initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / combustion / reactingFoam / createFields.H
blobd92766db5498508a45847a41101c7a54f5960701
1 Info<< nl << "Reading thermophysicalProperties" << endl;
2 autoPtr<psiChemistryModel> pChemistry
4     psiChemistryModel::New(mesh)
5 );
6 psiChemistryModel& chemistry = pChemistry();
8 hCombustionThermo& thermo = chemistry.thermo();
10 basicMultiComponentMixture& composition = thermo.composition();
11 PtrList<volScalarField>& Y = composition.Y();
13 word inertSpecie(thermo.lookup("inertSpecie"));
15 volScalarField rho
17     IOobject
18     (
19         "rho",
20         runTime.timeName(),
21         mesh
22     ),
23     thermo.rho()
26 Info<< "Reading field U\n" << endl;
27 volVectorField U
29     IOobject
30     (
31         "U",
32         runTime.timeName(),
33         mesh,
34         IOobject::MUST_READ,
35         IOobject::AUTO_WRITE
36     ),
37     mesh
41 volScalarField& p = thermo.p();
42 const volScalarField& psi = thermo.psi();
43 volScalarField& h = thermo.h();
46 #include "compressibleCreatePhi.H"
48 volScalarField kappa
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)
62 Info << "Creating turbulence model.\n" << nl;
63 autoPtr<compressible::turbulenceModel> turbulence
65     compressible::turbulenceModel::New
66     (
67         rho,
68         U,
69         phi,
70         thermo
71     )
74 Info<< "Creating field DpDt\n" << endl;
75 volScalarField DpDt =
76     fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
78 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
80 forAll (Y, i)
82     fields.add(Y[i]);
84 fields.add(h);