38 namespace regionModels
40 namespace surfaceFilmModels
77 surfaceFilmRegionModel& film,
81 phaseChangeModel(typeName, film,
dict),
82 deltaMin_(coeffDict_.
get<scalar>(
"deltaMin")),
83 L_(coeffDict_.
get<scalar>(
"L")),
84 TbFactor_(coeffDict_.getOrDefault<scalar>(
"TbFactor", 1.1)),
85 YInfZero_(coeffDict_.getOrDefault(
"YInfZero", false))
91 template<
class YInfType>
106 const label vapId =
thermo.carrierId(filmThermo.
name());
124 const scalar Wvap =
thermo.carrier().W(vapId);
127 const scalar Wliq = filmThermo.
W();
136 const scalar pc = pInf[celli];
139 const scalar Tb = filmThermo.
Tb(pc);
145 const scalar pSat = filmThermo.
pv(pc, Tloc);
148 const scalar hVap = filmThermo.
hl(pc, Tloc);
154 const scalar
Cp = filmThermo.
Cp(pc, Tloc);
155 const scalar Tcorr =
max(0.0,
T[celli] - Tb);
156 const scalar qCorr = limMass[celli]*
Cp*(Tcorr);
162 const scalar rhoInfc = rhoInf[celli];
165 const scalar muInfc = muInf[celli];
168 const scalar
Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
171 const scalar Ys = Wliq*pSat/(Wliq*pSat + Wvap*(pc - pSat));
174 const scalar Dab = filmThermo.
D(pc, Tloc);
177 const scalar Sc = muInfc/(rhoInfc*(Dab + ROOTVSMALL));
180 const scalar
Sh = this->
Sh(Re, Sc);
183 const scalar hm =
Sh*Dab/(
L_ + ROOTVSMALL);
186 dm = dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys);
189 dMass[celli] +=
min(limMass[celli],
max(dm, 0));
193 dEnergy[celli] += dm*hs[celli];
214 const thermoSingleLayer&
film = filmType<thermoSingleLayer>();
215 const label vapId =
film.thermo().carrierId(
film.filmThermo().
name());
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual const word & name() const =0
Return the specie name.
virtual const volVectorField & Us() const =0
Return the film surface velocity [m/s].
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual const volScalarField & hs() const =0
Return the film surface temperature [J/kg].
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].
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual scalar hl(const scalar p, const scalar T) const =0
Return latent heat [J/kg].
dimensionedScalar sqrt(const dimensionedScalar &ds)
void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy, const YInfType &YInf)
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Macros for easy insertion into run-time selection tables.
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
bool YInfZero_
Switch to treat YInf as zero.
#define forAll(list, i)
Loop across all elements in list.
scalar Sh(const scalar Re, const scalar Sc) const
Return Sherwood number as a function of Reynolds and Schmidt numbers.
standardPhaseChange(const standardPhaseChange &)=delete
No copy construct.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const scalar TbFactor_
Boiling temperature factor / [].
dimensionedScalar cbrt(const dimensionedScalar &ds)
virtual const volScalarField & delta() const =0
Return the film thickness [m].
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
const word & name() const
Name function is needed to disambiguate those inherited from regIOobject and dictionary.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
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].
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Standard phase change model with modification for boiling.
const volScalarField & Cp
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalarField Re(const UList< complex > &cmplx)
Extract real component.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual scalar W() const =0
Return molecular weight [kg/kmol].
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const scalar deltaMin_
Minimum film height for model to be active.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
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 =0
Return the film mean temperature [K].