createFields.H
Go to the documentation of this file.
1 Info<< "Creating reaction model\n" << endl;
2 
3 autoPtr<combustionModels::rhoCombustionModel> reaction
4 (
6 );
7 
8 rhoReactionThermo& thermo = reaction->thermo();
9 thermo.validate(args.executable(), "h", "e");
10 
11 basicMultiComponentMixture& composition = thermo.composition();
12 PtrList<volScalarField>& Y = composition.Y();
13 
14 word inertSpecie(thermo.lookup("inertSpecie"));
15 
17 (
18  IOobject
19  (
20  "rho",
21  runTime.timeName(),
22  mesh
23  ),
24  thermo.rho()
25 );
26 
27 Info<< "Reading field U\n" << endl;
29 (
30  IOobject
31  (
32  "U",
33  runTime.timeName(),
34  mesh,
35  IOobject::MUST_READ,
36  IOobject::AUTO_WRITE
37  ),
38  mesh
39 );
40 
41 
42 volScalarField& p = thermo.p();
43 const volScalarField& psi = thermo.psi();
44 const volScalarField& T = thermo.T();
45 
46 
47 #include "compressibleCreatePhi.H"
48 
49 mesh.setFluxRequired(p.name());
50 
51 Info << "Creating turbulence model.\n" << nl;
52 autoPtr<compressible::turbulenceModel> turbulence
53 (
55  (
56  rho,
57  U,
58  phi,
59  thermo
60  )
61 );
62 
63 // Set the turbulence into the reaction model
64 reaction->setTurbulence(turbulence());
65 
66 
67 #include "readGravitationalAcceleration.H"
68 #include "readhRef.H"
69 #include "gh.H"
70 
71 Info<< "Reading field p_rgh\n" << endl;
73 (
74  IOobject
75  (
76  "p_rgh",
77  runTime.timeName(),
78  mesh,
79  IOobject::MUST_READ,
80  IOobject::AUTO_WRITE
81  ),
82  mesh
83 );
84 
85 // Force p_rgh to be consistent with p
86 p_rgh = p - rho*gh;
87 
88 Info<< "Creating field dpdt\n" << endl;
90 (
91  IOobject
92  (
93  "dpdt",
94  runTime.timeName(),
95  mesh
96  ),
97  mesh,
98  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
99 );
100 
101 Info<< "Creating field kinetic energy K\n" << endl;
102 volScalarField K("K", 0.5*magSqr(U));
103 
104 
105 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
106 
108 {
109  fields.add(Y[i]);
110 }
111 fields.add(thermo.he());
112 
114 (
115  IOobject
116  (
117  "dQ",
118  runTime.timeName(),
119  mesh,
120  IOobject::NO_READ,
121  IOobject::AUTO_WRITE
122  ),
123  mesh,
125 );
gh.H
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
forAll
forAll(Y, i)
Definition: createFields.H:129
dQ
volScalarField dQ(IOobject("dQ", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("dQ", dimEnergy/dimTime, 0.0))
Foam::dimEnergy
const dimensionSet dimEnergy
fields
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p - rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:127
phi
surfaceScalarField & phi
Definition: createFields.H:13
inertSpecie
const word inertSpecie(thermo.lookup("inertSpecie"))
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
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::nl
static const char nl
Definition: Ostream.H:260
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
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:34
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
reaction
Info<< "Creating reaction model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > reaction(combustionModels::psiCombustionModel::New(mesh))
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
T
const volScalarField & T
Definition: createFields.H:25
readhRef.H
composition
basicMultiComponentMixture & composition
Definition: createFields.H:35
args
Foam::argList args(argc, argv)
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
p_rgh
volScalarField & p_rgh
Definition: setRegionFluidFields.H:31
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Y
PtrList< volScalarField > & Y
Definition: createFields.H:36