Go to the documentation of this file.00001 Info<< "Reading thermophysical properties\n" << endl;
00002
00003 autoPtr<hsCombustionThermo> pThermo
00004 (
00005 hsCombustionThermo::New(mesh)
00006 );
00007
00008 hsCombustionThermo& thermo = pThermo();
00009
00010 basicMultiComponentMixture& composition = thermo.composition();
00011
00012 volScalarField rho
00013 (
00014 IOobject
00015 (
00016 "rho",
00017 runTime.timeName(),
00018 mesh,
00019 IOobject::NO_READ,
00020 IOobject::AUTO_WRITE
00021 ),
00022 thermo.rho()
00023 );
00024
00025 dimensionedScalar stoicRatio
00026 (
00027 thermo.lookup("stoichiometricAirFuelMassRatio")
00028 );
00029
00030 volScalarField& p = thermo.p();
00031 volScalarField& hs = thermo.hs();
00032
00033 const volScalarField& psi = thermo.psi();
00034
00035 volScalarField& ft = composition.Y("ft");
00036 volScalarField& fu = composition.Y("fu");
00037
00038
00039 Info<< "Reading field U\n" << endl;
00040
00041 volVectorField U
00042 (
00043 IOobject
00044 (
00045 "U",
00046 runTime.timeName(),
00047 mesh,
00048 IOobject::MUST_READ,
00049 IOobject::AUTO_WRITE
00050 ),
00051 mesh
00052 );
00053
00054 #include <finiteVolume/compressibleCreatePhi.H>
00055
00056 Info<< "Creating turbulence model\n" << endl;
00057 autoPtr<compressible::turbulenceModel> turbulence
00058 (
00059 compressible::turbulenceModel::New(rho, U, phi, thermo)
00060 );
00061
00062 IOdictionary combustionProperties
00063 (
00064 IOobject
00065 (
00066 "combustionProperties",
00067 runTime.constant(),
00068 mesh,
00069 IOobject::MUST_READ,
00070 IOobject::NO_WRITE
00071 )
00072 );
00073
00074 Info<< "Creating combustion model\n" << endl;
00075 autoPtr<combustionModel> combustion
00076 (
00077 combustionModel::combustionModel::New
00078 (
00079 combustionProperties,
00080 thermo,
00081 turbulence(),
00082 phi,
00083 rho
00084 )
00085 );
00086
00087
00088 Info<< "Calculating field g.h\n" << endl;
00089 volScalarField gh("gh", g & mesh.C());
00090 surfaceScalarField ghf("gh", g & mesh.Cf());
00091
00092 Info<< "Reading field p_rgh\n" << endl;
00093 volScalarField p_rgh
00094 (
00095 IOobject
00096 (
00097 "p_rgh",
00098 runTime.timeName(),
00099 mesh,
00100 IOobject::MUST_READ,
00101 IOobject::AUTO_WRITE
00102 ),
00103 mesh
00104 );
00105
00106
00107 p_rgh = p - rho*gh;
00108
00109
00110 volScalarField dQ
00111 (
00112 IOobject
00113 (
00114 "dQ",
00115 runTime.timeName(),
00116 mesh,
00117 IOobject::NO_READ,
00118 IOobject::AUTO_WRITE
00119 ),
00120 mesh,
00121 dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0)
00122 );
00123
00124
00125 Info<< "Creating field DpDt\n" << endl;
00126 volScalarField DpDt =
00127 fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
00128
00129
00130 dimensionedScalar initialMass = fvc::domainIntegrate(rho);
00131
00132
00133 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
00134
00135 if (composition.contains("ft"))
00136 {
00137 fields.add(composition.Y("ft"));
00138 }
00139
00140 if (composition.contains("fu"))
00141 {
00142 fields.add(composition.Y("fu"));
00143 }
00144
00145 fields.add(hs);