createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<psiThermo> pThermo
4 (
6 );
7 psiThermo& 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 
43 (
44  dimensionedScalar::lookupOrDefault
45  (
46  "rhoMax",
47  pimple.dict(),
48  dimDensity,
49  GREAT
50  )
51 );
52 
54 (
55  dimensionedScalar::lookupOrDefault
56  (
57  "rhoMin",
58  pimple.dict(),
59  dimDensity,
60  0
61  )
62 );
63 
64 Info<< "Creating turbulence model\n" << endl;
65 autoPtr<compressible::turbulenceModel> turbulence
66 (
68  (
69  rho,
70  U,
71  phi,
72  thermo
73  )
74 );
75 
76 mesh.setFluxRequired(p.name());
77 
78 Info<< "Creating field dpdt\n" << endl;
80 (
81  IOobject
82  (
83  "dpdt",
84  runTime.timeName(),
85  mesh
86  ),
87  mesh,
88  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
89 );
90 
91 Info<< "Creating field kinetic energy K\n" << endl;
92 volScalarField K("K", 0.5*magSqr(U));
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
Foam::dimDensity
const dimensionSet dimDensity
phi
surfaceScalarField & phi
Definition: createFields.H:13
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:79
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
rhoMin
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::argList::executable
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
psi
const volScalarField & psi
Definition: createFields.H:24
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
rhoMax
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
args
Foam::argList args(argc, argv)
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)