FreeFOAM The Cross-Platform CFD Toolkit
createFields.H
Go to the documentation of this file.
1 Info<< nl << "Reading thermophysicalProperties" << endl;
2 autoPtr<psiChemistryModel> pChemistry
3 (
4  psiChemistryModel::New(mesh)
5 );
6 psiChemistryModel& chemistry = pChemistry();
7 
8 hsCombustionThermo& thermo = chemistry.thermo();
9 
10 basicMultiComponentMixture& composition = thermo.composition();
11 PtrList<volScalarField>& Y = composition.Y();
12 
13 word inertSpecie(thermo.lookup("inertSpecie"));
14 
16 (
17  IOobject
18  (
19  "rho",
20  runTime.timeName(),
21  mesh
22  ),
23  thermo.rho()
24 );
25 
26 Info<< "Reading field U\n" << endl;
28 (
29  IOobject
30  (
31  "U",
32  runTime.timeName(),
33  mesh,
34  IOobject::MUST_READ,
35  IOobject::AUTO_WRITE
36  ),
37  mesh
38 );
39 
40 
41 volScalarField& p = thermo.p();
42 const volScalarField& psi = thermo.psi();
43 volScalarField& hs = thermo.hs();
44 const volScalarField& T = thermo.T();
45 
47 
49 (
50  IOobject
51  (
52  "kappa",
53  runTime.timeName(),
54  mesh,
55  IOobject::NO_READ,
56  IOobject::AUTO_WRITE
57  ),
58  mesh,
59  dimensionedScalar("zero", dimless, 0.0)
60 );
61 
62 Info << "Creating turbulence model.\n" << nl;
63 autoPtr<compressible::turbulenceModel> turbulence
64 (
65  compressible::turbulenceModel::New
66  (
67  rho,
68  U,
69  phi,
70  thermo
71  )
72 );
73 
74 Info<< "Creating field DpDt\n" << endl;
77 
78 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
79 
80 forAll(Y, i)
81 {
82  fields.add(Y[i]);
83 }
84 fields.add(hs);
85 
86 DimensionedField<scalar, volMesh> chemistrySh
87 (
88  IOobject
89  (
90  "chemistry::Sh",
91  runTime.timeName(),
92  mesh,
93  IOobject::NO_READ,
94  IOobject::NO_WRITE
95  ),
96  mesh,
97  dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
98 );