MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
GlauertRotor Class Reference

#include <rotor.h>

Inheritance diagram for GlauertRotor:
Collaboration diagram for GlauertRotor:

Public Types

enum  Type {
  UNKNOWN = -1, GLAUERT, COLEMAN_ET_AL, DREES_1,
  PAYNE, WHITE_AND_BLAKE, PITT_AND_PETERS, HOWLETT,
  DREES_2, LAST
}
 
- Public Types inherited from Elem
enum  Type {
  UNKNOWN = -1, AIRPROPERTIES = 0, INDUCEDVELOCITY, AUTOMATICSTRUCTURAL,
  GRAVITY, BODY, JOINT, JOINT_REGULARIZATION,
  BEAM, PLATE, FORCE, INERTIA,
  ELECTRICBULK, ELECTRIC, THERMAL, HYDRAULIC,
  BULK, LOADABLE, DRIVEN, EXTERNAL,
  AEROMODAL, AERODYNAMIC, GENEL, SOCKETSTREAM_OUTPUT,
  RTAI_OUTPUT = SOCKETSTREAM_OUTPUT, LASTELEMTYPE
}
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 
- Public Types inherited from AerodynamicElem
enum  Type {
  UNKNOWN = -1, INDUCEDVELOCITY = 0, AEROMODAL, AERODYNAMICBODY,
  AERODYNAMICBEAM, AERODYNAMICEXTERNAL, AERODYNAMICEXTERNALMODAL, AERODYNAMICLOADABLE,
  AIRCRAFTINSTRUMENTS, GENERICFORCE, LASTAEROTYPE
}
 
- Public Types inherited from InducedVelocity
enum  Type {
  UNKNOWN = -1, USER_DEFINED = 0x01000000U, ROTOR = 0x10000000U, NO = (0U | ROTOR),
  UNIFORM = (1U | ROTOR), GLAUERT = (2U | ROTOR), MANGLER = (3U | ROTOR), DYNAMICINFLOW = (4U | ROTOR),
  PETERS_HE = (5U | ROTOR), CYCLOCOPTER = (11U | ROTOR), LASTROTORTYPE
}
 

Public Member Functions

 GlauertRotor (unsigned int uLabel, const DofOwner *pDO)
 
 GlauertRotor (unsigned int uLabel, const DofOwner *pDO, const StructNode *pCraft, const Mat3x3 &rrot, const StructNode *pRotor, const StructNode *pGround, ResForceSet **ppres, const doublereal &dOR, const doublereal &dR, DriveCaller *pdW, unsigned int iMaxIt, const doublereal &dTol, const doublereal &dE, const doublereal &dCH, const doublereal &dCFF, GlauertRotor::Type gtype, flag fOut)
 
virtual ~GlauertRotor (void)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual std::ostream & Restart (std::ostream &out) const
 
InducedVelocity::Type GetInducedVelocityType (void) const
 
virtual void AddForce (const Elem *pEl, const StructNode *pNode, const Vec3 &F, const Vec3 &M, const Vec3 &X)
 
virtual Vec3 GetInducedVelocity (Elem::Type type, unsigned uLabel, unsigned uPnt, const Vec3 &X) const
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual bool bInverseDynamics (void) const
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
virtual int GetNumConnectedNodes (void) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 
- Public Member Functions inherited from Rotor
 Rotor (unsigned int uL, const DofOwner *pDO)
 
 Rotor (unsigned int uL, const DofOwner *pDO, const StructNode *pC, const Mat3x3 &rrot, const StructNode *pR, const StructNode *pG, ResForceSet **ppres, const doublereal &dR, unsigned int iMaxIt, const doublereal &dTol, const doublereal &dE, flag fOut)
 
virtual ~Rotor (void)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void Output (OutputHandler &OH) const
 
virtual void SetInitialValue (VectorHandler &)
 
virtual const Vec3GetXCurr (void) const
 
virtual doublereal dGetOmega (void) const
 
virtual doublereal dGetRadius (void) const
 
