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 
14 #include "gh.H"
15 
16 volScalarField& p = phases[0].thermoRef().p();
17 
18 Info<< "Reading field p_rgh\n" << endl;
20 (
21  IOobject
22  (
23  "p_rgh",
24  runTime.timeName(),
25  mesh,
26  IOobject::MUST_READ,
27  IOobject::AUTO_WRITE
28  ),
29  mesh
30 );
31 
32 if (fluid.found("pMin"))
33 {
34  IOWarningInFunction(fluid)
35  << "Pressure limits, pMin and pMax, are now read from "
36  << pimple.dict().name() << endl;
37 }
38 
40 (
41  p,
42  p_rgh,
43  pimple.dict(),
44  fluid.incompressible()
45 );
46 
47 if (fluid.incompressible())
48 {
49  p = p_rgh + fluid.rho()*gh;
50 }
51 
52 if (p_rgh.needReference() && fluid.incompressible())
53 {
55  (
56  "p",
57  p.dimensions(),
58  pressureReference.refValue()
59  - getRefCellValue(p, pressureReference.refCell())
60  );
61 }
62 
63 p_rgh = p - fluid.rho()*gh;
64 
65 mesh.setFluxRequired(p_rgh.name());
66 
67 PtrList<volScalarField> rAUs;
68 PtrList<surfaceScalarField> rAUfs;
volScalarField & p_rgh
Info<< "Creating phaseSystem\"<< endl;autoPtr< phaseSystem > fluidPtr(phaseSystem::New(mesh))
pimpleNoLoopControl & pimple
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);if(fluid.found("pMin")){ IOWarningInFunction(fluid)<< "Pressure limits, pMin and pMax, are now read from "<< pimple.dict().name()<< endl;}pressureReference pressureReference(p, p_rgh, pimple.dict(), fluid.incompressible());if(fluid.incompressible()){ p=p_rgh+fluid.rho() *gh;}if(p_rgh.needReference() &&fluid.incompressible()){ p+=dimensionedScalar("p", p.dimensions(), pressureReference.refValue() - getRefCellValue(p, pressureReference.refCell()));}p_rgh=p - fluid.rho() *gh;mesh.setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
Definition: createFields.H:67
pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false)
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
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
PtrList< surfaceScalarField > rAUfs
Definition: createFields.H:68
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh
messageStream Info
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.