47 sigmaNut_(dimensioned<scalar>::lookupOrAddToDict(
51 kappa_(dimensioned<scalar>::lookupOrAddToDict(
56 Cb1_(dimensioned<scalar>::lookupOrAddToDict(
60 Cb2_(dimensioned<scalar>::lookupOrAddToDict(
64 Cw1_(Cb1_ / sqr(kappa_) + (1.0 + Cb2_) / sigmaNut_),
65 Cw2_(dimensioned<scalar>::lookupOrAddToDict(
69 Cw3_(dimensioned<scalar>::lookupOrAddToDict(
73 Cv1_(dimensioned<scalar>::lookupOrAddToDict(
77 Cs_(dimensioned<scalar>::lookupOrAddToDict(
82 nuTilda_(const_cast<volScalarField&>(
83 mesh.thisDb().lookupObject<volScalarField>(
"nuTilda"))),
87 mesh.time().timeName(),
92 #ifdef CompressibleFlow
93 dimensionedScalar(
"nuTildaRes", dimensionSet(1, -1, -2, 0, 0, 0, 0), 0.0),
95 #ifdef IncompressibleFlow
96 dimensionedScalar(
"nuTildaRes", dimensionSet(0, 2, -2, 0, 0, 0, 0), 0.0),
98 zeroGradientFvPatchField<scalar>::typeName),
99 y_(
mesh.thisDb().lookupObject<volScalarField>(
"yWall"))
104 IOdictionary fvSchemes(
107 mesh.time().system(),
112 word ddtScheme = word(fvSchemes.subDict(
"ddtSchemes").lookup(
"default"));
113 if (ddtScheme ==
"steadyState")
116 daOption.getAllOptions().lookupOrDefault<label>(
"printInterval", 100);
121 daOption.getAllOptions().lookupOrDefault<label>(
"printIntervalUnsteady", 500);
135 const volScalarField& chi)
const
137 const volScalarField chi3(pow3(
chi));
138 return chi3 / (chi3 + pow3(
Cv1_));
142 const volScalarField& chi,
143 const volScalarField& fv1)
const
149 const volScalarField& chi,
150 const volScalarField& fv1)
const
152 volScalarField Omega(::sqrt(2.0) * mag(skew(fvc::grad(
U_))));
162 const volScalarField& Stilda)
const
169 dimensionedScalar(
"SMALL",
Stilda.dimensions(), SMALL))
172 r.boundaryFieldRef() == 0.0;
174 const volScalarField g(r +
Cw2_ * (pow6(r) - r));
176 return g * pow((1.0 + pow6(
Cw3_)) / (pow6(g) + pow6(
Cw3_)), 1.0 / 6.0);
181 return tmp<volScalarField>(
212 word stateName = modelStates[idxI];
213 if (stateName ==
"nut")
215 modelStates[idxI] =
"nuTilda";
228 const volScalarField
chi(this->
chi());
229 const volScalarField
fv1(this->
fv1(chi));
232 nut_.correctBoundaryConditions();
248 nuTilda_.correctBoundaryConditions();
301 forAll(stateCon[idxI], idxJ)
303 word conStateName = stateCon[idxI][idxJ];
304 if (conStateName ==
"nut")
306 stateCon[idxI][idxJ] =
"nuTilda";
352 if (
mesh_.thisDb().foundObject<volScalarField>(
"p"))
356 else if (
mesh_.thisDb().foundObject<volScalarField>(
"p_rgh"))
363 "Neither p nor p_rgh was found in mesh.thisDb()!"
364 "addModelResidualCon failed to setup turbulence residuals!")
369 #ifdef IncompressibleFlow
373 {
"U",
"nuTilda",
"phi"},
379 #ifdef CompressibleFlow
383 {
"U",
"T", pName,
"nuTilda",
"phi"},
384 {
"U",
"T", pName,
"nuTilda"},
385 {
"T", pName,
"nuTilda"}
403 dictionary dummyOptions;
434 word divNuTildaScheme =
"div(phi,nuTilda)";
440 isPC = options.getLabel(
"isPC");
444 divNuTildaScheme =
"div(pc)";
448 const volScalarField
chi(this->
chi());
449 const volScalarField
fv1(this->
fv1(chi));
453 tmp<fvScalarMatrix> nuTildaEqn(
461 nuTildaEqn.ref().relax();
468 SolverPerformance<scalar> solverNuTilda =
solve(nuTildaEqn);
471 Info <<
"nuTilda Initial residual: " << solverNuTilda.initialResidual() << endl
472 <<
" Final residual: " << solverNuTilda.finalResidual() << endl;
476 nuTilda_.correctBoundaryConditions();