ThirdParty packages: modification for calling make another compiler than gcc
[openfoam-extend-OpenFOAM-1.6-ext.git] / applications / solvers / combustion / fireFoam / createFields.H
blob0cb8e704ba432a7db24b18655eedf4c0e4e48e3f
1 Info<< "Reading thermophysical properties\n" << endl;
3 autoPtr<hsCombustionThermo> pThermo
5     hsCombustionThermo::New(mesh)
6 );
8 hsCombustionThermo& thermo = pThermo();
10 basicMultiComponentMixture& composition = thermo.composition();
12 volScalarField rho
14     IOobject
15     (
16         "rho",
17         runTime.timeName(),
18         mesh,
19         IOobject::NO_READ,
20         IOobject::AUTO_WRITE
21     ),
22     thermo.rho()
25 dimensionedScalar stoicRatio
27     thermo.lookup("stoichiometricAirFuelMassRatio")
30 volScalarField& p = thermo.p();
31 volScalarField& hs = thermo.hs();
33 const volScalarField& psi = thermo.psi();
35 volScalarField& ft = composition.Y("ft");
36 volScalarField& fu = composition.Y("fu");
38 Info<< "Reading field U\n" << endl;
40 volVectorField U
42     IOobject
43     (
44         "U",
45         runTime.timeName(),
46         mesh,
47         IOobject::MUST_READ,
48         IOobject::AUTO_WRITE
49     ),
50     mesh
53 #include "compressibleCreatePhi.H"
55 Info<< "Creating turbulence model\n" << endl;
56 autoPtr<compressible::turbulenceModel> turbulence
58     compressible::turbulenceModel::New(rho, U, phi, thermo)
61 IOdictionary combustionProperties
63     IOobject
64     (
65         "combustionProperties",
66         runTime.constant(),
67         mesh,
68         IOobject::MUST_READ,
69         IOobject::NO_WRITE
70     )
73 Info<< "Creating combustion model\n" << endl;
74 autoPtr<combustionModel> combustion
76     combustionModel::combustionModel::New
77     (
78         combustionProperties,
79         thermo,
80         turbulence(),
81         phi,
82         rho
83     )
86 volScalarField dQ
88     IOobject
89     (
90         "dQ",
91         runTime.timeName(),
92         mesh,
93         IOobject::NO_READ,
94         IOobject::AUTO_WRITE
95     ),
96     mesh,
97     dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0)
101 Info<< "Creating field DpDt\n" << endl;
102 volScalarField DpDt =
103     fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
106 Info<< "Calculating field g.h\n" << endl;
107 volScalarField gh("gh", g & mesh.C());
109 surfaceScalarField ghf("gh", g & mesh.Cf());
111 p += rho*gh;
113 thermo.correct();
115 dimensionedScalar initialMass = fvc::domainIntegrate(rho);
118 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
120 if (composition.contains("ft"))
122     fields.add(composition.Y("ft"));
125 if (composition.contains("fu"))
127     fields.add(composition.Y("fu"));
130 fields.add(hs);