Overture  Version 25
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 
15  {
16  arc,
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 
33 
35 
38 
39  virtual void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
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 
63 
64  int update( MappingInformation & mapInfo ) ;
65 
66  protected:
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
75 
76 // realArray yc,yt,theta, ytt, yct, thetat;
79 
80  private:
81 
82  //
83  // Virtual member functions used only through class ReferenceCounting:
84  //
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