42 namespace functionObjects
66 word Dname(
"D" + s_.name());
77 else if (mesh_.foundObject<icoModel>(momentumTransportModel::typeName))
79 const icoModel& model = mesh_.lookupObject<icoModel>
81 momentumTransportModel::typeName
84 return alphaD_*model.nu() + alphaDt_*model.nut();
86 else if (mesh_.foundObject<cmpModel>(momentumTransportModel::typeName))
88 const cmpModel& model = mesh_.lookupObject<cmpModel>
90 momentumTransportModel::typeName
93 return alphaD_*model.mu() + alphaDt_*model.mut();
125 mesh_.time().timeName(),
173 word divScheme(
"div(phi," + schemesField_ +
")");
174 word laplacianScheme(
"laplacian(" + D.name() +
"," + schemesField_ +
")");
177 scalar relaxCoeff = 0.0;
178 if (mesh_.relaxEquation(schemesField_))
180 relaxCoeff = mesh_.equationRelaxationFactor(schemesField_);
194 for (
int i=0; i<=nCorr_; i++)
202 fvModels.source(rho, s_)
205 sEqn.
relax(relaxCoeff);
209 sEqn.solve(schemesField_);
216 for (
int i=0; i<=nCorr_; i++)
227 sEqn.
relax(relaxCoeff);
231 sEqn.solve(schemesField_);
239 <<
"Incompatible dimensions for phi: " << phi.
dimensions() <<
nl
virtual ~scalarTransport()
Destructor.
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.
IncompressibleMomentumTransportModel< kinematicTransportModel > momentumTransportModel
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
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.
Calculate the matrix for the laplacian of the field.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
const dimensionSet dimLength
scalarTransport(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool execute()
Calculate the scalarTransport.
CompressibleMomentumTransportModel< dynamicTransportModel > momentumTransportModel
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
Foam::fvConstraints & fvConstraints
A class for handling words, derived from string.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
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 &)
Read the scalarTransport data.
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.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
const dimensionSet dimMass
defineTypeNameAndDebug(Qdot, 0)
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
Calculate the matrix for the divergence of the given field and flux.
virtual bool write()
Do nothing.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Finite volume constraints.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const dimensionSet dimVolume
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Calculate the matrix for implicit and explicit sources.