createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 #include "readGravitationalAcceleration.H"
3 #include "readhRef.H"
4 
5 Info<< "Creating phaseSystem\n" << endl;
6 
7 autoPtr<phaseSystem> fluidPtr
8 (
10 );
11 phaseSystem& fluid = fluidPtr();
12 phaseSystem::phaseModelList& phases = fluid.phases();
13 
15 (
16  "pMin",
18  fluid
19 );
20 
21 #include "gh.H"
22 
23 volScalarField& p = phases[0].thermoRef().p();
24 
25 Info<< "Reading field p_rgh\n" << endl;
27 (
28  IOobject
29  (
30  "p_rgh",
31  runTime.timeName(),
32  mesh,
33  IOobject::MUST_READ,
34  IOobject::AUTO_WRITE
35  ),
36  mesh
37 );
38 
39 label pRefCell = 0;
40 scalar pRefValue = 0.0;
41 if (fluid.incompressible())
42 {
43  p = max(p_rgh + fluid.rho()*gh, pMin);
44 
45  if (p_rgh.needReference())
46  {
48  (
49  p,
50  p_rgh,
51  pimple.dict(),
52  pRefCell,
53  pRefValue
54  );
55 
57  (
58  "p",
59  p.dimensions(),
60  pRefValue - getRefCellValue(p, pRefCell)
61  );
62  p_rgh = p - fluid.rho()*gh;
63  }
64 }
65 mesh.setFluxRequired(p_rgh.name());
66 
67 PtrList<volScalarField> rAUs;
68 PtrList<surfaceScalarField> rAUfs;
Info<< "Creating phaseSystem\"<< endl;autoPtr< phaseSystem > fluidPtr(phaseSystem::New(mesh))
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
pimpleNoLoopControl & pimple
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:136
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dynamicFvMesh & mesh
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);label pRefCell=0;scalar pRefValue=0.0;if(fluid.incompressible()){ p=max(p_rgh+fluid.rho() *gh, pMin);if(p_rgh.needReference()) { setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue);p+=dimensionedScalar("p", p.dimensions(), pRefValue - getRefCellValue(p, pRefCell));p_rgh=p - fluid.rho() *gh;}}mesh.setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
Definition: createFields.H:67
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
const dimensionSet dimPressure
dimensionedScalar pMin("pMin", dimPressure, fluid)
PtrList< surfaceScalarField > rAUfs
Definition: createFields.H:68
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
const volScalarField & gh
messageStream Info
scalar pRefValue
Definition: createFields.H:107