Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / multiphase / interMixingFoam / incompressibleThreePhaseMixture / threePhaseMixture.H
blobb55b75a2ca1331879b02c54f6ce1363b35b823e1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM 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 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 Class
26     threePhaseMixture
28 Description
30 SourceFiles
31     threePhaseMixture.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef threePhaseMixture_H
36 #define threePhaseMixture_H
38 #include "incompressible/transportModel/transportModel.H"
39 #include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
40 #include "dimensionedScalar.H"
41 #include "volFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                            Class threePhaseMixture Declaration
50 \*---------------------------------------------------------------------------*/
52 class threePhaseMixture
54     public transportModel
56     // Private data
58         word phase1Name_;
59         word phase2Name_;
60         word phase3Name_;
62         autoPtr<viscosityModel> nuModel1_;
63         autoPtr<viscosityModel> nuModel2_;
64         autoPtr<viscosityModel> nuModel3_;
66         dimensionedScalar rho1_;
67         dimensionedScalar rho2_;
68         dimensionedScalar rho3_;
70         const volVectorField& U_;
71         const surfaceScalarField& phi_;
73         const volScalarField& alpha1_;
74         const volScalarField& alpha2_;
75         const volScalarField& alpha3_;
77         volScalarField nu_;
80     // Private Member Functions
82         //- Calculate and return the laminar viscosity
83         void calcNu();
86 public:
88     // Constructors
90         //- Construct from components
91         threePhaseMixture
92         (
93             const volVectorField& U,
94             const surfaceScalarField& phi
95         );
98     // Destructor
100         ~threePhaseMixture()
101         {}
104     // Member Functions
106         //- Return const-access to phase1 viscosityModel
107         const viscosityModel& nuModel1() const
108         {
109             return nuModel1_();
110         }
112         //- Return const-access to phase2 viscosityModel
113         const viscosityModel& nuModel2() const
114         {
115             return nuModel2_();
116         }
118         //- Return const-access to phase3 viscosityModel
119         const viscosityModel& nuModel3() const
120         {
121             return nuModel3_();
122         }
124         //- Return const-access to phase1 density
125         const dimensionedScalar& rho1() const
126         {
127             return rho1_;
128         }
130         //- Return const-access to phase2 density
131         const dimensionedScalar& rho2() const
132         {
133             return rho2_;
134         };
136         //- Return const-access to phase3 density
137         const dimensionedScalar& rho3() const
138         {
139             return rho3_;
140         };
142         const volScalarField& alpha1() const
143         {
144             return alpha1_;
145         }
147         const volScalarField& alpha2() const
148         {
149             return alpha2_;
150         }
152         const volScalarField& alpha3() const
153         {
154             return alpha3_;
155         }
157         //- Return the velocity
158         const volVectorField& U() const
159         {
160             return U_;
161         }
163         //- Return the dynamic laminar viscosity
164         tmp<volScalarField> mu() const;
166         //- Return the face-interpolated dynamic laminar viscosity
167         tmp<surfaceScalarField> muf() const;
169         //- Return the kinematic laminar viscosity
170         const volScalarField& nu() const
171         {
172             return nu_;
173         }
175         //- Return the face-interpolated dynamic laminar viscosity
176         tmp<surfaceScalarField> nuf() const;
178         //- Correct the laminar viscosity
179         void correct()
180         {
181             calcNu();
182         }
184         //- Read base transportProperties dictionary
185         bool read();
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 } // End namespace Foam
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 #endif
197 // ************************************************************************* //