41namespace functionObjects
57 const auto&
U = lookupObject<volVectorField>(
UName_);
61 auto*
turb = findObject<cmpTurbModel>
87 "div(((rho*nuEff)*dev2(T(grad(U)))))"
100 const auto*
turb = findObject<icoTurbModel>
123 "div((nuEff*dev2(T(grad(U)))))"
150 const auto&
phi =lookupObject<surfaceScalarField>(
phiName_);
182 subMesh.objectRegistry::store(momentPtr);
201 mesh_.objectRegistry::store(momentPtr);
214 if (
dict.readIfPresent<
word>(
"p", pName_))
218 if (
dict.readIfPresent<
word>(
"U", UName_))
223 if (
dict.readIfPresent<
word>(
"phi", phiName_))
225 Info<<
" phi: " << phiName_ <<
endl;
228 if (
dict.found(
"cellZones"))
234 zoneSubSetPtr_.reset(
nullptr);
246 const auto&
p = lookupObject<volScalarField>(pName_);
247 const auto&
U = lookupObject<volVectorField>(UName_);
248 const auto&
phi = lookupObject<surfaceScalarField>(phiName_);
252 const fvMeshSubset& subsetter = zoneSubSetPtr_->subsetter();
254 fvMesh& subMesh = zoneSubSetPtr_->subsetter().subMesh();
256 subMesh.fvSchemes::readOpt() = mesh_.fvSchemes::readOpt();
257 subMesh.fvSchemes::read();
262 scopedName(
"momentErrorMap")
279 lookupObjectRef<volVectorField>(scopedName(
"momentError"));
296 Log <<
" functionObjects::" <<
type() <<
" " <<
name();
300 Log <<
" writing field: " << scopedName(
"momentError") <<
endl;
302 const auto& momentErr =
303 lookupObjectRef<volVectorField>(scopedName(
"momentError"));
309 Log <<
" writing field: " << scopedName(
"momentErrorMap") <<
endl;
311 const fvMeshSubset& subsetter = zoneSubSetPtr_->subsetter();
314 const auto& momentErrMap =
317 scopedName(
"momentErrorMap")
321 zoneSubSetPtr_->mapToZone<
vector>(momentErrMap);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
compressible::turbulenceModel & turb
const dimensionSet & dimensions() const
Return dimensions.
static const GeometricField< vector, fvPatchField, volMesh > & null()
Return a null geometric field.
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.
static word timeName(const scalar t, const int precision=precision_)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Abstract base-class for Time/database function objects.
word scopedName(const word &name) const
Return a scoped (prefixed) name.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
Computes balance terms for the steady momentum equation.
word UName_
Name of velocity field.
word phiName_
Name of flux field.
tmp< volVectorField > divDevRhoReff()
Return the effective viscous stress (laminar + turbulent).
void calcMomentError()
Calculate the momentum error.
virtual bool execute()
Execute.
autoPtr< Detail::zoneSubSet > zoneSubSetPtr_
Sub-set mesh.
virtual bool write()
Write.
virtual bool read(const dictionary &)
Read the forces data.
const Time & time_
Reference to the time database.
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the su...
static tmp< DimensionedField< Type, volMesh > > interpolate(const DimensionedField< Type, volMesh > &, const fvMesh &sMesh, const labelUList &cellMap)
Map volume internal (dimensioned) field.
const fvMesh & subMesh() const
Return reference to subset mesh.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Type & lookupObjectRef(const word &name, const bool recursive=false) const
const Type & lookupObject(const word &name, const bool recursive=false) const
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.
Calculate the divergence of the given field.
Calculate the gradient of the given field.
Calculate the laplacian of the given field.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimVelocity
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
tmp< volScalarField > trho