55 {
"solid",
"liquid",
"gas"};
60 void Foam::fv::homogeneousLiquidPhaseSeparation::readCoeffs
62 const dictionary&
dict
67 solubilityCurve_.reset
83 Foam::fv::homogeneousLiquidPhaseSeparation::YSat
94 solubilityCurve_->value(
T)
104 const word& modelType,
131 name +
":mDotByAlpha",
140 solubilityCurve_(nullptr),
163 this->multicomponentThermos(
true,
false);
172 multicomponentThermos.valid().second()
173 ? vfToVif(multicomponentThermos.second().rhoi(specieis().
second(),
p,
T))
179 return alphaSolution*mDotByAlphaSolution_/(rhoPrecipitate*v);
189 return alphaSolution*mDotByAlphaSolution_;
203 this->multicomponentThermos(
true,
false);
213 return Yi*rhoSolution/
max(mDotByAlphaSolution_, mDotRootVSmall);
219 #define DebugField(field) \
222 << #field << ' ' << field.dimensions() << " min/avg/max = " \
223 << gMin(field) << '/' << gAverage(field) << '/' << gMax(field) \
231 this->multicomponentThermos(
true,
false);
234 this->fluidMulticomponentThermos(
true,
false).first();
253 : vfToVif(thermos().
second().
W())
258 ? vfToVif(multicomponentThermos.
second().rhoi(specieis().
second(),
p,
T))
272 fluid_.phases()[phaseNames().
first()],
273 fluid_.phases()[phaseNames().
second()]
290 solubilityCurve_->value(
T)
324 switch (nucleateType_)
326 case nucleateType::solid:
327 case nucleateType::liquid:
328 talpha =
k*
T()/(3*
pi*
pow3(dMolc)*muSolution);
331 case nucleateType::gas:
340 cSat*
NNA*talpha*
exp(-deltaPhiStar/(
k*
T()))
345 mDotByAlphaSolution_ = J*iStar*mMolc;
359 const label i = index(alphaNames(), eqn.
psi().name());
367 eqn -=
fvm::Sp(mDotByAlphaSolution_, eqn.
psi());
380 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,.
static autoPtr< Function1< scalar > > New(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Select from dictionary.
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...
Initialise the NamedEnum HashTable from the static list of names.
Enum read(Istream &) const
Read a word from Istream and return the corresponding.
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 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.
Base-class for multi-component fluid thermodynamic properties.
virtual const volScalarField & mu() const =0
Dynamic viscosity of mixture [kg/m/s].
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.
Model for the homogeneous nucleation of a solid or liquid phase separating out of a liquid solution.
virtual void correct()
Correct the fvModel.
static const NamedEnum< nucleateType, 3 > nucleateTypeNames_
Names of the moment types.
homogeneousLiquidPhaseSeparation(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual tmp< DimensionedField< scalar, volMesh > > mDot() const
Return the mass transfer rate.
nucleateType
Enumeration for the nucleate types.
virtual bool read(const dictionary &dict)
Read source dictionary.
void addSup(const volScalarField &alpha, const volScalarField &rho, const volScalarField &heOrYi, fvMatrix< scalar > &eqn) const
Use phaseChange's source functions.
virtual tmp< DimensionedField< scalar, volMesh > > d() const
Return the diameter of nuclei.
virtual tmp< DimensionedField< scalar, volMesh > > tau() const
Return the nucleation time scale.
virtual tmp< DimensionedField< scalar, volMesh > > 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.
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.
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)
Fundamental dimensioned constants.
#define DebugField(field)
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
const dimensionedScalar k
Boltzmann constant.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionedScalar NNA
Avagadro number: default SI units: [1/kmol].
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimless
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimLength
labelList second(const UList< labelPair > &p)
const dimensionSet dimTemperature
dimensionedScalar log(const dimensionedScalar &ds)
labelList first(const UList< labelPair > &p)
const dimensionSet dimTime
scalarList W(const fluidMulticomponentThermo &thermo)
const dimensionSet dimDensity
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void cbrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
const unitConversion unitFraction