00001 Info<< "Reading thermophysical properties\n" << endl;
00002
00003 autoPtr<psiChemistryModel> pChemistry
00004 (
00005 psiChemistryModel::New(mesh)
00006 );
00007 psiChemistryModel& chemistry = pChemistry();
00008
00009 hsCombustionThermo& thermo = chemistry.thermo();
00010
00011 basicMultiComponentMixture& composition = thermo.composition();
00012 PtrList<volScalarField>& Y = composition.Y();
00013
00014 word inertSpecie(thermo.lookup("inertSpecie"));
00015
00016 if (!composition.contains(inertSpecie))
00017 {
00018 FatalErrorIn(args.executable())
00019 << "Specified inert specie '" << inertSpecie << "' not found in "
00020 << "species list. Available species:" << composition.species()
00021 << exit(FatalError);
00022 }
00023
00024 volScalarField& p = thermo.p();
00025 volScalarField& hs = thermo.hs();
00026 const volScalarField& T = thermo.T();
00027 const volScalarField& psi = thermo.psi();
00028
00029 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
00030
00031 forAll(Y, i)
00032 {
00033 fields.add(Y[i]);
00034 }
00035 fields.add(hs);
00036
00037 volScalarField rho
00038 (
00039 IOobject
00040 (
00041 "rho",
00042 runTime.timeName(),
00043 mesh,
00044 IOobject::NO_READ,
00045 IOobject::AUTO_WRITE
00046 ),
00047 thermo.rho()
00048 );
00049
00050
00051 volScalarField rhoEffLagrangian
00052 (
00053 IOobject
00054 (
00055 "rhoEffLagrangian",
00056 runTime.timeName(),
00057 mesh,
00058 IOobject::NO_READ,
00059 IOobject::AUTO_WRITE
00060 ),
00061 mesh,
00062 dimensionedScalar("zero", dimDensity, 0.0)
00063 );
00064
00065
00066 volScalarField pDyn
00067 (
00068 IOobject
00069 (
00070 "pDyn",
00071 runTime.timeName(),
00072 mesh,
00073 IOobject::NO_READ,
00074 IOobject::AUTO_WRITE
00075 ),
00076 mesh,
00077 dimensionedScalar("zero", dimPressure, 0.0)
00078 );
00079
00080
00081 Info<< "\nReading field U\n" << endl;
00082 volVectorField U
00083 (
00084 IOobject
00085 (
00086 "U",
00087 runTime.timeName(),
00088 mesh,
00089 IOobject::MUST_READ,
00090 IOobject::AUTO_WRITE
00091 ),
00092 mesh
00093 );
00094
00095 #include <finiteVolume/compressibleCreatePhi.H>
00096
00097 DimensionedField<scalar, volMesh> kappa
00098 (
00099 IOobject
00100 (
00101 "kappa",
00102 runTime.timeName(),
00103 mesh,
00104 IOobject::NO_READ,
00105 IOobject::AUTO_WRITE
00106 ),
00107 mesh,
00108 dimensionedScalar("zero", dimless, 0.0)
00109 );
00110
00111 Info<< "Creating turbulence model\n" << endl;
00112 autoPtr<compressible::turbulenceModel> turbulence
00113 (
00114 compressible::turbulenceModel::New
00115 (
00116 rho,
00117 U,
00118 phi,
00119 thermo
00120 )
00121 );
00122
00123 Info<< "Creating field DpDt\n" << endl;
00124 volScalarField DpDt
00125 (
00126 "DpDt",
00127 fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
00128 );
00129
00130 Info<< "\nConstructing explicit enthalpy source" << endl;
00131 scalarTimeActivatedExplicitSourceList enthalpySource
00132 (
00133 "energy",
00134 mesh,
00135 dimEnergy/dimTime/dimVolume,
00136 "hs"
00137 );
00138
00139 DimensionedField<scalar, volMesh> chemistrySh
00140 (
00141 IOobject
00142 (
00143 "chemistry::Sh",
00144 runTime.timeName(),
00145 mesh,
00146 IOobject::NO_READ,
00147 IOobject::NO_WRITE
00148 ),
00149 mesh,
00150 dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
00151 );