119void InfoField(
const word& fldName)
121 Info<<
"Writing field: " << fldName <<
nl <<
endl;
136 mesh.time().timeName(),
157 basicThermo::dictName,
173 compressible::turbulenceModel::New
191 #include "createPhi.H"
245int main(
int argc,
char *argv[])
249 "Sets initial turbulence fields based on"
250 " various empirical equations"
252 argList::noFunctionObjects();
253 argList::addOption(
"dict",
"file",
"Alternative setTurbulenceFieldsDict");
269 IOstream::defaultPrecision(15);
274 const scalar uRef =
dict.getCheck<scalar>(
"uRef", scalarMinMax::ge(SMALL));
277 dict.getCheckOrDefault<scalar>(
"kappa", 0.41, scalarMinMax::ge(SMALL));
279 dict.getCheckOrDefault<scalar>(
"Cmu", 0.09, scalarMinMax::ge(SMALL));
280 const scalar dPlusRef =
281 dict.getCheckOrDefault<scalar>(
"dPlusRef", 15, scalarMinMax::ge(SMALL));
284 const word epsilonName =
dict.getOrDefault<
word>(
"epsilon",
"epsilon");
286 const word omegaName =
dict.getOrDefault<
word>(
"omega",
"omega");
288 const bool initU =
dict.getOrDefault<
bool>(
"initialiseU",
false);
289 const bool initEpsilon =
290 dict.getOrDefault<
bool>(
"initialiseEpsilon",
false);
291 const bool initK =
dict.getOrDefault<
bool>(
"initialiseK",
false);
292 const bool initOmega =
dict.getOrDefault<
bool>(
"initialiseOmega",
false);
293 const bool initR =
dict.getOrDefault<
bool>(
"initialiseR",
false);
294 const bool writeF =
dict.getOrDefault<
bool>(
"writeF",
false);
303 createIOobject(
mesh,
UName, IOobject::MUST_READ),
310 tU.cref().boundaryField().size(),
323 createIOobject(
mesh, epsilonName),
334 createIOobject(
mesh, kName),
345 createIOobject(
mesh, omegaName),
356 createIOobject(
mesh, RName),
384 if (isA<wallFvPatch>(pfld.patch()))
433 const scalar
C = 7.8;
434 const scalar B1 = 11;
452 if (tepsilon.
valid())
476 R[celli] = Rdiag[celli];
487 InfoField(tU->name());
491 if (tepsilon.
valid())
493 InfoField(tepsilon->name());
499 InfoField(tk->name());
505 InfoField(tomega->name());
511 InfoField(tR->name());
523 runTime.printExecutionTime(Info);
#define R(A, B, C, D, E, F, K, M)
Graphite solid properties.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (uses typeFilePath to find file) and check its info.
readOption
Enumeration defining the read options.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Generic dimensioned Type class.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Fundamental fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
A simple single-phase transport model based on viscosityModel.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
void clear() const noexcept
bool valid() const noexcept
Identical to good(), or bool operator.
A class for handling words, derived from Foam::string.
Creates and initialises the face-flux field phi.
const word dictName("faMeshDefinition")
compressible::turbulenceModel & turbulence
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionedScalar pow4(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a)
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))
singlePhaseTransportModel laminarTransport(U, phi)
#define forAll(list, i)
Loop across all elements in list.
static const char *const typeName
The type name used in ensight case files.
const word UName(propsDict.getOrDefault< word >("U", "U"))
const vector L(dict.get< vector >("L"))