mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
so that the specification of the name and dimensions are optional in property dictionaries. Update tutorials so that the name of the dimensionedScalar property is no longer duplicated but optional dimensions are still provided and are checked on read.
73 lines
1.2 KiB
C
73 lines
1.2 KiB
C
Info<< "Reading field p_rgh\n" << endl;
|
|
volScalarField p_rgh
|
|
(
|
|
IOobject
|
|
(
|
|
"p_rgh",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading field U\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
#include "createPhi.H"
|
|
|
|
Info<< "Constructing multiphaseMixtureThermo\n" << endl;
|
|
multiphaseMixtureThermo mixture(U, phi);
|
|
|
|
volScalarField& p = mixture.p();
|
|
volScalarField& T = mixture.T();
|
|
|
|
volScalarField rho
|
|
(
|
|
IOobject
|
|
(
|
|
"rho",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::READ_IF_PRESENT
|
|
),
|
|
mixture.rho()
|
|
);
|
|
|
|
dimensionedScalar pMin("pMin", dimPressure, mixture.lookup("pMin"));
|
|
|
|
mesh.setFluxRequired(p_rgh.name());
|
|
|
|
|
|
#include "readGravitationalAcceleration.H"
|
|
#include "readhRef.H"
|
|
#include "gh.H"
|
|
|
|
|
|
// Construct compressible turbulence model
|
|
autoPtr<compressible::turbulenceModel> turbulence
|
|
(
|
|
compressible::turbulenceModel::New
|
|
(
|
|
rho,
|
|
U,
|
|
mixture.rhoPhi(),
|
|
mixture
|
|
)
|
|
);
|
|
|
|
Info<< "Creating field kinetic energy K\n" << endl;
|
|
volScalarField K("K", 0.5*magSqr(U));
|