75 lines
1.4 KiB
C++
75 lines
1.4 KiB
C++
Info<< "Reading thermophysical properties\n" << endl;
|
|
|
|
autoPtr<fluidThermo> pThermo(fluidThermo::New(mesh));
|
|
fluidThermo& thermo = pThermo();
|
|
thermo.validate(args.executable(), "h", "e");
|
|
|
|
volScalarField rho
|
|
(
|
|
IOobject
|
|
(
|
|
"rho",
|
|
runTime.name(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
thermo.renameRho()
|
|
);
|
|
|
|
volScalarField& p = thermo.p();
|
|
|
|
Info<< "Reading field U\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.name(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
#include "compressibleCreatePhi.H"
|
|
|
|
Info<< "Creating turbulence model\n" << endl;
|
|
autoPtr<compressible::momentumTransportModel> turbulence
|
|
(
|
|
compressible::momentumTransportModel::New
|
|
(
|
|
rho,
|
|
U,
|
|
phi,
|
|
thermo
|
|
)
|
|
);
|
|
|
|
Info<< "Creating thermophysical transport model\n" << endl;
|
|
autoPtr<fluidThermoThermophysicalTransportModel> thermophysicalTransport
|
|
(
|
|
fluidThermoThermophysicalTransportModel::New(turbulence(), thermo)
|
|
);
|
|
|
|
Info<< "Creating field dpdt\n" << endl;
|
|
volScalarField dpdt
|
|
(
|
|
IOobject
|
|
(
|
|
"dpdt",
|
|
runTime.name(),
|
|
mesh
|
|
),
|
|
mesh,
|
|
dimensionedScalar(p.dimensions()/dimTime, 0)
|
|
);
|
|
|
|
Info<< "Creating field kinetic energy K\n" << endl;
|
|
volScalarField K("K", 0.5*magSqr(U));
|
|
|
|
#include "createFvModels.H"
|
|
#include "createFvConstraints.H"
|
|
#include "checkRadiationModel.H"
|