Rheolef  7.1
an efficient C++ finite element environment
cavity.h

The driven cavity benchmark: 2D boundary conditions

struct cavity {
static space velocity_space (const geo& omega, string approx) {
space Xh (omega, approx, "vector");
Xh.block("top"); Xh.block("bottom");
if (omega.dimension() == 3) {
Xh.block("back"); Xh.block("front");
Xh[1].block("left"); Xh[1].block("right");
} else {
Xh.block("left"); Xh.block("right");
}
return Xh;
}
static field velocity_field (const space& Xh, Float alpha=1) {
field uh (Xh, 0.);
uh[0]["top"] = alpha;
return uh;
}
static space streamf_space (geo omega, string approx) {
string valued = (omega.dimension() == 3) ? "vector" : "scalar";
space Ph (omega, approx, valued);
Ph.block("top"); Ph.block("bottom");
if (omega.dimension() == 3) {
Ph.block("back"); Ph.block("front");
} else {
Ph.block("left"); Ph.block("right");
}
return Ph;
}
static field streamf_field (space Ph) {
return field(Ph, 0);
}
};
bdf::alpha
Float alpha[pmax+1][pmax+1]
Definition: bdf.icc:28
field
see the field page for the full documentation
cavity::streamf_field
static field streamf_field(space Ph)
Definition: cavity.h:53
space
see the space page for the full documentation
cavity::streamf_space
static space streamf_space(geo omega, string approx)
Definition: cavity.h:42
cavity
Definition: cavity.h:25
Float
see the Float page for the full documentation
cavity::velocity_space
static space velocity_space(const geo &omega, string approx)
Definition: cavity.h:26
cavity::velocity_field
static field velocity_field(const space &Xh, Float alpha=1)
Definition: cavity.h:37
geo
see the geo page for the full documentation