createFields.H
Go to the documentation of this file.
1 Info<< "Creating combustion model\n" << endl;
2 
3 autoPtr<combustionModels::rhoCombustionModel> combustion
4 (
6 );
7 
8 rhoReactionThermo& thermo = combustion->thermo();
9 thermo.validate(args.executable(), "h", "e");
10 
11 SLGThermo slgThermo(mesh, thermo);
12 
13 basicSpecieMixture& composition = thermo.composition();
14 PtrList<volScalarField>& Y = composition.Y();
15 
16 const word inertSpecie(thermo.lookup("inertSpecie"));
17 
18 if (!composition.contains(inertSpecie))
19 {
21  << "Specified inert specie '" << inertSpecie << "' not found in "
22  << "species list. Available species:" << composition.species()
23  << exit(FatalError);
24 }
25 
26 volScalarField& p = thermo.p();
27 const volScalarField& T = thermo.T();
28 const volScalarField& psi = thermo.psi();
29 
31 (
32  IOobject
33  (
34  "rho",
35  runTime.timeName(),
36  mesh,
37  IOobject::NO_READ,
38  IOobject::AUTO_WRITE
39  ),
40  thermo.rho()
41 );
42 
43 Info<< "\nReading field U\n" << endl;
45 (
46  IOobject
47  (
48  "U",
49  runTime.timeName(),
50  mesh,
51  IOobject::MUST_READ,
52  IOobject::AUTO_WRITE
53  ),
54  mesh
55 );
56 
57 #include "compressibleCreatePhi.H"
58 
59 mesh.setFluxRequired(p.name());
60 
62 (
63  dimensionedScalar::lookupOrDefault
64  (
65  "rhoMax",
66  pimple.dict(),
67  dimDensity,
68  GREAT
69  )
70 );
71 
73 (
74  dimensionedScalar::lookupOrDefault
75  (
76  "rhoMin",
77  pimple.dict(),
78  dimDensity,
79  0
80  )
81 );
82 
83 Info<< "Creating turbulence model\n" << endl;
84 autoPtr<compressible::turbulenceModel> turbulence
85 (
87  (
88  rho,
89  U,
90  phi,
91  thermo
92  )
93 );
94 
95 // Set the turbulence into the combustion model
96 combustion->setTurbulence(turbulence());
97 
98 Info<< "Creating field dpdt\n" << endl;
100 (
101  IOobject
102  (
103  "dpdt",
104  runTime.timeName(),
105  mesh
106  ),
107  mesh,
108  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
109 );
110 
111 Info<< "Creating field kinetic energy K\n" << endl;
112 volScalarField K("K", 0.5*magSqr(U));
113 
114 Info<< "Creating multi-variate interpolation scheme\n" << endl;
115 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
116 
117 forAll(Y, i)
118 {
119  fields.add(Y[i]);
120 }
121 fields.add(thermo.he());
122 
124 (
125  IOobject
126  (
127  "dQ",
128  runTime.timeName(),
129  mesh,
130  IOobject::NO_READ,
131  IOobject::AUTO_WRITE
132  ),
133  mesh,
135 );
volScalarField & dpdt
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
Info<< "Creating combustion model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > combustion(combustionModels::psiCombustionModel::New( mesh ))
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
CGAL::Exact_predicates_exact_constructions_kernel K
const word inertSpecie(thermo.lookup("inertSpecie"))
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Creates and initialises the face-flux field phi.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
const dimensionSet dimEnergy
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
const dimensionSet dimDensity
const dictionary & pimple
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField dQ(IOobject( "dQ", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("dQ", dimEnergy/dimTime, 0.0))
rho
Definition: createFields.H:79
SLGThermo slgThermo(mesh, thermo)
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:314
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::argList args(argc, argv)
error FatalError
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
forAll(Y, i)
Definition: createFields.H:129
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())