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