flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
peclet::flow::vof::VofEnergyAdvector Class Reference

#include <energy_advect.hpp>

Public Member Functions

void init (const WyAdvector &w, double rcpG, double rcpL)
 
bool initialized () const
 
void setPhaseRcp (double g, double l)
 
double phaseRcpG () const
 
double phaseRcpL () const
 
SField temperature () const
 The transported temperature on the advector's block (inner cells mirror the solver's scalar).
 
void advect (WyAdvector &w, double dt, long step)
 One consistent colour + energy Weymouth-Yue step.
 
void extrema (double &lo, double &hi) const
 Min/max of the transported temperature over the inner region (a boundedness read-out).
 
void energyUpdate (WyAdvector &w, int d, double dth)
 The DEVIATION form of the update, and it is not cosmetic.
 

Public Attributes

bool energyMuscl = false
 MinMod-limited donor reconstruction of the face temperature, instead of the DEFAULT plain donor-cell (first-order upwind) value.
 
std::function< void(SField)> exchange
 Ghost policy for the temperature — the halo/periodic exchange plus the block's non-periodic zero-gradient clamp.
 

Detailed Description

Definition at line 59 of file energy_advect.hpp.

Member Function Documentation

◆ init()

void peclet::flow::vof::VofEnergyAdvector::init ( const WyAdvector &  w,
double  rcpG,
double  rcpL 
)
inline
Parameters
wthe colour advector whose block, planes, fluxes and face velocities are shared
rcpGrho c_p of the C = 0 phase (gas)
rcpLrho c_p of the C = 1 phase (liquid)

Definition at line 64 of file energy_advect.hpp.

References peclet::flow::I3::x, peclet::flow::I3::y, and peclet::flow::I3::z.

Referenced by peclet::flow::Solver< Grid >::buildVofBlock(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergy().

◆ initialized()

◆ setPhaseRcp()

void peclet::flow::vof::VofEnergyAdvector::setPhaseRcp ( double  g,
double  l 
)
inline

◆ phaseRcpG()

double peclet::flow::vof::VofEnergyAdvector::phaseRcpG ( ) const
inline

Definition at line 82 of file energy_advect.hpp.

◆ phaseRcpL()

double peclet::flow::vof::VofEnergyAdvector::phaseRcpL ( ) const
inline

Definition at line 83 of file energy_advect.hpp.

◆ temperature()

SField peclet::flow::vof::VofEnergyAdvector::temperature ( ) const
inline

The transported temperature on the advector's block (inner cells mirror the solver's scalar).

Definition at line 85 of file energy_advect.hpp.

Referenced by peclet::flow::Solver< Grid >::advectVof(), peclet::flow::Solver< Grid >::advectVofKinematic(), and peclet::flow::Solver< Grid >::buildVofBlock().

◆ advect()

void peclet::flow::vof::VofEnergyAdvector::advect ( WyAdvector &  w,
double  dt,
long  step 
)
inline

One consistent colour + energy Weymouth-Yue step.

Replaces WyAdvector::advect(dt, step) — do not call both. T_ must hold the current temperature on the inner cells on entry.

Definition at line 112 of file energy_advect.hpp.

References energyUpdate(), exchange, initialized(), peclet::flow::vof::kWySweepPerm, and perm().

Referenced by peclet::flow::Solver< Grid >::advectVof(), and peclet::flow::Solver< Grid >::advectVofKinematic().

◆ extrema()

void peclet::flow::vof::VofEnergyAdvector::extrema ( double &  lo,
double &  hi 
) const
inline

Min/max of the transported temperature over the inner region (a boundedness read-out).

Definition at line 139 of file energy_advect.hpp.

References peclet::flow::L3().

Referenced by peclet::flow::Solver< Grid >::phaseChangeDiagnostics().

◆ energyUpdate()

void peclet::flow::vof::VofEnergyAdvector::energyUpdate ( WyAdvector &  w,
int  d,
double  dth 
)
inline

The DEVIATION form of the update, and it is not cosmetic.

Algebraically

T_new = H_new / rcp(C_new)
      = T_i + [ Phi_- (That_- - T_i) - Phi_+ (That_+ - T_i) ] / rcp(C_new)

because the three terms -drcp dC T_i + (Phi_- - Phi_+) + rcp^_i (a_+ - a_-) cancel exactly (that IS the consistency identity). Evolving the second form makes the cancellation happen in EXACT arithmetic instead of between two O(rcp_l T) floating-point numbers, so a uniform temperature is preserved BITWISE at any heat-capacity ratio rather than to ~1e-12 relative — the same reason momentum_advect.hpp::momentumUpdate evolves u_old + dev/rho_new.

Definition at line 171 of file energy_advect.hpp.

References energyMuscl, peclet::flow::L3(), peclet::flow::vof::pcPhaseMix(), peclet::flow::vof::vofMinmod(), peclet::flow::I3::x, and peclet::flow::I3::y.

Referenced by advect().

Member Data Documentation

◆ energyMuscl

bool peclet::flow::vof::VofEnergyAdvector::energyMuscl = false

MinMod-limited donor reconstruction of the face temperature, instead of the DEFAULT plain donor-cell (first-order upwind) value.

OFF by default; turn it on deliberately and record it.

Why it exists, measured: the geometric energy flux is what makes the transport CONSISTENT with the colour, but its donor-cell temperature carries the first-order upwind numerical diffusion |u| h (1 - CFL)/2, which thickens the thermal boundary layer and therefore LOWERS the interfacial gradient — exactly the quantity mdot is. On the P3 Scriven bubble at Ja = 0.5 the consistent transport with plain upwind reads -2.24 % on R(t) against -1.46 % for the scalar module's Koren TVD advection, i.e. the consistency is bought with accuracy at that Jakob number. The limited reconstruction buys it back.

Why it is not the default: this is the energy twin of momentumMuscl, and there the slope's coefficient is unbounded in the density ratio on a control volume the sweep empties. The temperature has no such amplification (the recovery divides by rho c_p(C^{new}), which the flux is consistent with), but the boundedness statement is weaker than plain upwind's and the campaign's rule is that a scheme change ships as a measured switch.

Definition at line 103 of file energy_advect.hpp.

Referenced by energyUpdate(), peclet::flow::Solver< Grid >::phaseChangeEnergyMuscl(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergyMuscl().

◆ exchange

std::function<void(SField)> peclet::flow::vof::VofEnergyAdvector::exchange

Ghost policy for the temperature — the halo/periodic exchange plus the block's non-periodic zero-gradient clamp.

Set by the solver; NOT the colour's own hook, because that one also runs the solid-band fill and the VoF boundary-colour rules, neither of which is a temperature.

Definition at line 108 of file energy_advect.hpp.

Referenced by advect(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergy().


The documentation for this class was generated from the following file: