|
flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
flow — cell-centred scalar transport (advection–diffusion) on the cut-cell grid. More...
#include <Kokkos_Core.hpp>#include <string>#include "mac_cutcell.hpp"#include "staggered_advection.hpp"Go to the source code of this file.
Classes | |
| struct | peclet::flow::ScalarField |
Namespaces | |
| namespace | peclet |
| namespace | peclet::flow |
Enumerations | |
| enum class | peclet::flow::ScalarBc { peclet::flow::Periodic = 0 , peclet::flow::Neumann = 1 , peclet::flow::Dirichlet = 2 } |
Functions | |
| void | peclet::flow::scalarBuildDiffusionOpen (CCField AC, CCField AW, CCField AE, CCField AS, CCField AN, CCField AB, CCField AT, CCConst ox, CCConst oy, CCConst oz, double D, double idt, C3 e, int g) |
| void | peclet::flow::scalarBuildRhs (CCField b, CCConst cOld, CCConst U, CCConst V, CCConst W, CCConst ox, CCConst oy, CCConst oz, double idt, int scheme, C3 e, int g) |
flow — cell-centred scalar transport (advection–diffusion) on the cut-cell grid.
A transported scalar c (temperature, concentration, phase fraction) obeys, in the solver's divided-by-dt convention (dx = 1 grid units; physical diffusivity converted by the Python layer):
(1/dt)(c^{n+1} - c^n) + div(open u c) = div(open D grad c) + S
Diffusion is backward-Euler implicit (an openness-weighted 7-band operator, solved by the same red-black Gauss–Seidel as the pressure Poisson — cutcellSmoothColor); advection is explicit, conservative flux-form, reusing the momentum limiter helpers (sadv::tvd / sou / fou_flux) with the MAC face-normal velocities (staggered: C[fd].u is the -fd face velocity, co-located with the face openness). Closed faces (openness 0) carry no flux and no diffusion, so an immersed solid is adiabatic (zero-flux) for free and solid cells stay frozen (A_C = 1/dt, all off-diagonals 0).
This header holds the field-agnostic kernels + the per-scalar state; the Solver owns the scalars and calls advanceScalars() at the end of step() with the just-projected divergence-free velocity.
Definition in file scalar_transport.hpp.