mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
twoPhaseMixture: Added support for named phases
e.g. in transportProperties phases (air water);
This commit is contained in:
@ -25,38 +25,6 @@
|
||||
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
|
||||
(
|
||||
@ -78,6 +46,27 @@
|
||||
|
||||
twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
|
||||
|
||||
volScalarField& gamma(twoPhaseProperties.alpha1());
|
||||
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
|
||||
);
|
||||
|
||||
// Create incompressible turbulence model
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
|
||||
@ -12,20 +12,6 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field alpha1\n" << endl;
|
||||
volScalarField alpha1
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alpha1",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
@ -46,6 +32,8 @@
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||
|
||||
volScalarField& alpha1(twoPhaseProperties.alpha1());
|
||||
|
||||
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
||||
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
||||
|
||||
|
||||
@ -12,20 +12,6 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field alpha1\n" << endl;
|
||||
volScalarField alpha1
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alpha1",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
@ -45,6 +31,8 @@
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||
|
||||
volScalarField& alpha1(twoPhaseProperties.alpha1());
|
||||
|
||||
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
||||
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user