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-2025 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  nCorr_(0),
123  s_
124  (
125  IOobject
126  (
127  fieldName_,
128  time_.name(),
129  mesh_,
130  IOobject::MUST_READ,
131  IOobject::NO_WRITE
132  ),
133  mesh_
134  ),
135  MULES_(false),
136  deltaN_
137  (
138  "deltaN",
139  s_.dimensions()/dimLength,
140  1e-8/pow(average(mesh_.V()), 1.0/3.0).value()
141  )
142 {
143  read(dict);
144 
145  if (mesh_.solution().solversDict().found(fieldName_))
146  {
147  const dictionary& controls = mesh_.solution().solverDict(fieldName_);
148 
149  if (controls.found("nSubCycles"))
150  {
151  MULES_ = true;
152 
153  if (controls.lookupOrDefault<Switch>("MULESCorr", false))
154  {
155  mesh_.schemes().setFluxRequired(fieldName_);
156  }
157  }
158  }
159 }
160 
161 
162 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
163 
165 {}
166 
167 
168 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
169 
171 {
173 
174  phiName_ = dict.lookupOrDefault<word>("phi", "phi");
175  rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
176  schemesField_ = dict.lookupOrDefault<word>("schemesField", fieldName_);
177 
178  diffusivity_ = diffusivityTypeNames_.read(dict.lookup("diffusivity"));
179 
180  switch(diffusivity_)
181  {
182  case diffusivityType::none:
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  nCorr_ = dict.lookupOrDefaultBackwardsCompatible<label>
196  (
197  {"nCorrectors", "nCorr"},
198  0
199  );
200 
201  return true;
202 }
203 
204 
206 {
207  return wordList{phiName_};
208 }
209 
210 
212 {
213  Info<< type() << " execute:" << endl;
214 
215  const surfaceScalarField& phi =
216  mesh_.lookupObject<surfaceScalarField>(phiName_);
217 
218  const word divScheme("div(phi," + schemesField_ + ")");
219 
220  // Set under-relaxation coeff
221  scalar relaxCoeff = 0.0;
222  if (mesh_.solution().relaxEquation(schemesField_))
223  {
224  relaxCoeff = mesh_.solution().equationRelaxationFactor(schemesField_);
225  }
226 
229  (
231  );
232 
233  if (phi.dimensions() == dimVolume/dimTime)
234  {
235  if (MULES_)
236  {
237  subCycleMULES();
238 
240  }
241  else
242  {
243  for (int i=0; i<=nCorr_; i++)
244  {
245  fvScalarMatrix sEqn
246  (
247  fvm::ddt(s_)
248  + fvm::div(phi, s_, divScheme)
249  ==
250  fvModels.source(s_)
251  );
252 
253  if (diffusivity_ != diffusivityType::none)
254  {
255  sEqn -= fvm::laplacian(D(), s_);
256  }
257 
258  sEqn.relax(relaxCoeff);
259 
260  fvConstraints.constrain(sEqn);
261 
262  sEqn.solve(schemesField_);
263 
265  }
266  }
267  }
268  else if (phi.dimensions() == dimMass/dimTime)
269  {
270  const volScalarField& rho =
271  mesh_.lookupObject<volScalarField>(rhoName_);
272 
273  for (int i=0; i<=nCorr_; i++)
274  {
275  fvScalarMatrix sEqn
276  (
277  fvm::ddt(rho, s_)
278  + fvm::div(phi, s_, divScheme)
279  ==
280  fvModels.source(rho, s_)
281  );
282 
283  if (diffusivity_ != diffusivityType::none)
284  {
285  sEqn -= fvm::laplacian(rho*D(), s_);
286  }
287 
288  sEqn.relax(relaxCoeff);
289 
290  fvConstraints.constrain(sEqn);
291 
292  sEqn.solve(schemesField_);
293 
295  }
296  }
297  else
298  {
300  << "Incompatible dimensions for phi: " << phi.dimensions() << nl
301  << "Dimensions should be " << dimMass/dimTime << " or "
303  }
304 
305  Info<< endl;
306 
307  return true;
308 }
309 
310 
311 void Foam::functionObjects::scalarTransport::subCycleMULES()
312 {
313  const dictionary& controls = mesh_.solution().solverDict(fieldName_);
314  const label nSubCycles(controls.lookup<label>("nSubCycles"));
315  const bool LTS = fv::localEulerDdt::enabled(mesh_);
316 
317  if (nSubCycles > 1)
318  {
319  tmp<volScalarField> trSubDeltaT;
320 
321  if (LTS)
322  {
323  trSubDeltaT =
324  fv::localEulerDdt::localRSubDeltaT(mesh_, nSubCycles);
325  }
326 
327  for
328  (
329  subCycle<volScalarField> sSubCycle(s_, nSubCycles);
330  !(++sSubCycle).end();
331  )
332  {
333  solveMULES();
334  }
335  }
336  else
337  {
338  solveMULES();
339  }
340 
341 
342  // Apply the diffusivity term separately to allow implicit solution
343  // and boundedness of the explicit advection
344  if (diffusivity_ != diffusivityType::none)
345  {
346  fvScalarMatrix sEqn
347  (
348  fvm::ddt(s_) - fvc::ddt(s_)
349  - fvm::laplacian(D(), s_)
350  );
351 
352  sEqn.solve(controls.subDict("diffusivity"));
353 
354  Info<< fieldName_ << " volume fraction = "
355  << s_.weightedAverage(mesh_.V()).value()
356  << " Min(" << fieldName_ << ") = " << min(s_).value()
357  << " Max(" << fieldName_ << ") = " << max(s_).value()
358  << endl;
359  }
360 }
361 
362 
363 void Foam::functionObjects::scalarTransport::solveMULES()
364 {
365  const dictionary& controls = mesh_.solution().solverDict(fieldName_);
366  const bool MULESCorr(controls.lookupOrDefault<Switch>("MULESCorr", false));
367 
368  const MULES::control MULEScontrols(mesh().solution().solverDict(s_.name()));
369 
370  // Apply the compression correction from the previous iteration
371  // Improves efficiency for steady-simulations but can only be applied
372  // once the s field is reasonably steady, i.e. fully developed
373  const bool applyPrevCorr
374  (
375  controls.lookupOrDefault<Switch>("applyPrevCorr", false)
376  );
377 
378  const bool LTS = fv::localEulerDdt::enabled(mesh_);
379 
380  const word divScheme("div(phi," + schemesField_ + ")");
381 
382  const surfaceScalarField& phi =
383  mesh_.lookupObject<surfaceScalarField>(phiName_);
384 
385  surfaceScalarField sPhi
386  (
387  IOobject
388  (
389  "sPhi",
390  s_.time().name(),
391  mesh_
392  ),
393  mesh_,
394  phi.dimensions()*s_.dimensions()
395  );
396 
397  const word sScheme(mesh_.schemes().div(divScheme)[1].wordToken());
398 
399  // If a compressive convection scheme is used
400  // the interface normal must be cached
401  tmp<surfaceScalarField> nHatf;
402 
403  if (compressionSchemes.found(sScheme))
404  {
405  const surfaceVectorField gradsf(fvc::interpolate(fvc::grad(s_)));
406 
407  nHatf = new surfaceScalarField
408  (
409  IOobject
410  (
411  "nHatf",
412  s_.time().name(),
413  mesh_
414  ),
415  gradsf/(mag(gradsf) + deltaN_) & mesh_.Sf()
416  );
417  }
418 
419  // Set the off-centering coefficient according to ddt scheme
420  scalar ocCoeff = 0;
421  {
422  tmp<fv::ddtScheme<scalar>> tddtS
423  (
425  (
426  mesh_,
427  mesh_.schemes().ddt("ddt(s)")
428  )
429  );
430  const fv::ddtScheme<scalar>& ddtS = tddtS();
431 
432  if
433  (
434  isType<fv::EulerDdtScheme<scalar>>(ddtS)
435  || isType<fv::localEulerDdtScheme<scalar>>(ddtS)
436  )
437  {
438  ocCoeff = 0;
439  }
440  else if (isType<fv::CrankNicolsonDdtScheme<scalar>>(ddtS))
441  {
442  ocCoeff =
443  refCast<const fv::CrankNicolsonDdtScheme<scalar>>(ddtS)
444  .ocCoeff();
445  }
446  else
447  {
449  << "Only Euler and CrankNicolson ddt schemes are supported"
450  << exit(FatalError);
451  }
452  }
453 
454  // Set the time blending factor, 1 for Euler
455  scalar cnCoeff = 1.0/(1.0 + ocCoeff);
456 
457  tmp<surfaceScalarField> tphiCN(phi);
458 
459  // Calculate the Crank-Nicolson off-centred volumetric flux
460  if (ocCoeff > 0)
461  {
462  tphiCN = surfaceScalarField::New
463  (
464  "phiCN",
465  cnCoeff*phi + (1.0 - cnCoeff)*phi.oldTime()
466  );
467  }
468 
469  if (MULESCorr)
470  {
471  tmp<surfaceScalarField> tphiCN1(phi);
472  tmp<surfaceScalarField> tsPhiCN0;
473 
474  if (ocCoeff > 0)
475  {
476  const volScalarField::Internal Co
477  (
478  (0.5*time_.deltaT())*fvc::surfaceSum(mag(phi))/mesh_.V()
479  );
480 
481  const surfaceScalarField cnBDCoeff
482  (
483  localMax<scalar>(mesh_).interpolate
484  (
486  (
487  "cnBDCoeff",
488  max(cnCoeff, 1.0 - 1.0/max(Co, scalar(2))),
490  )
491  )
492  );
493 
494  const surfaceScalarField phiCN0((1.0 - cnBDCoeff)*phi.oldTime());
495 
496  tsPhiCN0 = fv::gaussConvectionScheme<scalar>
497  (
498  mesh_,
499  phiCN0,
500  upwind<scalar>(mesh_, phiCN0)
501  ).flux(phiCN0, s_);
502 
503  tphiCN1 = cnBDCoeff*phi;
504  }
505 
506  fvScalarMatrix sEqn
507  (
508  (
509  LTS
510  ? fv::localEulerDdtScheme<scalar>(mesh_).fvmDdt(s_)
511  : fv::EulerDdtScheme<scalar>(mesh_).fvmDdt(s_)
512  )
513  + fv::gaussConvectionScheme<scalar>
514  (
515  mesh_,
516  tphiCN1,
517  upwind<scalar>(mesh_, tphiCN1)
518  ).fvmDiv(tphiCN1, s_)
519  );
520 
521  if (tsPhiCN0.valid())
522  {
523  sEqn += fvc::div(tsPhiCN0());
524  }
525 
526  sEqn.solve();
527 
528  Info<< fieldName_ << " volume fraction = "
529  << s_.weightedAverage(mesh_.Vsc()).value()
530  << " Min(" << fieldName_ << ") = " << min(s_).value()
531  << " Max(" << fieldName_ << ") = " << max(s_).value()
532  << endl;
533 
534  tmp<surfaceScalarField> tsPhiUD(sEqn.flux());
535 
536  if (tsPhiCN0.valid())
537  {
538  tsPhiUD.ref() += tsPhiCN0;
539  }
540 
541  sPhi = tsPhiUD();
542 
543  if (applyPrevCorr && tsPhiCorr0_.valid())
544  {
545  Info<< "Applying the previous iteration compression flux" << endl;
547  (
548  MULEScontrols,
549  geometricOneField(),
550  s_,
551  sPhi,
552  tsPhiCorr0_.ref(),
553  oneField(),
554  zeroField()
555  );
556 
557  sPhi += tsPhiCorr0_();
558  }
559 
560  // Cache the upwind-flux
561  tsPhiCorr0_ = tsPhiUD;
562  }
563 
564  for (int sCorr=0; sCorr<nCorr_; sCorr++)
565  {
566  // Split operator
567  tmp<surfaceScalarField> tsPhiUn
568  (
569  fvc::flux
570  (
571  tphiCN(),
572  (cnCoeff*s_ + (1.0 - cnCoeff)*s_.oldTime())(),
573  mesh_.schemes().div(divScheme)
574  )
575  );
576 
577  if (MULESCorr)
578  {
579  tmp<surfaceScalarField> tsPhiCorr(tsPhiUn() - sPhi);
580  volScalarField s0("s0", s_);
581 
583  (
584  MULEScontrols,
585  geometricOneField(),
586  s_,
587  sPhi,
588  tsPhiCorr.ref(),
589  oneField(),
590  zeroField()
591  );
592 
593  // Under-relax the correction for all but the 1st corrector
594  if (sCorr == 0)
595  {
596  sPhi += tsPhiCorr();
597  }
598  else
599  {
600  s_ = 0.5*s_ + 0.5*s0;
601  sPhi += 0.5*tsPhiCorr();
602  }
603  }
604  else
605  {
606  sPhi = tsPhiUn;
607 
609  (
610  MULEScontrols,
611  geometricOneField(),
612  s_,
613  tphiCN,
614  sPhi,
615  oneField(),
616  zeroField()
617  );
618  }
619  }
620 
621  if (applyPrevCorr && MULESCorr)
622  {
623  tsPhiCorr0_ = sPhi - tsPhiCorr0_;
624  tsPhiCorr0_.ref().rename("sPhiCorr0");
625  }
626  else
627  {
628  tsPhiCorr0_.clear();
629  }
630 
631  Info<< fieldName_ << "volume fraction = "
632  << s_.weightedAverage(mesh_.Vsc()).value()
633  << " Min(" << fieldName_ << ") = " << min(s_).value()
634  << " Max(" << fieldName_ << ") = " << max(s_).value()
635  << endl;
636 }
637 
638 
640 {
641  s_.write();
642  return true;
643 }
644 
645 
646 // ************************************************************************* //
CMULES: Multidimensional universal limiter for explicit corrected implicit solution.
Macros for easy insertion into run-time selection tables.
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
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:740
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:849
T lookupOrDefault(const word &, const T &, const bool writeDefault=writeOptionalEntries > 0) const
Find and return a T, if not found return the given default.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Definition: dictionary.C:539
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Definition: dictionaryIO.C:103
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:67
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:603
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:1799
const fvSolution & solution() const
Return the fvSolution.
Definition: fvMesh.C:1810
Finite volume models.
Definition: fvModels.H:65
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
void setFluxRequired(const word &name) const
Definition: fvSchemes.C:447
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
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:342
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:348
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:62
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.
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(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, 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)
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
const doubleScalar e
Definition: doubleScalar.H:106
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 HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Definition: dimensionSets.C:96
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:258
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
const dimensionSet dimKinematicViscosity
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
bool isType(const Type &t)
Check the typeid.
Definition: typeInfo.H:163
SurfaceField< scalar > surfaceScalarField
messageStream Info
const dimensionSet dimLength
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimTime
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimVolume
const wordHashSet compressionSchemes
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimMass
error FatalError
SurfaceField< vector > surfaceVectorField
static const char nl
Definition: Ostream.H:267
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.