|
flow 1.3.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):
bcColourConst / bcColourProfile overwrite ALL g ghost layers of the face with the prescribed colour, after clampFill. All g layers, not one: the MYC stencil of the first inner cell reads ±1, the donor-ring reconstruction reaches one cell further out, and the V3 height columns reach ±3, so a partially-filled band would let the clamped interior value back into the stencil through the outer layers.clampFill, unchanged) where the fluid LEAVES, and bcColourBackflow where the face velocity points back INTO the domain: there the ghost carries the prescribed backflow colour instead. This is OpenFOAM's inletOutlet / inletOutletFvPatchField (Rusche, PhD thesis 2002, §4), the standard VoF outlet: an outlet is a place where you know what leaves (whatever is inside) but must state what comes back. Zero-gradient on a backflow face re-injects whatever happens to be sitting at the outlet, which for a draining film means the film is fed back into the domain.clampFill IS the 90° neutral continuation (Afkhami & Bussmann, IJNMF 57:453, 2008, expressed as fractions); WO-S replaces it with the θ-consistent fill and a domain wall is just a flat SDF wall at the face.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:
bcColourConst), so its MYC normal is the degenerate normal of a constant field — there is no interface there to reconstruct;set_vof_inflow(face, 0.3)) is a statement about the incoming FLUX ("30 % of what enters is liquid"), not about a sub-cell interface position. The slab integral of a reconstructed plane would put all 0.3 of it on one side of the cell and let the flux jump between 0 and a as the slab thickness crosses the plane.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.