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

#include <rotor.h>

Inheritance diagram for NoRotor:
Collaboration diagram for NoRotor:

Public Member Functions

 NoRotor (unsigned int uLabel, const DofOwner *pDO)
 
 NoRotor (unsigned int uLabel, const DofOwner *pDO, const StructNode *pCraft, const Mat3x3 &rrot, const StructNode *pRotor, ResForceSet **ppres, const doublereal &dR, flag fOut)
 
virtual ~NoRotor (void)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual 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, ResForceSet **ppres, const doublereal &dR, 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 209 of file rotor.h.

Constructor & Destructor Documentation

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

Definition at line 547 of file rotor.cc.

References NO_OP.

549 : Elem(uLabel, flag(0)),
550 Rotor(uLabel, pDO)
551 {
552  NO_OP;
553 }
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
NoRotor::NoRotor ( unsigned int  uLabel,
const DofOwner pDO,
const StructNode pCraft,
const Mat3x3 rrot,
const StructNode pRotor,
ResForceSet **  ppres,
const doublereal dR,
flag  fOut 
)

Definition at line 555 of file rotor.cc.

References Init().

563 : Elem(uLabel, flag(0)),
564 Rotor(uLabel, pDO)
565 {
566  Init(pCraft, rrot, pRotor, ppres, dR, fOut);
567 }
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, ResForceSet **ppres, const doublereal &dR, flag fOut)
Definition: rotor.cc:570
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

NoRotor::~NoRotor ( void  )
virtual

Definition at line 596 of file rotor.cc.

References SAFEDELETE, and SAFEDELETEARR.

597 {
598 #ifdef USE_MPI
599  SAFEDELETEARR(pBlockLenght);
600  SAFEDELETEARR(pDispl);
601  SAFEDELETE(pIndVelDataType);
602 #endif /* USE_MPI */
603 }
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

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

Reimplemented from InducedVelocity.

Definition at line 652 of file rotor.cc.

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

654 {
655  // Non gli serve in quanto non calcola velocita' indotta.
656  // Solo se deve fare l'output lo calcola
657 #ifdef USE_MPI
658  if (ReqV != MPI::REQUEST_NULL) {
659  while (!ReqV.Test()) {
660  MYSLEEP(mysleeptime);
661  }
662  }
663 #endif // USE_MPI
664 
665 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
666  pthread_mutex_lock(&forces_mutex);
667  Wait();
668 #endif // USE_MULTITHREAD && MBDYN_X_MT_ASSRES
669 
670  if (bToBeOutput()) {
671  Res.AddForces(F, M, X);
672  InducedVelocity::AddForce(pEl, pNode, F, M, X);
673  }
674 
675 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
676  pthread_mutex_unlock(&forces_mutex);
677 #endif // USE_MULTITHREAD && MBDYN_X_MT_ASSRES
678 }
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

Here is the call graph for this function:

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

Implements Elem.

Definition at line 607 of file rotor.cc.

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

611 {
612  DEBUGCOUT("Entering NoRotor::AssRes()" << std::endl);
613 
614  flag out = fToBeOutput();
615 
616 #ifdef USE_MPI
617  if (out) {
618  ExchangeLoads(out);
619  }
620 
621  if (!is_parallel || IndVelComm.Get_rank() == 0)
622 #endif /* USE_MPI */
623  {
624  if (out) {
625  /* Calcola parametri vari */
626  Rotor::InitParam(false);
627 
628 #ifdef USE_MPI
629  ExchangeVelocity();
630 #endif /* USE_MPI */
631  }
632  }
633 
634  ResetForce();
635  WorkVec.Resize(0);
636 
637 #if defined(USE_MULTITHREAD) && defined(MBDYN_X_MT_ASSRES)
638  Done();
639 #endif // USE_MULTITHREAD && MBDYN_X_MT_ASSRES
640 
641  return WorkVec;
642 }
long int flag
Definition: mbdyn.h:43
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 NoRotor::GetInducedVelocity ( Elem::Type  type,
unsigned  uLabel,
unsigned  uPnt,
const Vec3 X 
) const
virtual

Implements InducedVelocity.

Definition at line 683 of file rotor.cc.

References Zero3.

685 {
686  return Zero3;
687 }
const Vec3 Zero3(0., 0., 0.)
virtual InducedVelocity::Type NoRotor::GetInducedVelocityType ( void  ) const
inlinevirtual

Implements InducedVelocity.

Definition at line 240 of file rotor.h.

References InducedVelocity::NO.

240  {
241  return InducedVelocity::NO;
242  };
void NoRotor::Init ( const StructNode pCraft,
const Mat3x3 rrot,
const StructNode pRotor,
ResForceSet **  ppres,
const doublereal dR,
flag  fOut 
)
protectedvirtual

Definition at line 570 of file rotor.cc.

References ToBeOutput::bToBeOutput(), Rotor::Init(), Vec3::pGetVec(), ExternResForces::Pole(), InducedVelocity::Res, SAFENEWARR, and SAFENEWWITHCONSTRUCTOR.

Referenced by NoRotor().

576 {
577  Rotor::Init(pCraft, rrot, pRotor, 0, ppres, dR, 0, 0., 0., fOut);
578 
579 #ifdef USE_MPI
580  if (is_parallel && bToBeOutput()) {
581  SAFENEWARR(pBlockLenght, int, 3);
582  SAFENEWARR(pDispl, MPI::Aint, 3);
583  for (int i = 0; i < 3; i++) {
584  pBlockLenght[i] = 1;
585  }
586  for (int i = 0; i < 3; i++) {
587  pDispl[i] = MPI::Get_address(&(Res.Pole().pGetVec()[i]));
588  }
589  SAFENEWWITHCONSTRUCTOR(pIndVelDataType, MPI::Datatype,
590  MPI::Datatype(MPI::DOUBLE.Create_hindexed(3, pBlockLenght, pDispl)));
591  pIndVelDataType->Commit();
592  }
593 #endif /* USE_MPI */
594 }
ExternResForces Res
Definition: indvel.h:114
virtual bool bToBeOutput(void) const
Definition: output.cc:890
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
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
#define SAFENEWARR(pnt, item, sz)
Definition: mynewmem.h:701

Here is the call graph for this function:

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

Reimplemented from Rotor.

Definition at line 645 of file rotor.cc.

References Rotor::Restart().

646 {
647  return Rotor::Restart(out) << "no;" << std::endl;
648 }
virtual std::ostream & Restart(std::ostream &out) const
Definition: rotor.cc:535

Here is the call graph for this function:


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