db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
85 lines
1.8 KiB
C
85 lines
1.8 KiB
C
Info<< "Reading field p\n" << endl;
|
|
volScalarField p
|
|
(
|
|
IOobject
|
|
(
|
|
"p",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
volScalarField rho
|
|
(
|
|
IOobject
|
|
(
|
|
"rho",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
volScalarField gamma
|
|
(
|
|
IOobject
|
|
(
|
|
"gamma",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0))
|
|
);
|
|
gamma.oldTime();
|
|
|
|
Info<< "Creating compressibilityModel\n" << endl;
|
|
autoPtr<barotropicCompressibilityModel> psiModel =
|
|
barotropicCompressibilityModel::New
|
|
(
|
|
thermodynamicProperties,
|
|
gamma
|
|
);
|
|
|
|
const volScalarField& psi = psiModel->psi();
|
|
|
|
rho == max
|
|
(
|
|
psi*p
|
|
+ (1.0 - gamma)*rhol0
|
|
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
|
|
rhoMin
|
|
);
|
|
|
|
Info<< "Reading field U\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
# include "createPhiv.H"
|
|
# include "compressibleCreatePhi.H"
|
|
|
|
Info<< "Reading transportProperties\n" << endl;
|
|
|
|
twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
|
|
|
|
// Create RAS turbulence model
|
|
autoPtr<incompressible::RASModel> turbulence
|
|
(
|
|
incompressible::RASModel::New(U, phiv, twoPhaseProperties)
|
|
);
|