39 namespace functionObjects
53 mesh_.boundary().size(),
59 if (isA<wallFvPatch>(mesh_.boundary()[
patchi]))
69 bool Foam::functionObjects::age::converged
72 const scalar initialResidual
75 if (initialResidual < tolerance_)
77 Info<<
"Field " << typeName
78 <<
" converged in " << nCorr <<
" correctors\n" <<
endl;
122 if (dict.
found(
"fvOptions"))
124 fvOptions_.reset(dict.
subDict(
"fvOptions"));
140 mesh_.time().timeName(),
153 const word divScheme(
"div(phi," + schemesField_ +
")");
156 scalar relaxCoeff = 0.0;
157 if (mesh_.relaxEquation(schemesField_))
159 relaxCoeff = mesh_.equationRelaxationFactor(schemesField_);
177 word laplacianScheme;
184 momentumTransportModel::typeName
188 "laplacian(" + tmuEff().name() +
',' + schemesField_ +
")";
191 for (
int i=0; i<=nCorr_; i++)
195 fvm::div(phi, age, divScheme) == rho + fvOptions_(rho, age)
203 ageEqn.
relax(relaxCoeff);
205 fvOptions_.constrain(ageEqn);
207 if (converged(i, ageEqn.
solve(schemesField_).initialResidual()))
216 word laplacianScheme;
223 momentumTransportModel::typeName
227 "laplacian(" + tnuEff().name() +
',' + schemesField_ +
")";
230 for (
int i=0; i<=nCorr_; i++)
243 ageEqn.
relax(relaxCoeff);
245 fvOptions_.constrain(ageEqn);
247 if (converged(i, ageEqn.
solve(schemesField_).initialResidual()))
254 Info<<
"Min/max age:" <<
min(age).value()
255 <<
' ' <<
max(age).value() <<
endl;
263 return writeObject(typeName);
virtual bool execute()
Execute.
virtual bool read(const dictionary &)
Read the data.
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.
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 > &)
static const char *const typeName
T & ref() const
Return non-const reference or generate a fatal error.
age(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
wordList patchTypes(nPatches)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
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 dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const dimensionSet & dimensions() const
Return dimensions.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
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).
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
defineTypeNameAndDebug(Qdot, 0)
Calculates and writes out the time taken for a particle to travel from an inlet to the location...
Abstract base class for turbulence models (RAS, LES and laminar).
Calculate the matrix for the divergence of the given field and flux.
List< word > wordList
A List of words.
virtual ~age()
Destructor.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
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)
virtual bool write()
Write.
const doubleScalar e
Elementary charge.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...