FreeFOAM The Cross-Platform CFD Toolkit
twoPhaseMixture.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::twoPhaseMixture
26 
27 Description
28  A two-phase incompressible transportModel
29 
30 SourceFiles
31  twoPhaseMixture.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef twoPhaseMixture_H
36 #define twoPhaseMixture_H
37 
41 #include <finiteVolume/volFields.H>
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class twoPhaseMixture Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public transportModel
55 {
56 protected:
57 
58  // Protected data
59 
62 
65 
68 
71 
73 
75 
76 
77  // Private Member Functions
78 
79  //- Calculate and return the laminar viscosity
80  void calcNu();
81 
82 
83 public:
84 
85  // Constructors
86 
87  //- Construct from components
89  (
90  const volVectorField& U,
91  const surfaceScalarField& phi,
92  const word& alpha1Name = "alpha1"
93  );
94 
95 
96  // Destructor
97 
99  {}
100 
101 
102  // Member Functions
103 
104  const word phase1Name() const
105  {
106  return phase1Name_;
107  }
108 
109  const word phase2Name() const
110  {
111  return phase2Name_;
112  }
113 
114  //- Return const-access to phase1 viscosityModel
115  const viscosityModel& nuModel1() const
116  {
117  return nuModel1_();
118  }
119 
120  //- Return const-access to phase2 viscosityModel
121  const viscosityModel& nuModel2() const
122  {
123  return nuModel2_();
124  }
125 
126  //- Return const-access to phase1 density
127  const dimensionedScalar& rho1() const
128  {
129  return rho1_;
130  }
131 
132  //- Return const-access to phase2 density
133  const dimensionedScalar& rho2() const
134  {
135  return rho2_;
136  };
137 
138  //- Return the dynamic laminar viscosity
139  tmp<volScalarField> mu() const;
140 
141  //- Return the face-interpolated dynamic laminar viscosity
143 
144  //- Return the kinematic laminar viscosity
145  virtual tmp<volScalarField> nu() const
146  {
147  return nu_;
148  }
149 
150  //- Return the face-interpolated kinematic laminar viscosity
152 
153  //- Correct the laminar viscosity
154  virtual void correct()
155  {
156  calcNu();
157  }
158 
159  //- Read base transportProperties dictionary
160  virtual bool read();
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************ vim: set sw=4 sts=4 et: ************************ //