scalarTransport.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "scalarTransport.H"
27 #include "surfaceFields.H"
28 #include "fvmDdt.H"
29 #include "fvcDdt.H"
30 #include "fvmDiv.H"
31 #include "fvmLaplacian.H"
32 #include "fvmSup.H"
33 #include "fvcFlux.H"
34 #include "fvModels.H"
35 #include "fvConstraints.H"
38 
39 #include "CMULES.H"
40 #include "EulerDdtScheme.H"
41 #include "localEulerDdtScheme.H"
42 #include "CrankNicolsonDdtScheme.H"
43 #include "localMax.H"
45 #include "subCycle.H"
46 #include "interfaceCompression.H"
47 
49 
50 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace functionObjects
55 {
57 
59  (
63  );
64 }
65 }
66 
67 const Foam::NamedEnum
68 <
70  3
72 {
73  "none",
74  "constant",
75  "viscosity"
76 };
77 
78 
79 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
80 
82 Foam::functionObjects::scalarTransport::D() const
83 {
84  const word Dname("D" + fieldName_);
85 
86  if (diffusivity_ == diffusivityType::constant)
87  {
88  return volScalarField::New
89  (
90  Dname,
91  mesh_,
93  );
94  }
95  else
96  {
99 
100  return volScalarField::New
101  (
102  Dname,
103  alphal_*turbulence.nu() + alphat_*turbulence.nut()
104  );
105  }
106 }
107 
108 
109 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
110 
112 (
113  const word& name,
114  const Time& runTime,
115  const dictionary& dict
116 )
117 :
118  fvMeshFunctionObject(name, runTime, dict),
119  fieldName_(dict.lookupOrDefault<word>("field", "s")),
120  diffusivity_(diffusivityType::none),
121  D_(0),
122  s_
123  (
124  IOobject
125  (
126  fieldName_,
127  time_.name(),
128  mesh_,
129  IOobject::MUST_READ,
130  IOobject::NO_WRITE
131  ),
132  mesh_
133  ),
134  MULES_(false),
135  deltaN_
136  (
137  "deltaN",
138  s_.dimensions()/dimLength,
139  1e-8/pow(average(mesh_.V()), 1.0/3.0).value()
140  )
141 {
142  read(dict);
143 
144  if (mesh_.solution().solversDict().found(fieldName_))
145  {
146  const dictionary& controls = mesh_.solution().solverDict(fieldName_);
147 
148  if (controls.found("nSubCycles"))
149  {
150  MULES_ = true;
151 
152  if (controls.lookupOrDefault<Switch>("MULESCorr", false))
153  {
154  mesh_.schemes().setFluxRequired(fieldName_);
155  }
156  }
157  }
158 }
159 
160 
161 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
162 
164 {}
165 
166 
167 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
168 
170 {
172 
173  phiName_ = dict.lookupOrDefault<word>("phi", "phi");
174  rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
175  schemesField_ = dict.lookupOrDefault<word>("schemesField", fieldName_);
176  solverField_ = dict.lookupOrDefault<word>("solverField", fieldName_);
177 
178  diffusivity_ = diffusivityTypeNames_.read(dict.lookup("diffusivity"));
179 
180  switch(diffusivity_)
181  {
183  break;
184 
185  case diffusivityType::constant:
186  dict.lookup("D") >> D_;
187  break;
188 
190  dict.lookup("alphal") >> alphal_;
191  dict.lookup("alphat") >> alphat_;
192  break;
193  }
194 
195  return true;
196 }
197 
198 
200 {
201  return wordList{phiName_};
202 }
203 
204 
206 {
207  Info<< type() << " execute:" << endl;
208 
209  const surfaceScalarField& phi =
210  mesh_.lookupObject<surfaceScalarField>(phiName_);
211 
212  const word divScheme("div(phi," + schemesField_ + ")");
213 
214  const int nCorr =
215  mesh_.solution().solverDict(solverField_)
216  .lookupOrDefaultBackwardsCompatible<label>
217  (
218  {"nCorrectors", "nCorr"},
219  0
220  );
221 
222  // Set under-relaxation coeff
223  scalar relaxCoeff = 0.0;
224  if (mesh_.solution().relaxEquation(solverField_))
225  {
226  relaxCoeff = mesh_.solution().equationRelaxationFactor(solverField_);
227  }
228 
231  (
233  );
234 
235  if (phi.dimensions() == dimVolume/dimTime)
236  {
237  if (MULES_)
238  {
239  subCycleMULES();
240 
242  }
243  else
244  {
245  for (int i=0; i<=nCorr; i++)
246  {
247  fvScalarMatrix sEqn
248  (
249  fvm::ddt(s_)
250  + fvm::div(phi, s_, divScheme)
251  ==
252  fvModels.source(s_)
253  );
254 
255  if (diffusivity_ != diffusivityType::none)
256  {
257  const volScalarField D(this->D());
258 
259  sEqn -=
261  (
262  D,
263  s_,
264  "laplacian(" + D.name() + "," + schemesField_ + ")"
265  );
266  }
267 
268  sEqn.relax(relaxCoeff);
269 
270  fvConstraints.constrain(sEqn);
271 
272  sEqn.solve(solverField_);
273 
275  }
276  }
277  }
278  else if (phi.dimensions() == dimMass/dimTime)
279  {
280  const volScalarField& rho =
281  mesh_.lookupObject<volScalarField>(rhoName_);
282 
283  for (int i=0; i<=nCorr; i++)
284  {
285  fvScalarMatrix sEqn
286  (
287  fvm::ddt(rho, s_)
288  + fvm::div(phi, s_, divScheme)
289  ==
290  fvModels.source(rho, s_)
291  );
292 
293  if (diffusivity_ != diffusivityType::none)
294  {
295  const volScalarField D(this->D());
296 
297  sEqn -=
299  (
300  rho*D,
301  s_,
302  "laplacian(" + D.name() + "," + schemesField_ + ")"
303  );
304  }
305 
306  sEqn.relax(relaxCoeff);
307 
308  fvConstraints.constrain(sEqn);
309 
310  sEqn.solve(solverField_);
311 
313  }
314  }
315  else
316  {
318  << "Incompatible dimensions for phi: " << phi.dimensions() << nl
319  << "Dimensions should be " << dimMass/dimTime << " or "
321  }
322 
323  Info<< endl;
324 
325  return true;
326 }
327 
328 
329 void Foam::functionObjects::scalarTransport::subCycleMULES()
330 {
331  const dictionary& controls = mesh_.solution().solverDict(fieldName_);
332  const label nSubCycles(controls.lookup<label>("nSubCycles"));
333  const bool LTS = fv::localEulerDdt::enabled(mesh_);
334 
335  if (nSubCycles > 1)
336  {
337  tmp<volScalarField> trSubDeltaT;
338 
339  if (LTS)
340  {
341  trSubDeltaT =
342  fv::localEulerDdt::localRSubDeltaT(mesh_, nSubCycles);
343  }
344 
345  for
346  (
347  subCycle<volScalarField> sSubCycle(s_, nSubCycles);
348  !(++sSubCycle).end();
349  )
350  {
351  solveMULES();
352  }
353  }
354  else
355  {
356  solveMULES();
357  }
358 
359 
360  // Apply the diffusivity term separately to allow implicit solution
361  // and boundedness of the explicit advection
362  if (diffusivity_ != diffusivityType::none)
363  {
364  const volScalarField D(this->D());
365 
366  fvScalarMatrix sEqn
367  (
368  fvm::ddt(s_) - fvc::ddt(s_)
370  (
371  D,
372  s_,
373  "laplacian(" + D.name() + "," + schemesField_ + ")"
374  )
375  );
376 
377  sEqn.solve(controls.subDict("diffusivity"));
378 
379  Info<< fieldName_ << " volume fraction = "
380  << s_.weightedAverage(mesh_.V()).value()
381  << " Min(" << fieldName_ << ") = " << min(s_).value()
382  << " Max(" << fieldName_ << ") = " << max(s_).value()
383  << endl;
384  }
385 }
386 
387 
388 void Foam::functionObjects::scalarTransport::solveMULES()
389 {
390  const dictionary& controls = mesh_.solution().solverDict(fieldName_);
391 
392  const int nCorr = controls.lookupOrDefaultBackwardsCompatible<label>
393  (
394  {"nCorrectors", "nCorr"},
395  0
396  );
397 
398  const bool MULESCorr(controls.lookupOrDefault<Switch>("MULESCorr", false));
399 
400  const MULES::control MULEScontrols(mesh().solution().solverDict(s_.name()));
401 
402  // Apply the compression correction from the previous iteration
403  // Improves efficiency for steady-simulations but can only be applied
404  // once the s field is reasonably steady, i.e. fully developed
405  const bool applyPrevCorr
406  (
407  controls.lookupOrDefault<Switch>("applyPrevCorr", false)
408  );
409 
410  const bool LTS = fv::localEulerDdt::enabled(mesh_);
411 
412  const word divScheme("div(phi," + schemesField_ + ")");
413 
414  const surfaceScalarField& phi =
415  mesh_.lookupObject<surfaceScalarField>(phiName_);
416 
417  surfaceScalarField sPhi
418  (
419  IOobject
420  (
421  "sPhi",
422  s_.time().name(),
423  mesh_
424  ),
425  mesh_,
426  phi.dimensions()*s_.dimensions(),
428  );
429 
430  const word sScheme(mesh_.schemes().div(divScheme)[1].wordToken());
431 
432  // If a compressive convection scheme is used
433  // the interface normal must be cached
434  tmp<surfaceScalarField> nHatf;
435 
436  if (compressionSchemes.found(sScheme))
437  {
438  const surfaceVectorField gradsf(fvc::interpolate(fvc::grad(s_)));
439 
440  nHatf = new surfaceScalarField
441  (
442  IOobject
443  (
444  "nHatf",
445  s_.time().name(),
446  mesh_
447  ),
448  gradsf/(mag(gradsf) + deltaN_) & mesh_.Sf()
449  );
450  }
451 
452  // Set the off-centering coefficient according to ddt scheme
453  scalar ocCoeff = 0;
454  {
455  tmp<fv::ddtScheme<scalar>> tddtS
456  (
458  (
459  mesh_,
460  mesh_.schemes().ddt("ddt(s)")
461  )
462  );
463  const fv::ddtScheme<scalar>& ddtS = tddtS();
464 
465  if
466  (
467  isType<fv::EulerDdtScheme<scalar>>(ddtS)
468  || isType<fv::localEulerDdtScheme<scalar>>(ddtS)
469  )
470  {
471  ocCoeff = 0;
472  }
473  else if (isType<fv::CrankNicolsonDdtScheme<scalar>>(ddtS))
474  {
475  ocCoeff =
476  refCast<const fv::CrankNicolsonDdtScheme<scalar>>(ddtS)
477  .ocCoeff();
478  }
479  else
480  {
482  << "Only Euler and CrankNicolson ddt schemes are supported"
483  << exit(FatalError);
484  }
485  }
486 
487  // Set the time blending factor, 1 for Euler
488  scalar cnCoeff = 1.0/(1.0 + ocCoeff);
489 
490  tmp<surfaceScalarField> tphiCN(phi);
491 
492  // Calculate the Crank-Nicolson off-centred volumetric flux
493  if (ocCoeff > 0)
494  {
495  tphiCN = surfaceScalarField::New
496  (
497  "phiCN",
498  cnCoeff*phi + (1.0 - cnCoeff)*phi.oldTime()
499  );
500  }
501 
502  if (MULESCorr)
503  {
504  tmp<surfaceScalarField> tphiCN1(phi);
505  tmp<surfaceScalarField> tsPhiCN0;
506 
507  if (ocCoeff > 0)
508  {
509  const volScalarField::Internal Co
510  (
511  (0.5*time_.deltaT())*fvc::surfaceSum(mag(phi))/mesh_.V()
512  );
513 
514  const surfaceScalarField cnBDCoeff
515  (
516  localMax<scalar>(mesh_).interpolate
517  (
519  (
520  "cnBDCoeff",
521  max(cnCoeff, 1.0 - 1.0/max(Co, scalar(2))),
523  )
524  )
525  );
526 
527  const surfaceScalarField phiCN0((1.0 - cnBDCoeff)*phi.oldTime());
528 
529  tsPhiCN0 = fv::gaussConvectionScheme<scalar>
530  (
531  mesh_,
532  phiCN0,
533  upwind<scalar>(mesh_, phiCN0)
534  ).flux(phiCN0, s_);
535 
536  tphiCN1 = cnBDCoeff*phi;
537  }
538 
539  fvScalarMatrix sEqn
540  (
541  (
542  LTS
543  ? fv::localEulerDdtScheme<scalar>(mesh_).fvmDdt(s_)
544  : fv::EulerDdtScheme<scalar>(mesh_).fvmDdt(s_)
545  )
546  + fv::gaussConvectionScheme<scalar>
547  (
548  mesh_,
549  tphiCN1,
550  upwind<scalar>(mesh_, tphiCN1)
551  ).fvmDiv(tphiCN1, s_)
552  );
553 
554  if (tsPhiCN0.valid())
555  {
556  sEqn += fvc::div(tsPhiCN0());
557  }
558 
559  sEqn.solve();
560 
561  Info<< fieldName_ << " volume fraction = "
562  << s_.weightedAverage(mesh_.Vsc()).value()
563  << " Min(" << fieldName_ << ") = " << min(s_).value()
564  << " Max(" << fieldName_ << ") = " << max(s_).value()
565  << endl;
566 
567  tmp<surfaceScalarField> tsPhiUD(sEqn.flux());
568 
569  if (tsPhiCN0.valid())
570  {
571  tsPhiUD.ref() += tsPhiCN0;
572  }
573 
574  sPhi = tsPhiUD();
575 
576  if (applyPrevCorr && tsPhiCorr0_.valid())
577  {
578  Info<< "Applying the previous iteration compression flux" << endl;
580  (
581  MULEScontrols,
582  geometricOneField(),
583  s_,
584  sPhi,
585  tsPhiCorr0_.ref(),
586  oneField(),
587  zeroField()
588  );
589 
590  sPhi += tsPhiCorr0_();
591  }
592 
593  // Cache the upwind-flux
594  tsPhiCorr0_ = tsPhiUD;
595  }
596 
597  for (int sCorr=0; sCorr<nCorr; sCorr++)
598  {
599  // Split operator
600  tmp<surfaceScalarField> tsPhiUn
601  (
602  fvc::flux
603  (
604  tphiCN(),
605  (cnCoeff*s_ + (1.0 - cnCoeff)*s_.oldTime())(),
606  mesh_.schemes().div(divScheme)
607  )
608  );
609 
610  if (MULESCorr)
611  {
612  tmp<surfaceScalarField> tsPhiCorr(tsPhiUn() - sPhi);
613  volScalarField s0("s0", s_);
614 
616  (
617  MULEScontrols,
618  geometricOneField(),
619  s_,
620  sPhi,
621  tsPhiCorr.ref(),
622  oneField(),
623  zeroField()
624  );
625 
626  // Under-relax the correction for all but the 1st corrector
627  if (sCorr == 0)
628  {
629  sPhi += tsPhiCorr();
630  }
631  else
632  {
633  s_ = 0.5*s_ + 0.5*s0;
634  sPhi += 0.5*tsPhiCorr();
635  }
636  }
637  else
638  {
639  sPhi = tsPhiUn;
640 
642  (
643  MULEScontrols,
644  geometricOneField(),
645  s_,
646  tphiCN,
647  sPhi,
648  oneField(),
649  zeroField()
650  );
651  }
652  }
653 
654  if (applyPrevCorr && MULESCorr)
655  {
656  tsPhiCorr0_ = sPhi - tsPhiCorr0_;
657  tsPhiCorr0_.ref().rename("sPhiCorr0");
658  }
659  else
660  {
661  tsPhiCorr0_.clear();
662  }
663 
664  Info<< fieldName_ << "volume fraction = "
665  << s_.weightedAverage(mesh_.Vsc()).value()
666  << " Min(" << fieldName_ << ") = " << min(s_).value()
667  << " Max(" << fieldName_ << ") = " << max(s_).value()
668  << endl;
669 }
670 
671 
673 {
674  s_.write();
675 
676  return true;
677 }
678 
679 
680 // ************************************************************************* //
CMULES: Multidimensional universal limiter for explicit corrected implicit solution.
Macros for easy insertion into run-time selection tables.
static fvModels & New(const word &name, const fvMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
const dimensionSet & dimensions() const
Return dimensions.
static const char *const typeName
Definition: Field.H:106
Generic GeometricField class.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
bool found(const Key &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:138
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
Initialise the NamedEnum HashTable from the static list of names.
Definition: NamedEnum.H:55
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
T lookupOrDefault(const word &, const T &) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:669
T lookupOrDefaultBackwardsCompatible(const wordList &, const T &) const
Find and return a T, trying a list of keywords in sequence,.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:778
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Definition: dictionary.C:468
const word & name() const
Return const reference to name.
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
virtual bool read(const dictionary &)
Read optional controls.
Evolves a passive scalar transport equation.
static const NamedEnum< diffusivityType, 3 > diffusivityTypeNames_
Diffusivity type names.
virtual wordList fields() const
Return the list of fields required.
diffusivityType
Enumeration defining the type of the diffusivity.
virtual bool execute()
Calculate the scalarTransport.
virtual bool write()
Write the updated scalar field.
virtual bool read(const dictionary &)
Read the scalarTransport data.
scalarTransport(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Finite volume constraints.
Definition: fvConstraints.H:68
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
Definition: fvMatrix.C:602
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
Definition: fvMatrixSolve.C:58
const fvSchemes & schemes() const
Return the fvSchemes.
Definition: fvMesh.C:1795
const fvSolution & solution() const
Return the fvSolution.
Definition: fvMesh.C:1806
Finite volume models.
Definition: fvModels.H:69
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
void setFluxRequired(const word &name) const
Definition: fvSchemes.C:434
static tmp< ddtScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return a pointer to a new ddtScheme created on freestore.
Definition: ddtScheme.C:45
static tmp< volScalarField > localRSubDeltaT(const fvMesh &mesh, const label nAlphaSubCycles)
Calculate and return the reciprocal of the local sub-cycling.
Definition: localEulerDdt.C:70
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
Definition: localEulerDdt.C:37
static const word & calculatedType()
Return the type of the calculated for of fvsPatchField.
const Type & lookupType(const word &group=word::null) const
Lookup and return the object of the given Type.
const dictionary & solversDict() const
Return the solver controls dictionary.
Definition: solution.C:232
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:238
Perform a subCycleTime on a field or list of fields.
Definition: subCycle.H:235
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
Calculate the first temporal derivative.
Calculate the face-flux of the given field.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
Calculate the matrix for implicit and explicit sources.
rho
Definition: pEqn.H:1
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &psiPhi, const SpType &Sp, const SuType &Su)
compressibleMomentumTransportModel momentumTransportModel
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
Definition: fvcGrad.C:46
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
Definition: fvcDiv.C:47
tmp< VolInternalField< Type > > surfaceSum(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
Definition: fvmLaplacian.C:47
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
Definition: fvmDiv.C:48
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
Definition: fvmDdt.C:46
static const coefficient D("D", dimTemperature, 257.14)
const unitSet none
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
const doubleScalar e
Definition: doubleScalar.H:106
const dimensionSet & dimKinematicViscosity
Definition: dimensions.C:297
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
const dimensionSet & dimMass
Definition: dimensions.C:275
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:288
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
const dimensionSet & dimLength
Definition: dimensions.C:276
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
bool isType(const Type &t)
Check the typeid.
Definition: typeInfo.H:170
SurfaceField< scalar > surfaceScalarField
messageStream Info
const dimensionSet & dimVolume
Definition: dimensions.C:282
const dimensionSet & dimTime
Definition: dimensions.C:277
const wordHashSet compressionSchemes
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
error FatalError
SurfaceField< vector > surfaceVectorField
static const char nl
Definition: Ostream.H:297
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
dictionary dict
Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating face flux\n"<< endl;surfaceScalarField phi(IOobject("phi", runTime.name(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedScalar(mesh.Sf().dimensions() *U.dimensions(), 0));autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))
Foam::surfaceFields.