createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 
5 autoPtr<fluidThermo> pThermo
6 (
8 );
9 fluidThermo& thermo = pThermo();
10 thermo.validate(args.executable(), "h", "e");
11 
12 volScalarField& p = thermo.p();
13 
15 (
16  IOobject
17  (
18  "rho",
19  runTime.timeName(),
20  mesh,
21  IOobject::NO_READ,
22  IOobject::NO_WRITE
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 #include "compressibleCreatePhi.H"
42 
43 Info<< "Creating turbulence model\n" << endl;
44 autoPtr<compressible::momentumTransportModel> turbulence
45 (
47  (
48  rho,
49  U,
50  phi,
51  thermo
52  )
53 );
54 
55 Info<< "Creating thermophysical transport model\n" << endl;
56 autoPtr<fluidThermophysicalTransportModel> thermophysicalTransport
57 (
59 );
60 
61 
62 #include "readGravitationalAcceleration.H"
63 #include "readhRef.H"
64 #include "gh.H"
65 #include "readpRef.H"
66 
67 
68 Info<< "Reading field p_rgh\n" << endl;
70 (
71  IOobject
72  (
73  "p_rgh",
74  runTime.timeName(),
75  mesh,
76  IOobject::MUST_READ,
77  IOobject::AUTO_WRITE
78  ),
79  mesh
80 );
81 
82 // Force p_rgh to be consistent with p
83 p_rgh = p - rho*gh - pRef;
84 
86 (
87  p,
88  p_rgh,
89  rho,
90  pimple.dict(),
91  thermo.incompressible()
92 );
93 
94 mesh.setFluxRequired(p_rgh.name());
95 
96 Info<< "Creating field dpdt\n" << endl;
98 (
99  IOobject
100  (
101  "dpdt",
102  runTime.timeName(),
103  mesh
104  ),
105  mesh,
106  dimensionedScalar(p.dimensions()/dimTime, 0)
107 );
108 
109 Info<< "Creating field kinetic energy K\n" << endl;
110 volScalarField K("K", 0.5*magSqr(U));
111 
113 
114 #include "createMRF.H"
115 #include "createRadiationModel.H"
116 #include "createFvOptions.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
pimpleNoLoopControl & pimple
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
engineTime & runTime
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:58
CGAL::Exact_predicates_exact_constructions_kernel K
phi
Definition: pEqn.H:104
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))
scalar pRef
Definition: createFields.H:19
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))
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)
Creates and initialises the face-flux field phi.