82 surfaceFilmRegionModel& film,
93 film.regionMesh().thisDb(),
98 coeffDict_.get<scalar>(
"Wwax")
105 film.regionMesh().time().
constant(),
106 film.regionMesh().thisDb(),
111 coeffDict_.get<scalar>(
"Wsolvent")
118 film.regionMesh().time().
constant(),
119 film.regionMesh().thisDb(),
130 film.regionMesh().time().
timeName(),
131 film.regionMesh().thisDb(),
138 deltaMin_(coeffDict_.get<scalar>(
"deltaMin")),
139 L_(coeffDict_.get<scalar>(
"L")),
140 TbFactor_(coeffDict_.getOrDefault<scalar>(
"TbFactor", 1.1)),
141 YInfZero_(coeffDict_.getOrDefault(
"YInfZero", false)),
157template<
class YInfType>
176 const label vapId =
thermo.carrierId(filmThermo.
name());
193 const scalar Wvap =
thermo.carrier().W(vapId);
204 auto& evapRateCoeff = tevapRateCoeff.ref();
212 auto& evapRateInf = tevapRateInf.ref();
214 bool filmPresent =
false;
222 const scalar Ysolvent =
Ysolvent_[celli];
225 const scalar Xsolvent
227 Ysolvent*Wsolvent/((1 - Ysolvent)*Wwax + Ysolvent*Wsolvent)
231 const scalar rhoInfc = rhoInf[celli];
234 const scalar pc = pInf[celli];
237 const scalar Tb = filmThermo.
Tb(pc);
242 const scalar pPartialCoeff
247 scalar XsCoeff = pPartialCoeff/pc;
250 scalar Xs = XsCoeff*Xsolvent;
255 <<
"Solvent vapour pressure > ambient pressure"
265 XsCoeff/(XsCoeff*Xsolvent*Wsolvent + (1 - Xs)*Wvap)
269 const scalar muInfc = muInf[celli];
272 const scalar
Re = rhoInfc*
mag(dU[celli])*
L_/muInfc;
275 const scalar Dab = filmThermo.
D(pc, Tloc);
278 const scalar Sc = muInfc/(rhoInfc*(Dab + ROOTVSMALL));
281 const scalar
Sh = this->
Sh(Re, Sc);
284 evapRateCoeff[celli] = rhoInfc*
Sh*Dab/(
L_ + ROOTVSMALL);
292 *evapRateCoeff[celli]*(YsCoeff*Ysolvent - YInf[celli]),
297 if (dm > limMass[celli])
299 evapRateCoeff[celli] *= limMass[celli]/dm;
302 evapRateInf[celli] = evapRateCoeff[celli]*YInf[celli];
303 evapRateCoeff[celli] *= YsCoeff;
358 dt*magSf*rhoInf*(evapRateCoeff*
Ysolvent_ + evapRateInf)
388 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 noexcept
Return dimensions.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
DimensionedField< scalar, volMesh > Internal
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
const word & name() const
Name function is needed to disambiguate those inherited from regIOobject and dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const noexcept
Return const reference to value.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
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.
const FilmType & filmType() const
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.
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
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].
waxSolventEvaporation(const waxSolventEvaporation &)=delete
No copy construct.
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.
void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy, const YInfType &YInf)
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.
const dictionary coeffDict_
Coefficients dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
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 ...
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
#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.
Different types of constants.
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.
fvMatrix< scalar > fvScalarMatrix
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVelocity
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
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.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
scalarField Re(const UList< complex > &cmplx)
Extract real component.
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimDensity
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define forAll(list, i)
Loop across all elements in list.