createFields.H
Go to the documentation of this file.
1  Info<< "Reading thermophysical properties\n" << endl;
2 
3  autoPtr<psiThermo> pThermo
4  (
5  psiThermo::New(mesh)
6  );
7  psiThermo& thermo = pThermo();
8  thermo.validate(args.executable(), "h", "e");
9 
10  volScalarField rho
11  (
12  IOobject
13  (
14  "rho",
15  runTime.timeName(),
16  mesh,
17  IOobject::READ_IF_PRESENT,
18  IOobject::AUTO_WRITE
19  ),
20  thermo.rho()
21  );
22 
23  volScalarField& p = thermo.p();
24  const volScalarField& psi = thermo.psi();
25 
26  Info<< "Reading field U\n" << endl;
27  volVectorField U
28  (
29  IOobject
30  (
31  "U",
32  runTime.timeName(),
33  mesh,
34  IOobject::MUST_READ,
35  IOobject::AUTO_WRITE
36  ),
37  mesh
38  );
39 
40  #include "compressibleCreatePhi.H"
41 
42 
43  label pRefCell = 0;
44  scalar pRefValue = 0.0;
45  setRefCell(p, simple.dict(), pRefCell, pRefValue);
46 
47  dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
48  dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
49 
50  Info<< "Creating turbulence model\n" << endl;
51  autoPtr<compressible::RASModel> turbulence
52  (
53  compressible::RASModel::New
54  (
55  rho,
56  U,
57  phi,
58  thermo
59  )
60  );
61 
62  dimensionedScalar initialMass = fvc::domainIntegrate(rho);
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
const dictionary & simple
Creates and initialises the face-flux field phi.
const label pRefCell
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:249
Foam::argList args(argc, argv)
const scalar pRefValue
rho
Definition: createFields.H:77
surfaceScalarField & phi
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
void setRefCell(const volScalarField &field, const volScalarField &fieldRef, const dictionary &dict, label &refCelli, scalar &refValue, const bool forceReference=false)
If the field fieldRef needs referencing find the reference cell nearest.
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())