45namespace functionObjects
66 result[patchi] = zeroGradientFvPatchField<scalar>::typeName;
77 const scalar initialResidual
80 if (initialResidual < tolerance_)
82 Info<<
"Field " << typeName
83 <<
" converged in " <<
nCorr <<
" correctors"
93template<
class GeoField>
105 scopedName(baseName),
139 phiName_ =
dict.getOrDefault<
word>(
"phi",
"phi");
140 rhoName_ =
dict.getOrDefault<
word>(
"rho",
"rho");
141 schemesField_ =
dict.getOrDefault<
word>(
"schemesField", typeName);
142 tolerance_ =
dict.getOrDefault<scalar>(
"tolerance", 1
e-5);
143 nCorr_ =
dict.getOrDefault<
int>(
"nCorr", 5);
144 diffusion_ =
dict.getOrDefault<
bool>(
"diffusion",
false);
160 mesh_.time().timeName(),
172 const word divScheme(
"div(phi," + schemesField_ +
")");
175 scalar relaxCoeff = 0;
176 if (mesh_.relaxEquation(schemesField_))
178 relaxCoeff = mesh_.equationRelaxationFactor(schemesField_);
197 word laplacianScheme;
208 "laplacian(" + tmuEff().name() +
',' + schemesField_ +
")";
211 for (
int i = 0; i <= nCorr_; ++i)
223 ageEqn.
relax(relaxCoeff);
227 if (converged(i, ageEqn.
solve().initialResidual()))
238 word laplacianScheme;
249 "laplacian(" + tnuEff().name() +
',' + schemesField_ +
")";
252 for (
int i = 0; i <= nCorr_; ++i)
265 ageEqn.
relax(relaxCoeff);
269 if (converged(i, ageEqn.
solve().initialResidual()))
278 Info<<
"Min/max age:"
279 <<
min(
age).value() <<
' '
284 word fieldName = typeName;
286 return store(fieldName, tage);
292 return writeObject(typeName);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Templated abstract base class for single-phase incompressible turbulence models.
virtual bool read()
Re-read model coefficients if they have changed.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
const complexVectorField & newField()
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Generic dimensioned Type class.
Abstract base-class for Time/database function objects.
Calculates and writes out the time taken for a particle to travel from an inlet to the location....
virtual bool execute()
Execute.
virtual bool write()
Write.
virtual bool read(const dictionary &)
Read the data.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
A class for managing temporary objects.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
List< word > wordList
A List of words.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
constexpr char nl
The newline '\n' character (0x0a)
wordList patchTypes(nPatches)
#define forAll(list, i)
Loop across all elements in list.
static const char *const typeName
The type name used in ensight case files.