mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressibleMultiphaseInterFoam: hack implementation of compressible multiphaseInterFoam
Needs to be consolidated with multiphaseInterFoam with thermal and compressibility effects made run-time selectable
This commit is contained in:
@ -0,0 +1,71 @@
|
||||
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 multiphaseProperties(U, phi);
|
||||
|
||||
volScalarField& p = multiphaseProperties.p();
|
||||
volScalarField& T = multiphaseProperties.T();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
multiphaseProperties.rho()
|
||||
);
|
||||
|
||||
Info<< max(rho) << min(rho);
|
||||
|
||||
dimensionedScalar pMin(multiphaseProperties.lookup("pMin"));
|
||||
|
||||
|
||||
Info<< "Calculating field g.h\n" << endl;
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||
|
||||
// Construct compressible turbulence model
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
multiphaseProperties.rhoPhi(),
|
||||
multiphaseProperties
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
Reference in New Issue
Block a user