|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
flow — VoF phase change (Part II, rungs P0/P1): the container-free kernel set. More...
Go to the source code of this file.
Classes | |
| struct | peclet::flow::vof::PcGradFit |
Accumulator for dT/dn fitted through the interface value: T - T_G = G * phi, so G = sum_j w_j phi_j (T_j - T_G) / sum_j w_j phi_j^2. More... | |
| struct | peclet::flow::vof::PcGfmRow |
| WO-P3g item 2 — the Gibou–Fedkiw second-order one-sided (ghost-fluid) row. More... | |
Namespaces | |
| namespace | peclet |
| namespace | peclet::flow |
| namespace | peclet::flow::vof |
Functions | |
| double | peclet::flow::vof::plicArea (double mx, double my, double mz, double alpha) |
Area of the PLIC polygon {x in [0,1]^3 : m.x = alpha}, as a multiple of h^2. | |
| double | peclet::flow::vof::plicAreaMetric (double mx, double my, double mz, double alpha, const VofMetric &g) |
The PHYSICAL area of the PLIC polygon of an ANISOTROPIC cell, in hRef^2 (flow/doc/anisotropic_vof.md §2, §7 V5.1). | |
| double | peclet::flow::vof::pcUnitNormal (double mx, double my, double mz, double n[3]) |
| Unit (L2) interface normal from a PLIC normal of any scale. | |
| double | peclet::flow::vof::pcCentreDistance (double mx, double my, double mz, double alpha) |
Signed distance (in cells) from the CELL CENTRE to the PLIC plane, measured along n and POSITIVE ON THE GAS SIDE: phi(x) = (m.x - alpha)/|m|_2, evaluated at x = (1/2,1/2,1/2). | |
| double | peclet::flow::vof::pcOffsetDistance (double phic, const double n[3], double dx, double dy, double dz) |
Signed distance from the plane of the neighbour at INTEGER cell offset d, given the centre distance phic of the reference cell: phi_j = phi_c + d.n (cells, positive in the gas). | |
| double | peclet::flow::vof::pcGradWeight (double dx, double dy, double dz, const double n[3]) |
Malan's collinearity weight for a sample at cell offset d: w = xi / |d| with xi = (d.n)^2/|d|^2 — i.e. | |
| void | peclet::flow::vof::pcGradAdd (PcGradFit &f, double w, double phi, double T, double Tg) |
Add one pure-phase sample at normal distance phi with temperature T. | |
| double | peclet::flow::vof::pcGradSolve (const PcGradFit &f) |
The fitted normal derivative dT/dn (0 if the side carried no usable sample). | |
| double | peclet::flow::vof::pcCurvedDistance (double phi, double dx, double dy, double dz, const double n[3], double kappa) |
| WO-P3f — the sample's distance to the CURVED interface, not to the tangent plane. | |
| double | peclet::flow::vof::pcGradSolve2 (const PcGradFit &f) |
The QUADRATIC one-sided fit (WO-P23): T - T_G = G phi + Q phi^2, returning G. | |
| double | peclet::flow::vof::pcMassFlux (double kg, double gradG, double kl, double gradL, double hlv) |
mdot = (k_g dT_g/dn - k_l dT_l/dn)/h_lv with n the PLIC normal (liquid -> gas). | |
| double | peclet::flow::vof::pcRegressVolume (double mdot, double area, double dt, double rhoL) |
Liquid volume (fraction of a cell) removed from an interfacial cell in one step: dV = mdot A_G dt / rho_l. | |
| double | peclet::flow::vof::pcDivSource (double mdot, double area, double rhoG, double rhoL) |
The volumetric divergence source of one interfacial cell (1/s, cell volume = 1): S = mdot A_G (1/rho_g - 1/rho_l). | |
| double | peclet::flow::vof::pcInterfaceTemperature (double Tsat, double mdot, double Rint) |
Interfacial temperature under the Schrage-derived interfacial heat-transfer resistance (Bureš & Sato): T_G = T_sat + mdot R_int. | |
| double | peclet::flow::vof::pcCarriedValue (double Tg, double grad, double phic) |
| The plane-anchored (ghost-fluid) interfacial Dirichlet condition (WO-P23, the first item). | |
| double | peclet::flow::vof::pcGfmTheta (double phiC, double nd, double s, double thetaMin, double thetaMax) |
thetaMin keeps the coefficient finite when the plane grazes the cell centre (the standard GFM clamp); thetaMax bounds it when the plane sits deep inside the far cell (|phi_c| <= sqrt(3)/2, so theta <= 1 + sqrt(3)/2) AND when the interface is nearly PARALLEL to this face's axis, where |phi_i|/|n_d| diverges and the honest statement is "the interface is far
along this line". | |
| double | peclet::flow::vof::pcFaceConductivity (double ki, double kj, bool mi, bool mj) |
Face conductivity of the variable-coefficient energy operator, k(C) arithmetic in the colour with ONE exception: where one of the two cells carries the per-cell Dirichlet condition (an interfacial cell pinned at the plane-anchored T_G) the face takes the OTHER cell's k. | |
| double | peclet::flow::vof::pcPhaseMix (double vg, double vl, double c) |
Linear-in-C phase property (k, rho c_p), written so that C = 0 and C = 1 return the endpoint EXACTLY — the same construction as vofPhaseRho in momentum_advect.hpp. | |
| bool | peclet::flow::vof::pcPushWeights (const double n[3], double sgn, const bool avail[3], int step[3], double w[3]) |
| The clip-and-redistribute allocation: which face neighbours a clipped cell's residue is pushed into, and in what fractions. | |
| double | peclet::flow::vof::pcGfmThetaK (double phiC, double nd, double s, double kappa, double thetaMin, double thetaMax) |
| WO-P3g item 3 — the curvature-consistent GFM distance. | |
| double | peclet::flow::vof::pcGfmThetaKAniso (double phiC, const double n[3], int d, double s, double kappa, double thetaMin, double thetaMax, const VofMetric &g) |
The same on an ANISOTROPIC cell (Phase 3, flow/doc/anisotropic_vof.md §7, V5.3). | |
| PcGfmRow | peclet::flow::vof::pcGfmRow (double theta, bool behind, int order) |
| double | peclet::flow::vof::pcOperatorMassFlux (double q, double coefSum, double area, double hlv, double Rint) |
WO-P3g item 1 — mdot from the ENERGY OPERATOR's own interfacial flux. | |
| bool | peclet::flow::vof::pcIsInterfacial (double c, double eps) |
Is this a cell the regression acts on? The PLIC contract of advect_wy.hpp (wyIsMixed) with an explicit wisp guard: a cell whose colour is round-off residue has no meaningful plane, and giving it an area would inject an unbounded mdot into the census. | |
flow — VoF phase change (Part II, rungs P0/P1): the container-free kernel set.
Container-free by contract, exactly like plic.hpp: scalars and small local arrays only — no Kokkos::View, no grid indexing, no halo types. The solver-side driver (the block walk, the fields, the MPI ghosts) lives in flow_ibm.hpp; everything that is geometry or physics is here so the block container (Part III) and the AMR path can share one copy.
mdot (kg m^-2 s^-1, solver units) on interfacial cells, either prescribed (P0) or from the two one-sided pure-cell temperature gradients (P1): mdot = ( k_g grad(T_g).n - k_l grad(T_l).n ) / h_lv , n = m/|m|_2, LIQUID -> GASThe sign convention matters and the work-order text has it the other way round. The interfacial energy balance is
mdot h_lv = (q_l - q_g).n with q = -k grad T and n pointing out of the liquid, which gives the form above. Check it on the Stefan problem: superheated vapour at x < x_G, saturated liquid at x > x_G, so n = -x_hat, grad(T_g).n = -dT_g/dx > 0, grad(T_l) = 0 and mdot = k_g |dT_g/dx| / h_lv > 0 — evaporation, as it must be. Writing (k_l grad(T_l) - k_g grad(T_g)).n with the SAME n (the PLIC normal, which points into the gas) would condense a superheated vapour.dV = mdot * A_G * dt / rho_l , A_G = the PLIC polygon area of the celland the new colour is ‘C’ = C - dV
— which IS the plane shift, because plicVolume(m, plicAlpha(m, C - dV)) == C - dVidentically.plicAreabelow supplies A_Ganalytically (no finite difference ofplicVolumein alpha: that is exact only where V(alpha)` is locally linear, i.e. NOT in the two cubic branches).C - dV < 0 the cell is emptied and the deficit is pushed into the face neighbours on the LIQUID side (along -n), weighted by n_d^2; the mirror rule handles C - dV > 1 (condensation) along +n. Conservative to round-off.S = mdot A_G (1/rho_g - 1/rho_l) / V_cell deposited into the nearest PURE GAS cell along +n, so the interfacial cell's face velocities stay the LIQUID velocity and Weymouth–Yue advects the colour with a field it is entitled to.Cell size h = 1 (the solver's cell units), so A_G is a fraction of a cell face, V_cell = 1, mdot/rho is a velocity in cells/s and S is a 1/s divergence. Densities are in kg/cell^3, k in W/(cell K), h_lv in J/kg.
Definition in file phase_change.hpp.