31 #include "surfaceInterpolate.H"
41 template<
class BasicThermophysicalTransportModel>
44 const PtrList<volScalarField>&
Y = this->
thermo().
Y();
48 Dm_.setSize(
Y.size());
50 if (mixtureDiffusionCoefficients_)
106 (1/Wm -
Y[i]/this->
thermo().Wi(i))
114 template<
class BasicThermophysicalTransportModel>
129 template<
class BasicThermophysicalTransportModel>
137 BasicThermophysicalTransportModel
146 mixtureDiffusionCoefficients_(
true),
148 DFuncs_(this->
thermo().species().size()),
150 DmFuncs_(this->
thermo().species().size()),
154 this->coeffDict().
found(
"DT")
163 template<
class BasicThermophysicalTransportModel>
170 const dictionary& coeffDict = this->coeffDict();
172 coeffDict.
lookup(
"mixtureDiffusionCoefficients")
173 >> mixtureDiffusionCoefficients_;
175 if (mixtureDiffusionCoefficients_)
197 const dictionary& Ddict = coeffDict.
subDict(
"D");
203 DFuncs_[i].setSize(species.
size());
209 const word nameij(species[i] +
'-' + species[j]);
210 const word nameji(species[j] +
'-' + species[i]);
214 if (Ddict.found(nameij) && Ddict.found(nameji))
219 <<
"Binary mass diffusion coefficients "
220 "for Both " << nameij
221 <<
" and " << nameji <<
" provided, using "
227 else if (Ddict.found(nameij))
231 else if (Ddict.found(nameji))
238 <<
"Binary mass diffusion coefficient for pair "
239 << nameij <<
" or " << nameji <<
" not provided"
262 if (coeffDict.
found(
"DT"))
264 const dictionary& DTdict = coeffDict.
subDict(
"DT");
292 template<
class BasicThermophysicalTransportModel>
301 this->momentumTransport().
rho()
302 *Dm()[this->
thermo().specieIndex(Yi)]
307 template<
class BasicThermophysicalTransportModel>
315 this->momentumTransport().rho().boundaryField()[
patchi]
320 template<
class BasicThermophysicalTransportModel>
330 this->momentumTransport().alphaRhoPhi().
group()
365 if (i != this->
thermo().defaultSpecie())
392 template<
class BasicThermophysicalTransportModel>
418 if (i != this->
thermo().defaultSpecie())
445 template<
class BasicThermophysicalTransportModel>
489 if (i != this->
thermo().defaultSpecie())
515 template<
class BasicThermophysicalTransportModel>
527 BasicThermophysicalTransportModel::j(Yi)
532 DTFuncs_[this->
thermo().specieIndex(Yi)],
542 return BasicThermophysicalTransportModel::j(Yi);
547 template<
class BasicThermophysicalTransportModel>
560 BasicThermophysicalTransportModel::j(Yi,
patchi)
566 return BasicThermophysicalTransportModel::j(Yi,
patchi);
571 template<
class BasicThermophysicalTransportModel>
583 BasicThermophysicalTransportModel::divj(Yi)
590 DTFuncs_[this->
thermo().specieIndex(Yi)],
602 return BasicThermophysicalTransportModel::divj(Yi);
607 template<
class BasicThermophysicalTransportModel>
610 BasicThermophysicalTransportModel::predict();
615 template<
class BasicThermophysicalTransportModel>
622 template<
class BasicThermophysicalTransportModel>
633 template<
class BasicThermophysicalTransportModel>
644 template<
class BasicThermophysicalTransportModel>
#define forAll(list, i)
Loop across all elements in list.
const dimensionSet & dimensions() const
Return dimensions.
virtual bool movePoints()
Update for mesh motion.
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
virtual tmp< fvScalarMatrix > divj(volScalarField &Yi) const
Return the source term for the given specie mass-fraction equation.
virtual void predict()
Update the diffusion coefficients.
virtual void mapMesh(const polyMeshMap &map)
Update from another mesh using the given map.
virtual tmp< surfaceScalarField > j(const volScalarField &Yi) const
Return the specie flux for the given specie mass-fraction [kg/m^2/s].
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
BasicThermophysicalTransportModel::thermoModel thermoModel
BasicThermophysicalTransportModel::momentumTransportModel momentumTransportModel
Fickian(const word &type, const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from a momentum transport model and a thermo model.
virtual void topoChange(const polyTopoChangeMap &map)
Update topology using the given map.
virtual bool read()
Read thermophysicalTransport dictionary.
Run-time selectable function of two variables.
static autoPtr< Function2< Type > > New(const word &name, const Function2s::unitConversions &units, const dictionary &dict)
Select from dictionary.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
static word groupName(Name name, const word &group)
void size(const label)
Override size to be inconsistent with allocated storage.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label size() const
Return the number of elements in the UPtrList.
virtual const volScalarField & T() const =0
Temperature [K].
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual const volScalarField & p() const =0
Pressure [Pa].
A wordList with hashed indices for faster lookup by name.
virtual const speciesTable & species() const =0
The table of species.
virtual PtrList< volScalarField > & Y()=0
Access the mass-fraction fields.
virtual dimensionedScalar Wi(const label speciei) const =0
Molecular weight [kg/kmol].
virtual label defaultSpecie() const =0
The index of the default specie.
label specieIndex(const volScalarField &Yi) const
Access the specie index of the given mass-fraction field.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Base class for multi-component Fickian based temperature gradient heat flux models with optional Sore...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Calculate the divergence of the given field.
Calculate the laplacian of the given field.
Calculate the snGrad of the given volField.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
#define WarningInFunction
Report a warning using Foam::Warning.
const char *const group
Group name for atomic constants.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Su(const DimensionedField< Type, volMesh > &, const VolField< Type > &)
tmp< fvMatrix< Type > > laplacianCorrection(const VolField< scalar > &gamma, const VolField< Type > &vf)
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimDynamicViscosity
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 dimEnergy
const dimensionSet dimPressure
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimKinematicViscosity
const dimensionSet dimless
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimTemperature
const dimensionSet dimTime
scalarList W(const fluidMulticomponentThermo &thermo)
void evaluate(GeometricField< Type, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, GeoMesh > &x)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimMass
const dimensionSet dimArea
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
PtrList< volScalarField > & Y
fluidMulticomponentThermo & thermo