Loading...
Searching...
No Matches
cavity.h

The driven cavity benchmark: 2D boundary conditions.

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);
}
};
Float
see the Float page for the full documentation
field
see the field page for the full documentation
geo
see the geo page for the full documentation
space
see the space page for the full documentation
cavity
Definition cavity.h:25
cavity::streamf_field
static field streamf_field(space Ph)
Definition cavity.h:53
cavity::velocity_space
static space velocity_space(const geo &omega, string approx)
Definition cavity.h:26
cavity::streamf_space
static space streamf_space(geo omega, string approx)
Definition cavity.h:42
cavity::velocity_field
static field velocity_field(const space &Xh, Float alpha=1)
Definition cavity.h:37