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

#include <rotor.h>

Inheritance diagram for ManglerRotor:
Collaboration diagram for ManglerRotor:

Public Member Functions

 ManglerRotor (unsigned int uLabel, const DofOwner *pDO)
 
 ManglerRotor (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, flag fOut)
 
virtual ~ManglerRotor (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)
 

Additional Inherited Members

- 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
}
 
- 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 462 of file rotor.h.

Constructor & Destructor Documentation

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

Definition at line 1261 of file rotor.cc.

References NO_OP.

1262 : Elem(uLabel, flag(0)),
1263 Rotor(uLabel, pDO)
1264 {
1265  NO_OP;
1266 }
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
ManglerRotor::ManglerRotor ( 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,
flag  fOut 
)

Definition at line 1268 of file rotor.cc.

References Init().

1284 : Elem(uLabel, flag(0)),
1285 Rotor(uLabel, pDO)
1286 {
1287  Init(pCraft, rrot, pRotor, pGround, ppres, dOR, dR, pdW, iMaxIt, dTol, dE, dCH, dCFF, fOut);
1288 }
long int flag
Definition: mbdyn.h:43
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:1291
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

Here is the call graph for this function:

ManglerRotor::~ManglerRotor ( void  )
virtual

Definition at line 1346 of file rotor.cc.

References SAFEDELETE, and SAFEDELETEARR.

1347 {
1348 #ifdef USE_MPI
1349  SAFEDELETEARR(pBlockLenght);
1350  SAFEDELETEARR(pDispl);
1351  SAFEDELETE(pIndVelDataType);
1352 #endif /* USE_MPI */
1353 }
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

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

Reimplemented from InducedVelocity.

Definition at line 1427 of file rotor.cc.

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

1429 {
1430 #ifdef USE_MPI
1431  if (ReqV != MPI::REQUEST_NULL) {
1432  while (!ReqV.Test()) {
1433  MYSLEEP(mysleeptime);
1434  }
1435  }
1436 #endif /* USE_MPI */
1437 
1438 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1439  pthread_mutex_lock(&forces_mutex);
1440  Wait();
1441 #endif /* USE_MULTITHREAD && MBDYN_X_MT_ASSRES */
1442 
1443  /* Solo se deve fare l'output calcola anche il momento */
1444  if (bToBeOutput()) {
1445  Res.AddForces(F, M, X);
1446  InducedVelocity::AddForce(pEl, pNode, F, M, X);
1447  } else {
1448  Res.AddForce(F);
1449  }
1450 
1451 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1452  pthread_mutex_unlock(&forces_mutex);
1453 #endif /* USE_MULTITHREAD && MBDYN_X_MT_ASSRES */
1454 }
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 & ManglerRotor::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 1358 of file rotor.cc.

References Rotor::dCosAlphad, DEBUGCOUT, Rotor::dGetPos(), Rotor::dGetPsi(), Rotor::dLambda, Rotor::dMu, Rotor::dOmega, Rotor::dPsi0, Rotor::dRadius, Rotor::dSinAlphad, Rotor::dUMean, Rotor::dVelocity, ToBeOutput::fToBeOutput(), GetInducedVelocity(), StructDispNode::GetXCurr(), Rotor::InitParam(), Rotor::pRotor, InducedVelocity::ResetForce(), VectorHandler::Resize(), and Rotor::VCraft.

