createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
5 rhoReactionThermo& thermo = pThermo();
6 thermo.validate(args.executable(), "h", "e");
7 
8 SLGThermo slgThermo(mesh, thermo);
9 
10 basicSpecieMixture& composition = thermo.composition();
11 PtrList<volScalarField>& Y = composition.Y();
12 
13 const word inertSpecie(thermo.lookup("inertSpecie"));
14 if (!composition.species().found(inertSpecie))
15 {
17  << "Inert specie " << inertSpecie << " not found in available species "
18  << composition.species()
19  << exit(FatalIOError);
20 }
21 
22 Info<< "Creating field rho\n" << endl;
24 (
25  IOobject
26  (
27  "rho",
28  runTime.timeName(),
29  mesh
30  ),
31  thermo.rho()
32 );
33 
34 volScalarField& p = thermo.p();
35 
36 Info<< "\nReading field U\n" << endl;
38 (
39  IOobject
40  (
41  "U",
42  runTime.timeName(),
43  mesh,
44  IOobject::MUST_READ,
45  IOobject::AUTO_WRITE
46  ),
47  mesh
48 );
49 
50 #include "compressibleCreatePhi.H"
51 
52 Info<< "Creating turbulence model\n" << endl;
53 autoPtr<compressible::momentumTransportModel> turbulence
54 (
56  (
57  rho,
58  U,
59  phi,
60  thermo
61  )
62 );
63 
64 Info<< "Creating thermophysical transport model\n" << endl;
65 autoPtr<rhoReactionThermophysicalTransportModel>
67 (
69  (
70  turbulence(),
71  thermo
72  )
73 );
74 
75 Info<< "Creating combustion model\n" << endl;
76 autoPtr<CombustionModel<rhoReactionThermo>> combustion
77 (
79 );
80 
81 Info<< "Creating field dpdt\n" << endl;
83 (
84  IOobject
85  (
86  "dpdt",
87  runTime.timeName(),
88  mesh
89  ),
90  mesh,
91  dimensionedScalar(p.dimensions()/dimTime, 0)
92 );
93 
94 Info<< "Creating field kinetic energy K\n" << endl;
95 volScalarField K("K", 0.5*magSqr(U));
96 
97 
98 #include "readGravitationalAcceleration.H"
99 #include "readhRef.H"
100 #include "gh.H"
101 
102 
104 (
105  IOobject
106  (
107  "p_rgh",
108  runTime.timeName(),
109  mesh,
110  IOobject::MUST_READ,
111  IOobject::AUTO_WRITE
112  ),
113  mesh
114 );
115 
116 // Force p_rgh to be consistent with p
117 p_rgh = p - rho*gh;
118 
119 pressureControl pressureControl(p, rho, pimple.dict(), false);
120 
121 mesh.setFluxRequired(p_rgh.name());
122 
123 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
124 
125 forAll(Y, i)
126 {
127  fields.add(Y[i]);
128 }
129 fields.add(thermo.he());
130 
131 #include "createMRF.H"
132 #include "createRadiationModel.H"
133 #include "createClouds.H"
134 #include "createSurfaceFilmModel.H"
135 #include "createFvOptions.H"
forAll(Y, i)
Definition: createFields.H:105
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
pimpleNoLoopControl & pimple
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
SLGThermo slgThermo(mesh, thermo)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
rhoReactionThermo & thermo
Definition: createFields.H:28
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
CGAL::Exact_predicates_exact_constructions_kernel K
phi
Definition: pEqn.H:104
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:103
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
volScalarField & dpdt
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
pressureControl & pressureControl
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(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:325
Info<< "Creating thermophysical transport model\"<< endl;autoPtr< fluidThermophysicalTransportModel > thermophysicalTransport(fluidThermophysicalTransportModel::New(turbulence(), thermo))
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
Info<< "Creating combustion model\"<< endl;autoPtr< CombustionModel< psiReactionThermo > > combustion(CombustionModel< psiReactionThermo >::New(thermo, turbulence()))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const volScalarField & gh
messageStream Info
Foam::argList args(argc, argv)
const word inertSpecie(thermo.lookup("inertSpecie"))
Creates and initialises the face-flux field phi.
IOerror FatalIOError