40 namespace regionModels
42 namespace surfaceFilmModels
52 waxSolventEvaporation,
70 return 0.037*
pow(Re, 0.8)*
cbrt(Sc);
98 typeName +
":Wsolvent",
108 typeName +
":Ysolvent0",
119 typeName +
":Ysolvent",
127 deltaMin_(
readScalar(coeffDict_.lookup(
"deltaMin"))),
129 TbFactor_(coeffDict_.lookupOrDefault<scalar>(
"TbFactor", 1.1)),
130 YInfZero_(coeffDict_.lookupOrDefault<
Switch>(
"YInfZero",
false)),
146 template<
class YInfType>
182 const scalar Wvap = thermo.
carrier().
Wi(vapId);
191 typeName +
":evapRateCoeff",
206 typeName +
":evapRateInf",
217 bool filmPresent =
false;
225 const scalar Ysolvent =
Ysolvent_[celli];
228 const scalar Xsolvent
230 Ysolvent*Wsolvent/((1 - Ysolvent)*Wwax + Ysolvent*Wsolvent)
234 const scalar rhoInfc = rhoInf[celli];
237 const scalar pc = pInf[celli];
240 const scalar Tb = filmThermo.
Tb(pc);
245 const scalar pPartialCoeff
250 scalar XsCoeff = pPartialCoeff/pc;
253 scalar Xs = XsCoeff*Xsolvent;
258 <<
"Solvent vapour pressure > ambient pressure" 268 XsCoeff/(XsCoeff*Xsolvent*Wsolvent + (1 - Xs)*Wvap)
272 const scalar muInfc = muInf[celli];
275 const scalar Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
278 const scalar Dab = filmThermo.
D(pc, Tloc);
281 const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall));
284 const scalar
Sh = this->
Sh(Re, Sc);
287 evapRateCoeff[celli] = rhoInfc*Sh*Dab/(
L_ + rootVSmall);
295 *evapRateCoeff[celli]*(YsCoeff*Ysolvent - YInf[celli]),
300 if (dm > limMass[celli])
302 evapRateCoeff[celli] *= limMass[celli]/dm;
305 evapRateInf[celli] = evapRateCoeff[celli]*YInf[celli];
306 evapRateCoeff[celli] *= YsCoeff;
362 dt*magSf*rhoInf*(evapRateCoeff*
Ysolvent_ + evapRateInf)
volScalarField Ysolvent_
Solvent mass-fraction.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
#define forAll(list, i)
Loop across all elements in list.
virtual const word & name() const =0
Return the specie name.
virtual ~waxSolventEvaporation()
Destructor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual const volScalarField & deltaRho() const
Return the film thickness*density (helper field) [kg/m^3].
Base class for surface film models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Base class for film thermo models.
autoPtr< Function1< scalar > > activityCoeff_
Activity coefficient as a function of solvent mole fraction.
uniformDimensionedScalarField Wwax_
Molecular weight of wax [kg/kmol].
dimensionedScalar sqrt(const dimensionedScalar &ds)
volScalarField & rhoSp()
Mass [kg/m^2/s].
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volVectorField & Us() const
Return the film surface velocity [m/s].
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
virtual scalar Wi(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const volScalarField & rhoPrimary() const
Density [kg/m^3].
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
rhoReactionThermo & thermo
const Time & time() const
Return the top-level database.
const scalar deltaMin_
Minimum film height for model to be active.
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Macros for easy insertion into run-time selection tables.
const scalar TbFactor_
Boiling temperature factor.
Base class for surface film phase change models.
const volScalarField & muPrimary() const
Viscosity [Pa.s].
const filmThermoModel & filmThermo() const
Film thermo.
const dimensionSet & dimensions() const
Return dimensions.
const volVectorField & UPrimary() const
Velocity [m/s].
const scalar L_
Length scale [m].
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
dimensionedScalar cbrt(const dimensionedScalar &ds)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
const word & constant() const
Return constant name.
const Type & value() const
Return const reference to value.
virtual const surfaceScalarField & phi() const
Return the film flux [kg m/s].
const fvMesh & regionMesh() const
Return the region mesh database.
const PtrList< volScalarField > & YPrimary() const
Specie mass fractions [0-1].
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
void min(const dimensioned< Type > &)
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
virtual scalar D(const scalar p, const scalar T) const =0
Return diffusivity [m2/s].
virtual scalar Tb(const scalar p) const =0
Return boiling temperature [K].
const volScalarField & pPrimary() const
Pressure [Pa].
Calculate the divergence of the given field.
Switch YInfZero_
Switch to treat YInf as zero.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
uniformDimensionedScalarField Wsolvent_
Molecular weight of liquid [kg/kmol].
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const volScalarField & delta() const
Return const access to the film thickness [m].
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionSet dimDensity
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Calculate the matrix for the divergence of the given field and flux.
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m^2].
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void max(const dimensioned< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar Sh(const scalar Re, const scalar Sc) const
Return Sherwood number as a function of Reynolds and Schmidt numbers.
virtual const volScalarField & rho() const
Return the film density [kg/m^3].
uniformDimensionedScalarField Ysolvent0_
Initial solvent mass-fraction.
waxSolventEvaporation(surfaceFilmRegionModel &film, const dictionary &dict)
Construct from surface film model.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(kinematicSingleLayer, 0)
const SLGThermo & thermo() const
Return const reference to the SLGThermo object.
void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy, YInfType YInf)
Calculate the matrix for implicit and explicit sources.
virtual scalar pv(const scalar p, const scalar T) const =0
Return vapour pressure [Pa].
Thermodynamic form of single-cell layer surface film model.
virtual const volScalarField & T() const
Return the film mean temperature [K].
const dimensionSet dimVelocity