createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<fluidThermo> pThermo
4 (
6 );
7 fluidThermo& thermo = pThermo();
8 thermo.validate(args.executable(), "h", "e");
9 
11 const volScalarField& psi = thermo.psi();
12 
14 (
15  IOobject
16  (
17  "rho",
18  runTime.timeName(),
19  mesh,
20  IOobject::READ_IF_PRESENT,
21  IOobject::AUTO_WRITE
22  ),
23  thermo.rho()
24 );
25 
26 Info<< "Reading field U\n" << endl;
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 pressureControl pressureControl(p, rho, pimple.dict(), false);
43 
44 const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
45 const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
46 
47 mesh.setFluxRequired(p.name());
48 
49 #include "createDpdt.H"
50 
51 #include "createK.H"
52 
53 //- Overset specific
54 
55 // Add solver-specific interpolations
56 {
57  wordHashSet& nonInt =
58  const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
59 
60  nonInt.insert("HbyA");
61  nonInt.insert("grad(p)");
62  nonInt.insert("surfaceIntegrate(phi)");
63  nonInt.insert("surfaceIntegrate(phiHbyA)");
64  nonInt.insert("cellMask");
65  nonInt.insert("cellDisplacement");
66  nonInt.insert("interpolatedCells");
67  nonInt.insert("cellInterpolationWeight");
68 }
69 
70 // Mask field for zeroing out contributions on hole cells
71 #include "createCellMask.H"
72 // Create bool field with interpolated cells
74 
75 Info<< "Creating turbulence model\n" << endl;
76 autoPtr<compressible::turbulenceModel> turbulence
77 (
79  (
80  rho,
81  U,
82  phi,
83  thermo
84  )
85 );
Info<< "Reading thermophysical properties\"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:232
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
psiReactionThermo & thermo
Definition: createFields.H:28
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:44
const volScalarField & psi
Definition: createFields.H:11
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
Definition: HashSet.H:73
pimpleControl & pimple
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
Creates mask for interpolated cells.
volScalarField & p
Definition: createFields.H:23
const dimensionSet dimDensity
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict())
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Creates mask for blocked out cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::argList args(argc, argv)
pressureControl pressureControl(p, rho, pimple.dict(), false)
Creates and initialises the face-flux field phi.
const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict())
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127