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

@ -54,7 +54,8 @@ Foam::twoPhaseMixture::twoPhaseMixture
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name
const word& alpha1Name,
const word& alpha2Name
)
:
transportModel(U, phi),
@ -102,6 +103,17 @@ Foam::twoPhaseMixture::twoPhaseMixture
U_.mesh()
),
alpha2_
(
IOobject
(
found("phases") ? word("alpha" + phase2Name_) : alpha2Name,
U_.time().timeName(),
U_.db()
),
1.0 - alpha1_
),
nu_
(
IOobject

View File

@ -70,6 +70,7 @@ protected:
const surfaceScalarField& phi_;
volScalarField alpha1_;
volScalarField alpha2_;
volScalarField nu_;
@ -89,7 +90,8 @@ public:
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name = "alpha1"
const word& alpha1Name = "alpha1",
const word& alpha2Name = "alpha2"
);
@ -122,6 +124,18 @@ public:
return alpha1_;
}
//- Return the phase-fraction of phase 2
const volScalarField& alpha2() const
{
return alpha2_;
}
//- Return the phase-fraction of phase 2
volScalarField& alpha2()
{
return alpha2_;
}
//- Return const-access to phase1 viscosityModel
const viscosityModel& nuModel1() const
{