40 namespace regionModels
42 namespace surfaceFilmModels
52 waxSolventEvaporation,
70 return 0.037*
pow(Re, 0.8)*
cbrt(Sc);
92 coeffDict_.lookup<scalar>(
"Wwax")
102 coeffDict_.lookup<scalar>(
"Wsolvent")
127 deltaMin_(coeffDict_.lookup<scalar>(
"deltaMin")),
128 L_(coeffDict_.lookup<scalar>(
"L")),
129 TbFactor_(coeffDict_.lookupOrDefault<scalar>(
"TbFactor", 1.1)),
130 YInfZero_(coeffDict_.lookupOrDefault<
Switch>(
"YInfZero",
false)),
146 template<
class YInfType>
184 const scalar Wvap = thermo.
carrier().
Wi(vapId);
219 bool filmPresent =
false;
227 const scalar Ysolvent =
Ysolvent_[celli];
230 const scalar Xsolvent
232 Ysolvent*Wsolvent/((1 - Ysolvent)*Wwax + Ysolvent*Wsolvent)
236 const scalar rhoInfc = rhoInf[celli];
239 const scalar pc = pInf[celli];
242 const scalar Tb = filmThermo.
Tb(pc);
247 const scalar pPartialCoeff
252 scalar XsCoeff = pPartialCoeff/pc;
255 scalar Xs = XsCoeff*Xsolvent;
260 <<
"Solvent vapour pressure > ambient pressure" 270 XsCoeff/(XsCoeff*Xsolvent*Wsolvent + (1 - Xs)*Wvap)
274 const scalar muInfc = muInf[celli];
277 const scalar Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
280 const scalar Dab = filmThermo.
D(pc, Tloc);
283 const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall));
286 const scalar
Sh = this->
Sh(Re, Sc);
289 evapRateCoeff[celli] =
290 rhoInfc*Sh*Dab/(VbyA[celli]*(
L_ + rootVSmall));
298 *evapRateCoeff[celli]*(YsCoeff*Ysolvent - YInf[celli]),
303 if (dm > limMass[celli])
305 evapRateCoeff[celli] *= limMass[celli]/dm;
308 evapRateInf[celli] = evapRateCoeff[celli]*YInf[celli];
309 evapRateCoeff[celli] *= YsCoeff;
365 dt*V*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.
const volScalarField & VbyA() const
Return the cell layer volume/area [m].
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.
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)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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 DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const scalar deltaMin_
Minimum film height for model to be active.
volScalarField::Internal & rhoSp()
Mass [kg/m^2/s].
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].
virtual Type value(const scalar x) const =0
Return value as a function of (scalar) independent variable.
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.
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.
const volScalarField::Internal & continuityErr() const
Return the current continuity error.
void min(const dimensioned< Type > &)
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
virtual scalar D(const scalar p, const scalar T) const =0
Return diffusivity [m^2/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.
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
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.
const volScalarField::Internal & magSf() const
Return the face area magnitudes [m^2].
#define WarningInFunction
Report a warning using Foam::Warning.
const volVectorField::Internal & Us() const
Return the film surface velocity [m/s].
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void max(const dimensioned< Type > &)
virtual const volScalarField & h() const
Return the film sensible enthalpy [J/kg].
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)
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionedScalar & h
Planck constant.
scalar Sh(const scalar Re, const scalar Sc) const
Return Sherwood number as a function of Reynolds and Schmidt numbers.
const volScalarField & rho() const
Return the film density [kg/m^3].
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
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.
const volScalarField & alpha() const
Return const access to the film volume fraction [].
virtual const volScalarField & T() const
Return the film mean temperature [K].