1362 {
1363  DEBUGCOUT("Entering ManglerRotor::AssRes()" << std::endl);
1364 
1365 #ifdef USE_MPI
1366  ExchangeLoads(fToBeOutput());
1367  if (!is_parallel || IndVelComm.Get_rank() == 0)
1368 #endif /* USE_MPI */
1369  {
1370  /* Calcola parametri vari */
1371  Rotor::InitParam();
1372 
1373 #ifdef DEBUG
1374  // Prova:
1375 #if 0
1376  Vec3 XTmp(2.,2.,0.);
1377  doublereal dPsiTmp = dGetPsi(XTmp);
1378  doublereal dXTmp = dGetPos(XTmp);
1379  Vec3 IndV = GetInducedVelocity(XTmp);
1380  std::cout
1381  << "X rotore: " << pRotor->GetXCurr() << std::endl
1382  << "V rotore: " << VCraft << std::endl
1383  << "X punto: " << XTmp << std::endl
1384  << "Omega: " << dOmega << std::endl
1385  << "Velocita': " << dVelocity << std::endl
1386  << "Psi0: " << dPsi0 << std::endl
1387  << "Psi punto: " << dPsiTmp << std::endl
1388  << "Raggio: " << dRadius << std::endl
1389  << "r punto: " << dXTmp << std::endl
1390  << "mu: " << dMu << std::endl
1391  << "lambda: " << dLambda << std::endl
1392  << "cos(ad): " << dCosAlphad << std::endl
1393  << "sin(ad): " << dSinAlphad << std::endl
1394  << "UMean: " << dUMean << std::endl
1395  << "iv punto: " << IndV << std::endl;
1396 #endif
1397 #endif /* DEBUG */
1398  }
1399 
1400 #ifdef USE_MPI
1401  ExchangeVelocity();
1402 #endif /* USE_MPI */
1403 
1404  ResetForce();
1405 
1406  /* Non tocca il residuo */
1407  WorkVec.Resize(0);
1408 
1409 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1410  Done();
1411 #endif // USE_MULTITHREAD && MBDYN_X_MT_ASSRES
1412 
1413  return WorkVec;
1414 }
virtual Vec3 GetInducedVelocity(Elem::Type type, unsigned uLabel, unsigned uPnt, const Vec3 &X) const
Definition: rotor.cc:1460
doublereal dVelocity
Definition: rotor.h:86
virtual void ResetForce(void)
Definition: indvel.cc:276
virtual doublereal dGetPsi(const Vec3 &X) const
Definition: rotor.cc:286
doublereal dCosAlphad
Definition: rotor.h:81
Definition: matvec3.h:98
doublereal dSinAlphad
Definition: rotor.h:80
doublereal dOmega
Definition: rotor.h:87
doublereal dPsi0
Definition: rotor.h:79
Vec3 VCraft
Definition: rotor.h:78
#define DEBUGCOUT(msg)
Definition: myassert.h:232
doublereal dMu
Definition: rotor.h:82
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual doublereal dGetPos(const Vec3 &X) const
Definition: rotor.cc:296
virtual flag fToBeOutput(void) const
Definition: output.cc:884
virtual void InitParam(bool bComputeMeanInducedVelocity=true)
Definition: rotor.cc:323
doublereal dLambda
Definition: rotor.h:83
doublereal dRadius
Definition: rotor.h:51
const StructNode * pRotor
Definition: rotor.h:46
double doublereal
Definition: colamd.c:52
doublereal dUMean
Definition: rotor.h:54
virtual void Resize(integer iNewSize)=0

Here is the call graph for this function:

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

Implements InducedVelocity.

Definition at line 1460 of file rotor.cc.

References grad::cos(), Rotor::dSinAlphad, Rotor::dUMeanPrev, Rotor::GetPos(), M_PI, grad::pow(), Rotor::RRot3, grad::sqrt(), and Zero3.

Referenced by AssRes().

1462 {
1463  if (dUMeanPrev == 0.) {
1465  }
1466 
1467 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
1468  Wait();
1469 #endif /* USE_MULTITHREAD && MBDYN_X_MT_ASSRES */
1470 
1471  doublereal dr, dp;
1472  GetPos(X, dr, dp);
1473 
1474  doublereal dr2 = dr*dr;
1475  doublereal dm2 = 1. - dr2;
1476  doublereal dm = 0.;
1477  if (dm2 > 0.) {
1478  dm = sqrt(dm2);
1479  }
1480  doublereal da = 1. + std::abs(dSinAlphad);
1481  if (da > 1.e-9) {
1482  da = (1. - std::abs(dSinAlphad))/da;
1483  }
1484  if (da > 0.) {
1485  da = sqrt(da);
1486  }
1487 
1488  // c_0
1489  doublereal dd = 15./4.*dm*dr2;
1490 
1491  // c_1
1492  doublereal dc = -15./256.*M_PI*(9.*dr2 - 4.)*dr*da;
1493  dd -= 4.*dc*cos(dp);
1494 
1495  // c_3
1496  dc = 45./256.*M_PI*pow(da*dr, 3);
1497  dd -= 4.*dc*cos(3.*dp);
1498 
1499  // c_[5:2:infty] = 0
1500 
1501  // c_[2:2:infty] (truncated at 10)
1502  for (int i = 2; i <= 10; i += 2) {
1503  dc = pow(-1., i/2 - 1)*15./8.
1504  *((dm + i)/(i*i - 1.)*(3. - 9.*dr2 + i*i) + 3.*dm)/(i*i - 9.)
1505  *pow(((1. - dm)/(1. + dm))*da, i/2.);
1506  dd -= 4.*dc*cos(i*dp);
1507  }
1508 
1509  return RRot3*(dd*dUMeanPrev);
1510 };
#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
Vec3 RRot3
Definition: rotor.h:77
doublereal dSinAlphad
Definition: rotor.h:80
doublereal dUMeanPrev
Definition: rotor.h:56
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
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
Definition: gradient.h:2978
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

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

