Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
multiphase
interMixingFoam
incompressibleThreePhaseMixture
threePhaseMixture.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
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
25
Class
26
threePhaseMixture
27
28
Description
29
30
SourceFiles
31
threePhaseMixture.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef threePhaseMixture_H
36
#define threePhaseMixture_H
37
38
#include <
incompressibleTransportModels/transportModel.H
>
39
#include <
incompressibleTransportModels/viscosityModel.H
>
40
#include <
OpenFOAM/dimensionedScalar.H
>
41
#include <
finiteVolume/volFields.H
>
42
43
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45
namespace
Foam
46
{
47
48
/*---------------------------------------------------------------------------*\
49
Class threePhaseMixture Declaration
50
\*---------------------------------------------------------------------------*/
51
52
class
threePhaseMixture
53
:
54
public
transportModel
55
{
56
// Private data
57
58
word phase1Name_;
59
word phase2Name_;
60
word phase3Name_;
61
62
autoPtr<viscosityModel> nuModel1_;
63
autoPtr<viscosityModel> nuModel2_;
64
autoPtr<viscosityModel> nuModel3_;
65
66
dimensionedScalar
rho1_;
67
dimensionedScalar
rho2_;
68
dimensionedScalar
rho3_;
69
70
const
volVectorField
& U_;
71
const
surfaceScalarField
& phi_;
72
73
const
volScalarField
& alpha1_;
74
const
volScalarField
& alpha2_;
75
const
volScalarField
& alpha3_;
76
77
volScalarField
nu_;
78
79
80
// Private Member Functions
81
82
//- Calculate and return the laminar viscosity
83
void
calcNu();
84
85
86
public
:
87
88
// Constructors
89
90
//- Construct from components
91
threePhaseMixture
92
(
93
const
volVectorField
&
U
,
94
const
surfaceScalarField
&
phi
95
);
96
97
98
// Destructor
99
100
~threePhaseMixture
()
101
{}
102
103
104
// Member Functions
105
106
//- Return const-access to phase1 viscosityModel
107
const
viscosityModel
&
nuModel1
()
const
108
{
109
return
nuModel1_();
110
}
111
112
//- Return const-access to phase2 viscosityModel
113
const
viscosityModel&
nuModel2
()
const
114
{
115
return
nuModel2_();
116
}
117
118
//- Return const-access to phase3 viscosityModel
119
const
viscosityModel
&
nuModel3
()
const
120
{
121
return
nuModel3_();
122
}
123
124
//- Return const-access to phase1 density
125
const
dimensionedScalar
&
rho1
()
const
126
{
127
return
rho1_;
128
}
129
130
//- Return const-access to phase2 density
131
const
dimensionedScalar
&
rho2
()
const
132
{
133
return
rho2_;
134
};
135
136
//- Return const-access to phase3 density
137
const
dimensionedScalar
&
rho3
()
const
138
{
139
return
rho3_;
140
};
141
142
const
volScalarField
&
alpha1
()
const
143
{
144
return
alpha1_;
145
}
146
147
const
volScalarField
&
alpha2
()
const
148
{
149
return
alpha2_;
150
}
151
152
const
volScalarField
&
alpha3
()
const
153
{
154
return
alpha3_;
155
}
156
157
//- Return the velocity
158
const
volVectorField
&
U
()
const
159
{
160
return
U_;
161
}
162
163
//- Return the dynamic laminar viscosity
164
tmp<volScalarField>
mu
()
const
;
165
166
//- Return the face-interpolated dynamic laminar viscosity
167
tmp<surfaceScalarField>
muf
()
const
;
168
169
//- Return the kinematic laminar viscosity
170
tmp<volScalarField>
nu
()
const
171
{
172
return
nu_;
173
}
174
175
//- Return the face-interpolated dynamic laminar viscosity
176
tmp<surfaceScalarField>
nuf
()
const
;
177
178
//- Correct the laminar viscosity
179
void
correct
()
180
{
181
calcNu();
182
}
183
184
//- Read base transportProperties dictionary
185
bool
read
();
186
};
187
188
189
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190
191
}
// End namespace Foam
192
193
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194
195
#endif
196
197
// ************************************************************************* //