epsilonWallFunctionFvPatchScalarField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2019 OpenFOAM Foundation
9  Copyright (C) 2017-2024 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
31 #include "turbulenceModel.H"
32 #include "fvMatrix.H"
34 
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 
38 
39 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
40 
42 {
43  if (master_ != -1)
44  {
45  return;
46  }
47 
48  const auto& epsilon =
49  static_cast<const volScalarField&>(this->internalField());
50 
51  const volScalarField::Boundary& bf = epsilon.boundaryField();
52 
53  label master = -1;
54  forAll(bf, patchi)
55  {
56  if (isA<epsilonWallFunctionFvPatchScalarField>(bf[patchi]))
57  {
59 
60  if (master == -1)
61  {
62  master = patchi;
63  }
64 
65  epf.master() = master;
66  }
67  }
68 }
69 
70 
72 {
73  const auto& epsilon =
74  static_cast<const volScalarField&>(this->internalField());
75 
76  const volScalarField::Boundary& bf = epsilon.boundaryField();
77 
78  const fvMesh& mesh = epsilon.mesh();
79 
80  if (initialised_ && !mesh.changing())
81  {
82  return;
83  }
84 
85  volScalarField weights
86  (
87  IOobject
88  (
89  "weights",
90  mesh.time().timeName(),
91  mesh,
95  ),
96  mesh,
98  );
99 
100  DynamicList<label> epsilonPatches(bf.size());
101  forAll(bf, patchi)
102  {
103  if (isA<epsilonWallFunctionFvPatchScalarField>(bf[patchi]))
104  {
105  epsilonPatches.append(patchi);
106 
107  const labelUList& faceCells = bf[patchi].patch().faceCells();
108  for (const auto& faceCell : faceCells)
109  {
110  ++weights[faceCell];
111  }
112  }
113  }
114 
115  cornerWeights_.setSize(bf.size());
116 
117  for (const auto& patchi : epsilonPatches)
118  {
119  const fvPatchScalarField& wf = weights.boundaryField()[patchi];
120  cornerWeights_[patchi] = 1.0/wf.patchInternalField();
121  }
122 
123  G_.setSize(internalField().size(), Zero);
124  epsilon_.setSize(internalField().size(), Zero);
126  initialised_ = true;
127 }
128 
129 
132 (
133  const label patchi
134 )
135 {
136  const auto& epsilon =
137  static_cast<const volScalarField&>(this->internalField());
138 
139  const volScalarField::Boundary& bf = epsilon.boundaryField();
140 
141  const auto& epf =
142  refCast<const epsilonWallFunctionFvPatchScalarField>(bf[patchi]);
143 
144  return const_cast<epsilonWallFunctionFvPatchScalarField&>(epf);
145 }
146 
147 
149 (
151  scalarField& G0,
153 )
154 {
155  // Accumulate all of the G and epsilon contributions
156  forAll(cornerWeights_, patchi)
157  {
158  if (!cornerWeights_[patchi].empty())
159  {
160  epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchi);
161 
162  const List<scalar>& w = cornerWeights_[patchi];
163 
164  epf.calculate(turbulence, w, epf.patch(), G0, epsilon0);
165  }
166  }
167 
168  // Apply zero-gradient condition for epsilon
169  forAll(cornerWeights_, patchi)
170  {
171  if (!cornerWeights_[patchi].empty())
172  {
173  epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchi);
174 
175  epf == scalarField(epsilon0, epf.patch().faceCells());
176  }
177  }
178 }
179 
180 
182 (
183  const turbulenceModel& turbModel,
184  const List<scalar>& cornerWeights,
185  const fvPatch& patch,
186  scalarField& G0,
188 )
189 {
190  const label patchi = patch.index();
191 
192  const scalar Cmu25 = pow025(wallCoeffs_.Cmu());
193  const scalar Cmu75 = pow(wallCoeffs_.Cmu(), 0.75);
194  const scalar kappa = wallCoeffs_.kappa();
195  const scalar yPlusLam = wallCoeffs_.yPlusLam();
196 
197  const scalarField& y = turbModel.y()[patchi];
198 
199  const labelUList& faceCells = patch.faceCells();
200 
201  const tmp<scalarField> tnuw = turbModel.nu(patchi);
202  const scalarField& nuw = tnuw();
203 
204  const tmp<volScalarField> tk = turbModel.k();
205  const volScalarField& k = tk();
206 
207  // Calculate y-plus
208  const auto yPlus = [&](const label facei) -> scalar
209  {
210  return
211  (
212  Cmu25*y[facei]*sqrt(k[faceCells[facei]])/nuw[facei]
213  );
214  };
215 
216  // Contribution from the viscous sublayer
217  const auto epsilonVis = [&](const label facei) -> scalar
218  {
219  return
220  (
221  2.0*k[faceCells[facei]]*nuw[facei]
222  / sqr(y[facei])
223  );
224  };
225 
226  // Contribution from the inertial sublayer
227  const auto epsilonLog = [&](const label facei) -> scalar
228  {
229  return
230  (
231  Cmu75*pow(k[faceCells[facei]], 1.5)
232  / (kappa*y[facei])
233  );
234  };
235 
236  switch (blender_)
237  {
238  case blenderType::STEPWISE:
239  {
240  forAll(faceCells, facei)
241  {
242  if (lowReCorrection_ && yPlus(facei) < yPlusLam)
243  {
244  epsilon0[faceCells[facei]] +=
245  cornerWeights[facei]
246  * epsilonVis(facei);
247  }
248  else
249  {
250  epsilon0[faceCells[facei]] +=
251  cornerWeights[facei]
252  * epsilonLog(facei);
253  }
254  }
255  break;
256  }
257 
258  case blenderType::BINOMIAL:
259  {
260  forAll(faceCells, facei)
261  {
262  // (ME:Eqs. 15-16)
263  epsilon0[faceCells[facei]] +=
264  cornerWeights[facei]
265  * pow
266  (
267  pow(epsilonVis(facei), n_) + pow(epsilonLog(facei), n_),
268  scalar(1)/n_
269  );
270  }
271  break;
272  }
273 
274  case blenderType::MAX:
275  {
276  forAll(faceCells, facei)
277  {
278  // (PH:Eq. 27)
279  epsilon0[faceCells[facei]] +=
280  cornerWeights[facei]
281  * max(epsilonVis(facei), epsilonLog(facei));
282  }
283  break;
284  }
285 
286  case blenderType::EXPONENTIAL:
287  {
288  forAll(faceCells, facei)
289  {
290  // (PH:p. 193)
291  const scalar yPlusFace = yPlus(facei);
292  const scalar Gamma =
293  0.001*pow4(yPlusFace)/(scalar(1) + yPlusFace);
294  const scalar invGamma = scalar(1)/(Gamma + ROOTVSMALL);
295 
296  epsilon0[faceCells[facei]] +=
297  cornerWeights[facei]
298  * (
299  epsilonVis(facei)*exp(-Gamma)
300  + epsilonLog(facei)*exp(-invGamma)
301  );
302  }
303  break;
304  }
305 
306  case blenderType::TANH:
307  {
308  forAll(faceCells, facei)
309  {
310  // (KAS:Eqs. 33-34)
311  const scalar epsilonVisFace = epsilonVis(facei);
312  const scalar epsilonLogFace = epsilonLog(facei);
313  const scalar b1 = epsilonVisFace + epsilonLogFace;
314  const scalar b2 =
315  pow
316  (
317  pow(epsilonVisFace, 1.2) + pow(epsilonLogFace, 1.2),
318  1.0/1.2
319  );
320  const scalar phiTanh = tanh(pow4(0.1*yPlus(facei)));
321 
322  epsilon0[faceCells[facei]] +=
323  cornerWeights[facei]
324  * (phiTanh*b1 + (1 - phiTanh)*b2);
325  }
326  break;
327  }
328  }
329 
330  const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
331  const scalarField magGradUw(mag(Uw.snGrad()));
332 
333  const tmp<scalarField> tnutw = turbModel.nut(patchi);
334  const scalarField& nutw = tnutw();
335 
336  forAll(faceCells, facei)
337  {
338  if (!lowReCorrection_ || (yPlus(facei) > yPlusLam))
339  {
340  G0[faceCells[facei]] +=
341  cornerWeights[facei]
342  *(nutw[facei] + nuw[facei])
343  *magGradUw[facei]
344  *Cmu25*sqrt(k[faceCells[facei]])
345  /(kappa*y[facei]);
346  }
347  }
348 }
349 
350 
352 (
353  Ostream& os
354 ) const
355 {
357  os.writeEntryIfDifferent<bool>("lowReCorrection", false, lowReCorrection_);
358  wallCoeffs_.writeEntries(os);
359 }
360 
361 
362 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
363 
366 (
367  const fvPatch& p,
369 )
370 :
371  fixedValueFvPatchField<scalar>(p, iF),
373  lowReCorrection_(false),
374  initialised_(false),
375  master_(-1),
376  wallCoeffs_(),
377  G_(),
378  epsilon_(),
379  cornerWeights_()
380 {}
381 
382 
385 (
387  const fvPatch& p,
389  const fvPatchFieldMapper& mapper
390 )
391 :
392  fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
394  lowReCorrection_(ptf.lowReCorrection_),
395  initialised_(false),
396  master_(-1),
397  wallCoeffs_(ptf.wallCoeffs_),
398  G_(),
399  epsilon_(),
400  cornerWeights_()
401 {}
402 
403 
406 (
407  const fvPatch& p,
409  const dictionary& dict
410 )
411 :
412  fixedValueFvPatchField<scalar>(p, iF, dict),
413  wallFunctionBlenders(dict, blenderType::STEPWISE, scalar(2)),
414  lowReCorrection_(dict.getOrDefault("lowReCorrection", false)),
415  initialised_(false),
416  master_(-1),
417  wallCoeffs_(dict),
418  G_(),
419  epsilon_(),
420  cornerWeights_()
421 {
422  // Apply zero-gradient condition on start-up
423  this->extrapolateInternal();
424 }
425 
426 
429 (
431 )
432 :
433  fixedValueFvPatchField<scalar>(ewfpsf),
434  wallFunctionBlenders(ewfpsf),
435  lowReCorrection_(ewfpsf.lowReCorrection_),
436  initialised_(false),
437  master_(-1),
438  wallCoeffs_(ewfpsf.wallCoeffs_),
439  G_(),
440  epsilon_(),
441  cornerWeights_()
442 {}
443 
444 
447 (
450 )
451 :
452  fixedValueFvPatchField<scalar>(ewfpsf, iF),
453  wallFunctionBlenders(ewfpsf),
454  lowReCorrection_(ewfpsf.lowReCorrection_),
455  initialised_(false),
456  master_(-1),
457  wallCoeffs_(ewfpsf.wallCoeffs_),
458  G_(),
459  epsilon_(),
460  cornerWeights_()
461 {}
462 
463 
464 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
465 
467 (
468  bool init
469 )
470 {
471  if (patch().index() == master_)
472  {
473  if (init)
474  {
475  G_ = 0.0;
476  }
477 
478  return G_;
479  }
480 
481  return epsilonPatch(master_).G();
482 }
483 
484 
486 (
487  bool init
488 )
489 {
490  if (patch().index() == master_)
491  {
492  if (init)
493  {
494  epsilon_ = 0.0;
495  }
496 
497  return epsilon_;
498  }
499 
500  return epsilonPatch(master_).epsilon(init);
501 }
502 
503 
505 {
506  if (updated())
507  {
508  return;
509  }
510 
511  const auto& turbModel = db().lookupObject<turbulenceModel>
512  (
514  (
516  internalField().group()
517  )
518  );
519 
520  setMaster();
521 
522  if (patch().index() == master_)
523  {
524  createAveragingWeights();
525  calculateTurbulenceFields(turbModel, G(true), epsilon(true));
526  }
527 
528  const scalarField& G0 = this->G();
529  const scalarField& epsilon0 = this->epsilon();
530 
531  typedef DimensionedField<scalar, volMesh> FieldType;
532 
533  FieldType& G = db().lookupObjectRef<FieldType>(turbModel.GName());
534 
535  FieldType& epsilon = const_cast<FieldType&>(internalField());
536 
537  forAll(*this, facei)
538  {
539  const label celli = patch().faceCells()[facei];
540 
541  G[celli] = G0[celli];
542  epsilon[celli] = epsilon0[celli];
543  }
544 
546 }
547 
548 
550 (
551  const scalarField& weights
552 )
553 {
554  if (updated())
555  {
556  return;
557  }
558 
559  const auto& turbModel = db().lookupObject<turbulenceModel>
560  (
562  (
564  internalField().group()
565  )
566  );
567 
568  setMaster();
569 
570  if (patch().index() == master_)
571  {
572  createAveragingWeights();
573  calculateTurbulenceFields(turbModel, G(true), epsilon(true));
574  }
575 
576  const scalarField& G0 = this->G();
577  const scalarField& epsilon0 = this->epsilon();
578 
579  typedef DimensionedField<scalar, volMesh> FieldType;
580 
581  FieldType& G = db().lookupObjectRef<FieldType>(turbModel.GName());
582 
583  FieldType& epsilon = const_cast<FieldType&>(internalField());
584 
585  scalarField& epsilonf = *this;
586 
587  // Only set the values if the weights are > tolerance
588  forAll(weights, facei)
589  {
590  const scalar w = weights[facei];
591 
592  if (w > tolerance_)
593  {
594  const label celli = patch().faceCells()[facei];
595 
596  G[celli] = (1.0 - w)*G[celli] + w*G0[celli];
597  epsilon[celli] = (1.0 - w)*epsilon[celli] + w*epsilon0[celli];
598  epsilonf[facei] = epsilon[celli];
599  }
600  }
601 
603 }
604 
605 
607 (
608  fvMatrix<scalar>& matrix
609 )
610 {
611  if (manipulatedMatrix())
612  {
613  return;
614  }
615 
616  matrix.setValues(patch().faceCells(), patchInternalField());
617 
619 }
620 
621 
623 (
624  fvMatrix<scalar>& matrix,
625  const Field<scalar>& weights
626 )
627 {
628  if (manipulatedMatrix())
629  {
630  return;
631  }
632 
633  DynamicList<label> constraintCells(weights.size());
634  DynamicList<scalar> constraintValues(weights.size());
635  const labelUList& faceCells = patch().faceCells();
636 
637  const DimensionedField<scalar, volMesh>& fld = internalField();
638 
639  forAll(weights, facei)
640  {
641  // Only set the values if the weights are > tolerance
642  if (weights[facei] > tolerance_)
643  {
644  const label celli = faceCells[facei];
645 
646  constraintCells.append(celli);
647  constraintValues.append(fld[celli]);
648  }
649  }
650 
651  if (debug)
652  {
653  Pout<< "Patch: " << patch().name()
654  << ": number of constrained cells = " << constraintCells.size()
655  << " out of " << patch().size()
656  << endl;
657  }
658 
659  matrix.setValues(constraintCells, constraintValues);
660 
662 }
663 
664 
666 (
667  Ostream& os
668 ) const
669 {
671  writeLocalEntries(os);
673 }
674 
675 
676 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
677 
678 namespace Foam
679 {
681  (
683  epsilonWallFunctionFvPatchScalarField
684  );
685 }
686 
687 
688 // ************************************************************************* //
dimensionedScalar tanh(const dimensionedScalar &ds)
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
dictionary dict
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
static bool initialised_(false)
fvPatchField< vector > fvPatchVectorField
void writeLocalEntries(Ostream &) const
Write local wall function variables.
const dimensionedScalar G0
Conductance quantum: default SI units: [S].
virtual void calculate(const turbulenceModel &turbulence, const List< scalar > &cornerWeights, const fvPatch &patch, scalarField &G, scalarField &epsilon)
Calculate the epsilon and G.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
const fvPatch & patch() const noexcept
Return the patch.
Definition: fvPatchField.H:250
const dimensionedScalar G
Newtonian constant of gravitation.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
dimensionedSymmTensor sqr(const dimensionedVector &dv)
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:529
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
dimensionedScalar pow025(const dimensionedScalar &ds)
virtual void manipulateMatrix(fvMatrix< scalar > &matrix)
Manipulate matrix.
static scalar tolerance_
Tolerance used in weighted calculations.
void extrapolateInternal()
Assign the patch field from the internal field.
Definition: fvPatchField.C:62
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Definition: fvPatchField.H:413
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
label k
Boltzmann constant.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:52
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:360
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:374
const dimensionedScalar epsilon0
Electric constant: default SI units: [F/m].
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Abstract base class for turbulence models (RAS, LES and laminar).
The class wallFunctionBlenders is a base class that hosts common entries for various derived wall-fun...
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
Definition: UList.H:76
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:286
constexpr const char *const group
Group name for atomic constants.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
scalar y
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
void setSize(const label n)
Alias for resize()
Definition: List.H:325
dynamicFvMesh & mesh
dimensionedScalar exp(const dimensionedScalar &ds)
virtual label & master()
Return non-const access to the master patch ID.
fvPatchField< scalar > fvPatchScalarField
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual void calculateTurbulenceFields(const turbulenceModel &turbulence, scalarField &G0, scalarField &epsilon0)
Main driver to calculate the turbulence fields.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:64
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
Definition: fvPatchField.C:344
This boundary condition provides wall functions for the turbulent kinetic energy dissipation rate (i...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
Definition: Ostream.H:336
scalarField & G(bool init=false)
Return non-const access to the master&#39;s G field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual epsilonWallFunctionFvPatchScalarField & epsilonPatch(const label patchi)
Helper function to return non-const access to an epsilon patch.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Definition: Time.C:714
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
bool changing() const noexcept
Is mesh changing (topology changing and/or moving)
Definition: polyMesh.H:768
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual void updateWeightedCoeffs(const scalarField &weights)
Update the coefficients associated with the patch field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
scalar yPlus
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: fvPatchField.C:311
void writeEntries(Ostream &) const
Write wall-function blending data as dictionary entries.
scalar epsilon
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow4(const dimensionedScalar &ds)
Nothing to be read.
const DimensionedField< scalar, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
Definition: fvPatchField.H:706
const std::string patch
OpenFOAM patch number as a std::string.
void setValues(const labelUList &cellLabels, const Type &value)
Set solution in given cells to the specified value and eliminate the corresponding equations from the...
Definition: fvMatrix.C:971
virtual void setMaster()
Set the master patch - master is responsible for updating all wall function patches.
volScalarField & p
virtual void createAveragingWeights()
Create the averaging weights for cells which are bounded by multiple wall function faces...
epsilonWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Do not request registration (bool: false)
Namespace for OpenFOAM.
scalarField & epsilon(bool init=false)
Return non-const access to the master&#39;s epsilon field.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127