Implements InducedVelocity.

Definition at line 509 of file rotor.h.

References InducedVelocity::MANGLER.

509  {
511  };
void ManglerRotor::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 1291 of file rotor.cc.

References ASSERT, Rotor::dArea, Rotor::dForwardFlightCorrection, Rotor::dHoverCorrection, Rotor::dOmegaRef, Rotor::dPsi0, Rotor::dRadius, Rotor::dSinAlphad, 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 ManglerRotor().

1305 {
1306  ASSERT(dOR > 0.);
1307  ASSERT(dR > 0.);
1308  ASSERT(pdW != 0);
1309 
1310  Rotor::Init(pCraft, rrot, pRotor, pGround, ppres, dR, iMaxIt, dTol, dE, fOut);
1311 
1312  dOmegaRef = dOR;
1314  dArea = M_PI*dRadius*dRadius;
1315  Weight.Set(pdW);
1316  dHoverCorrection = dCH;
1317  dForwardFlightCorrection = dCFF;
1318 
1319 #ifdef USE_MPI
1320  if (is_parallel) {
1321  SAFENEWARR(pBlockLenght, int, 18);
1322  SAFENEWARR(pDispl, MPI::Aint, 18);
1323  for (int i = 0; i < 18; i++) {
1324  pBlockLenght[i] = 1;
1325  }
1326  for (int i = 0; i < 3; i++) {
1327  pDispl[i] = MPI::Get_address(&(RRot3.pGetVec()[i]));
1328  }
1329  pDispl[3] = MPI::Get_address(&dUMeanPrev);
1330  pDispl[4] = MPI::Get_address(&dSinAlphad);
1331  pDispl[5] = MPI::Get_address(&dPsi0);
1332  for (int i = 6; i <= 8; i++) {
1333  pDispl[i] = MPI::Get_address(&(Res.Pole().pGetVec()[i-6]));
1334  }
1335  for (int i = 9; i < 18; i++) {
1336  pDispl[i] = MPI::Get_address(&(RRotTranspose.pGetMat()[i-9]));
1337  }
1338  SAFENEWWITHCONSTRUCTOR(pIndVelDataType, MPI::Datatype,
1339  MPI::Datatype(MPI::DOUBLE.Create_hindexed(18, pBlockLenght, pDispl)));
1340  pIndVelDataType->Commit();
1341  }
1342 #endif /* USE_MPI */
1343 }
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
doublereal dSinAlphad
Definition: rotor.h:80
DriveOwner Weight
Definition: rotor.h:65
doublereal dUMeanPrev
Definition: rotor.h:56
doublereal dPsi0
Definition: rotor.h:79
#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 dRadius
Definition: rotor.h:51
#define SAFENEWARR(pnt, item, sz)
Definition: mynewmem.h:701

Here is the call graph for this function:

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

Reimplemented from Rotor.

Definition at line 1417 of file rotor.cc.

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

1418 {
1419  return Rotor::Restart(out) << "Mangler, " << dRadius << ", ",
1421  << ", correction, " << dHoverCorrection
1422  << ", " << dForwardFlightCorrection << ';' << std::endl;
1423 }
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:


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