mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
84 lines
1.4 KiB
C
84 lines
1.4 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::READ_IF_PRESENT,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
thermo.rho()
|
|
);
|
|
|
|
volScalarField& p = thermo.p();
|
|
const volScalarField& psi = thermo.psi();
|
|
|
|
Info<< "Reading field U\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
#include "compressibleCreatePhi.H"
|
|
|
|
|
|
label pRefCell = 0;
|
|
scalar pRefValue = 0.0;
|
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
|
|
|
mesh.setFluxRequired(p.name());
|
|
|
|
dimensionedScalar rhoMax
|
|
(
|
|
dimensionedScalar::lookupOrDefault
|
|
(
|
|
"rhoMax",
|
|
simple.dict(),
|
|
dimDensity,
|
|
GREAT
|
|
)
|
|
);
|
|
|
|
dimensionedScalar rhoMin
|
|
(
|
|
dimensionedScalar::lookupOrDefault
|
|
(
|
|
"rhoMin",
|
|
simple.dict(),
|
|
dimDensity,
|
|
0
|
|
)
|
|
);
|
|
|
|
Info<< "Creating turbulence model\n" << endl;
|
|
autoPtr<compressible::turbulenceModel> turbulence
|
|
(
|
|
compressible::turbulenceModel::New
|
|
(
|
|
rho,
|
|
U,
|
|
phi,
|
|
thermo
|
|
)
|
|
);
|
|
|
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|