41 namespace functionObjects
55 mesh_.boundary().size(),
61 if (isA<wallFvPatch>(mesh_.boundary()[
patchi]))
71 bool Foam::functionObjects::age::converged
74 const scalar initialResidual
77 if (initialResidual < tolerance_)
79 Info<<
"Field " << typeName
80 <<
" converged in " << nCorr <<
" correctors\n" <<
endl;
136 mesh_.time().timeName(),
149 const word divScheme(
"div(phi," + schemesField_ +
")");
152 scalar relaxCoeff = 0.0;
153 if (mesh_.relaxEquation(schemesField_))
155 relaxCoeff = mesh_.equationRelaxationFactor(schemesField_);
179 word laplacianScheme;
186 momentumTransportModel::typeName
190 "laplacian(" + tmuEff().name() +
',' + schemesField_ +
")";
193 for (
int i=0; i<=nCorr_; i++)
197 fvm::div(phi, age, divScheme) == rho + fvModels.source(rho, age)
205 ageEqn.relax(relaxCoeff);
209 if (converged(i, ageEqn.solve(schemesField_).initialResidual()))
220 word laplacianScheme;
227 momentumTransportModel::typeName
231 "laplacian(" + tnuEff().name() +
',' + schemesField_ +
")";
234 for (
int i=0; i<=nCorr_; i++)
247 ageEqn.relax(relaxCoeff);
251 if (converged(i, ageEqn.solve(schemesField_).initialResidual()))
260 Info<<
"Min/max age:" <<
min(age).value()
261 <<
' ' <<
max(age).value() <<
endl;
269 return writeObject(typeName);
virtual bool execute()
Execute.
virtual bool read(const dictionary &)
Read the data.
#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 dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
bool read(const char *, int32_t &)
Foam::fvConstraints & fvConstraints
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.
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.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionSet dimMass
defineTypeNameAndDebug(Qdot, 0)
Calculates and writes out the time taken for a particle to travel from an inlet to the location...
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Abstract base class for turbulence models (RAS, LES and laminar).
Foam::fvModels & fvModels
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,.
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)
virtual bool write()
Write.
const doubleScalar e
Elementary charge.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...