Skip to content
Snippets Groups Projects
createFields.H 1.76 KiB
Newer Older
Info<< "Creating combustion model\n" << endl;

autoPtr<combustionModels::psiChemistryCombustionModel> combustion
    combustionModels::psiChemistryCombustionModel::New
    (
        mesh
    )

psiChemistryModel& chemistry = combustion->pChemistry();
hsCombustionThermo& thermo = chemistry.thermo();

basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

word inertSpecie(thermo.lookup("inertSpecie"));

volScalarField rho
(
    IOobject
    (
        "rho",
        runTime.timeName(),
        mesh
    ),
);

Info<< "Reading field U\n" << endl;
volVectorField U
(
    IOobject
    (
        "U",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);


volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& hs = thermo.hs();
const volScalarField& T = thermo.T();

#include "compressibleCreatePhi.H"

Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::turbulenceModel> turbulence
// Set the turbulence into the combustion model
combustion->setTurbulence(turbulence());


Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt("dpdt", fvc::ddt(p));

Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));


multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
    dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)