createFields.H
Go to the documentation of this file.
1 #include "readGravitationalAcceleration.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 volScalarField& p = thermo.p();
23 
25 (
26  IOobject
27  (
28  "rho",
29  runTime.timeName(),
30  mesh
31  ),
32  thermo.rho()
33 );
34 
35 Info<< "\nReading field U\n" << endl;
37 (
38  IOobject
39  (
40  "U",
41  runTime.timeName(),
42  mesh,
43  IOobject::MUST_READ,
44  IOobject::AUTO_WRITE
45  ),
46  mesh
47 );
48 
49 #include "compressibleCreatePhi.H"
50 
51 mesh.setFluxRequired(p.name());
52 
53 dimensionedScalar rhoMax
54 (
55  dimensionedScalar::lookupOrDefault
56  (
57  "rhoMax",
58  simple.dict(),
59  dimDensity,
60  great
61  )
62 );
63 
64 dimensionedScalar rhoMin
65 (
66  dimensionedScalar::lookupOrDefault
67  (
68  "rhoMin",
69  simple.dict(),
70  dimDensity,
71  0
72  )
73 );
74 
75 Info<< "Creating turbulence model\n" << endl;
76 autoPtr<compressible::turbulenceModel> turbulence
77 (
79  (
80  rho,
81  U,
82  phi,
83  thermo
84  )
85 );
86 
87 Info<< "Creating combustion model\n" << endl;
88 autoPtr<CombustionModel<rhoReactionThermo>> combustion
89 (
91 );
92 
93 Info<< "Creating multi-variate interpolation scheme\n" << endl;
94 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
95 
96 forAll(Y, i)
97 {
98  fields.add(Y[i]);
99 }
100 fields.add(thermo.he());
101 
102 #include "createMRF.H"
103 #include "createRadiationModel.H"
104 #include "createClouds.H"
105 #include "createFvOptions.H"
forAll(Y, i)
Definition: createFields.H:99
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-7/applications/solvers/combustion/chemFoam/createFields.H" 2 Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
surfaceScalarField & phi
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
SLGThermo slgThermo(mesh, thermo)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
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::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
rhoReactionThermo & thermo
Definition: createFields.H:28
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
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
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:325
const dimensionSet dimDensity
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.
messageStream Info
Foam::argList args(argc, argv)
const word inertSpecie(thermo.lookup("inertSpecie"))
Creates and initialises the face-flux field phi.
simpleControl simple(mesh)
IOerror FatalIOError