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
finiteVolume
cfdTools
general
fieldSources
basicSource
actuationDiskSource
actuationDiskSource.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) 2010-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 the
13
Free Software Foundation; either version 3 of the License, or (at your
14
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, write to the Free Software Foundation,
23
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
25
Class
26
Foam::actuationDiskSource
27
28
Description
29
Actuation disk zone definition.
30
Constant values for momentum source for actuation disk
31
32
T = 2*rho*A*sqr(Uo)*a*(1-a)
33
U1 = (1 -a)Uo
34
where:
35
A: disk area
36
Uo: upstream velocity
37
a: 1 - Cp/Ct
38
U1: velocity at the disk
39
40
SourceFiles
41
actuationDiskSource.C
42
actuationDiskSourceTemplates.C
43
44
\*---------------------------------------------------------------------------*/
45
46
#ifndef actuationDiskSource_H
47
#define actuationDiskSource_H
48
49
#include <
OpenFOAM/IOdictionary.H
>
50
#include <
meshTools/coordinateSystem.H
>
51
#include <
meshTools/coordinateSystems.H
>
52
#include <
OpenFOAM/wordList.H
>
53
#include <
OpenFOAM/labelList.H
>
54
#include <
OpenFOAM/DimensionedField.H
>
55
#include <
finiteVolume/volFieldsFwd.H
>
56
#include <
finiteVolume/fvMatricesFwd.H
>
57
#include <
finiteVolume/basicSource.H
>
58
59
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61
namespace
Foam
62
{
63
64
/*---------------------------------------------------------------------------*\
65
Class actuationDiskSource Declaration
66
\*---------------------------------------------------------------------------*/
67
68
class
actuationDiskSource
69
:
70
public
basicSource
71
{
72
// Private data
73
74
//- Cell zone ID
75
label cellZoneID_;
76
77
//- Sub dictionary with actuationDisk information
78
const
dictionary
& dict_;
79
80
//- Disk area normal
81
vector
diskDir_;
82
83
//- Power coefficient
84
scalar Cp_;
85
86
//- Thrust coefficient
87
scalar Ct_;
88
89
//- Disk area
90
scalar diskArea_;
91
92
93
// Private Member Functions
94
95
//- Check data
96
void
checkData();
97
98
//- Add resistance to the UEqn
99
template
<
class
RhoFieldType>
100
void
addActuationDiskAxialInertialResistance
101
(
102
vectorField
& Usource,
103
const
labelList
&
cells
,
104
const
scalarField
&
V
,
105
const
RhoFieldType&
rho
,
106
const
vectorField
&
U
107
)
const
;
108
109
//- Disallow default bitwise copy construct
110
actuationDiskSource
(
const
actuationDiskSource
&);
111
112
//- Disallow default bitwise assignment
113
void
operator=(
const
actuationDiskSource
&);
114
115
116
public
:
117
118
//- Runtime type information
119
TypeName
(
"actuationDiskSource"
);
120
121
122
// Constructors
123
124
//- Construct from components
125
actuationDiskSource
126
(
127
const
word
&
name
,
128
const
dictionary
& dict,
129
const
fvMesh
&
mesh
130
);
131
132
133
//- Destructor
134
virtual
~actuationDiskSource
()
135
{}
136
137
138
// Member Functions
139
140
// Access
141
142
//- cellZone number
143
label
zoneId
()
const
144
{
145
return
cellZoneID_;
146
}
147
148
//- Return Cp
149
scalar
Cp
()
const
150
{
151
return
Cp_;
152
}
153
154
//- Return Ct
155
scalar
Ct
()
const
156
{
157
return
Ct_;
158
}
159
160
//- Normal disk direction
161
const
vector
&
diskDir
()
const
162
{
163
return
diskDir_;
164
}
165
166
//- Disk area
167
scalar
diskArea
()
const
168
{
169
return
diskArea_;
170
}
171
172
173
// Public Functions
174
175
//-Source term to fvMatrix<vector>
176
virtual
void
addSu
(
fvMatrix<vector>
&
UEqn
);
177
178
//-Source term to fvMatrix<scalar>
179
virtual
void
addSu
(
fvMatrix<scalar>
&
UEqn
){}
180
181
//- Add all explicit source
182
virtual
void
addExplicitSources
(){}
183
184
//- Add source to scalar field
185
virtual
void
addSu
(
DimensionedField<scalar, volMesh>
& field){}
186
187
//- Add source to vector field
188
virtual
void
addSu
(
DimensionedField<vector, volMesh>
& field){}
189
190
191
// I-O
192
193
//- Write data
194
virtual
void
writeData
(
Ostream
&)
const
;
195
196
//- Read dictionary
197
virtual
bool
read
(
const
dictionary
& dict);
198
};
199
200
201
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203
}
// End namespace Foam
204
205
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207
#ifdef NoRepository
208
# include "
actuationDiskSourceTemplates.C
"
209
#endif
210
211
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213
#endif
214
215
// ************************************************************************* //