30 #include "surfaceInterpolate.H" 65 mesh_.time().constant(),
93 momentumTransportModel::typeName
96 return turbulence.nuEff();
100 const thermophysicalTransportModel& ttm =
101 mesh().lookupObject<thermophysicalTransportModel>
103 thermophysicalTransportModel::typeName
107 fieldNames_[fieldi] == ttm.thermo().T().name()
109 : fieldNames_[fieldi] == ttm.thermo().he().name()
111 : ttm.momentumTransport().muEff();
116 <<
"Dimensions of " << phi.name() <<
" not recognised" 118 return tmp<volScalarField>(
nullptr);
123 template <
class Type>
124 void Foam::fv::volumeFractionSource::addDivSup
135 eqn -= AByB*
fvm::div(phi, eqn.psi());
139 void Foam::fv::volumeFractionSource::addUDivSup
141 fvMatrix<vector>& eqn,
150 const word
scheme(
"div(" + phiName_ +
"," + eqn.psi().name() +
")");
156 void Foam::fv::volumeFractionSource::addRhoDivSup
158 fvMatrix<scalar>& eqn,
171 template <
class Type,
class AlphaFieldType>
172 void Foam::fv::volumeFractionSource::addLaplacianSup
174 const AlphaFieldType& alpha,
183 const word
scheme(
"laplacian(" + D.name() +
"," + eqn.psi().name() +
")");
196 const word& modelType,
201 option(name, modelType, dict, mesh),
225 if (fieldNames_[fieldi] == rhoName_)
227 addRhoDivSup(eqn, fieldi);
231 addDivSup(eqn, fieldi);
243 if (fieldNames_[fieldi] == UName_)
245 addUDivSup(eqn, fieldi);
249 addDivSup(eqn, fieldi);
261 addDivSup(eqn, fieldi);
272 addDivSup(eqn, fieldi);
283 addDivSup(eqn, fieldi);
295 if (fieldNames_[fieldi] == rhoName_)
297 addRhoDivSup(eqn, fieldi);
301 addDivSup(eqn, fieldi);
314 if (fieldNames_[fieldi] == UName_)
316 addUDivSup(eqn, fieldi);
320 addDivSup(eqn, fieldi);
333 addDivSup(eqn, fieldi);
345 addDivSup(eqn, fieldi);
357 addDivSup(eqn, fieldi);
370 if (fieldNames_[fieldi] == rhoName_)
372 addRhoDivSup(eqn, fieldi);
376 addDivSup(eqn, fieldi);
377 addLaplacianSup(alpha, eqn, fieldi);
390 if (fieldNames_[fieldi] == UName_)
392 addUDivSup(eqn, fieldi);
396 addDivSup(eqn, fieldi);
397 addLaplacianSup(alpha, eqn, fieldi);
410 addDivSup(eqn, fieldi);
411 addLaplacianSup(alpha, eqn, fieldi);
423 addDivSup(eqn, fieldi);
424 addLaplacianSup(alpha, eqn, fieldi);
436 addDivSup(eqn, fieldi);
437 addLaplacianSup(alpha, eqn, fieldi);
445 if (coeffs_.found(
"fields"))
447 coeffs_.lookup(
"fields") >> fieldNames_;
450 applied_.setSize(fieldNames_.size(),
false);
defineTypeNameAndDebug(option, 0)
virtual ~volumeFractionSource()
Destructor.
virtual void addSup(fvMatrix< scalar > &, const label)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool read(const dictionary &dict)
Read dictionary.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
static tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
Calculate the matrix for the laplacian of the field.
addToRunTimeSelectionTable(option, fixedTemperatureConstraint, dictionary)
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
CompressibleMomentumTransportModel< fluidThermo > momentumTransportModel
const dimensionSet dimVolume(pow3(dimLength))
bool read(const char *, int32_t &)
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
virtual bool read(const dictionary &dict)
Read source dictionary.
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.
Calculate the divergence of the given field.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
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.
volumeFractionSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Calculate the matrix for the divergence of the given field and flux.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...