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
src
transportModels
incompressible
viscosityModels
viscosityModel
viscosityModel.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
Namespace
25
Foam::viscosityModels
26
27
Description
28
A namespace for various incompressible viscosityModel implementations.
29
30
Class
31
Foam::viscosityModel
32
33
Description
34
An abstract base class for incompressible viscosityModels
35
36
SourceFiles
37
viscosityModel.C
38
newViscosityModel.C
39
40
\*---------------------------------------------------------------------------*/
41
42
#ifndef viscosityModel_H
43
#define viscosityModel_H
44
45
#include <
OpenFOAM/IOdictionary.H
>
46
#include <
OpenFOAM/typeInfo.H
>
47
#include <
OpenFOAM/runTimeSelectionTables.H
>
48
#include <
finiteVolume/volFieldsFwd.H
>
49
#include <
finiteVolume/surfaceFieldsFwd.H
>
50
#include <
OpenFOAM/dimensionedScalar.H
>
51
#include <
OpenFOAM/tmp.H
>
52
#include <
OpenFOAM/autoPtr.H
>
53
54
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56
namespace
Foam
57
{
58
59
/*---------------------------------------------------------------------------*\
60
Class viscosityModel Declaration
61
\*---------------------------------------------------------------------------*/
62
63
class
viscosityModel
64
{
65
66
protected
:
67
68
// Protected data
69
70
word
name_
;
71
dictionary
viscosityProperties_
;
72
73
const
volVectorField
&
U_
;
74
const
surfaceScalarField
&
phi_
;
75
76
77
// Private Member Functions
78
79
//- Disallow copy construct
80
viscosityModel
(
const
viscosityModel
&);
81
82
//- Disallow default bitwise assignment
83
void
operator=
(
const
viscosityModel
&);
84
85
86
public
:
87
88
//- Runtime type information
89
TypeName
(
"viscosityModel"
);
90
91
92
// Declare run-time constructor selection table
93
94
declareRunTimeSelectionTable
95
(
96
autoPtr
,
97
viscosityModel
,
98
dictionary
,
99
(
100
const
word
&
name
,
101
const
dictionary
&
viscosityProperties
,
102
const
volVectorField
&
U
,
103
const
surfaceScalarField
&
phi
104
),
105
(name, viscosityProperties, U, phi)
106
);
107
108
109
// Selectors
110
111
//- Return a reference to the selected viscosity model
112
static
autoPtr<viscosityModel>
New
113
(
114
const
word
& name,
115
const
dictionary
& viscosityProperties,
116
const
volVectorField
& U,
117
const
surfaceScalarField
& phi
118
);
119
120
121
// Constructors
122
123
//- Construct from components
124
viscosityModel
125
(
126
const
word
& name,
127
const
dictionary
& viscosityProperties,
128
const
volVectorField
& U,
129
const
surfaceScalarField
& phi
130
);
131
132
133
// Destructor
134
135
virtual
~viscosityModel
()
136
{}
137
138
139
// Member Functions
140
141
//- Return the phase transport properties dictionary
142
const
dictionary
&
viscosityProperties
()
const
143
{
144
return
viscosityProperties_
;
145
}
146
147
//- Return the strain rate mag(grad(U))
148
tmp<volScalarField>
strainRate
()
const
;
149
150
//- Return the laminar viscosity
151
virtual
tmp<volScalarField>
nu
()
const
= 0;
152
153
//- Correct the laminar viscosity
154
virtual
void
correct
() = 0;
155
156
//- Read transportProperties dictionary
157
virtual
bool
read
(
const
dictionary
& viscosityProperties) = 0;
158
};
159
160
161
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163
}
// End namespace Foam
164
165
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167
#endif
168
169
// ************************ vim: set sw=4 sts=4 et: ************************ //