40 namespace functionObjects
64 word Dname(
"D" + s_.name());
68 return tmp<volScalarField>
75 mesh_.time().timeName(),
87 const icoModel& model = mesh_.lookupObject<icoModel>
92 return alphaD_*model.nu() + alphaDt_*model.nut();
96 const cmpModel& model = mesh_.lookupObject<cmpModel>
101 return alphaD_*model.mu() + alphaDt_*model.mut();
105 return tmp<volScalarField>
112 mesh_.time().timeName(),
127 Foam::functionObjects::scalarTransport::scalarTransport
144 mesh_.time().timeName(),
178 if (dict.
found(
"fvOptions"))
180 fvOptions_.reset(dict.
subDict(
"fvOptions"));
197 word divScheme(
"div(phi," + schemesField_ +
")");
198 word laplacianScheme(
"laplacian(" + D.name() +
"," + schemesField_ +
")");
201 scalar relaxCoeff = 0.0;
202 if (mesh_.relaxEquation(schemesField_))
204 relaxCoeff = mesh_.equationRelaxationFactor(schemesField_);
212 for (
label i = 0; i <= nCorr_; i++)
223 sEqn.
relax(relaxCoeff);
225 fvOptions_.constrain(sEqn);
227 sEqn.
solve(mesh_.solverDict(schemesField_));
232 for (
label i = 0; i <= nCorr_; i++)
243 sEqn.
relax(relaxCoeff);
245 fvOptions_.constrain(sEqn);
247 sEqn.
solve(mesh_.solverDict(schemesField_));
253 <<
"Incompatible dimensions for phi: " << phi.
dimensions() <<
nl
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Ostream & endl(Ostream &os)
Add newline and flush stream.
Calculate the matrix for the laplacian of the field.
IncompressibleTurbulenceModel< transportModel > turbulenceModel
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual bool execute()
Calculate the scalarTransport.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
const dimensionSet & dimensions() const
Return dimensions.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
static const word propertiesName
Default name of the turbulence properties dictionary.
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.
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
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,.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
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.
addToRunTimeSelectionTable(functionObject, add, dictionary)