createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<psiuReactionThermo> pThermo
4 (
6 );
7 psiuReactionThermo& thermo = pThermo();
8 thermo.validate(args.executable(), "ha", "ea");
9 
10 basicMultiComponentMixture& composition = thermo.composition();
11 
13 (
14  IOobject
15  (
16  "rho",
17  runTime.timeName(),
18  mesh,
19  IOobject::NO_READ,
20  IOobject::AUTO_WRITE
21  ),
22  thermo.rho()
23 );
24 
26 const volScalarField& psi = thermo.psi();
27 
29 Info<< "min(b) = " << min(b).value() << endl;
30 
31 
32 Info<< "\nReading field U\n" << endl;
34 (
35  IOobject
36  (
37  "U",
38  runTime.timeName(),
39  mesh,
40  IOobject::MUST_READ,
41  IOobject::AUTO_WRITE
42  ),
43  mesh
44 );
45 
46 #include "compressibleCreatePhi.H"
47 
48 mesh.setFluxRequired(p.name());
49 
50 Info<< "Creating turbulence model\n" << endl;
51 autoPtr<compressible::turbulenceModel> turbulence
52 (
54  (
55  rho,
56  U,
57  phi,
58  thermo
59  )
60 );
61 
62 Info<< "Creating field dpdt\n" << endl;
64 (
65  IOobject
66  (
67  "dpdt",
68  runTime.timeName(),
69  mesh
70  ),
71  mesh,
72  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
73 );
74 
75 Info<< "Creating field kinetic energy K\n" << endl;
76 volScalarField K("K", 0.5*magSqr(U));
77 
78 Info<< "Creating field Xi\n" << endl;
80 (
81  IOobject
82  (
83  "Xi",
84  runTime.timeName(),
85  mesh,
86  IOobject::MUST_READ,
87  IOobject::AUTO_WRITE
88  ),
89  mesh
90 );
91 
92 
93 Info<< "Creating the unstrained laminar flame speed\n" << endl;
94 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
95 (
97 );
98 
99 
100 Info<< "Reading strained laminar flame speed field Su\n" << endl;
102 (
103  IOobject
104  (
105  "Su",
106  runTime.timeName(),
107  mesh,
108  IOobject::MUST_READ,
109  IOobject::AUTO_WRITE
110  ),
111  mesh
112 );
113 
114 dimensionedScalar SuMin = 0.01*Su.average();
115 dimensionedScalar SuMax = 4*Su.average();
116 
117 Info<< "Calculating turbulent flame speed field St\n" << endl;
119 (
120  IOobject
121  (
122  "St",
123  runTime.timeName(),
124  mesh,
125  IOobject::NO_READ,
126  IOobject::AUTO_WRITE
127  ),
128  Xi*Su
129 );
130 
131 
132 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
133 
134 if (composition.contains("ft"))
135 {
136  fields.add(composition.Y("ft"));
137 }
138 
139 fields.add(b);
140 fields.add(thermo.he());
141 fields.add(thermo.heu());
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
fields
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
phi
surfaceScalarField & phi
Definition: createFields.H:13
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:79
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::argList::executable
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
Foam::fvc::Su
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
psi
const volScalarField & psi
Definition: createFields.H:24
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
b
volScalarField & b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:28
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
unstrainedLaminarFlameSpeed
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));Info<< "Creating the unstrained laminar flame speed\n"<< endl;autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed(laminarFlameSpeed::New(thermo))
Definition: createFields.H:81
composition
basicMultiComponentMixture & composition
Definition: createFields.H:35
args
Foam::argList args(argc, argv)
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)