2010-09-22 18:13:13 +00:00
|
|
|
/*---------------------------------------------------------------------------*\
|
|
|
|
========= |
|
2013-12-11 16:09:41 +00:00
|
|
|
\\ / F ield | foam-extend: Open Source CFD
|
2016-06-20 15:00:40 +00:00
|
|
|
\\ / O peration | Version: 4.0
|
2015-05-17 13:32:07 +00:00
|
|
|
\\ / A nd | Web: http://www.foam-extend.org
|
|
|
|
\\/ M anipulation | For copyright notice see file Copyright
|
2010-09-22 18:13:13 +00:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
License
|
2013-12-11 16:09:41 +00:00
|
|
|
This file is part of foam-extend.
|
2010-09-22 18:13:13 +00:00
|
|
|
|
2013-12-11 16:09:41 +00:00
|
|
|
foam-extend is free software: you can redistribute it and/or modify it
|
2010-09-22 18:13:13 +00:00
|
|
|
under the terms of the GNU General Public License as published by the
|
2013-12-11 16:09:41 +00:00
|
|
|
Free Software Foundation, either version 3 of the License, or (at your
|
2010-09-22 18:13:13 +00:00
|
|
|
option) any later version.
|
|
|
|
|
2013-12-11 16:09:41 +00:00
|
|
|
foam-extend is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
2010-09-22 18:13:13 +00:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2013-12-11 16:09:41 +00:00
|
|
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
2010-09-22 18:13:13 +00:00
|
|
|
|
|
|
|
Class
|
|
|
|
threePhaseMixture
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
|
|
|
SourceFiles
|
|
|
|
threePhaseMixture.C
|
|
|
|
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#ifndef threePhaseMixture_H
|
|
|
|
#define threePhaseMixture_H
|
|
|
|
|
|
|
|
#include "incompressible/transportModel/transportModel.H"
|
|
|
|
#include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
|
|
|
|
#include "dimensionedScalar.H"
|
|
|
|
#include "volFields.H"
|
|
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
|
|
|
|
namespace Foam
|
|
|
|
{
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------------*\
|
|
|
|
Class threePhaseMixture Declaration
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
class threePhaseMixture
|
|
|
|
:
|
|
|
|
public transportModel
|
|
|
|
{
|
|
|
|
// Private data
|
|
|
|
|
|
|
|
word phase1Name_;
|
|
|
|
word phase2Name_;
|
|
|
|
word phase3Name_;
|
|
|
|
|
|
|
|
autoPtr<viscosityModel> nuModel1_;
|
|
|
|
autoPtr<viscosityModel> nuModel2_;
|
|
|
|
autoPtr<viscosityModel> nuModel3_;
|
|
|
|
|
|
|
|
dimensionedScalar rho1_;
|
|
|
|
dimensionedScalar rho2_;
|
|
|
|
dimensionedScalar rho3_;
|
|
|
|
|
|
|
|
const volVectorField& U_;
|
|
|
|
const surfaceScalarField& phi_;
|
|
|
|
|
|
|
|
const volScalarField& alpha1_;
|
|
|
|
const volScalarField& alpha2_;
|
|
|
|
const volScalarField& alpha3_;
|
|
|
|
|
|
|
|
volScalarField nu_;
|
|
|
|
|
|
|
|
|
|
|
|
// Private Member Functions
|
|
|
|
|
|
|
|
//- Calculate and return the laminar viscosity
|
|
|
|
void calcNu();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
// Constructors
|
|
|
|
|
|
|
|
//- Construct from components
|
|
|
|
threePhaseMixture
|
|
|
|
(
|
|
|
|
const volVectorField& U,
|
|
|
|
const surfaceScalarField& phi
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// Destructor
|
|
|
|
|
|
|
|
~threePhaseMixture()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
// Member Functions
|
|
|
|
|
|
|
|
//- Return const-access to phase1 viscosityModel
|
|
|
|
const viscosityModel& nuModel1() const
|
|
|
|
{
|
|
|
|
return nuModel1_();
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return const-access to phase2 viscosityModel
|
|
|
|
const viscosityModel& nuModel2() const
|
|
|
|
{
|
|
|
|
return nuModel2_();
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return const-access to phase3 viscosityModel
|
|
|
|
const viscosityModel& nuModel3() const
|
|
|
|
{
|
|
|
|
return nuModel3_();
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return const-access to phase1 density
|
|
|
|
const dimensionedScalar& rho1() const
|
|
|
|
{
|
|
|
|
return rho1_;
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return const-access to phase2 density
|
|
|
|
const dimensionedScalar& rho2() const
|
|
|
|
{
|
|
|
|
return rho2_;
|
|
|
|
};
|
|
|
|
|
|
|
|
//- Return const-access to phase3 density
|
|
|
|
const dimensionedScalar& rho3() const
|
|
|
|
{
|
|
|
|
return rho3_;
|
|
|
|
};
|
|
|
|
|
|
|
|
const volScalarField& alpha1() const
|
|
|
|
{
|
|
|
|
return alpha1_;
|
|
|
|
}
|
|
|
|
|
|
|
|
const volScalarField& alpha2() const
|
|
|
|
{
|
|
|
|
return alpha2_;
|
|
|
|
}
|
|
|
|
|
|
|
|
const volScalarField& alpha3() const
|
|
|
|
{
|
|
|
|
return alpha3_;
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return the velocity
|
|
|
|
const volVectorField& U() const
|
|
|
|
{
|
|
|
|
return U_;
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return the dynamic laminar viscosity
|
|
|
|
tmp<volScalarField> mu() const;
|
|
|
|
|
|
|
|
//- Return the face-interpolated dynamic laminar viscosity
|
|
|
|
tmp<surfaceScalarField> muf() const;
|
|
|
|
|
|
|
|
//- Return the kinematic laminar viscosity
|
|
|
|
const volScalarField& nu() const
|
|
|
|
{
|
|
|
|
return nu_;
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Return the face-interpolated dynamic laminar viscosity
|
|
|
|
tmp<surfaceScalarField> nuf() const;
|
|
|
|
|
|
|
|
//- Correct the laminar viscosity
|
|
|
|
void correct()
|
|
|
|
{
|
|
|
|
calcNu();
|
|
|
|
}
|
|
|
|
|
|
|
|
//- Read base transportProperties dictionary
|
|
|
|
bool read();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
|
|
|
|
} // End namespace Foam
|
|
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// ************************************************************************* //
|