|
flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
flow — VoF rung V-BC (WO-R): the colour field's OPEN-BOUNDARY ghost rules and the out-of-domain mask that tells the Weymouth–Yue flux which donors are boundary DATA. More...
#include <Kokkos_Core.hpp>#include "mac_stencils.hpp"#include "policy.hpp"#include "vof/advect_wy.hpp"Go to the source code of this file.
Namespaces | |
| namespace | peclet |
| namespace | peclet::flow |
| namespace | peclet::flow::vof |
| namespace | peclet::flow::vof::bcdetail |
Functions | |
| void | peclet::flow::vof::bcdetail::axisDims (I3 e, int(&dims)[3], long(&strides)[3]) |
| void | peclet::flow::vof::buildOutsideMask (UCField m, I3 e, int g, I3 o, I3 gs, bool px, bool py, bool pz) |
| 1 for every ghost cell of the block that lies OUTSIDE the global domain on a non-periodic axis, 0 everywhere else (inner cells, and ghosts that are interior halo on a periodic axis or across a rank boundary). | |
| void | peclet::flow::vof::bcColourConst (SField f, I3 e, int g, int a, int s, double value) |
| Overwrite ALL g ghost layers of domain face (axis a, side s) with a constant colour. | |
| void | peclet::flow::vof::bcColourProfile (SField f, I3 e, int g, int a, int s, SField prof, int nc) |
| Same, with a per-position colour on the face's (b, c) plane. | |
| void | peclet::flow::vof::bcColourBackflow (SField f, I3 e, int g, int a, int s, SField un, double backflow) |
| inletOutlet on an outflow face: where the boundary face velocity points INTO the domain, the ghost band takes backflow; where it points out, the band is left as clampFill wrote it (zero-gradient, so what leaves is what is inside). | |
flow — VoF rung V-BC (WO-R): the colour field's OPEN-BOUNDARY ghost rules and the out-of-domain mask that tells the Weymouth–Yue flux which donors are boundary DATA.
Rung V2a gave the colour field exactly one non-periodic ghost policy: clampFill, the globally-clamped zero-gradient copy. That is the right rule for a WALL (a wall neither creates nor destroys colour, and the 90° neutral continuation is what the MYC/height stencils want), and it is the wrong rule for an INFLOW, where the colour of the incoming fluid is a prescribed boundary datum, not an extrapolation of the interior.
Three rules live here, one per domain-BC type (IbmSolver::setDomainBc):
wyFaceFlux fluxes the donor cell's PLIC SLAB: it reconstructs a plane in the donor from the donor's own 3³ colour stencil and integrates the liquid volume in the |a|-thick layer next to the face. For an interior donor that is the whole point of a geometric scheme. For a GHOST donor on an inflow face it is meaningless and actively wrong:
So the flux on a face whose donor lies outside the global domain is the ALGEBRAIC C_donor·a. wyFaceFluxBc (in advect_wy.hpp) is that rule; the mask built here is what selects it. Everything else — the dilation term, the sweep structure, the frozen flag — is untouched, so the conservation identity still telescopes: a boundary face's flux appears in exactly one inner cell's budget and nowhere else, which is what makes the colour budget of gate G1 (Σ eps C − ∫in + ∫out = const) close to round-off.
The mask marks EVERY ghost cell outside the global domain on a non-periodic axis, not just the inflow ones. It is installed on the advector only when a VoF boundary colour has actually been set (IbmSolver::vofBcActive_), so with no VoF BC the advector takes its validated V1 path bit for bit (WO-R gate G5). Where it IS installed, the change at a wall is nil (the wall's normal face velocity is zero, so the flux is zero on both branches) and the change at an outflow face is confined to backflow (an outgoing face's donor is the inner cell).
Definition in file colour_bc.hpp.