45namespace surfaceFilmModels
95 coeffDict_.get<scalar>(
"Wwax")
101 typeName +
":Wsolvent",
102 film.regionMesh().time().
constant(),
105 coeffDict_.get<scalar>(
"Wsolvent")
111 typeName +
":Ysolvent0",
112 film.regionMesh().time().
constant(),
122 typeName +
":Ysolvent",
123 film.regionMesh().time().
timeName(),
130 deltaMin_(coeffDict_.get<scalar>(
"deltaMin")),
131 L_(coeffDict_.get<scalar>(
"L")),
132 TbFactor_(coeffDict_.getOrDefault<scalar>(
"TbFactor", 1.1)),
133 YInfZero_(coeffDict_.getOrDefault(
"YInfZero", false)),
136 Function1<scalar>::
New(
"activityCoeff", coeffDict_, &film.regionMesh())
149template<
class YInfType>
168 const label vapId =
thermo.carrierId(filmThermo.
name());
185 const scalar Wvap =
thermo.carrier().W(vapId);
194 typeName +
":evapRateCoeff",
209 typeName +
":evapRateInf",
220 bool filmPresent =
false;
228 const scalar Ysolvent =
Ysolvent_[celli];
231 const scalar Xsolvent
233 Ysolvent*Wsolvent/((1 - Ysolvent)*Wwax + Ysolvent*Wsolvent)
237 const scalar rhoInfc = rhoInf[celli];
240 const scalar pc = pInf[celli];
243 const scalar Tb = filmThermo.
Tb(pc);
248 const scalar pPartialCoeff
253 scalar XsCoeff = pPartialCoeff/pc;
256 scalar Xs = XsCoeff*Xsolvent;
261 <<
"Solvent vapour pressure > ambient pressure"
271 XsCoeff/(XsCoeff*Xsolvent*Wsolvent + (1 - Xs)*Wvap)
275 const scalar muInfc = muInf[celli];
278 const scalar
Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
281 const scalar Dab = filmThermo.
D(pc, Tloc);
284 const scalar Sc = muInfc/(rhoInfc*(Dab + ROOTVSMALL));
287 const scalar
Sh = this->
Sh(Re, Sc);
290 evapRateCoeff[celli] = rhoInfc*
Sh*Dab/(
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*magSf*rhoInf*(evapRateCoeff*
Ysolvent_ + evapRateInf)
395 const label vapId =
film.thermo().carrierId(
film.filmThermo().
name());
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const dimensionSet & dimensions() const
Return dimensions.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
scalar Sh() const
Sherwood number.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
static word timeName(const scalar t, const int precision=precision_)
const word & name() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
const Time & time() const
Return the top-level database.
constant condensation/saturation model.
const fvMesh & regionMesh() const
Return the region mesh database.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
Base class for film thermo models.
virtual const word & name() const =0
Return the specie name.
virtual scalar Tb(const scalar p) const =0
Return boiling temperature [K].
virtual scalar pv(const scalar p, const scalar T) const =0
Return vapour pressure [Pa].
virtual scalar D(const scalar p, const scalar T) const =0
Return diffusivity [m2/s].
Base class for surface film phase change models.
Base class for surface film models.
virtual const volScalarField & hs() const =0
Return the film surface temperature [J/kg].
virtual const volScalarField & T() const =0
Return the film mean temperature [K].
virtual const volVectorField & Us() const =0
Return the film surface velocity [m/s].
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
virtual const volScalarField & delta() const =0
Return the film thickness [m].
Thermodynamic form of single-cell layer surface film model.
volScalarField Ysolvent_
Solvent mass-fraction.
const scalar L_
Length scale [m].
autoPtr< Function1< scalar > > activityCoeff_
Activity coefficient as a function of solvent mole fraction.
const scalar TbFactor_
Boiling temperature factor.
uniformDimensionedScalarField Wsolvent_
Molecular weight of liquid [kg/kmol].
void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy, YInfType YInf)
uniformDimensionedScalarField Wwax_
Molecular weight of wax [kg/kmol].
uniformDimensionedScalarField Ysolvent0_
Initial solvent mass-fraction.
const scalar deltaMin_
Minimum film height for model to be active.
virtual ~waxSolventEvaporation()
Destructor.
scalar Sh(const scalar Re, const scalar Sc) const
Return Sherwood number as a function of Reynolds and Schmidt numbers.
bool YInfZero_
Switch to treat YInf as zero.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the divergence of the given field.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the divergence of the given field and flux.
Calculate the finiteVolume matrix for implicit and explicit sources.
#define WarningInFunction
Report a warning using Foam::Warning.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
scalarField Re(const UList< complex > &cf)
Extract real component.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimVelocity
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
dimensionedScalar cbrt(const dimensionedScalar &ds)
const dimensionSet dimDensity
#define forAll(list, i)
Loop across all elements in list.