42 namespace regionModels
44 namespace surfaceFilmModels
54 waxSolventEvaporation,
72 return 0.037*
pow(Re, 0.8)*
cbrt(Sc);
94 coeffDict_.lookup<scalar>(
"Wwax")
104 coeffDict_.lookup<scalar>(
"Wsolvent")
129 deltaMin_(coeffDict_.lookup<scalar>(
"deltaMin")),
130 L_(coeffDict_.lookup<scalar>(
"L")),
131 TbFactor_(coeffDict_.lookupOrDefault<scalar>(
"TbFactor", 1.1)),
132 YInfZero_(coeffDict_.lookupOrDefault<
Switch>(
"YInfZero",
false)),
148 template<
class YInfType>
167 refCast<const heRhoThermopureMixtureliquidProperties>(film.
thermo())
168 .cellThermoMixture(0).properties();
227 bool filmPresent =
false;
235 const scalar Ysolvent =
Ysolvent_[celli];
238 const scalar Xsolvent
240 Ysolvent*Wsolvent/((1 - Ysolvent)*Wwax + Ysolvent*Wsolvent)
244 const scalar rhoInfc = rhoInf[celli];
247 const scalar pc = pInf[celli];
250 const scalar Tb = liquidThermo.
pvInvert(pc);
255 const scalar pPartialCoeff
260 scalar XsCoeff = pPartialCoeff/pc;
263 scalar Xs = XsCoeff*Xsolvent;
268 <<
"Solvent vapour pressure > ambient pressure" 278 XsCoeff/(XsCoeff*Xsolvent*Wsolvent + (1 - Xs)*Wvap)
282 const scalar muInfc = muInf[celli];
285 const scalar Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
288 const scalar Dab = liquidThermo.
D(pc, Tloc[celli]);
291 const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall));
294 const scalar
Sh = this->
Sh(Re, Sc);
297 evapRateCoeff[celli] =
298 rhoInfc*Sh*Dab/(VbyA[celli]*(
L_ + rootVSmall));
306 *evapRateCoeff[celli]*(YsCoeff*Ysolvent - YInf[celli]),
311 if (dm > limMass[celli])
313 evapRateCoeff[celli] *= limMass[celli]/dm;
316 evapRateInf[celli] = evapRateCoeff[celli]*YInf[celli];
317 evapRateCoeff[celli] *= YsCoeff;
373 dt*V*rhoInf*(evapRateCoeff*
Ysolvent_ + evapRateInf)
381 dEnergy += dm*primarySpecieThermo.
Hs(
vapId(), pInf, Tloc);
volScalarField Ysolvent_
Solvent mass-fraction.
Run-time selectable general function of one variable.
#define forAll(list, i)
Loop across all elements in list.
const volScalarField & VbyA() const
Return the cell layer volume/area [m].
virtual ~waxSolventEvaporation()
Destructor.
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 > &)
virtual scalar pvInvert(scalar p) const
Invert the vapour pressure relationship to retrieve the.
autoPtr< Function1< scalar > > activityCoeff_
Activity coefficient as a function of solvent mole fraction.
void size(const label)
Override size to be inconsistent with allocated storage.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
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.
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 > &)
const Time & time() const
Return the top-level database.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
tmp< volVectorField::Internal > Us() const
Return the film surface velocity [m/s].
const scalar deltaMin_
Minimum film height for model to be active.
volScalarField::Internal & rhoSp()
Mass [kg/m^2/s].
Macros for easy insertion into run-time selection tables.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
const scalar TbFactor_
Boiling temperature factor.
const volScalarField & muPrimary() const
Viscosity [Pa.s].
const dimensionSet dimTime
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 x.
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
const dimensionSet dimDensity
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.
The thermophysical properties of a liquid.
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.
virtual scalar pv(scalar p, scalar T) const =0
Vapour pressure [Pa].
const volScalarField::Internal & continuityErr() const
Return the current continuity error.
void min(const dimensioned< Type > &)
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].
const rhoThermo & thermo() const
Film thermo.
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 > &)
virtual scalar D(scalar p, scalar T) const =0
Vapour diffusivity [m^2/s].
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Calculate the matrix for the divergence of the given field and flux.
const volScalarField::Internal & magSf() const
Return the face area magnitudes [m^2].
#define WarningInFunction
Report a warning using Foam::Warning.
virtual const volScalarField & T() const =0
Temperature [K].
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void max(const dimensioned< Type > &)
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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.
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.
uniformDimensionedScalarField Ysolvent0_
Initial solvent mass-fraction.
Specie phase change model abstract base class.
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...
const fluidThermo & primaryThermo() const
Return const reference to the primary region thermo object.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy, YInfType YInf)
Calculate the matrix for implicit and explicit sources.
addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh)
Thermodynamic form of single-cell layer surface film model.
const volScalarField & alpha() const
Return const access to the film volume fraction [].