Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
AirfoilMapping.h
Go to the documentation of this file.
1
#ifndef AIRFOIL_H
2
#define AIRFOIL_H "Airfoil.h"
3
4
#include "
Mapping.h
"
5
6
class
AirfoilMapping
:
public
Mapping
7
{
8
//-------------------------------------------------------------
9
// Here is a derived class to define a Airfoil in 2D
10
//-------------------------------------------------------------
11
12
public
:
13
14
enum
AirfoilTypes
15
{
16
arc
,
17
sinusoid
,
18
diamond
,
19
naca
,
20
joukowsky
21
};
22
23
AirfoilMapping
(
const
AirfoilTypes
& aft=
arc
,
24
const
real
xa=-1.5,
25
const
real
xb=1.5,
26
const
real
ya=0.,
27
const
real
yb=2. );
28
29
// Copy constructor is deep by default
30
AirfoilMapping
(
const
AirfoilMapping
&,
const
CopyType
copyType=
DEEP
);
31
32
~AirfoilMapping
();
33
34
AirfoilMapping
&
operator =
(
const
AirfoilMapping
& X0 );
35
36
void
map
(
const
realArray
&
r
,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
37
MappingParameters
& params=
Overture::nullMappingParameters
());
38
39
virtual
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&xr =
Overture::nullRealArray
(),
40
MappingParameters
& params =
Overture::nullMappingParameters
());
41
42
// set bounds on the rectangle that the airfoil sits in
43
int
setBoxBounds
(
const
real
xa=-1.5,
44
const
real
xb=1.5,
45
const
real
ya=0.,
46
const
real
yb=2. );
47
48
int
setParameters
(
const
AirfoilTypes
& airfoilType_,
49
const
real
&
chord
=1.,
50
const
real
&
thicknessToChordRatio
=.1,
51
const
real
&
maximumCamber
=0.,
52
const
real
&
positionOfMaximumCamber
=0.,
53
const
real
&
trailingEdgeEpsilon
=.02,
54
const
real
&
sinusoidPower
= 1. );
55
56
int
setJoukowskyParameters
(
const
real
& a,
const
real
& d,
const
real
& delta );
57
58
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
59
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
60
61
Mapping
*
make
(
const
aString
&
mappingClassName
);
62
aString
getClassName
()
const
{
return
AirfoilMapping::className
; }
63
64
int
update
(
MappingInformation
& mapInfo ) ;
65
66
protected
:
67
aString
className
;
68
RealArray
xBound
;
69
real
chord
;
70
real
thicknessToChordRatio
;
// ratio of airfoil thickness to chord
71
real
sinusoidPower
;
// sin(...)^sinusoidPower
72
73
real
maximumCamber
,
positionOfMaximumCamber
;
// addition parameters for NACA 4 airfoil
74
real
trailingEdgeEpsilon
;
75
76
// realArray yc,yt,theta, ytt, yct, thetat;
77
AirfoilTypes
airfoilType
;
78
real
joukowskyDelta
,
joukowskyD
,
joukowskyA
;
79
80
private
:
81
82
//
83
// Virtual member functions used only through class ReferenceCounting:
84
//
85
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
86
{
return
operator=
((
AirfoilMapping
&)x); }
87
virtual
void
reference(
const
ReferenceCounting
& x)
88
{ reference((
AirfoilMapping
&)x); }
// *** Conversion to this class for the virtual = ****
89
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
90
{ return ::new
AirfoilMapping
(*
this
, ct); }
91
92
};
93
94
95
#endif // AIRFOIL_H
96
97
Generated on Fri Jan 4 2013 10:17:48 for Overture by
1.8.3