35 namespace regionModels
37 namespace surfaceFilmModels
65 return 0.037*
pow(Re, 0.8)*
cbrt(Sc);
79 deltaMin_(
readScalar(coeffDict_.lookup(
"deltaMin"))),
81 TbFactor_(coeffDict_.lookupOrDefault<scalar>(
"TbFactor", 1.1)),
82 YInfZero_(coeffDict_.lookupOrDefault<
Switch>(
"YInfZero",
false))
94 template<
class YInfType>
109 const label vapId = thermo.carrierId(filmThermo.
name());
127 const scalar Wvap = thermo.carrier().Wi(vapId);
130 const scalar Wliq = filmThermo.
W();
139 const scalar pc = pInf[celli];
142 const scalar Tb = filmThermo.
Tb(pc);
148 const scalar pSat = filmThermo.
pv(pc, Tloc);
151 const scalar hVap = filmThermo.
hl(pc, Tloc);
157 const scalar
Cp = filmThermo.
Cp(pc, Tloc);
158 const scalar Tcorr =
max(0.0, T[celli] - Tb);
159 const scalar qCorr = limMass[celli]*Cp*(Tcorr);
165 const scalar rhoInfc = rhoInf[celli];
168 const scalar muInfc = muInf[celli];
171 const scalar Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
174 const scalar Ys = Wliq*pSat/(Wliq*pSat + Wvap*(pc - pSat));
177 const scalar Dab = filmThermo.
D(pc, Tloc);
180 const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall));
183 const scalar
Sh = this->
Sh(Re, Sc);
186 const scalar hm = Sh*Dab/(
L_ + rootVSmall);
189 dm = dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys);
192 dMass[celli] +=
min(limMass[celli],
max(dm, 0));
196 dEnergy[celli] += dm*hs[celli];
#define forAll(list, i)
Loop across all elements in list.
virtual const word & name() const =0
Return the specie name.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
virtual scalar Cp(const scalar p, const scalar T) const =0
Return specific heat capacity [J/kg/K].
const scalar L_
Length scale / [m].
virtual scalar hl(const scalar p, const scalar T) const =0
Return latent heat [J/kg].
dimensionedScalar sqrt(const dimensionedScalar &ds)
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.
const volScalarField & rhoPrimary() const
Density [kg/m^3].
rhoReactionThermo & thermo
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Macros for easy insertion into run-time selection tables.
Base class for surface film phase change models.
const volScalarField & muPrimary() const
Viscosity [Pa.s].
const filmThermoModel & filmThermo() const
Film thermo.
const volVectorField & UPrimary() const
Velocity [m/s].
scalar Sh(const scalar Re, const scalar Sc) const
Return Sherwood number as a function of Reynolds and Schmidt numbers.
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
standardPhaseChange(surfaceFilmRegionModel &film, const dictionary &dict)
Construct from surface film model.
virtual ~standardPhaseChange()
Destructor.
const scalar TbFactor_
Boiling temperature factor / [].
dimensionedScalar cbrt(const dimensionedScalar &ds)
const PtrList< volScalarField > & YPrimary() const
Specie mass fractions [0-1].
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].
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 > &)
void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy, YInfType YInf)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual scalar W() const =0
Return molecular weight [kg/kmol].
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].
scalar Cp(const scalar p, const scalar T) const
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual const volScalarField & rho() const
Return the film density [kg/m^3].
const scalar deltaMin_
Minimum film height for model to be active.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
const SLGThermo & thermo() const
Return const reference to the SLGThermo object.
Switch YInfZero_
Switch to treat YInf as zero.
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].