incompressibleThreePhaseMixture.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::incompressibleThreePhaseMixture
28
29Description
30
31SourceFiles
32 incompressibleThreePhaseMixture.C
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef incompressibleThreePhaseMixture_H
37#define incompressibleThreePhaseMixture_H
38
40#include "IOdictionary.H"
42#include "dimensionedScalar.H"
43#include "volFields.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class incompressibleThreePhaseMixture Declaration
52\*---------------------------------------------------------------------------*/
55:
56 public IOdictionary,
57 public transportModel
58{
59 // Private data
60
61 word phase1Name_;
62 word phase2Name_;
63 word phase3Name_;
64
65 volScalarField alpha1_;
66 volScalarField alpha2_;
67 volScalarField alpha3_;
68
69 const volVectorField& U_;
70 const surfaceScalarField& phi_;
71
73
77
81
82
83 // Private Member Functions
84
85 //- Calculate and return the laminar viscosity
86 void calcNu();
87
88
89public:
90
91 // Constructors
92
93 //- Construct from components
95 (
96 const volVectorField& U,
98 );
99
100
101 //- Destructor
103 {}
104
105
106 // Member Functions
108 const word phase1Name() const
109 {
110 return phase1Name_;
111 }
113 const word phase2Name() const
114 {
115 return phase2Name_;
116 }
118 const word phase3Name() const
119 {
120 return phase3Name_;
121 }
123 const volScalarField& alpha1() const
124 {
125 return alpha1_;
126 }
129 {
130 return alpha1_;
131 }
133 const volScalarField& alpha2() const
134 {
135 return alpha2_;
136 }
139 {
140 return alpha2_;
141 }
143 const volScalarField& alpha3() const
144 {
145 return alpha3_;
146 }
149 {
150 return alpha3_;
151 }
152
153 //- Return const-access to phase1 density
154 const dimensionedScalar& rho1() const
155 {
156 return rho1_;
157 }
158
159 //- Return const-access to phase2 density
160 const dimensionedScalar& rho2() const
161 {
162 return rho2_;
163 };
164
165 //- Return const-access to phase3 density
166 const dimensionedScalar& rho3() const
167 {
168 return rho3_;
169 };
170
171 //- Return the velocity
172 const volVectorField& U() const
173 {
174 return U_;
175 }
176
177 //- Return the flux
178 const surfaceScalarField& phi() const
179 {
180 return phi_;
181 }
182
183 //- Return const-access to phase1 viscosityModel
184 const viscosityModel& nuModel1() const
185 {
186 return *nuModel1_;
187 }
188
189 //- Return const-access to phase2 viscosityModel
190 const viscosityModel& nuModel2() const
191 {
192 return *nuModel2_;
193 }
194
195 //- Return const-access to phase3 viscosityModel
196 const viscosityModel& nuModel3() const
197 {
198 return *nuModel3_;
199 }
200
201 //- Return the dynamic laminar viscosity
202 tmp<volScalarField> mu() const;
203
204 //- Return the face-interpolated dynamic laminar viscosity
206
207 //- Return the kinematic laminar viscosity
208 tmp<volScalarField> nu() const
209 {
210 return nu_;
211 }
212
213 //- Return the laminar viscosity for patch
214 tmp<scalarField> nu(const label patchi) const
215 {
216 return nu_.boundaryField()[patchi];
217 }
218
219 //- Return the face-interpolated dynamic laminar viscosity
221
222 //- Correct the laminar viscosity
223 void correct()
224 {
225 calcNu();
226 }
227
228 //- Read base transportProperties dictionary
229 bool read();
230};
231
232
233// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234
235} // End namespace Foam
236
237// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238
239#endif
240
241// ************************************************************************* //
const Boundary & boundaryField() const
Return const-reference to the boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
const volVectorField & U() const
Return the velocity.
incompressibleThreePhaseMixture(const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
void correct()
Correct the laminar viscosity.
const surfaceScalarField & phi() const
Return the flux.
tmp< surfaceScalarField > muf() const
Return the face-interpolated dynamic laminar viscosity.
const dimensionedScalar & rho1() const
Return const-access to phase1 density.
tmp< scalarField > nu(const label patchi) const
Return the laminar viscosity for patch.
const viscosityModel & nuModel3() const
Return const-access to phase3 viscosityModel.
const viscosityModel & nuModel1() const
Return const-access to phase1 viscosityModel.
tmp< volScalarField > nu() const
Return the kinematic laminar viscosity.
tmp< volScalarField > mu() const
Return the dynamic laminar viscosity.
const dimensionedScalar & rho2() const
Return const-access to phase2 density.
const viscosityModel & nuModel2() const
Return const-access to phase2 viscosityModel.
const dimensionedScalar & rho3() const
Return const-access to phase3 density.
bool read()
Read base transportProperties dictionary.
tmp< surfaceScalarField > nuf() const
Return the face-interpolated dynamic laminar viscosity.
A class for managing temporary objects.
Definition: tmp.H:65
Base-class for all transport models used by the incompressible turbulence models.
An abstract base class for incompressible viscosityModels.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.