directionalPressureGradientExplicitSource.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) 2015-2018 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
29 #include "fvMatrices.H"
30 #include "DimensionedField.H"
31 #include "IFstream.H"
33 #include "transform.H"
34 #include "surfaceInterpolate.H"
35 #include "turbulenceModel.H"
38 #include "vectorFieldIOField.H"
39 #include "FieldField.H"
40 #include "emptyFvPatchFields.H"
41 
42 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace fv
47 {
48  defineTypeNameAndDebug(directionalPressureGradientExplicitSource, 0);
49 
51  (
52  option,
53  directionalPressureGradientExplicitSource,
54  dictionary
55  );
56 }
57 }
58 
59 
60 // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
61 
62 const Foam::Enum
63 <
65 >
66 Foam::fv::directionalPressureGradientExplicitSource::pressureDropModelNames_
67 ({
68  { pressureDropModel::pVolumetricFlowRateTable, "volumetricFlowRateTable" },
69  { pressureDropModel::pConstant, "constant" },
70  { pressureDropModel::pDarcyForchheimer, "DarcyForchheimer" },
71 });
72 
73 
74 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
75 
76 void Foam::fv::directionalPressureGradientExplicitSource::initialise()
77 {
78  const faceZone& fZone = mesh_.faceZones()[zoneID_];
79 
80  faceId_.setSize(fZone.size());
81  facePatchId_.setSize(fZone.size());
82 
83  label count = 0;
84  forAll(fZone, i)
85  {
86  label faceI = fZone[i];
87 
88  label faceId = -1;
89  label facePatchId = -1;
90  if (mesh_.isInternalFace(faceI))
91  {
92  faceId = faceI;
93  facePatchId = -1;
94  }
95  else
96  {
97  facePatchId = mesh_.boundaryMesh().whichPatch(faceI);
98  const polyPatch& pp = mesh_.boundaryMesh()[facePatchId];
99  if (isA<coupledPolyPatch>(pp))
100  {
101  if (refCast<const coupledPolyPatch>(pp).owner())
102  {
103  faceId = pp.whichFace(faceI);
104  }
105  else
106  {
107  faceId = -1;
108  }
109  }
110  else if (!isA<emptyPolyPatch>(pp))
111  {
112  faceId = faceI - pp.start();
113  }
114  else
115  {
116  faceId = -1;
117  facePatchId = -1;
118  }
119  }
120 
121  if (faceId >= 0)
122  {
123  facePatchId_[count] = facePatchId;
124  faceId_[count] = faceId;
125  count++;
126  }
127  }
128  faceId_.setSize(count);
129  facePatchId_.setSize(count);
130 }
131 
132 
133 void Foam::fv::directionalPressureGradientExplicitSource::writeProps
134 (
135  const vectorField& gradP
136 ) const
137 {
138  // Only write on output time
139  if (mesh_.time().writeTime())
140  {
141  IOdictionary propsDict
142  (
143  IOobject
144  (
145  name_ + "Properties",
146  mesh_.time().timeName(),
147  "uniform",
148  mesh_,
151  )
152  );
153  propsDict.add("gradient", gradP);
154  propsDict.regIOobject::write();
155  }
156 }
157 
158 
159 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
160 
161 Foam::fv::directionalPressureGradientExplicitSource::
162 directionalPressureGradientExplicitSource
163 (
164  const word& sourceName,
165  const word& modelType,
166  const dictionary& dict,
167  const fvMesh& mesh
168 )
169 :
170  cellSetOption(sourceName, modelType, dict, mesh),
171  model_(pressureDropModelNames_.get("model", coeffs_)),
172  gradP0_(cells_.size(), Zero),
173  dGradP_(cells_.size(), Zero),
174  gradPporous_(cells_.size(), Zero),
175  flowDir_(coeffs_.get<vector>("flowDir")),
176  invAPtr_(nullptr),
177  D_(0),
178  I_(0),
179  length_(0),
180  pressureDrop_(0),
181  flowRate_(),
182  faceZoneName_(coeffs_.get<word>("faceZone")),
183  zoneID_(mesh_.faceZones().findZoneID(faceZoneName_)),
184  faceId_(),
185  facePatchId_(),
186  relaxationFactor_(coeffs_.lookupOrDefault<scalar>("relaxationFactor",0.3)),
187  cellFaceMap_(cells_.size(), -1)
188 {
189  coeffs_.readEntry("fields", fieldNames_);
190 
191  flowDir_.normalise();
192 
193  if (fieldNames_.size() != 1)
194  {
196  << "Source can only be applied to a single field. Current "
197  << "settings are:" << fieldNames_ << exit(FatalError);
198  }
199 
200  if (zoneID_ < 0)
201  {
203  << type() << " " << this->name() << ": "
204  << " Unknown face zone name: " << faceZoneName_
205  << ". Valid face zones are: " << mesh_.faceZones().names()
206  << nl << exit(FatalError);
207  }
208 
209  if (model_ == pVolumetricFlowRateTable)
210  {
211  flowRate_ = interpolationTable<scalar>(coeffs_);
212  }
213  else if (model_ == pConstant)
214  {
215  coeffs_.readEntry("pressureDrop", pressureDrop_);
216  }
217  else if (model_ == pDarcyForchheimer)
218  {
219  coeffs_.readEntry("D", D_);
220  coeffs_.readEntry("I", I_);
221  coeffs_.readEntry("length", length_);
222  }
223  else
224  {
226  << "Did not find mode " << model_
227  << nl
228  << "Please set 'model' to one of "
229  << pressureDropModelNames_
230  << exit(FatalError);
231  }
232 
233  applied_.setSize(fieldNames_.size(), false);
234 
235  // Read the initial pressure gradient from file if it exists
236  IFstream propsFile
237  (
238  mesh_.time().timePath()/"uniform"/(name_ + "Properties")
239  );
240 
241  if (propsFile.good())
242  {
243  Info<< " Reading pressure gradient from file" << endl;
245  propsDict.readEntry("gradient", gradP0_);
246  }
247 
248  Info<< " Initial pressure gradient = " << gradP0_ << nl << endl;
249 
250  initialise();
251 }
252 
253 
254 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
255 
257 (
259 )
260 {
261  const scalarField& rAU = invAPtr_().internalField();
262 
263  const scalarField magUn(mag(U), cells_);
264 
265  const surfaceScalarField& phi =
266  mesh().lookupObject<surfaceScalarField>("phi");
267 
268  switch (model_)
269  {
270  case pDarcyForchheimer:
271  {
272  if (phi.dimensions() == dimVelocity*dimArea)
273  {
274  const incompressible::turbulenceModel& turbModel =
275  mesh().lookupObject<incompressible::turbulenceModel>
276  (
278  );
279 
280  const scalarField nu(turbModel.nu(), cells_);
281 
282  gradPporous_ = -flowDir_*(D_*nu + I_*0.5*magUn)*magUn*length_;
283  }
284  else
285  {
286  const compressible::turbulenceModel& turbModel =
287  mesh().lookupObject<compressible::turbulenceModel>
288  (
290  );
291 
292  const scalarField mu(turbModel.mu(),cells_);
293 
294  const scalarField rho(turbModel.rho(),cells_);
295 
296  gradPporous_ =
297  - flowDir_*(D_*mu + I_*0.5*rho*magUn)*magUn*length_;
298  }
299  break;
300  }
301  case pConstant:
302  {
303  gradPporous_ = -flowDir_*pressureDrop_;
304  break;
305  }
306 
307  case pVolumetricFlowRateTable:
308  {
309  scalar volFlowRate = 0;
310  scalar totalphi = 0;
311 
312  forAll(faceId_, i)
313  {
314  label faceI = faceId_[i];
315  if (facePatchId_[i] != -1)
316  {
317  label patchI = facePatchId_[i];
318  totalphi += phi.boundaryField()[patchI][faceI];
319  }
320  else
321  {
322  totalphi += phi[faceI];
323  }
324  }
325  reduce(totalphi, sumOp<scalar>());
326 
327  if (phi.dimensions() == dimVelocity*dimArea)
328  {
329  volFlowRate = mag(totalphi);
330  }
331  else
332  {
333  const compressible::turbulenceModel& turbModel =
334  mesh().lookupObject<compressible::turbulenceModel>
335  (
337  );
338  const scalarField rho(turbModel.rho(),cells_);
339  const scalarField cv(mesh_.V(), cells_);
340  scalar rhoAve = gSumProd(rho, cv)/gSum(cv);
341  volFlowRate = mag(totalphi)/rhoAve;
342  }
343 
344  gradPporous_ = -flowDir_*flowRate_(volFlowRate);
345  break;
346  }
347  }
348 
349  const faceZone& fZone = mesh_.faceZones()[zoneID_];
350 
351  labelList meshToLocal(mesh_.nCells(), -1);
352  forAll(cells_, i)
353  {
354  meshToLocal[cells_[i]] = i;
355  }
356 
357  labelList faceToCellIndex(fZone.size(), -1);
358  const labelList& mc = fZone.masterCells();
359  const labelList& sc = fZone.slaveCells();
360 
361  forAll(fZone, i)
362  {
363  label masterCellI = mc[i];
364 
365  if (meshToLocal[masterCellI] != -1 && masterCellI != -1)
366  {
367  faceToCellIndex[i] = meshToLocal[masterCellI];
368  }
369  else if (meshToLocal[masterCellI] == -1)
370  {
372  << "Did not find cell " << masterCellI
373  << "in cellZone :" << cellSetName()
374  << exit(FatalError);
375  }
376  }
377 
378  // Accumulate 'upstream' velocity into cells
379  vectorField UfCells(cells_.size(), Zero);
380  scalarField UfCellWeights(cells_.size(), Zero);
381 
382  const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
383 
384  FieldField<Field, vector> upwindValues(pbm.size());
385 
386  forAll(U.boundaryField(), patchI)
387  {
388  const fvPatchVectorField& pf = U.boundaryField()[patchI];
389 
390  if (pf.coupled())
391  {
392  upwindValues.set(patchI, pf.patchNeighbourField());
393  }
394  else if (!isA<emptyFvPatchScalarField>(pf))
395  {
396  upwindValues.set(patchI, new vectorField(pf));
397  }
398  }
399 
400  forAll(fZone, i)
401  {
402  label faceI = fZone[i];
403  label cellId = faceToCellIndex[i];
404 
405  if (cellId != -1)
406  {
407  label sourceCellId = sc[i];
408  if (mesh_.isInternalFace(faceI))
409  {
410  scalar w = mesh_.magSf()[faceI];
411  UfCells[cellId] += U[sourceCellId]*w;
412  UfCellWeights[cellId] += w;
413  }
414  else if (fZone.flipMap()[i])
415  {
416  label patchI = pbm.patchID()[faceI-mesh_.nInternalFaces()];
417  label localFaceI = pbm[patchI].whichFace(faceI);
418 
419  scalar w = mesh_.magSf().boundaryField()[patchI][localFaceI];
420 
421  if (upwindValues.set(patchI))
422  {
423  UfCells[cellId] += upwindValues[patchI][localFaceI]*w;
424  UfCellWeights[cellId] += w;
425  }
426  }
427  }
428  }
429 
430  UfCells /= UfCellWeights;
431 
432  forAll(cells_, i)
433  {
434  label cellI = cells_[i];
435 
436  const vector Ufnorm = UfCells[i]/(mag(UfCells[i]) + SMALL);
437 
438  const tensor D = rotationTensor(Ufnorm, flowDir_);
439 
440  dGradP_[i] +=
441  relaxationFactor_*
442  (
443  (D & UfCells[i]) - U[cellI]
444  )/rAU[cellI];
445 
446 
447  if (debug)
448  {
449  Info<< "Difference mag(U) = "
450  << mag(UfCells[i]) - mag(U[cellI])
451  << endl;
452  Info<< "Pressure drop in flowDir direction : "
453  << gradPporous_[i] << endl;
454  Info<< "UfCell:= " << UfCells[i] << "U : " << U[cellI] << endl;
455  }
456  }
457  writeProps(gradP0_ + dGradP_);
458 }
459 
460 
462 (
463  fvMatrix<vector>& eqn,
464  const label fieldI
465 )
466 {
468  (
469  IOobject
470  (
471  name_ + fieldNames_[fieldI] + "Sup",
472  mesh_.time().timeName(),
473  mesh_,
476  ),
477  mesh_,
479  );
480 
481  UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_;
482 
483  eqn += Su;
484 }
485 
486 
488 (
489  const volScalarField& rho,
490  fvMatrix<vector>& eqn,
491  const label fieldI
492 )
493 {
494  this->addSup(eqn, fieldI);
495 }
496 
497 
499 (
500  fvMatrix<vector>& eqn,
501  const label
502 )
503 {
504  if (invAPtr_.empty())
505  {
506  invAPtr_.reset
507  (
508  new volScalarField
509  (
510  IOobject
511  (
512  name_ + ":invA",
513  mesh_.time().timeName(),
514  mesh_,
517  ),
518  1.0/eqn.A()
519  )
520  );
521  }
522  else
523  {
524  invAPtr_() = 1.0/eqn.A();
525  }
526 
527  gradP0_ += dGradP_;
528  dGradP_ = Zero;
529 }
530 
531 
533 (
534  Ostream& os
535 ) const
536 {
538 }
539 
540 
542 (
543  const dictionary& dict
544 )
545 {
546  const dictionary coeffs(dict.subDict(typeName + "Coeffs"));
547 
548  relaxationFactor_ =
549  coeffs.lookupOrDefault<scalar>("relaxationFactor", 0.3);
550 
551  coeffs.readEntry("flowDir", flowDir_);
552  flowDir_.normalise();
553 
554  if (model_ == pConstant)
555  {
556  coeffs.readEntry("pressureDrop", pressureDrop_);
557  }
558  else if (model_ == pDarcyForchheimer)
559  {
560  coeffs.readEntry("D", D_);
561  coeffs.readEntry("I", I_);
562  coeffs.readEntry("length", length_);
563  }
564 
565  return false;
566 }
567 
568 
569 // ************************************************************************* //
Foam::expressions::patchExpr::debug
int debug
Static debugging option.
Foam::fvPatchField< vector >
Foam::IOobject::NO_WRITE
Definition: IOobject.H:130
Foam::Tensor< scalar >
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
gradP
volVectorField gradP(fvc::grad(p))
Foam::Enum
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: IOstreamOption.H:51
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fv::cellSetOption
Cell-set options abtract base class. Provides a base set of controls, e.g.:
Definition: cellSetOption.H:72
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::constant::physicoChemical::mu
const dimensionedScalar mu
Atomic mass unit.
Definition: createFieldRefs.H:4
FieldField.H
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
Foam::dimVelocity
const dimensionSet dimVelocity
Foam::IFstream
Input from file stream, using an ISstream.
Definition: IFstream.H:97
DimensionedField.H
Foam::fvMatrix::dimensions
const dimensionSet & dimensions() const
Definition: fvMatrix.H:290
Foam::fv::directionalPressureGradientExplicitSource::constrain
virtual void constrain(fvMatrix< vector > &eqn, const label fieldI)
Set 1/A coefficient.
Definition: directionalPressureGradientExplicitSource.C:499
turbulentTransportModel.H
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::polyMesh::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:435
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
Foam::gSum
Type gSum(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:594
Foam::dictionary::lookupOrDefault
T lookupOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionary.H:1241
rho
rho
Definition: readInitialConditions.H:96
Foam::fv::option::mesh_
const fvMesh & mesh_
Reference to the mesh database.
Definition: fvOption.H:82
Foam::sumOp
Definition: ops.H:213
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:290
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
Foam::dimensionedVector
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Definition: dimensionedVector.H:50
Foam::polyMesh::faceZones
const faceZoneMesh & faceZones() const
Return face zone mesh.
Definition: polyMesh.H:477
Foam::dictionary::null
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition: dictionary.H:385
fvMatrices.H
A special matrix type and solver, designed for finite volume solutions of scalar equations.
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Su
zeroField Su
Definition: alphaSuSp.H:1
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:419
Foam::fvPatchField::coupled
virtual bool coupled() const
Return true if this patch field is coupled.
Definition: fvPatchField.H:331
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:51
Foam::dimArea
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:60
Foam::label
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:62
Foam::Field< scalar >
Foam::faceZone
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:65
vectorFieldIOField.H
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
directionalPressureGradientExplicitSource.H
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
faceId
label faceId(-1)
Foam::faceZone::slaveCells
const labelList & slaveCells() const
Return labels of slave cells.
Definition: faceZone.C:416
propsDict
IOdictionary propsDict(IOobject("particleTrackProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED))
Foam::polyBoundaryMesh::whichPatch
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Definition: polyBoundaryMesh.C:805
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
emptyFvPatchFields.H
IFstream.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::gSumProd
scalarProduct< Type, Type >::type gSumProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
Definition: FieldFunctions.C:605
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::fvMatrix::A
tmp< volScalarField > A() const
Return the central coefficient.
Definition: fvMatrix.C:788
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fv::directionalPressureGradientExplicitSource::pressureDropModel
pressureDropModel
Modes of pressure drop.
Definition: directionalPressureGradientExplicitSource.H:116
cellId
label cellId
Definition: interrogateWallPatches.H:67
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::fvPatchField::patchNeighbourField
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
Definition: fvPatchField.H:434
fv
labelList fv(nPoints)
Foam::fv::defineTypeNameAndDebug
defineTypeNameAndDebug(option, 0)
U
U
Definition: pEqn.H:72
Foam::faceZone::masterCells
const labelList & masterCells() const
Definition: faceZone.C:405
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::fv::addToRunTimeSelectionTable
addToRunTimeSelectionTable(option, fixedTemperatureConstraint, dictionary)
Foam::TurbulenceModel::nu
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Definition: TurbulenceModel.H:159
Foam::nl
constexpr char nl
Definition: Ostream.H:372
Foam::fv::directionalPressureGradientExplicitSource::addSup
virtual void addSup(fvMatrix< vector > &eqn, const label fieldI)
Add explicit contribution to momentum equation.
Definition: directionalPressureGradientExplicitSource.C:462
Foam::BitOps::count
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Definition: BitOps.H:74
Foam::Vector< scalar >
Foam::ThermalDiffusivity
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
Definition: phaseCompressibleTurbulenceModelFwd.H:47
Foam::List< label >
Foam::primitiveMesh::isInternalFace
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Definition: primitiveMeshI.H:102
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
D
const dimensionedScalar & D
Definition: solveBulkSurfactant.H:4
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:76
rAU
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1
Foam::UIndirectList
A List with indirect addressing.
Definition: fvMatrix.H:109
Foam::IncompressibleTurbulenceModel
Templated abstract base class for single-phase incompressible turbulence models.
Definition: IncompressibleTurbulenceModel.H:55
Foam::fv::directionalPressureGradientExplicitSource::writeData
virtual void writeData(Ostream &os) const
Write the source properties.
Definition: directionalPressureGradientExplicitSource.C:533
Foam::interpolationTable< scalar >
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
transform.H
3D tensor transformation operations.
Foam::rotationTensor
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
Definition: transform.H:49
Foam::IOstream::good
bool good() const
Return true if next operation might succeed.
Definition: IOstream.H:216
Foam::fv::directionalPressureGradientExplicitSource::correct
virtual void correct(volVectorField &U)
Correct the pressure gradient.
Definition: directionalPressureGradientExplicitSource.C:257
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:61
Foam::List::setSize
void setSize(const label newSize)
Alias for resize(const label)
Definition: ListI.H:146
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::IOobject::NO_READ
Definition: IOobject.H:123
Foam::faceZone::flipMap
const boolList & flipMap() const
Return face flip map.
Definition: faceZone.H:271
turbulenceModel.H
Foam::fv::directionalPressureGradientExplicitSource::read
virtual bool read(const dictionary &dict)
Read source dictionary.
Definition: directionalPressureGradientExplicitSource.C:542
turbulentFluidThermoModel.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54