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;
129 return wordList{phiName_, rhoName_};
142 mesh_.time().timeName(),
155 const word divScheme(
"div(phi," + schemesField_ +
")");
158 scalar relaxCoeff = 0.0;
159 if (mesh_.solution().relaxEquation(schemesField_))
161 relaxCoeff = mesh_.solution().equationRelaxationFactor(schemesField_);
184 const word laplacianScheme(
"laplacian(muEff," + schemesField_ +
")");
192 momentumTransportModel::typeName
196 for (
int i=0; i<=nCorr_; i++)
200 fvm::div(phi, age, divScheme) == rho + fvModels.source(rho, age)
208 ageEqn.relax(relaxCoeff);
212 if (converged(i, ageEqn.solve(schemesField_).initialResidual()))
223 word laplacianScheme;
230 momentumTransportModel::typeName
234 "laplacian(" + tnuEff().name() +
',' + schemesField_ +
")";
237 for (
int i=0; i<=nCorr_; i++)
250 ageEqn.relax(relaxCoeff);
254 if (converged(i, ageEqn.solve(schemesField_).initialResidual()))
263 Info<<
"Min/max age:" <<
min(age).value()
264 <<
' ' <<
max(age).value() <<
endl;
272 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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
A list of keyword definitions, which are a keyword followed by any number of values (e...
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.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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.
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 wordList fields() const
Return the list of fields required.
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...