36 namespace resolutionIndexModels
47 Foam::resolutionIndexModels::CelikNuIndex::nuNum()
const 49 const auto& Delta = getOrReadField<volScalarField>(deltaName_);
51 tmp<volScalarField> tkNum = kNum();
54 return sign(tkNum.cref())*Cnu_*Delta*
sqrt(tkNum.cref());
59 Foam::resolutionIndexModels::CelikNuIndex::kNum()
const 61 const auto& kSgs = getOrReadField<volScalarField>(kName_);
62 const auto& Delta = getOrReadField<volScalarField>(deltaName_);
64 tmp<volScalarField> th =
cbrt(V());
67 return Cn_*
sqr(th/Delta)*kSgs;
104 alphaNu_ =
dict.getOrDefault<scalar>(
"alphaNu", 0.05);
105 n_ =
dict.getOrDefault<scalar>(
"n", 0.53);
106 Cnu_ =
dict.getOrDefault<scalar>(
"Cnu", 0.1);
107 Cn_ =
dict.getOrDefault<scalar>(
"Cn", 1.0);
108 kName_ =
dict.getOrDefault<
word>(
"k",
"k");
109 deltaName_ =
dict.getOrDefault<
word>(
"delta",
"delta");
111 nutName_ =
dict.getOrDefault<
word>(
"nut",
"nut");
120 const auto&
nu = getOrReadField<volScalarField>(nuName_);
121 const auto& nuSgs = getOrReadField<volScalarField>(nutName_);
126 auto& index = getOrReadField<volScalarField>(resultName());
129 index = 1.0/(1.0 + alphaNu_*
pow(tnuEff/
nu, n_));
130 index.correctBoundaryConditions();
138 const auto& index = getOrReadField<volScalarField>(resultName());
140 Info<<
tab <<
"writing field:" << index.name() <<
endl;
dimensionedScalar sign(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char tab
The tab '\t' character(0x09)
CelikNuIndex(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from components.
Macros for easy insertion into run-time selection tables.
bool read(const char *buf, int32_t &val)
Same as readInt32.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
defineTypeNameAndDebug(CelikEtaIndex, 0)
dimensionedScalar cbrt(const dimensionedScalar &ds)
A base class for resolutionIndex models.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Mesh data needed to do the Finite Volume discretisation.
virtual bool read(const dictionary &dict)
Read top-level dictionary.
addToRunTimeSelectionTable(resolutionIndexModel, CelikEtaIndex, dictionary)
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool execute()
Calculate the result field.
A class for managing temporary objects.
virtual bool write()
Write the result field.
virtual bool read(const dictionary &dict)
Read top-level dictionary.