1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 A two-phase incompressible transportModel
33 \*---------------------------------------------------------------------------*/
35 #ifndef twoPhaseMixture_H
36 #define twoPhaseMixture_H
38 #include "incompressible/transportModel/transportModel.H"
39 #include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
40 #include "dimensionedScalar.H"
41 #include "volFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class twoPhaseMixture Declaration
50 \*---------------------------------------------------------------------------*/
63 autoPtr<viscosityModel> nuModel1_;
64 autoPtr<viscosityModel> nuModel2_;
66 dimensionedScalar rho1_;
67 dimensionedScalar rho2_;
69 const volVectorField& U_;
70 const surfaceScalarField& phi_;
72 const volScalarField& alpha1_;
77 // Private Member Functions
79 //- Get phase name (backward compatibility)
80 word getPhaseName(const word& key) const;
82 //- Calculate and return the laminar viscosity
90 //- Construct from components
93 const volVectorField& U,
94 const surfaceScalarField& phi,
95 const word& alpha1Name = "alpha1"
101 virtual ~twoPhaseMixture()
107 const word& phase1Name() const
112 const word& phase2Name() const
117 //- Return const-access to phase1 viscosityModel
118 const viscosityModel& nuModel1() const
123 //- Return const-access to phase2 viscosityModel
124 const viscosityModel& nuModel2() const
129 //- Return const-access to phase1 density
130 const dimensionedScalar& rho1() const
135 //- Return const-access to phase2 density
136 const dimensionedScalar& rho2() const
141 //- Return the density
142 tmp<volScalarField> rho() const;
144 //- Return the dynamic laminar viscosity
145 tmp<volScalarField> mu() const;
147 //- Return the face-interpolated dynamic laminar viscosity
148 tmp<surfaceScalarField> muf() const;
150 //- Return the kinematic laminar viscosity
151 virtual const volScalarField& nu() const
156 //- Return the face-interpolated dynamic laminar viscosity
157 tmp<surfaceScalarField> nuf() const;
159 //- Correct the laminar viscosity
160 virtual void correct()
165 //- Read base transportProperties dictionary
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 // ************************************************************************* //