createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 autoPtr<fluidReactionThermo> pThermo(fluidReactionThermo::New(mesh));
5 fluidReactionThermo& thermo = pThermo();
6 thermo.validate(args.executable(), "h", "e");
7 
8 basicSpecieMixture& composition = thermo.composition();
9 PtrList<volScalarField>& Y = composition.Y();
10 
12 (
13  IOobject
14  (
15  "rho",
16  runTime.timeName(),
17  mesh
18  ),
19  thermo.rho()
20 );
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 
37 volScalarField& p = thermo.p();
38 
39 
40 #include "compressibleCreatePhi.H"
41 
42 mesh.schemes().setFluxRequired(p.name());
43 
44 Info << "Creating turbulence model.\n" << nl;
45 autoPtr<compressible::momentumTransportModel> turbulence
46 (
48  (
49  rho,
50  U,
51  phi,
52  thermo
53  )
54 );
55 
56 Info<< "Creating thermophysical transport model\n" << endl;
57 autoPtr<fluidReactionThermophysicalTransportModel>
59 (
61  (
62  turbulence(),
63  thermo
64  )
65 );
66 
67 Info<< "Creating reaction model\n" << endl;
68 autoPtr<combustionModel> reaction(combustionModel::New(thermo, turbulence()));
69 
70 #include "readGravitationalAcceleration.H"
71 #include "readhRef.H"
72 #include "gh.H"
73 #include "readpRef.H"
74 
75 Info<< "Reading field p_rgh\n" << endl;
77 (
78  IOobject
79  (
80  "p_rgh",
81  runTime.timeName(),
82  mesh,
83  IOobject::MUST_READ,
84  IOobject::AUTO_WRITE
85  ),
86  mesh
87 );
88 
90 (
91  p,
92  p_rgh,
93  pimple.dict(),
94  thermo.incompressible()
95 );
96 
97 mesh.schemes().setFluxRequired(p_rgh.name());
98 
100 (
101  p_rgh,
102  p,
103  rho,
104  U,
105  gh,
106  ghf,
107  pRef,
108  thermo,
109  pimple.dict()
110 );
111 
112 Info<< "Creating field dpdt\n" << endl;
114 (
115  IOobject
116  (
117  "dpdt",
118  runTime.timeName(),
119  mesh
120  ),
121  mesh,
122  dimensionedScalar(p.dimensions()/dimTime, 0)
123 );
124 
125 Info<< "Creating field kinetic energy K\n" << endl;
126 volScalarField K("K", 0.5*magSqr(U));
127 
129 
130 
131 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
132 forAll(Y, i)
133 {
134  fields.add(Y[i]);
135 }
136 fields.add(thermo.he());
137 
138 #include "createMRF.H"
139 #include "createFvModels.H"
140 #include "createFvConstraints.H"
volScalarField & p_rgh
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
pimpleNoLoopControl & pimple
Info<< "Reading thermophysical properties\"<< endl;autoPtr< fluidReactionThermo > pThermo(fluidReactionThermo::New(mesh))
pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
CGAL::Exact_predicates_exact_constructions_kernel K
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
volScalarField & dpdt
rho
Definition: createFields.H:81
const dimensionSet dimTime
Info<< "Creating reaction model\"<< endl;autoPtr< combustionModel > reaction(combustionModel::New(thermo, turbulence()))
forAll(Y, i)
Definition: createFields.H:132
phi
Definition: correctPhi.H:3
void hydrostaticInitialisation(volScalarField &p_rgh, volScalarField &p, volScalarField &rho, const volVectorField &U, const volScalarField &gh, const surfaceScalarField &ghf, const uniformDimensionedScalarField &pRef, fluidThermo &thermo, const dictionary &dict)
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
const surfaceScalarField & ghf
static const char nl
Definition: Ostream.H:260
Info<< "Creating thermophysical transport model\"<< endl;autoPtr< fluidReactionThermophysicalTransportModel > thermophysicalTransport(fluidReactionThermophysicalTransportModel::New(turbulence(), thermo))
scalar pRef
Definition: createFields.H:6
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, p_rgh, pimple.dict(), thermo.incompressible());mesh.schemes().setFluxRequired(p_rgh.name());hydrostaticInitialisation(p_rgh, p, rho, U, gh, ghf, pRef, thermo, pimple.dict());Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));dimensionedScalar initialMass=fvc::domainIntegrate(rho);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:131
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh
messageStream Info
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.