44 void Foam::fv::coefficientPhaseChange::readCoeffs(
const dictionary&
dict)
53 Foam::fv::coefficientPhaseChange::timesY1
55 tmp<volScalarField::Internal> mDot
58 const ThermoRefPair<multicomponentThermo> mcThermos =
59 thermos().thermos<multicomponentThermo>();
61 if (!mcThermos.valid().first() || species().empty())
66 if (species().size() == 1)
68 return mcThermos.first().Y()[specieis().first()]*mDot;
71 tmp<volScalarField::Internal> tY1 =
75 mcThermos.first().Y()[specieis(0).
first()]
78 for (
label mDoti = 1; mDoti < species().size(); ++ mDoti)
80 tY1.ref() += mcThermos.first().Y()[specieis(mDoti).first()];
88 Foam::fv::coefficientPhaseChange::mDotByAlpha1Y1()
const
99 const word& modelType,
110 readSpecies(coeffs(modelType,
dict), false)
124 return timesY1(alpha1_*mDotByAlpha1Y1());
138 const labelPair specieis = this->specieis(mDoti);
140 tmDot.ref() *= mcThermos.
first().Y()[specieis.
first()];
154 const label i = index(alphaNames(), eqn.
psi().name());
186 const label i = index(phaseNames(), eqn.
psi().group());
196 && species().found(Yi.
member())
199 eqn -=
fvm::Sp(alpha1_*mDotByAlpha1Y1(), Yi);
212 readCoeffs(coeffs(
dict));
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Mesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
Generic GeometricField class.
static word member(const word &name)
Return member (name without the extension)
const Type & first() const
Return first.
Class containing a pair of thermo references. Handles down-casting to more specific thermo types by c...
const Pair< bool > & valid() const
Access the validity flags.
ThermoRefPair< OtherThermoType > thermos() const
Cast to a different thermo type, with error checking.
const ThermoType & first() const
Access the first thermo.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
void read(const dictionary &, const unitConversion &defaultUnits=NullObjectRef< unitConversion >())
Update the value of dimensioned<Type>
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
This simple model generates a phase change between two phases calculated from the following expressio...
virtual tmp< DimensionedField< scalar, volMesh > > mDot() const
Return the total phase change rate.
virtual bool read(const dictionary &dict)
Read source dictionary.
coefficientPhaseChange(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
void addSup(const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn) const
Override the compressible continuity equation to add.
virtual void addSup(fvMatrix< scalar > &eqn) const
Add a source term to a field-less proxy equation.
Base class for phase change models.
void reReadSpecies(const dictionary &dict) const
Re-read the names of the transferring species.
virtual bool read(const dictionary &dict)
Read source dictionary.
void addSup(const volScalarField &alpha, const volScalarField &rho, const volScalarField &heOrYi, fvMatrix< scalar > &eqn) const
Override the energy equation to add the phase change heat, or.
Base-class for multi-component thermodynamic properties.
A class for managing temporary objects.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Calculate the gradient of the given field.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
labelList first(const UList< labelPair > &p)
const dimensionSet dimTime
word typedName(Name name)
Return the name of the object within the given type.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimMass
const dimensionSet dimArea