ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / lagrangian / reactingParcelFoam / createFields.H
blob089489a014adeaedf43888bf9761475685644044
1     Info<< "Reading thermophysical properties\n" << endl;
3     autoPtr<psiChemistryModel> pChemistry
4     (
5         psiChemistryModel::New(mesh)
6     );
7     psiChemistryModel& chemistry = pChemistry();
9     hsCombustionThermo& thermo = chemistry.thermo();
11     SLGThermo slgThermo(mesh, thermo);
13     basicMultiComponentMixture& composition = thermo.composition();
14     PtrList<volScalarField>& Y = composition.Y();
16     const word inertSpecie(thermo.lookup("inertSpecie"));
18     if (!composition.contains(inertSpecie))
19     {
20         FatalErrorIn(args.executable())
21             << "Specified inert specie '" << inertSpecie << "' not found in "
22             << "species list. Available species:" << composition.species()
23             << exit(FatalError);
24     }
26     volScalarField& p = thermo.p();
27     volScalarField& hs = thermo.hs();
28     const volScalarField& T = thermo.T();
29     const volScalarField& psi = thermo.psi();
31     volScalarField rho
32     (
33         IOobject
34         (
35             "rho",
36             runTime.timeName(),
37             mesh,
38             IOobject::NO_READ,
39             IOobject::AUTO_WRITE
40         ),
41         thermo.rho()
42     );
44     Info<< "\nReading field U\n" << endl;
45     volVectorField U
46     (
47         IOobject
48         (
49             "U",
50             runTime.timeName(),
51             mesh,
52             IOobject::MUST_READ,
53             IOobject::AUTO_WRITE
54         ),
55         mesh
56     );
58     #include "compressibleCreatePhi.H"
60     DimensionedField<scalar, volMesh> kappa
61     (
62         IOobject
63         (
64             "kappa",
65             runTime.timeName(),
66             mesh,
67             IOobject::NO_READ,
68             IOobject::AUTO_WRITE
69         ),
70         mesh,
71         dimensionedScalar("zero", dimless, 0.0)
72     );
74     Info<< "Creating turbulence model\n" << endl;
75     autoPtr<compressible::turbulenceModel> turbulence
76     (
77         compressible::turbulenceModel::New
78         (
79             rho,
80             U,
81             phi,
82             thermo
83         )
84     );
86     Info<< "Creating field DpDt\n" << endl;
87     volScalarField DpDt
88     (
89         "DpDt",
90         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
91     );
93     multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
95     forAll(Y, i)
96     {
97         fields.add(Y[i]);
98     }
99     fields.add(hs);
101     DimensionedField<scalar, volMesh> chemistrySh
102     (
103         IOobject
104         (
105             "chemistry::Sh",
106             runTime.timeName(),
107             mesh,
108             IOobject::NO_READ,
109             IOobject::NO_WRITE
110         ),
111         mesh,
112         dimensionedScalar("chemistry::Sh", dimEnergy/dimTime/dimVolume, 0.0)
113     );