pub enum FvModel {
SemiImplicit(SemiImplicitSource),
SolidificationMelting(SolidificationMelting),
SolidificationPorosity(SolidificationPorosity),
VofSolidificationMelting(VofSolidificationMelting),
}Expand description
One optional source term.
Enum dispatch rather than trait objects, per the workspace rule: the set of
source models is closed and known at compile time, adding one forces every
match to be revisited, and rust-analyzer can navigate to each variant —
none of which is true of upstream’s runtime-selection table.
§Which equations a model contributes to
Not every model contributes to every equation.
contributes_to reports what a model acts on,
mirroring upstream’s addSupFields, so applying a whole collection to an
equation only invokes the models that have something to say about it.
Variants§
SemiImplicit(SemiImplicitSource)
A general explicit/implicit source, upstream semiImplicitSource.
SolidificationMelting(SolidificationMelting)
Solidification and melting by the enthalpy-porosity method, upstream
solidificationMelting. The physically complete phase-change model:
tracks a liquid fraction, absorbs latent heat, carries its own
Boussinesq buoyancy.
SolidificationPorosity(SolidificationPorosity)
Solidification as a bare porous blockage, upstream
porosityModels::solidification. No latent heat and no buoyancy —
it only freezes the momentum out of cold cells.
Strictly, upstream files this under porosityModel rather than
fvModel; it is folded into this enum because from a solver’s point of
view it is the same thing — a term added to the momentum equation over
a cell zone — and keeping it in a parallel mechanism would double the
wiring for no gain.
VofSolidificationMelting(VofSolidificationMelting)
Solidification and melting of a VoF phase, upstream
VoFSolidificationMelting. Needs a VoF phase fraction supplied from
outside; see FvModels::correct.
Implementations§
Source§impl FvModel
impl FvModel
Sourcepub fn contributes_to(&self, field: &str) -> bool
pub fn contributes_to(&self, field: &str) -> bool
Whether this model contributes to the equation for field.
Upstream’s addsSupToField. A model asked for a field it does not act
on contributes nothing, rather than erroring — that is how a single
collection can be handed to every equation a solver assembles.