62 else if (rhoName_ !=
"none")
69 <<
"Neither rhoName nor rho are specified."
80 const word& sourceName,
81 const word& modelType,
87 UName_(coeffs_.getOrDefault<
word>(
"U",
"U")),
88 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"none")),
98 const auto* thermoPtr =
108 coeffs_.readEntry(
"fields", fieldNames_);
114 <<
"settings are:" << fieldNames_ << exit(FatalError);
124Foam::fv::viscousDissipation::devRhoReff()
const
128 const auto* turbPtr =
136 return tmp<volSymmTensorField>(
rho()*turbPtr->devRhoReff());
142 const auto* turbPtr =
150 return tmp<volSymmTensorField>(turbPtr->devRhoReff());
155 <<
" The turbulence model is not found in the database."
172 const word gradUName(
"grad(" + UName_ +
')');
174 auto tgradU = GradFieldType::New
183 const auto* gradUPtr = mesh_.findObject<GradFieldType>(gradUName);
187 tgradU.ref() = *gradUPtr;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Generic GeometricField class.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
@ NO_REGISTER
Do not request registration (bool: false).
void resize(const label len)
Adjust allocated size of list.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
Abstract base-class for fluid and solid thermodynamic properties.
static const word dictName
The dictionary name ("thermophysicalProperties").
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const noexcept
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Base abstract class for handling finite volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Applies a viscous dissipation energy source to the energy equation.
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible energy equation.
viscousDissipation(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Namespace for finite-volume.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
IncompressibleTurbulenceModel< transportModel > turbulenceModel
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimDensity
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< tensor > dimensionedTensor
Dimensioned tensor obtained from generic dimensioned type.
tmp< volScalarField > trho
const dimensionedScalar & D