BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / interMixingFoam / incompressibleThreePhaseMixture / threePhaseMixture.H
blobba21579f303cbf9915d0c52f47c9ab215e54c7b8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     threePhaseMixture
27 Description
29 SourceFiles
30     threePhaseMixture.C
32 \*---------------------------------------------------------------------------*/
34 #ifndef threePhaseMixture_H
35 #define threePhaseMixture_H
37 #include "incompressible/transportModel/transportModel.H"
38 #include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
39 #include "dimensionedScalar.H"
40 #include "volFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class threePhaseMixture Declaration
49 \*---------------------------------------------------------------------------*/
51 class threePhaseMixture
53     public transportModel
55     // Private data
57         word phase1Name_;
58         word phase2Name_;
59         word phase3Name_;
61         autoPtr<viscosityModel> nuModel1_;
62         autoPtr<viscosityModel> nuModel2_;
63         autoPtr<viscosityModel> nuModel3_;
65         dimensionedScalar rho1_;
66         dimensionedScalar rho2_;
67         dimensionedScalar rho3_;
69         const volVectorField& U_;
70         const surfaceScalarField& phi_;
72         const volScalarField& alpha1_;
73         const volScalarField& alpha2_;
74         const volScalarField& alpha3_;
76         volScalarField nu_;
79     // Private Member Functions
81         //- Calculate and return the laminar viscosity
82         void calcNu();
85 public:
87     // Constructors
89         //- Construct from components
90         threePhaseMixture
91         (
92             const volVectorField& U,
93             const surfaceScalarField& phi
94         );
97     //- Destructor
98     ~threePhaseMixture()
99     {}
102     // Member Functions
104         //- Return const-access to phase1 viscosityModel
105         const viscosityModel& nuModel1() const
106         {
107             return nuModel1_();
108         }
110         //- Return const-access to phase2 viscosityModel
111         const viscosityModel& nuModel2() const
112         {
113             return nuModel2_();
114         }
116         //- Return const-access to phase3 viscosityModel
117         const viscosityModel& nuModel3() const
118         {
119             return nuModel3_();
120         }
122         //- Return const-access to phase1 density
123         const dimensionedScalar& rho1() const
124         {
125             return rho1_;
126         }
128         //- Return const-access to phase2 density
129         const dimensionedScalar& rho2() const
130         {
131             return rho2_;
132         };
134         //- Return const-access to phase3 density
135         const dimensionedScalar& rho3() const
136         {
137             return rho3_;
138         };
140         const volScalarField& alpha1() const
141         {
142             return alpha1_;
143         }
145         const volScalarField& alpha2() const
146         {
147             return alpha2_;
148         }
150         const volScalarField& alpha3() const
151         {
152             return alpha3_;
153         }
155         //- Return the velocity
156         const volVectorField& U() const
157         {
158             return U_;
159         }
161         //- Return the dynamic laminar viscosity
162         tmp<volScalarField> mu() const;
164         //- Return the face-interpolated dynamic laminar viscosity
165         tmp<surfaceScalarField> muf() const;
167         //- Return the kinematic laminar viscosity
168         tmp<volScalarField> nu() const
169         {
170             return nu_;
171         }
173         //- Return the face-interpolated dynamic laminar viscosity
174         tmp<surfaceScalarField> nuf() const;
176         //- Correct the laminar viscosity
177         void correct()
178         {
179             calcNu();
180         }
182         //- Read base transportProperties dictionary
183         bool read();
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 } // End namespace Foam
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 #endif
195 // ************************************************************************* //