DATurbulenceModel.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6 \*---------------------------------------------------------------------------*/
7 
8 #include "DATurbulenceModel.H"
9 
10 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
11 
12 namespace Foam
13 {
14 
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16 
17 defineTypeNameAndDebug(DATurbulenceModel, 0);
18 defineRunTimeSelectionTable(DATurbulenceModel, dictionary);
19 
20 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
21 
22 DATurbulenceModel::DATurbulenceModel(
23  const word modelType,
24  const fvMesh& mesh,
25  const DAOption& daOption)
26  : regIOobject(
27  IOobject(
28  "DATurbulenceModel",
29  mesh.time().timeName(),
30  mesh, // register to mesh
31  IOobject::NO_READ,
32  IOobject::NO_WRITE,
33  true // always register object
34  )),
35  mesh_(mesh),
36  daOption_(daOption),
37  allOptions_(daOption.getAllOptions()),
38  daGlobalVar_(const_cast<DAGlobalVar&>(mesh_.thisDb().lookupObject<DAGlobalVar>("DAGlobalVar"))),
39  nut_(const_cast<volScalarField&>(
40  mesh.thisDb().lookupObject<volScalarField>("nut"))),
41  U_(const_cast<volVectorField&>(
42  mesh.thisDb().lookupObject<volVectorField>("U"))),
43  phi_(const_cast<surfaceScalarField&>(
44  mesh.thisDb().lookupObject<surfaceScalarField>("phi"))),
45  phase_(
46  IOobject(
47  "phase",
48  mesh.time().timeName(),
49  mesh,
50  IOobject::NO_READ,
51  IOobject::NO_WRITE,
52  false),
53  mesh,
54  dimensionedScalar("phase", dimensionSet(0, 0, 0, 0, 0, 0, 0), 1.0),
55  zeroGradientFvPatchField<scalar>::typeName),
56  phaseRhoPhi_(const_cast<surfaceScalarField&>(
57  mesh.thisDb().lookupObject<surfaceScalarField>("phi"))),
58  // initialize an uniform rho field for incompressible cases
59  rhoOne_(
60  IOobject(
61  "rho",
62  mesh.time().timeName(),
63  mesh,
64  IOobject::NO_READ,
65  IOobject::NO_WRITE,
66  false),
67  mesh,
68  dimensionedScalar("rho", dimensionSet(0, 0, 0, 0, 0, 0, 0), 1.0),
69  zeroGradientFvPatchField<scalar>::typeName),
70  turbDict_(
71  IOobject(
72  "turbulenceProperties",
73  mesh.time().constant(),
74  mesh,
75  IOobject::MUST_READ,
76  IOobject::NO_WRITE,
77  false)),
78  coeffDict_(turbDict_.subDict("RAS")),
79  kMin_(dimensioned<scalar>::lookupOrAddToDict(
80  "kMin",
81  coeffDict_,
82  sqr(dimVelocity),
83  SMALL)),
84  epsilonMin_(dimensioned<scalar>::lookupOrAddToDict(
85  "epsilonMin",
86  coeffDict_,
87  kMin_.dimensions() / dimTime,
88  SMALL)),
89  omegaMin_(dimensioned<scalar>::lookupOrAddToDict(
90  "omegaMin",
91  coeffDict_,
92  dimless / dimTime,
93  SMALL)),
94  nuTildaMin_(dimensioned<scalar>::lookupOrAddToDict(
95  "nuTildaMin",
96  coeffDict_,
97  nut_.dimensions(),
98  SMALL))
99 {
100 
101  // first check the mode of the turbulence model: incompressible or compressible?
102  if (mesh.thisDb().foundObject<incompressible::turbulenceModel>(incompressible::turbulenceModel::propertiesName))
103  {
104  turbModelType_ = "incompressible";
105  }
106  else if (mesh.thisDb().foundObject<compressible::turbulenceModel>(compressible::turbulenceModel::propertiesName))
107  {
108  turbModelType_ = "compressible";
109  }
110  else
111  {
112  FatalErrorIn("DATurbulenceModel") << "turbModelType_ not valid!" << abort(FatalError);
113  }
114  Info << "Turbulence model is " << turbModelType_ << endl;
115 
116  if (turbModelType_ == "incompressible")
117  {
118  // initialize the Prandtl number from transportProperties
119  IOdictionary transportProperties(
120  IOobject(
121  "transportProperties",
122  mesh.time().constant(),
123  mesh,
124  IOobject::MUST_READ,
125  IOobject::NO_WRITE,
126  false));
127  Pr_ = readScalar(transportProperties.lookup("Pr"));
128 
129  if (mesh_.thisDb().foundObject<volScalarField>("alphat"))
130  {
131  Prt_ = readScalar(transportProperties.lookup("Prt"));
132  }
133  }
134 
135  if (turbModelType_ == "compressible")
136  {
137 
138  // initialize the Prandtl number from thermophysicalProperties
139  IOdictionary thermophysicalProperties(
140  IOobject(
141  "thermophysicalProperties",
142  mesh.time().constant(),
143  mesh,
144  IOobject::MUST_READ,
145  IOobject::NO_WRITE,
146  false));
147  Pr_ = readScalar(
148  thermophysicalProperties.subDict("mixture").subDict("transport").lookup("Pr"));
149 
150  if (mesh_.thisDb().foundObject<volScalarField>("alphat"))
151  {
152  const IOdictionary& turbDict = mesh_.thisDb().lookupObject<IOdictionary>("turbulenceProperties");
153  dictionary rasSubDict = turbDict.subDict("RAS");
154  Prt_ = rasSubDict.getScalar("Prt");
155  }
156  }
157 }
158 
159 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
160 
161 autoPtr<DATurbulenceModel> DATurbulenceModel::New(
162  const word modelType,
163  const fvMesh& mesh,
164  const DAOption& daOption)
165 {
166  if (daOption.getAllOptions().lookupOrDefault<label>("debug", 0))
167  {
168  Info << "Selecting " << modelType << " for DATurbulenceModel" << endl;
169  }
170 
171  dictionaryConstructorTable::iterator cstrIter =
172  dictionaryConstructorTablePtr_->find(modelType);
173 
174  if (cstrIter == dictionaryConstructorTablePtr_->end())
175  {
176  FatalErrorIn(
177  "DATurbulenceModel::New"
178  "("
179  " const word,"
180  " const fvMesh&,"
181  " const DAOption&"
182  ")")
183  << "Unknown DATurbulenceModel type "
184  << modelType << nl << nl
185  << "Valid DATurbulenceModel types:" << endl
186  << dictionaryConstructorTablePtr_->sortedToc()
187  << exit(FatalError);
188  }
189 
190  return autoPtr<DATurbulenceModel>(
191  cstrIter()(modelType, mesh, daOption));
192 }
193 
194 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
195 
196 // this is a virtual function for regIOobject
197 bool DATurbulenceModel::writeData(Ostream& os) const
198 {
199  // do nothing
200  return true;
201 }
202 
204 {
205  // see src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.C
206  if (mesh_.thisDb().foundObject<volScalarField>("alphat"))
207  {
208  dimensionedScalar Prt(
209  "Prt1",
210  dimless,
211  Prt_);
212 
213  volScalarField& alphat = const_cast<volScalarField&>(
214  mesh_.thisDb().lookupObject<volScalarField>("alphat"));
215  alphat = rho() * nut_ / Prt;
216  alphat.correctBoundaryConditions();
217  }
218 }
219 
220 tmp<volScalarField> DATurbulenceModel::nuEff() const
221 {
222  /*
223  Description:
224  Return nut+nu
225  */
226 
227  return tmp<volScalarField>(
228  new volScalarField(
229  "nuEff",
230  this->nu() + nut_));
231 }
232 
233 tmp<volScalarField> DATurbulenceModel::alphaEff()
234 {
235  /*
236  Description:
237  Return alphat+alpha
238  For compressible flow, we get it from thermo object
239  For incompressible flow we use alpha+alphat
240  */
241 
242  if (turbModelType_ == "incompressible")
243  {
244  const volScalarField& alphat = mesh_.thisDb().lookupObject<volScalarField>("alphat");
245  return tmp<volScalarField>(
246  new volScalarField(
247  "alphaEff",
248  this->alpha() + alphat));
249  }
250  else if (turbModelType_ == "compressible")
251  {
252  const volScalarField& alphat = mesh_.thisDb().lookupObject<volScalarField>("alphat");
253  const fluidThermo& thermo = mesh_.thisDb().lookupObject<fluidThermo>("thermophysicalProperties");
254  return tmp<volScalarField>(
255  new volScalarField(
256  "alphaEff",
257  thermo.alphaEff(alphat)));
258  }
259  else
260  {
261  FatalErrorIn("alphaEff") << "turbModelType_ not valid!" << abort(FatalError);
262  // a dummy return
263  return this->alpha();
264  }
265 }
266 
267 tmp<volScalarField> DATurbulenceModel::nu() const
268 {
269  /*
270  Description:
271  Return nu
272  For compressible flow, we get it from mu/rho
273  For incompressible flow we get it from ther laminarTransport object
274  */
275 
276  if (turbModelType_ == "incompressible")
277  {
278  const volScalarField& nu = mesh_.thisDb().lookupObject<singlePhaseTransportModel>("transportProperties").nu();
279  return nu;
280  }
281  else if (turbModelType_ == "compressible")
282  {
283  const volScalarField& mu = mesh_.thisDb().lookupObject<fluidThermo>("thermophysicalProperties").mu();
284  return mu / this->rho();
285  }
286  else
287  {
288  FatalErrorIn("alphaEff") << "turbModelType_ not valid!" << abort(FatalError);
289  // a dummy return
290  return this->mu();
291  }
292 }
293 
294 tmp<volScalarField> DATurbulenceModel::rho() const
295 {
296  /*
297  Description:
298  Return the density field
299  For compressible flow, we get it from the memory
300  For incompressible flow we return one
301  */
302 
303  if (turbModelType_ == "incompressible")
304  {
305  return rhoOne_;
306  }
307  else if (turbModelType_ == "compressible")
308  {
309  const volScalarField& rho = mesh_.thisDb().lookupObject<volScalarField>("rho");
310  return rho;
311  }
312  else
313  {
314  FatalErrorIn("alphaEff") << "turbModelType_ not valid!" << abort(FatalError);
315  // a dummy return
316  return this->alpha();
317  }
318 }
319 
322 {
323  if (turbModelType_ == "incompressible")
324  {
325  return rhoOne_.dimensions();
326  }
327  else if (turbModelType_ == "compressible")
328  {
329  const volScalarField& rho = mesh_.thisDb().lookupObject<volScalarField>("rho");
330  return rho.dimensions();
331  }
332  else
333  {
334  FatalErrorIn("alphaEff") << "turbModelType_ not valid!" << abort(FatalError);
335  // a dummy return
336  return rhoOne_.dimensions();
337  }
338 }
339 
340 tmp<volScalarField> DATurbulenceModel::alpha() const
341 {
342  /*
343  Description:
344  Return alpha = nu/Pr
345  */
346  return this->nu() / Pr_;
347 }
348 
349 tmp<Foam::volScalarField> DATurbulenceModel::mu() const
350 {
351  /*
352  Description:
353  Return mu
354  For compressible flow, we get it from thermo
355  Not appliable for other flow conditions
356  */
357 
358  if (turbModelType_ == "compressible")
359  {
360  const volScalarField& mu = mesh_.thisDb().lookupObject<fluidThermo>("thermophysicalProperties").mu();
361  return mu;
362  }
363  else
364  {
365  FatalErrorIn("flowCondition not valid!") << abort(FatalError);
366  // a dummy return
367  return this->nu();
368  }
369 }
370 
371 tmp<volSymmTensorField> DATurbulenceModel::devRhoReff() const
372 {
373  /*
374  Description:
375  Return devRhoReff for computing viscous force
376  */
377 
378  return tmp<volSymmTensorField>(
379  new volSymmTensorField(
380  IOobject(
381  IOobject::groupName("devRhoReff", U_.group()),
382  mesh_.time().timeName(),
383  mesh_,
384  IOobject::NO_READ,
385  IOobject::NO_WRITE),
386  (-phase_ * rho() * nuEff()) * dev(twoSymm(fvc::grad(U_)))));
387 }
388 
390  volVectorField& U)
391 {
392  /*
393  Description:
394  Return divDevRhoReff for the laplacian terms
395  */
396  word divScheme = "None";
397  if (turbModelType_ == "incompressible")
398  {
399  divScheme = "div((nuEff*dev2(T(grad(U)))))";
400  }
401  else if (turbModelType_ == "compressible")
402  {
403  divScheme = "div(((rho*nuEff)*dev2(T(grad(U)))))";
404  }
405 
406  return (
407  -fvm::laplacian(phase_ * rho() * nuEff(), U)
408  - fvc::div((phase_ * rho() * nuEff()) * dev2(T(fvc::grad(U))), divScheme));
409 }
410 
411 tmp<fvVectorMatrix> DATurbulenceModel::divDevReff(
412  volVectorField& U)
413 {
414  /*
415  Description:
416  Call divDevRhoReff
417  */
418 
419  return divDevRhoReff(U);
420 }
421 
423 {
424  /*
425  Description:
426  Update the near wall distance
427  */
428 
429  // ********* TODO ********
430  // ********* this is not implemented yet ********
431  //d_.correct();
432  // need to correct turbulence boundary conditions
433  // this is because when the near wall distance changes, the nut, omega, epsilon at wall
434  // may change if you use wall functions
436 }
437 
438 void DATurbulenceModel::printYPlus(const label printToScreen) const
439 {
440  /*
441  Description:
442  Calculate the min, max, and mean yPlus for all walls and print the
443  values to screen
444  Modified from src/functionObjects/field/yPlus/yPlus.C
445  */
446 
447  if (printToScreen)
448  {
449 
450  volScalarField yPlus(
451  IOobject(
452  typeName,
453  mesh_.time().timeName(),
454  mesh_,
455  IOobject::NO_READ,
456  IOobject::AUTO_WRITE),
457  mesh_,
458  dimensionedScalar(dimless, Zero));
459  volScalarField::Boundary& yPlusBf = yPlus.boundaryFieldRef();
460 
461  const nearWallDist nwd(mesh_);
462  const volScalarField::Boundary& d = nwd.y();
463 
464  const fvPatchList& patches = mesh_.boundary();
465 
466  const volScalarField::Boundary& nutBf = nut_.boundaryField();
467  const volVectorField::Boundary& UBf = U_.boundaryField();
468 
469  volScalarField nuEff = this->nuEff();
470  volScalarField nu = this->nu();
471 
472  const volScalarField::Boundary& nuEffBf = nuEff.boundaryField();
473  const volScalarField::Boundary& nuBf = nu.boundaryField();
474 
475  forAll(patches, patchI)
476  {
477  const fvPatch& patch = patches[patchI];
478 
479  if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchI]))
480  {
481  const nutWallFunctionFvPatchScalarField& nutPf =
482  dynamic_cast<const nutWallFunctionFvPatchScalarField&>(
483  nutBf[patchI]);
484 
485  yPlusBf[patchI] = nutPf.yPlus();
486  }
487  else if (isA<wallFvPatch>(patch))
488  {
489  yPlusBf[patchI] =
490  d[patchI]
491  * sqrt(
492  nuEffBf[patchI]
493  * mag(UBf[patchI].snGrad()))
494  / nuBf[patchI];
495  }
496  }
497 
498  // now compute the global min, max, and mean
499  scalarList yPlusAll;
500  forAll(patches, patchI)
501  {
502  const fvPatch& patch = patches[patchI];
503  if (isA<wallFvPatch>(patch))
504  {
505  forAll(yPlusBf[patchI], faceI)
506  {
507  yPlusAll.append(yPlusBf[patchI][faceI]);
508  }
509  }
510  }
511  scalar minYplus = gMin(yPlusAll);
512  scalar maxYplus = gMax(yPlusAll);
513  scalar avgYplus = gAverage(yPlusAll);
514 
515  Info << "yPlus min: " << minYplus
516  << " max: " << maxYplus
517  << " mean: " << avgYplus << endl;
518  }
519 }
520 
522  const Time& runTime,
523  const label printInterval) const
524 {
525  /*
526  Description:
527  Check if it is print time
528  */
529 
530  if (runTime.timeIndex() % printInterval == 0 || runTime.timeIndex() == 1)
531  {
532  return 1;
533  }
534  else
535  {
536  return 0;
537  }
538 }
539 
540 void DATurbulenceModel::getTurbProdTerm(volScalarField& prodTerm) const
541 {
542  /*
543  Description:
544  Return the value of the production term from the turbulence model
545  */
546 
547  FatalErrorIn("DATurbulenceModel::getTurbProdTerm")
548  << "Child class not implemented!"
549  << abort(FatalError);
550 }
551 
552 void DATurbulenceModel::getTurbProdOverDestruct(volScalarField& PoD) const
553 {
554  /*
555  Description:
556  Return the value of the production over destruction term from the turbulence model
557  */
558 
559  FatalErrorIn("DATurbulenceModel::getTurbProdOverDestruct")
560  << "Child class not implemented!"
561  << abort(FatalError);
562 }
563 
564 void DATurbulenceModel::getTurbConvOverProd(volScalarField& CoP) const
565 {
566  /*
567  Description:
568  Return the value of the convective over production term from the turbulence model
569  */
570 
571  FatalErrorIn("DATurbulenceModel::getTurbConvOverProd")
572  << "Child class not implemented!"
573  << abort(FatalError);
574 }
575 
577  const volScalarField& mySource,
578  volScalarField& pseudoNuTilda)
579 {
580  /*
581  Description:
582  Inverse transpose product, M_nuTilda^(-T)
583  */
584 
585  FatalErrorIn("DATurbulenceModel::invTranProdNuTildaEqn")
586  << "Child class not implemented!"
587  << abort(FatalError);
588 }
589 
590 void DATurbulenceModel::calcLduResidualTurb(volScalarField& nuTildaRes)
591 {
592  /*
593  Description:
594  calculate the turbulence residual using LDU matrix
595  */
596 
597  FatalErrorIn("DATurbulenceModel::calcLduResidualTurb")
598  << "Child class not implemented!"
599  << abort(FatalError);
600 }
601 
603 {
604  /*
605  Description:
606  construct the pseudo nuTildaEqn
607  */
608 
609  FatalErrorIn("DATurbulenceModel::constructPseudoNuTildaEqn")
610  << "Child class not implemented!"
611  << abort(FatalError);
612 }
613 
614 void DATurbulenceModel::rhsSolvePseudoNuTildaEqn(const volScalarField& nuTildaSource)
615 {
616  /*
617  Description:
618  solve the pseudo nuTildaEqn with overwritten rhs
619  */
620 
621  FatalErrorIn("DATurbulenceModel::rhsSolvePseudoNuTildaEqn")
622  << "Child class not implemented!"
623  << abort(FatalError);
624 }
625 
628  const word varName,
629  scalarField& diag,
630  scalarField& upper,
631  scalarField& lower)
632 {
633  FatalErrorIn("DATurbulenceModel::getFvMatrixFields")
634  << "Child class not implemented!"
635  << abort(FatalError);
636 }
637 
640  const word varName,
641  const scalarList& rhs,
642  scalarList& dPsi)
643 {
644  FatalErrorIn("DATurbulenceModel::solveAdjointFP")
645  << "Child class not implemented!"
646  << abort(FatalError);
647 }
648 
649 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
650 
651 } // End namespace Foam
652 
653 // ************************************************************************* //
Foam::DATurbulenceModel::getTurbProdTerm
virtual void getTurbProdTerm(volScalarField &prodTerm) const
return the value of the production term from the turbulence model
Definition: DATurbulenceModel.C:540
U
volVectorField & U
Definition: createRefsPimpleDyM.H:7
Foam::DATurbulenceModel::nuEff
tmp< volScalarField > nuEff() const
return effective viscosity
Definition: DATurbulenceModel.C:220
Foam::DATurbulenceModel::constructPseudoNuTildaEqn
virtual void constructPseudoNuTildaEqn()
Definition: DATurbulenceModel.C:602
Foam::DATurbulenceModel::divDevRhoReff
tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U)
divDev terms
Definition: DATurbulenceModel.C:389
Foam::DATurbulenceModel::divDevReff
tmp< fvVectorMatrix > divDevReff(volVectorField &U)
divDev terms
Definition: DATurbulenceModel.C:411
Foam::DAOption
Definition: DAOption.H:29
pseudoNuTilda
volScalarField & pseudoNuTilda
Definition: pseudoEqns.H:34
Foam::DATurbulenceModel::New
static autoPtr< DATurbulenceModel > New(const word modelType, const fvMesh &mesh, const DAOption &daOption)
Definition: DATurbulenceModel.C:161
Foam::DATurbulenceModel::rho
tmp< volScalarField > rho() const
get the density field
Definition: DATurbulenceModel.C:294
thermo
fluidThermo & thermo
Definition: createRefsRhoPimple.H:6
Foam::DATurbulenceModel::mu
tmp< Foam::volScalarField > mu() const
get mu
Definition: DATurbulenceModel.C:349
Foam::DATurbulenceModel::Prt_
scalar Prt_
turbulent Prandtl number
Definition: DATurbulenceModel.H:119
Foam::DAOption::getAllOptions
const dictionary & getAllOptions() const
return a reference of allOptions_ dictionary
Definition: DAOption.H:56
Foam::DATurbulenceModel::correctBoundaryConditions
virtual void correctBoundaryConditions()=0
update turbulence variable boundary values
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DATurbulenceModel::calcLduResidualTurb
virtual void calcLduResidualTurb(volScalarField &nuTildaRes)
calculate the turbulence residual using LDU matrix
Definition: DATurbulenceModel.C:590
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(DAFunction, dictionary)
Foam::DATurbulenceModel::correctWallDist
void correctWallDist()
update wall distance for d_. Note: y_ will be automatically updated in mesh_ object
Definition: DATurbulenceModel.C:422
Foam::DATurbulenceModel::U_
volVectorField & U_
velocity
Definition: DATurbulenceModel.H:80
Foam::DATurbulenceModel::nut_
volScalarField & nut_
turbulence viscosity
Definition: DATurbulenceModel.H:77
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(DAFunction, 0)
Foam
Definition: checkGeometry.C:32
divScheme
word divScheme
Definition: pseudoEqns.H:1
Foam::DATurbulenceModel::getTurbConvOverProd
virtual void getTurbConvOverProd(volScalarField &CoP) const
return the value of the convective over production term from the turbulence model
Definition: DATurbulenceModel.C:564
T
volScalarField & T
Definition: createRefsHeatTransfer.H:5
Foam::DATurbulenceModel::invTranProdNuTildaEqn
virtual void invTranProdNuTildaEqn(const volScalarField &mySource, volScalarField &pseudoNuTilda)
Inverse transpose product, M_nuTilda^(-T)
Definition: DATurbulenceModel.C:576
Foam::DATurbulenceModel::devRhoReff
tmp< volSymmTensorField > devRhoReff() const
dev terms
Definition: DATurbulenceModel.C:371
Prt
dimensionedScalar Prt
Definition: TEqnPimpleDyM.H:4
Foam::DATurbulenceModel::rhoDimensions
dimensionSet rhoDimensions() const
return the dimension of rho
Definition: DATurbulenceModel.C:321
Foam::DATurbulenceModel::rhoOne_
volScalarField rhoOne_
an uniform rho field with ones
Definition: DATurbulenceModel.H:92
Foam::DATurbulenceModel::rhsSolvePseudoNuTildaEqn
virtual void rhsSolvePseudoNuTildaEqn(const volScalarField &nuTildaSource)
Definition: DATurbulenceModel.C:614
Foam::DATurbulenceModel::nu
tmp< volScalarField > nu() const
get the nu field
Definition: DATurbulenceModel.C:267
forAll
forAll(nuTilda1, cellI)
Definition: nuTilda1EqnIrkPimple.H:19
Foam::DATurbulenceModel::printYPlus
void printYPlus(const label printToScreen) const
print the min max and mean yPlus to screen
Definition: DATurbulenceModel.C:438
Foam::DATurbulenceModel::correctAlphat
void correctAlphat()
update alphat
Definition: DATurbulenceModel.C:203
Foam::DATurbulenceModel::getFvMatrixFields
virtual void getFvMatrixFields(const word varName, scalarField &diag, scalarField &upper, scalarField &lower)
return the diag(), upper(), and lower() scalarFields from the turbulence model's fvMatrix
Definition: DATurbulenceModel.C:627
alphat
volScalarField & alphat
Definition: TEqnPimpleDyM.H:5
Foam::DATurbulenceModel::mesh_
const fvMesh & mesh_
fvMesh
Definition: DATurbulenceModel.H:65
Foam::DATurbulenceModel::solveAdjointFP
virtual void solveAdjointFP(const word varName, const scalarList &rhs, scalarList &dPsi)
solve the fvMatrixT field with given rhs and solution
Definition: DATurbulenceModel.C:639
Foam::DATurbulenceModel::isPrintTime
label isPrintTime(const Time &runTime, const label printInterval) const
Definition: DATurbulenceModel.C:521
Foam::DATurbulenceModel::alphaEff
tmp< volScalarField > alphaEff()
return effective thermal diffusivity
Definition: DATurbulenceModel.C:233
Foam::DATurbulenceModel::alpha
tmp< volScalarField > alpha() const
get alpha field
Definition: DATurbulenceModel.C:340
runTime
Time & runTime
Definition: createRefsHeatTransfer.H:1
Foam::DAGlobalVar
Definition: DAGlobalVar.H:26
Foam::DATurbulenceModel::Pr_
scalar Pr_
Prandtl number.
Definition: DATurbulenceModel.H:116
Foam::DATurbulenceModel::getTurbProdOverDestruct
virtual void getTurbProdOverDestruct(volScalarField &PoD) const
return the ratio of the production over destruction term from the turbulence model
Definition: DATurbulenceModel.C:552
DATurbulenceModel.H
Foam::DATurbulenceModel::turbModelType_
word turbModelType_
whether the turbulence model is incompressible or compressible
Definition: DATurbulenceModel.H:95
Foam::DATurbulenceModel::phase_
volScalarField phase_
phase field
Definition: DATurbulenceModel.H:86
Foam::DATurbulenceModel::writeData
bool writeData(Ostream &os) const
this is a virtual function for regIOobject
Definition: DATurbulenceModel.C:197