virtual doublereal dGetMu (void) const
 
virtual const Vec3GetForces (void) const
 
virtual const Vec3GetMoments (void) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
- Public Member Functions inherited from InducedVelocityElem
 InducedVelocityElem (unsigned int uL, const DofOwner *pDO, const StructNode *pCraft, ResForceSet **ppres, flag fOut)
 
virtual ~InducedVelocityElem (void)
 
virtual Elem::Type GetElemType (void) const
 
virtual AerodynamicElem::Type GetAerodynamicElemType (void) const
 
virtual DofOrder::Order GetDofType (unsigned int i) const
 
- Public Member Functions inherited from AerodynamicElem
 AerodynamicElem (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~AerodynamicElem (void)
 
virtual bool NeedsAirProperties (void) const
 
virtual const InducedVelocitypGetInducedVelocity (void) const
 
- Public Member Functions inherited from ElemWithDofs
 ElemWithDofs (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~ElemWithDofs (void)
 
- Public Member Functions inherited from DofOwnerOwner
 DofOwnerOwner (const DofOwner *pDO)
 
virtual ~DofOwnerOwner ()
 
virtual const DofOwnerpGetDofOwner (void) const
 
virtual integer iGetFirstIndex (void) const
 
- Public Member Functions inherited from AirPropOwner
 AirPropOwner (void)
 
virtual ~AirPropOwner (void)
 
virtual void PutAirProperties (const AirProperties *pAP)
 
virtual flag fGetAirVelocity (Vec3 &Velocity, const Vec3 &X) const
 
virtual doublereal dGetAirDensity (const Vec3 &X) const
 
virtual doublereal dGetAirPressure (const Vec3 &X) const
 
virtual doublereal dGetAirTemperature (const Vec3 &X) const
 
virtual doublereal dGetSoundSpeed (const Vec3 &X) const
 
virtual bool GetAirProps (const Vec3 &X, doublereal &rho, doublereal &c, doublereal &p, doublereal &T) const
 
- Public Member Functions inherited from InducedVelocity
 InducedVelocity (unsigned int uL, const StructNode *pCraft, ResForceSet **ppres, flag fOut)
 
virtual ~InducedVelocity (void)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual bool bSectionalForces (void) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual void AddSectionalForce (Elem::Type type, const Elem *pEl, unsigned uPnt, const Vec3 &F, const Vec3 &M, doublereal dW, const Vec3 &X, const Mat3x3 &R, const Vec3 &V, const Vec3 &W)
 
virtual void ResetForce (void)
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void SetValue (DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
 

Protected Member Functions

virtual void Init (const StructNode *pCraft, const Mat3x3 &rrot, const StructNode *pRotor, const StructNode *pGround, ResForceSet **ppres, const doublereal &dOR, const doublereal &dR, DriveCaller *pdW, unsigned int iMaxIt, const doublereal &dTol, const doublereal &dE, const doublereal &dCH, const doublereal &dCFF, flag fOut)
 
- Protected Member Functions inherited from Rotor
virtual doublereal dGetPsi (const Vec3 &X) const
 
virtual doublereal dGetPos (const Vec3 &X) const
 
virtual void GetPos (const Vec3 &X, doublereal &dr, doublereal &dp) const
 
virtual void InitParam (bool bComputeMeanInducedVelocity=true)
 
virtual void Init (const StructNode *pC, const Mat3x3 &rrot, const StructNode *pR, const StructNode *pG, ResForceSet **ppres, const doublereal &dR, unsigned int iMaxIt, const doublereal &dTol, const doublereal &dE, flag fOut)
 

Protected Attributes

Type gtype
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from Rotor
const StructNodepRotor
 
const StructNodepGround
 
doublereal dOmegaRef
 
doublereal dRadius
 
doublereal dVTipRef
 
doublereal dArea
 
doublereal dUMean
 
doublereal dUMeanRef
 
doublereal dUMeanPrev
 
unsigned int iMaxIter
 
unsigned int iCurrIter
 
doublereal dTolerance
 
doublereal dEta
 
bool bUMeanRefConverged
 
DriveOwner Weight
 
doublereal dWeight
 
doublereal dHoverCorrection
 
doublereal dForwardFlightCorrection
 
Mat3x3 RRotTranspose
 
Mat3x3 RRot
 
Vec3 RRot3
 
Vec3 VCraft
 
doublereal dPsi0
 
doublereal dSinAlphad
 
doublereal dCosAlphad
 
doublereal dMu
 
doublereal dLambda
 
doublereal dChi
 
doublereal dVelocity
 
doublereal dOmega
 
int iNumSteps
 
- Protected Attributes inherited from AirPropOwner
const AirPropertiespAirProperties
 
- Protected Attributes inherited from InducedVelocity
const StructNodepCraft
 
ExternResForces Res
 
ResForceSet ** ppRes
 

Detailed Description

Definition at line 372 of file rotor.h.

Member Enumeration Documentation

Enumerator
UNKNOWN 
GLAUERT 
COLEMAN_ET_AL 
DREES_1 
PAYNE 
WHITE_AND_BLAKE 
PITT_AND_PETERS 
HOWLETT 
DREES_2 
LAST 

Definition at line 374 of file rotor.h.

374  {
375  UNKNOWN = -1,
376 
377  // from (?)
378  GLAUERT,
379 
380  // from J. Gordon Leishman, Principles of Helicopter Aerodynamics, 2000
382  DREES_1,
383  PAYNE,
386  HOWLETT,
387 
388  // from Massimo Gennaretti, Roma Tre
389  DREES_2,
390 
391  LAST
392  };

Constructor & Destructor Documentation

GlauertRotor::GlauertRotor ( unsigned int  uLabel,
const DofOwner pDO 
)

Definition at line 976 of file rotor.cc.

References NO_OP.

977 : Elem(uLabel, flag(0)),
978 Rotor(uLabel, pDO),
980 {
981  NO_OP;
982 }
Type gtype
Definition: rotor.h:395
long int flag
Definition: mbdyn.h:43
#define NO_OP
Definition: myassert.h:74
Rotor(unsigned int uL, const DofOwner *pDO)
Definition: rotor.cc:59
unsigned int uLabel
Definition: withlab.h:44
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
GlauertRotor::GlauertRotor ( unsigned int  uLabel,
const DofOwner pDO,
const StructNode pCraft,
const Mat3x3 rrot,
const StructNode pRotor,
const StructNode pGround,
ResForceSet **  ppres,
const doublereal dOR,
const doublereal dR,
DriveCaller pdW,
unsigned int  iMaxIt,
const doublereal dTol,
const doublereal dE,
const doublereal dCH,
const doublereal dCFF,
GlauertRotor::Type  gtype,
flag  fOut 
)

Definition at line 984 of file rotor.cc.

References Init().

1001 : Elem(uLabel, flag(0)),
1002 Rotor(uLabel, pDO),
1003 gtype(gtype)
1004 {
1005  Init(pCraft, rrot, pRotor, pGround, ppres, dOR, dR,
1006  pdW, iMaxIt, dTol, dE, dCH, dCFF, fOut);
1007 }
Type gtype
Definition: rotor.h:395
long int flag
Definition: mbdyn.h:43
Rotor(unsigned int uL, const DofOwner *pDO)
Definition: rotor.cc:59
unsigned int uLabel
Definition: withlab.h:44
virtual void Init(const StructNode *pCraft, const Mat3x3 &rrot, const StructNode *pRotor, const StructNode *pGround, ResForceSet **ppres, const doublereal &dOR, const doublereal &dR, DriveCaller *pdW, unsigned int iMaxIt, const doublereal &dTol, const doublereal &dE, const doublereal &dCH, const doublereal &dCFF, flag fOut)
Definition: rotor.cc:1010
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

GlauertRotor::~GlauertRotor ( void  )
virtual

Definition at line 1067 of file rotor.cc.

References SAFEDELETE, and SAFEDELETEARR.

1068 {
1069 #ifdef USE_MPI
1070  SAFEDELETEARR(pBlockLenght);
1071  SAFEDELETEARR(pDispl);
1072  SAFEDELETE(pIndVelDataType);
1073 #endif /* USE_MPI */
1074 }
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

void GlauertRotor::AddForce ( const Elem pEl,
const StructNode pNode,
const Vec3 F,
const Vec3 M,
const Vec3 X 
)
virtual

Reimplemented from InducedVelocity.

Definition at line 1123 of file rotor.cc.

References ResForces::AddForce(), InducedVelocity::AddForce(), ResForces::AddForces(), ToBeOutput::bToBeOutput(), MYSLEEP, and InducedVelocity::Res.

1125 {
1126 #ifdef USE_MPI
1127  if (ReqV != MPI::REQUEST_NULL) {
1128  while (!ReqV.Test()) {
1129  MYSLEEP(mysleeptime);
1130  }
1131  }
1132 #endif /* USE_MPI */
1133 
1134 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1135  pthread_mutex_lock(&forces_mutex);
1136  Wait();
1137 #endif /* USE_MULTITHREAD && MBDYN_X_MT_ASSRES */
1138 
1139  /* Solo se deve fare l'output calcola anche il momento */
1140  if (bToBeOutput()) {
1141  Res.AddForces(F, M, X);
1142  InducedVelocity::AddForce(pEl, pNode, F, M, X);
1143  } else {
1144  Res.AddForce(F);
1145  }
1146 
1147 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1148  pthread_mutex_unlock(&forces_mutex);
1149 #endif /* USE_MULTITHREAD && MBDYN_X_MT_ASSRES */
1150 }
ExternResForces Res
Definition: indvel.h:114
virtual bool bToBeOutput(void) const
Definition: output.cc:890
#define MYSLEEP(t)
Definition: mysleep.h:49
virtual void AddForce(const Elem *pEl, const StructNode *pNode, const Vec3 &F, const Vec3 &M, const Vec3 &X)
Definition: indvel.cc:252
void AddForces(const Vec3 &f, const Vec3 &c, const Vec3 &x)
Definition: resforces.cc:77
void AddForce(const Vec3 &f)
Definition: resforces.cc:58

Here is the call graph for this function:

SubVectorHandler & GlauertRotor::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 1079 of file rotor.cc.

References DEBUGCOUT, ToBeOutput::fToBeOutput(), Rotor::InitParam(), InducedVelocity::ResetForce(), and VectorHandler::Resize().

1083 {
1084  DEBUGCOUT("Entering GlauertRotor::AssRes()" << std::endl);
1085 
1086 #ifdef USE_MPI
1087  ExchangeLoads(fToBeOutput());
1088  if (!is_parallel || IndVelComm.Get_rank() == 0)
1089 #endif /* USE_MPI */
1090  {
1091  /* Calcola parametri vari */
1092  Rotor::InitParam();
1093  }
1094 
1095 #ifdef USE_MPI
1096  ExchangeVelocity();
1097 #endif /* USE_MPI */
1098 
1099  ResetForce();
1100 
1101  /* Non tocca il residuo */
1102  WorkVec.Resize(0);
1103 
1104 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1105  Done();
1106 #endif // USE_MULTITHREAD && MBDYN_X_MT_ASSRES
1107 
1108  return WorkVec;
1109 }
virtual void ResetForce(void)
Definition: indvel.cc:276
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual flag fToBeOutput(void) const
Definition: output.cc:884
virtual void InitParam(bool bComputeMeanInducedVelocity=true)
Definition: rotor.cc:323
virtual void Resize(integer iNewSize)=0

Here is the call graph for this function:

Vec3 GlauertRotor::GetInducedVelocity ( Elem::Type  type,
unsigned  uLabel,
unsigned  uPnt,
const Vec3 X 
) const
virtual

Implements InducedVelocity.

Definition at line 1158 of file rotor.cc.

References COLEMAN_ET_AL, grad::cos(), Rotor::dChi, Rotor::dLambda, Rotor::dMu, DREES_1, DREES_2, Rotor::dUMeanPrev, Rotor::GetPos(), GLAUERT, gtype, HOWLETT, M_PI, MBDYN_EXCEPT_ARGS, PAYNE, PITT_AND_PETERS, grad::pow(), Rotor::RRot3, grad::sin(), grad::sqrt(), grad::tan(), WHITE_AND_BLAKE, and Zero3.

1160 {
1161  if (dUMeanPrev == 0.) {
1162  return Zero3;
1163  }
1164 
1165 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1166  Wait();
1167 #endif /* USE_MULTITHREAD && MBDYN_X_MT_ASSRES */
1168 
1169  if (std::abs(dLambda) < 1.e-9) {
1170  return RRot3*dUMeanPrev;
1171  }
1172 
1173  doublereal dr, dp;
1174  GetPos(X, dr, dp);
1175 
1176  // recall that tan(dChi) = dMu/dLambda
1177 
1178  doublereal k1, k2 = 0.;
1179  switch (gtype) {
1180  case GLAUERT:
1181  // NASA-TM-102219: attributed to Drees et al.
1182  k1 = 4./3.*(1. - 1.8*dMu*dMu)*tan(dChi/2.);
1183  break;
1184 
1185 #if 0
1186  case WHEATLEY:
1187  // NASA-TM-102219
1188  k1 = 0.5;
1189  break;
1190 #endif
1191 
1192  case COLEMAN_ET_AL:
1193  // NASA-TM-102219
1194  // Gordon J. Leishman, "Principles of Helicopter Aerodynamics", 2nd Ed., 2006
1195  // Wayne Johnson, "Rotorcraft Aeromechanics", 2013
1196  k1 = tan(dChi/2.);
1197  break;
1198 
1199  case DREES_1:
1200  case DREES_2:
1201  // Gordon J. Leishman, "Principles of Helicopter Aerodynamics", 2nd Ed., 2006
1202  // Wayne Johnson, "Rotorcraft Aeromechanics", 2013
1203  // k1 = 4./3.*(1 - cos(dChi) - 1.8*dMu*dMu)/sin(dChi); // risk of division by zero...
1204  k1 = 4./3.*(tan(dChi/2.) - 1.8*dLambda*dMu/cos(dChi));
1205  k2 = -2.*dMu;
1206  break;
1207 
1208  case PAYNE:
1209  // NASA-TM-102219
1210  // Gordon J. Leishman, "Principles of Helicopter Aerodynamics", 2nd Ed., 2006
1211  // k1 = 4./3.*(dMu/dLambda/(1.2 + dMu/dLambda));
1212  // reduce risk of division by zero
1213  k1 = 4./3.*dMu/(1.2*dLambda + dMu);
1214  break;
1215 
1216  case WHITE_AND_BLAKE:
1217  // NASA-TM-102219
1218  // Gordon J. Leishman, "Principles of Helicopter Aerodynamics", 2nd Ed., 2006
1219  // Wayne Johnson, "Rotorcraft Aeromechanics", 2013
1220  k1 = sqrt(2.)*sin(dChi);
1221  break;
1222 
1223  case PITT_AND_PETERS:
1224  // NASA-TM-102219
1225  // Gordon J. Leishman, "Principles of Helicopter Aerodynamics", 2nd Ed., 2006: "23" instead of "32"...
1226  k1 = 15.*M_PI/32.*tan(dChi/2.);
1227  break;
1228 
1229  case HOWLETT:
1230  // NASA-TM-102219
1231  // Gordon J. Leishman, "Principles of Helicopter Aerodynamics", 2nd Ed., 2006
1232  k1 = pow(sin(dChi), 2);
1233  break;
1234 
1235 #if 0
1236  case DREES_2: {
1237  // Jianhua Zhang, "Active-Passive Hybrid Optimization of Rotor Blades With Trailing Edge Flaps", PhD Thesis, PSU, 2001
1238  // in the end, it is identical to Drees' as of Wayne Johnson and Gordon J. Leishman
1239  // FIXME: what if dMu ~ 0?
1240  doublereal dLdM = dLambda/dMu;
1241  // k1 = 4./3.*((1. - 1.8*dMu*dMu)*sqrt(1. + dLdM*dLdM - dLdM));
1242  k1 = 4./3.*((1. - 1.8*dMu*dMu)*sqrt(1. + dLdM*dLdM) - dLdM);
1243  k2 = -2.*dMu;
1244  } break;
1245 #endif
1246 
1247  default:
1249  }
1250 
1251  doublereal dd = 1. + dr*(k1*cos(dp) + k2*sin(dp));
1252 
1253  return RRot3*(dd*dUMeanPrev);
1254 };
Type gtype
Definition: rotor.h:395
#define M_PI
Definition: gradienttest.cc:67
const Vec3 Zero3(0., 0., 0.)
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2961
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
GradientExpression< UnaryExpr< FuncSin, Expr > > sin(const GradientExpression< Expr > &u)
Definition: gradient.h:2977
Vec3 RRot3
Definition: rotor.h:77
doublereal dUMeanPrev
Definition: rotor.h:56
doublereal dMu
Definition: rotor.h:82
virtual void GetPos(const Vec3 &X, doublereal &dr, doublereal &dp) const
Definition: rotor.cc:304
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
doublereal dLambda
Definition: rotor.h:83
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
Definition: gradient.h:2978
double doublereal
Definition: colamd.c:52
GradientExpression< UnaryExpr< FuncTan, Expr > > tan(const GradientExpression< Expr > &u)
Definition: gradient.h:2979
doublereal dChi
Definition: rotor.h:84

Here is the call graph for this function:

InducedVelocity::Type GlauertRotor::GetInducedVelocityType ( void  ) const
inlinevirtual

Implements InducedVelocity.

Definition at line 443 of file rotor.h.

References InducedVelocity::GLAUERT.

443  {
445  };
void GlauertRotor::Init ( const StructNode pCraft,
const Mat3x3 rrot,
const StructNode pRotor,
const StructNode pGround,
ResForceSet **  ppres,
const doublereal dOR,
const doublereal dR,
DriveCaller pdW,
unsigned int  iMaxIt,
const doublereal dTol,
const doublereal dE,
const doublereal dCH,
const doublereal dCFF,
flag  fOut 
)
protectedvirtual

Definition at line 1010 of file rotor.cc.

References ASSERT, Rotor::dArea, Rotor::dChi, Rotor::dForwardFlightCorrection, Rotor::dHoverCorrection, Rotor::dLambda, Rotor::dMu, Rotor::dOmegaRef, Rotor::dPsi0, Rotor::dRadius, Rotor::dUMeanPrev, Rotor::dVTipRef, Rotor::Init(), M_PI, Mat3x3::pGetMat(), Vec3::pGetVec(), ExternResForces::Pole(), InducedVelocity::Res, Rotor::RRot3, Rotor::RRotTranspose, SAFENEWARR, SAFENEWWITHCONSTRUCTOR, DriveOwner::Set(), and Rotor::Weight.

Referenced by GlauertRotor().

1024 {
1025  ASSERT(dOR > 0.);
1026  ASSERT(dR > 0.);
1027  ASSERT(pdW != 0);
1028 
1029  Rotor::Init(pCraft, rrot, pRotor, pGround, ppres, dR, iMaxIt, dTol, dE, fOut);
1030 
1031  dOmegaRef = dOR;
1033  dArea = M_PI*dRadius*dRadius;
1034  Weight.Set(pdW);
1035  dHoverCorrection = dCH;
1036  dForwardFlightCorrection = dCFF;
1037 
1038 #ifdef USE_MPI
1039  if (is_parallel) {
1040  SAFENEWARR(pBlockLenght, int, 20);
1041  SAFENEWARR(pDispl, MPI::Aint, 20);
1042  for (int i = 0; i < 20; i++) {
1043  pBlockLenght[i] = 1;
1044  }
1045  for (int i = 0; i < 3; i++) {
1046  pDispl[i] = MPI::Get_address(&(RRot3.pGetVec()[i]));
1047  }
1048  pDispl[3] = MPI::Get_address(&dUMeanPrev);
1049  pDispl[4] = MPI::Get_address(&dLambda);
1050  pDispl[5] = MPI::Get_address(&dMu);
1051  pDispl[6] = MPI::Get_address(&dChi);
1052  pDispl[7] = MPI::Get_address(&dPsi0);
1053  for (int i = 8; i <= 10; i++) {
1054  pDispl[i] = MPI::Get_address(&(Res.Pole().pGetVec()[i-8]));
1055  }
1056  for (int i = 11; i < 20; i++) {
1057  pDispl[i] = MPI::Get_address(&(RRotTranspose.pGetMat()[i-11]));
1058  }
1059  SAFENEWWITHCONSTRUCTOR(pIndVelDataType, MPI::Datatype,
1060  MPI::Datatype(MPI::DOUBLE.Create_hindexed(20, pBlockLenght, pDispl)));
1061  pIndVelDataType->Commit();
1062  }
1063 #endif /* USE_MPI */
1064 }
ExternResForces Res
Definition: indvel.h:114
doublereal dHoverCorrection
Definition: rotor.h:70
#define M_PI
Definition: gradienttest.cc:67
doublereal dArea
Definition: rotor.h:53
doublereal dForwardFlightCorrection
Definition: rotor.h:72
Vec3 RRot3
Definition: rotor.h:77
const Vec3 & Pole(void) const
Definition: resforces.cc:145
virtual void Init(const StructNode *pC, const Mat3x3 &rrot, const StructNode *pR, const StructNode *pG, ResForceSet **ppres, const doublereal &dR, unsigned int iMaxIt, const doublereal &dTol, const doublereal &dE, flag fOut)
Definition: rotor.cc:112
DriveOwner Weight
Definition: rotor.h:65
doublereal dUMeanPrev
Definition: rotor.h:56
doublereal dPsi0
Definition: rotor.h:79
doublereal dMu
Definition: rotor.h:82
#define ASSERT(expression)
Definition: colamd.c:977
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
doublereal dVTipRef
Definition: rotor.h:52
Mat3x3 RRotTranspose
Definition: rotor.h:75
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
doublereal dOmegaRef
Definition: rotor.h:49
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
void Set(const DriveCaller *pDC)
Definition: drive.cc:647
doublereal dLambda
Definition: rotor.h:83
doublereal dRadius
Definition: rotor.h:51
#define SAFENEWARR(pnt, item, sz)
Definition: mynewmem.h:701
doublereal dChi
Definition: rotor.h:84

Here is the call graph for this function:

std::ostream & GlauertRotor::Restart ( std::ostream &  out) const
virtual

Reimplemented from Rotor.

Definition at line 1112 of file rotor.cc.

References Rotor::dForwardFlightCorrection, Rotor::dHoverCorrection, Rotor::dRadius, DriveOwner::pGetDriveCaller(), Rotor::Restart(), DriveCaller::Restart(), and Rotor::Weight.

1113 {
1114  return Rotor::Restart(out) << "Glauert, " << dRadius << ", ",
1116  << ", correction, " << dHoverCorrection
1117  << ", " << dForwardFlightCorrection << ';' << std::endl;
1118 }
doublereal dHoverCorrection
Definition: rotor.h:70
virtual std::ostream & Restart(std::ostream &out) const
Definition: rotor.cc:535
doublereal dForwardFlightCorrection
Definition: rotor.h:72
DriveOwner Weight
Definition: rotor.h:65
virtual std::ostream & Restart(std::ostream &out) const =0
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
doublereal dRadius
Definition: rotor.h:51

Here is the call graph for this function:

Member Data Documentation

Type GlauertRotor::gtype
protected

Definition at line 395 of file rotor.h.

Referenced by GetInducedVelocity().


The documentation for this class was generated from the following files: