31 #include "surfaceInterpolate.H" 41 template<
class BasicThermophysicalTransportModel>
49 BasicThermophysicalTransportModel
56 mixtureDiffusionCoefficients_(
true),
64 this->coeffDict_.found(
"DT")
75 template<
class BasicThermophysicalTransportModel>
86 this->coeffDict_.lookup(
"mixtureDiffusionCoefficients")
87 >> mixtureDiffusionCoefficients_;
89 if (mixtureDiffusionCoefficients_)
110 DFuncs_[i].setSize(species.
size());
116 const word nameij(species[i] +
'-' + species[j]);
117 const word nameji(species[j] +
'-' + species[i]);
121 if (Ddict.
found(nameij) && Ddict.
found(nameji))
126 <<
"Binary mass diffusion coefficients " 127 "for Both " << nameij
128 <<
" and " << nameji <<
" provided, using " 134 else if (Ddict.
found(nameij))
138 else if (Ddict.
found(nameji))
145 <<
"Binary mass diffusion coefficient for pair " 146 << nameij <<
" or " << nameji <<
" not provided" 162 if (this->coeffDict_.found(
"DT"))
185 template<
class BasicThermophysicalTransportModel>
196 this->momentumTransport().
rho()
197 *Dm_[composition.
index(Yi)]
202 template<
class BasicThermophysicalTransportModel>
212 this->momentumTransport().
rho().boundaryField()[
patchi]
213 *Dm_[composition.
index(Yi)].boundaryField()[
patchi];
217 template<
class BasicThermophysicalTransportModel>
227 this->momentumTransport().alphaRhoPhi().
group()
265 composition.
Hs(i, this->thermo().p(), this->
thermo().
T())
280 composition.
Hs(i, this->thermo().p(), this->
thermo().
T())
293 template<
class BasicThermophysicalTransportModel>
340 composition.
Hs(i, this->thermo().p(), this->
thermo().
T())
355 composition.
Hs(i, this->thermo().p(), this->
thermo().
T())
367 template<
class BasicThermophysicalTransportModel>
380 BasicThermophysicalTransportModel::j(Yi)
385 DTFuncs_[composition.
index(Yi)],
395 return BasicThermophysicalTransportModel::j(Yi);
400 template<
class BasicThermophysicalTransportModel>
413 BasicThermophysicalTransportModel::divj(Yi)
420 DTFuncs_[composition.
index(Yi)],
432 return BasicThermophysicalTransportModel::divj(Yi);
437 template<
class BasicThermophysicalTransportModel>
447 if (mixtureDiffusionCoefficients_)
const char *const group
Group name for atomic constants.
const dimensionSet dimViscosity
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimArea
fluidReactionThermo & thermo
bool set(const label) const
Is element set.
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void evaluate(GeometricField< Type, PatchField, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, PatchField, GeoMesh > &x)
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 > &)
basicSpecieMixture & composition
virtual tmp< fvScalarMatrix > divj(volScalarField &Yi) const
Return the source term for the given specie mass-fraction equation.
label index(const volScalarField &Yi) const
Return the specie index of the given mass-fraction field.
tmp< fvMatrix< Type > > Su(const DimensionedField< Type, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
T & ref() const
Return non-const reference or generate a fatal error.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
Ostream & endl(Ostream &os)
Add newline and flush stream.
unityLewisFourier< laminarThermophysicalTransportModel > ::thermoModel thermoModel
virtual scalar Wi(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
Calculate the snGrad of the given volField.
const dimensionSet dimless
virtual scalar rho(const label speciei, const scalar p, const scalar T) const =0
Density [kg/m^3].
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual volScalarField & p()=0
Pressure [Pa].
virtual basicSpecieMixture & composition()=0
Return the composition of the multi-component mixture.
Fickian(const word &type, const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from a momentum transport model and a thermo model.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
unityLewisFourier< laminarThermophysicalTransportModel > ::momentumTransportModel momentumTransportModel
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
A class for handling words, derived from string.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
static word groupName(Name name, const word &group)
Calculate the laplacian of the given field.
virtual void correct()
Update the diffusion coefficients.
const dimensionSet dimDynamicViscosity
Calculate the divergence of the given field.
const Mesh & mesh() const
Return mesh.
virtual tmp< surfaceScalarField > j(const volScalarField &Yi) const
Return the specie flux for the given specie mass-fraction [kg/m^2/s].
virtual bool read()
Read thermophysicalTransport dictionary.
const dimensionSet dimEnergy
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const dimensionSet dimMass
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
label size() const
Return the number of elements in the UPtrList.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual const volScalarField & T() const =0
Temperature [K].
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A wordList with hashed indices for faster lookup by name.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const scalarList W(::W(thermo))
PtrList< volScalarField > & Y
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
Run-time selectable function of two variables.
A class for managing temporary objects.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Calculate the matrix for implicit and explicit sources.
const speciesTable & species() const
Return the table of species.
label defaultSpecie() const
Return the index of the default specie.