Rheolef  7.2
an efficient C++ finite element environment
cavity_3d.h

The driven cavity benchmark: 3D boundary conditions

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