Go to the documentation of this file.
50 const word& modelType,
56 UName_(coeffs_.getOrDefault<
word>(
"U",
"U")),
57 max_(coeffs_.
get<scalar>(
"max"))
70 coeffs_.readEntry(
"max", max_);
81 const scalar maxSqrU =
sqr(max_);
85 for (
const label celli : cells_)
87 const scalar magSqrUi =
magSqr(Uif[celli]);
89 if (magSqrUi > maxSqrU)
91 Uif[celli] *=
sqrt(maxSqrU/magSqrUi);
100 if (!Up.fixesValue())
104 const scalar magSqrUi =
magSqr(Up[facei]);
106 if (magSqrUi > maxSqrU)
108 Up[facei] *=
sqrt(maxSqrU/magSqrUi);
117 U.correctBoundaryConditions();
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A class for handling words, derived from Foam::string.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
void resize(const label len)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
limitVelocity(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
virtual bool read(const dictionary &dict)
Generic templated field type.
virtual bool read(const dictionary &dict)
bool useSubMesh() const noexcept
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
virtual void correct(volVectorField &U)
fvPatchField< vector > fvPatchVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
Generic GeometricField class.