initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / lagrangian / reactingParcelFoam / createFields.H
blobec820fa5e364dcc3a56781d08bf9ac2dc7925ad0
1     Info<< "Reading thermophysical properties\n" << endl;
3     autoPtr<psiChemistryModel> pChemistry
4     (
5         psiChemistryModel::New(mesh)
6     );
7     psiChemistryModel& chemistry = pChemistry();
9     hCombustionThermo& thermo = chemistry.thermo();
11     basicMultiComponentMixture& composition = thermo.composition();
12     PtrList<volScalarField>& Y = composition.Y();
14     word inertSpecie(thermo.lookup("inertSpecie"));
16     volScalarField& p = thermo.p();
17     volScalarField& h = thermo.h();
18     const volScalarField& T = thermo.T();
19     const volScalarField& psi = thermo.psi();
21     volScalarField rho
22     (
23         IOobject
24         (
25             "rho",
26             runTime.timeName(),
27             mesh,
28             IOobject::NO_READ,
29             IOobject::AUTO_WRITE
30         ),
31         thermo.rho()
32     );
34     Info<< "\nReading field U\n" << endl;
35     volVectorField U
36     (
37         IOobject
38         (
39             "U",
40             runTime.timeName(),
41             mesh,
42             IOobject::MUST_READ,
43             IOobject::AUTO_WRITE
44         ),
45         mesh
46     );
48     #include "compressibleCreatePhi.H"
50     DimensionedField<scalar, volMesh> kappa
51     (
52         IOobject
53         (
54             "kappa",
55             runTime.timeName(),
56             mesh,
57             IOobject::NO_READ,
58             IOobject::AUTO_WRITE
59         ),
60         mesh,
61         dimensionedScalar("zero", dimless, 0.0)
62     );
64     Info<< "Creating turbulence model\n" << endl;
65     autoPtr<compressible::turbulenceModel> turbulence
66     (
67         compressible::turbulenceModel::New
68         (
69             rho,
70             U,
71             phi,
72             thermo
73         )
74     );
76     Info<< "Creating field DpDt\n" << endl;
77     volScalarField DpDt
78     (
79         "DpDt",
80         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
81     );
83     multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
85     forAll (Y, i)
86     {
87         fields.add(Y[i]);
88     }
89     fields.add(h);