BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / solvers / lagrangian / LTSReactingParcelFoam / createFields.H
blob103ead9d78f33787d964777673c78d08e943371c
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     dimensionedScalar rhoMax
75     (
76         mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
77     );
79     dimensionedScalar rhoMin
80     (
81         mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin")
82     );
84     Info<< "Creating turbulence model\n" << endl;
85     autoPtr<compressible::turbulenceModel> turbulence
86     (
87         compressible::turbulenceModel::New
88         (
89             rho,
90             U,
91             phi,
92             thermo
93         )
94     );
96     Info<< "Creating multi-variate interpolation scheme\n" << endl;
97     multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
99     forAll(Y, i)
100     {
101         fields.add(Y[i]);
102     }
103     fields.add(hs);
105     DimensionedField<scalar, volMesh> chemistrySh
106     (
107         IOobject
108         (
109             "chemistry::Sh",
110             runTime.timeName(),
111             mesh,
112             IOobject::NO_READ,
113             IOobject::NO_WRITE
114         ),
115         mesh,
116         dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
117     );
119     volScalarField rDeltaT
120     (
121         IOobject
122         (
123             "rDeltaT",
124             runTime.timeName(),
125             mesh,
126             IOobject::READ_IF_PRESENT,
127             IOobject::AUTO_WRITE
128         ),
129         mesh,
130         dimensionedScalar("one", dimless/dimTime, 1),
131         zeroGradientFvPatchScalarField::typeName
132     );
134     Info<< "Creating field DpDt\n" << endl;
135     volScalarField DpDt
136     (
137         IOobject
138         (
139             "DpDt",
140             runTime.timeName(),
141             mesh,
142             IOobject::NO_READ,
143             IOobject::NO_WRITE
144         ),
145         mesh,
146         dimensionedScalar("zero", dimPressure/dimTime, 0.0)
147     );
149     #include "setPressureWork.H"