createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
4 rhoThermo& thermo = pThermo();
5 thermo.validate(args.executable(), "h", "e");
6 
8 (
9  IOobject
10  (
11  "rho",
12  runTime.timeName(),
13  mesh,
14  IOobject::NO_READ,
15  IOobject::NO_WRITE
16  ),
17  thermo.rho()
18 );
19 
20 volScalarField& p = thermo.p();
21 
22 Info<< "Reading field U\n" << endl;
24 (
25  IOobject
26  (
27  "U",
28  runTime.timeName(),
29  mesh,
30  IOobject::MUST_READ,
31  IOobject::AUTO_WRITE
32  ),
33  mesh
34 );
35 
36 #include "compressibleCreatePhi.H"
37 
38 
39 Info<< "Creating turbulence model\n" << endl;
40 autoPtr<compressible::turbulenceModel> turbulence
41 (
43  (
44  rho,
45  U,
46  phi,
47  thermo
48  )
49 );
50 
51 
52 #include "readGravitationalAcceleration.H"
53 #include "readhRef.H"
54 #include "gh.H"
55 
56 
57 Info<< "Reading field p_rgh\n" << endl;
59 (
60  IOobject
61  (
62  "p_rgh",
63  runTime.timeName(),
64  mesh,
65  IOobject::MUST_READ,
66  IOobject::AUTO_WRITE
67  ),
68  mesh
69 );
70 
71 // Force p_rgh to be consistent with p
72 p_rgh = p - rho*gh;
73 
74 label pRefCell = 0;
75 scalar pRefValue = 0.0;
76 
77 if (thermo.incompressible())
78 {
80  (
81  p,
82  p_rgh,
83  pimple.dict(),
84  pRefCell,
85  pRefValue
86  );
87 }
88 
89 mesh.setFluxRequired(p_rgh.name());
90 
91 Info<< "Creating field dpdt\n" << endl;
93 (
94  IOobject
95  (
96  "dpdt",
97  runTime.timeName(),
98  mesh
99  ),
100  mesh,
101  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
102 );
103 
104 Info<< "Creating field kinetic energy K\n" << endl;
105 volScalarField K("K", 0.5*magSqr(U));
106 
107 #include "createMRF.H"
108 #include "createRadiationModel.H"
109 #include "createFvOptions.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
pimpleNoLoopControl & pimple
surfaceScalarField & phi
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
Info<< "Reading initial conditions.\"<< endl;IOdictionary initialConditions(IOobject("initialConditions", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));scalar p0=readScalar(initialConditions.lookup("p"));scalar T0=readScalar(initialConditions.lookup("T"));# 24 "/home/ubuntu/OpenFOAM-6/applications/solvers/combustion/chemFoam/createFields.H" 2 Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
CGAL::Exact_predicates_exact_constructions_kernel K
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField & dpdt
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const volScalarField & gh
messageStream Info
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.
scalar pRefValue
Definition: createFields.H:107