71 lines
1.2 KiB
C
71 lines
1.2 KiB
C
Info<< "Reading thermophysical properties\n" << endl;
|
|
|
|
autoPtr<psiThermo> pThermo
|
|
(
|
|
psiThermo::New(mesh)
|
|
);
|
|
psiThermo& thermo = pThermo();
|
|
thermo.validate(args.executable(), "h", "e");
|
|
|
|
volScalarField rho
|
|
(
|
|
IOobject
|
|
(
|
|
"rho",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
thermo.rho()
|
|
);
|
|
|
|
volScalarField& p = thermo.p();
|
|
|
|
Info<< "\nReading field U\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
#include "compressibleCreatePhi.H"
|
|
|
|
|
|
Info<< "Creating turbulence model\n" << endl;
|
|
autoPtr<compressible::turbulenceModel> turbulence
|
|
(
|
|
compressible::turbulenceModel::New
|
|
(
|
|
rho,
|
|
U,
|
|
phi,
|
|
thermo
|
|
)
|
|
);
|
|
|
|
Info<< "Creating field dpdt\n" << endl;
|
|
volScalarField dpdt
|
|
(
|
|
IOobject
|
|
(
|
|
"dpdt",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
mesh,
|
|
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
|
);
|
|
|
|
Info<< "Creating field kinetic energy K\n" << endl;
|
|
volScalarField K("K", 0.5*magSqr(U));
|
|
|
|
#include "createMRF.H"
|