ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / lagrangian / porousExplicitSourceReactingParcelFoam / createFields.H
blob22d7c1f219e49c8bde15b1fd01bf6e4a20895e4d
1     Info<< "Reading thermophysical properties\n" << endl;
3     autoPtr<rhoChemistryModel> pChemistry
4     (
5         rhoChemistryModel::New(mesh)
6     );
7     rhoChemistryModel& chemistry = pChemistry();
9     hsReactionThermo& 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 multi-variate interpolation scheme\n" << endl;
87     multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
89     forAll(Y, i)
90     {
91         fields.add(Y[i]);
92     }
93     fields.add(hs);
95     DimensionedField<scalar, volMesh> chemistrySh
96     (
97         IOobject
98         (
99             "chemistry::Sh",
100             runTime.timeName(),
101             mesh,
102             IOobject::NO_READ,
103             IOobject::NO_WRITE
104         ),
105         mesh,
106         dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
107     );