twoPhaseMixture: Add alpha2

This commit is contained in:
Henry
2013-02-06 10:52:49 +00:00
parent edbf12c163
commit 59f9f9ebd1
15 changed files with 57 additions and 23 deletions

View File

@ -4,8 +4,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
}
@ -57,8 +57,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
p.correctBoundaryConditions();

View File

@ -1,5 +1,5 @@
{
volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0;
volScalarField thermoRho = psi*p + gamma2*rhol0;
dimensionedScalar totalMass = fvc::domainIntegrate(rho);

View File

@ -49,6 +49,8 @@
volScalarField& gamma(twoPhaseProperties.alpha1());
gamma.oldTime();
volScalarField& gamma2(twoPhaseProperties.alpha2());
Info<< "Creating compressibilityModel\n" << endl;
autoPtr<barotropicCompressibilityModel> psiModel =
barotropicCompressibilityModel::New
@ -62,8 +64,8 @@
rho == max
(
psi*p
+ (1.0 - gamma)*rhol0
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
+ gamma2*rhol0
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
rhoMin
);

View File

@ -1,5 +1,6 @@
{
gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
gamma2 = 1.0 - gamma;
Info<< "max-min gamma: " << max(gamma).value()
<< " " << min(gamma).value() << endl;

View File

@ -4,8 +4,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
}
@ -49,8 +49,8 @@
rho == max
(
psi*p
+ (1.0 - gamma)*rhol0
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
+ gamma2*rhol0
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
rhoMin
);
@ -59,8 +59,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
p.correctBoundaryConditions();

View File

@ -18,7 +18,7 @@
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
@ -27,6 +27,7 @@
MULES::explicitLTSSolve(alpha1, phi, phiAlpha, 1, 0);
//MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
alpha2 = 1.0 - alpha1;
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
}

View File

@ -23,4 +23,4 @@ else
#include "alphaEqn.H"
}
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
rho == alpha1*rho1 + alpha2*rho2;

View File

@ -18,7 +18,7 @@
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
@ -26,6 +26,7 @@
MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
alpha2 = 1.0 - alpha1;
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
}

View File

@ -23,4 +23,4 @@ else
#include "alphaEqn.H"
}
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
rho == alpha1*rho1 + alpha2*rho2;

View File

@ -33,6 +33,7 @@
twoPhaseMixture twoPhaseProperties(U, phi);
volScalarField& alpha1(twoPhaseProperties.alpha1());
volScalarField& alpha2(twoPhaseProperties.alpha2());
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@ -48,7 +49,7 @@
mesh,
IOobject::READ_IF_PRESENT
),
alpha1*rho1 + (scalar(1) - alpha1)*rho2,
alpha1*rho1 + alpha2*rho2,
alpha1.boundaryField().types()
);
rho.oldTime();

View File

@ -12,7 +12,8 @@
alpha1Eqn.solve();
alpha2 = 1.0 - alpha1;
rhoPhi += alpha1Eqn.flux()*(rho1 - rho2);
}
rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2;
rho = alpha1*rho1 + alpha2*rho2;

View File

@ -23,4 +23,4 @@ else
#include "alphaEqn.H"
}
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
rho == alpha1*rho1 + alpha2*rho2;

View File

@ -32,6 +32,7 @@
twoPhaseMixture twoPhaseProperties(U, phi);
volScalarField& alpha1(twoPhaseProperties.alpha1());
volScalarField& alpha2(twoPhaseProperties.alpha2());
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@ -42,7 +43,7 @@
dimensionedScalar alphatab(twoPhaseProperties.lookup("alphatab"));
// Need to store rho for ddt(rho, U)
volScalarField rho("rho", alpha1*rho1 + (scalar(1) - alpha1)*rho2);
volScalarField rho("rho", alpha1*rho1 + alpha2*rho2);
rho.oldTime();