44 void Foam::fv::homogeneousNucleation::readCoeffs(
const dictionary&
dict)
50 void Foam::fv::homogeneousNucleation::correctDAndMDot()
const
54 Pair<tmp<volScalarField::Internal>> dAndMDotByAlphaSolution =
55 this->dAndMDotByAlphaSolution();
57 d_ = dAndMDotByAlphaSolution.first();
59 mDotByAlphaSolution_ = dAndMDotByAlphaSolution.second();
60 infoField(
"mDotByAlphaSolution", mDotByAlphaSolution_, debug);
65 mDot_ = alphaSolution*mDotByAlphaSolution_;
66 infoField(
"mDot", mDot_);
77 return vfToVif(fluid_.sigma(
phaseInterface(solution_, nucleate_)));
86 const word& modelType,
96 solution_(fluid_.phases()[phaseNames().
first()]),
97 nucleate_(fluid_.phases()[phaseNames().
second()]),
159 this->multicomponentThermos(
true,
false);
169 ? vfToVif(multicomponentThermos.
second().rhoi(specieis().
second(),
p,
T))
175 return mDot_/(rhoNucleate*v);
196 this->multicomponentThermos(
true,
false);
208 Yi*WSolution/thermoSolution.
Wi(specieis().
first())
211 return Xi*rhoSolution/
max(mDotByAlphaSolution_, mDotRootVSmall);
218 pressureEquationIndex_ = 0;
235 (&
alpha == &solution_ || &
alpha == &nucleate_)
236 && (&
rho == &solution_.rho() || &
rho == &nucleate_.rho())
237 && &eqn.
psi() == &p_rgh_
242 if (pressureEquationIndex_ % 2 == 0) correctDAndMDot();
243 pressureEquationIndex_ ++;
255 readCoeffs(coeffs(
dict));
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const Type & second() const
Return second.
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.
const ThermoType & first() const
Access the first thermo.
const ThermoType & second() const
Access the second thermo.
virtual tmp< volScalarField > W() const =0
Molecular weight [kg/kmol].
virtual const volScalarField & T() const =0
Temperature [K].
virtual tmp< volScalarField > rho() const =0
Density [kg/m^3].
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
Base class for homogeneous nucleation models based on classical nucleation theory.
virtual void correct()
Correct the fvModel.
homogeneousNucleation(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual tmp< DimensionedField< scalar, fvMesh > > mDot() const
Return the mass transfer rate.
virtual bool read(const dictionary &dict)
Read source dictionary.
tmp< volScalarField::Internal > sigma() const
Return the surface tension coefficient between the phases.
void addSup(const volScalarField &alpha, const volScalarField &rho, const volScalarField &heOrYi, fvMatrix< scalar > &eqn) const
Use phaseChange's source functions.
virtual tmp< DimensionedField< scalar, fvMesh > > d() const
Return the diameter of nuclei.
virtual tmp< DimensionedField< scalar, fvMesh > > tau() const
Return the nucleation time scale.
virtual tmp< DimensionedField< scalar, fvMesh > > nDot() const
Return the number rate at which nuclei are generated.
virtual void addSup(fvMatrix< scalar > &eqn) const
Add a source term to a field-less proxy equation.
Base class for phase change models.
void reReadSpecie(const dictionary &dict) const
Re-read the names of the transferring specie.
virtual bool read(const dictionary &dict)
Read source dictionary.
Base-class for multi-component thermodynamic properties.
virtual PtrList< volScalarField > & Y()=0
Access the mass-fraction fields.
virtual dimensionedScalar Wi(const label speciei) const =0
Molecular weight [kg/kmol].
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
Class to represent a system of phases.
Abstract base class for run-time selectable region solvers.
A class for managing temporary objects.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
defineTypeNameAndDebug(bound, 0)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
labelList second(const UList< labelPair > &p)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
labelList first(const UList< labelPair > &p)
const dimensionSet & dimTime
const dimensionSet & dimDensity
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.