createFields.H
Go to the documentation of this file.
1Info<< "Reading thermophysical properties\n" << endl;
2
3autoPtr<fluidThermo> pThermo
4(
5 fluidThermo::New(mesh)
6);
7fluidThermo& thermo = pThermo();
8thermo.validate(args.executable(), "h", "e");
9
10volScalarField& p = thermo.p();
11const volScalarField& psi = thermo.psi();
12
13volScalarField rho
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
26Info<< "Reading field U\n" << endl;
27volVectorField 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
41
43
44const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
45const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
46
47mesh.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
73Info<< "Creating turbulence model\n" << endl;
74autoPtr<compressible::turbulenceModel> turbulence
75(
76 compressible::turbulenceModel::New
77 (
78 rho,
79 U,
80 phi,
81 thermo
82 )
83);
surfaceScalarField & phi
pimpleControl & pimple
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:191
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
U
Definition: pEqn.H:72
volScalarField & p
const volScalarField & psi
Creates and initialises the face-flux field phi.
Creates mask for blocked out cells.
dynamicFvMesh & mesh
engineTime & runTime
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
const pressureControl & pressureControl
compressible::turbulenceModel & turbulence
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
Foam::argList args(argc, argv)
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))