MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
CyclocopterUniform1D Class Reference
Inheritance diagram for CyclocopterUniform1D:
Collaboration diagram for CyclocopterUniform1D:

Public Member Functions

 CyclocopterUniform1D (unsigned int uL, const DofOwner *pDO, DataManager *pDM, MBDynParser &HP)
 
virtual ~CyclocopterUniform1D (void)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void Output (OutputHandler &OH) const
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
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
 
virtual doublereal GetW (const Vec3 &X) const
 
virtual doublereal GetPsi (const Vec3 &X) const
 
virtual Mat3x3 GetRRotor (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 DofOrder::Order GetDofType (unsigned int) 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 CyclocopterInflow
 CyclocopterInflow (unsigned int uL, const DofOwner *pDO)
 
virtual ~CyclocopterInflow (void)
 
virtual Elem::Type GetElemType (void) const
 
virtual InducedVelocity::Type GetInducedVelocityType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph)
 
virtual void SetInitialValue (VectorHandler &X)
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
- Public Member Functions inherited from UserDefinedElem
 UserDefinedElem (unsigned uLabel, const DofOwner *pDO)
 
virtual ~UserDefinedElem (void)
 
bool NeedsAirProperties (void) const
 
void NeedsAirProperties (bool yesno)
 
virtual AerodynamicElem::Type GetAerodynamicElemType (void) const
 
- Public Member Functions inherited from InitialAssemblyElem
 InitialAssemblyElem (unsigned int uL, flag fOut)
 
virtual ~InitialAssemblyElem (void)
 
- Public Member Functions inherited from SubjectToInitialAssembly
 SubjectToInitialAssembly (void)
 
virtual ~SubjectToInitialAssembly (void)
 
- Public Member Functions inherited from AerodynamicElem
 AerodynamicElem (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~AerodynamicElem (void)
 
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 ElemGravityOwner
 ElemGravityOwner (unsigned int uL, flag fOut)
 
virtual ~ElemGravityOwner (void)
 
virtual doublereal dGetM (void) const
 
Vec3 GetS (void) const
 
Mat3x3 GetJ (void) const
 
Vec3 GetB (void) const
 
Vec3 GetG (void) const
 
- Public Member Functions inherited from GravityOwner
 GravityOwner (void)
 
virtual ~GravityOwner (void)
 
void PutGravity (const Gravity *pG)
 
virtual bool bGetGravity (const Vec3 &X, Vec3 &Acc) 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 const Vec3GetXCurr (void) const
 
virtual const Vec3GetForces (void) const
 
virtual const Vec3GetMoments (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)
 

Protected Attributes

Vec3 RRot3
 
Mat3x3 RRotor
 
doublereal dUindMeanPrev
 
bool bFlagIsFirstBlade
 
doublereal dAzimuth
 
doublereal dAzimuthPrev
 
doublereal dTz
 
doublereal dTzMean
 
Vec3 F
 
Vec3 FMean
 
Vec3 FMeanOut
 
unsigned int iStepCounter
 
doublereal Uk
 
doublereal Uk_1
 
doublereal Uk_2
 
doublereal Yk
 
doublereal Yk_1
 
doublereal Yk_2
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from CyclocopterInflow
const StructNodepRotor
 
bool bFlagAverage
 
doublereal dRadius
 
doublereal dSpan
 
doublereal dArea
 
doublereal dKappa
 
DriveOwner Weight
 
doublereal dWeight
 
Mat3x3 RRot
 
Mat3x3 RRotorTranspose
 
doublereal dUindMean
 
doublereal a1
 
doublereal a2
 
doublereal b0
 
doublereal b1
 
doublereal b2
 
- Protected Attributes inherited from UserDefinedElem
bool needsAirProperties
 
- Protected Attributes inherited from AirPropOwner
const AirPropertiespAirProperties
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 
- Protected Attributes inherited from InducedVelocity
const StructNodepCraft
 
ExternResForces Res
 
ResForceSet ** ppRes
 

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 Member Functions inherited from CyclocopterInflow
void SetFilterCoefficients (doublereal dOmegaFilter, doublereal dDeltaT)
 
- Protected Member Functions inherited from ElemGravityOwner
virtual Vec3 GetS_int (void) const
 
virtual Mat3x3 GetJ_int (void) const
 
virtual Vec3 GetB_int (void) const
 
virtual Vec3 GetG_int (void) const
 

Detailed Description

Definition at line 558 of file module-cyclocopter.cc.

Constructor & Destructor Documentation

CyclocopterUniform1D::CyclocopterUniform1D ( unsigned int  uL,
const DofOwner pDO,
DataManager pDM,
MBDynParser HP 
)

Definition at line 633 of file module-cyclocopter.cc.

References CyclocopterInflow::bFlagAverage, CyclocopterInflow::dArea, CyclocopterInflow::dKappa, CyclocopterInflow::dRadius, CyclocopterInflow::dSpan, DataManager::fReadOutput(), Elem::INDUCEDVELOCITY, HighParser::IsArg(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, InducedVelocity::pCraft, InducedVelocity::ppRes, CyclocopterInflow::pRotor, ReadResSets(), ReadRotorData(), ReadUniform(), CyclocopterInflow::RRot, DriveOwner::Set(), CyclocopterInflow::SetFilterCoefficients(), ToBeOutput::SetOutputFlag(), WithLabel::uLabel, and CyclocopterInflow::Weight.

635 : Elem(uL, flag(0)),
636 CyclocopterInflow(uL, pDO),
637 RRot3(::Zero3),
638 RRotor(::Eye3),
639 dUindMeanPrev(0.),
640 bFlagIsFirstBlade(true),
641 dAzimuth(0.), dAzimuthPrev(0.),
642 dTz(0.), dTzMean(0.),
643 F(::Zero3), FMean(::Zero3), FMeanOut(::Zero3),
644 iStepCounter(0),
645 Uk(0.), Uk_1(0.), Uk_2(0.), Yk(0.), Yk_1(0.), Yk_2(0.)
646 {
647  if (HP.IsKeyWord("help")) {
648  silent_cout(
649 " \n"
650 "Module: Cyclocopter \n"
651 "Author: Pierangelo Masarati <pierangelo.masarati@polimi.it> \n"
652 "based on work by \n"
653 " Mattia Mattaboni <mattia.mattaboni@mail.polimi.it> \n"
654 "Organization: Dipartimento di Scienze e Tecnologie Aerospaziali \n"
655 " Politecnico di Milano \n"
656 " http://www.aero.polimi.it/ \n"
657 " Description: This module implements induced velocity models \n"
658 " for cycloidal rotors. \n"
659 " \n"
660 " All rights reserved. \n"
661 "\n"
662 " Usage:\n"
663 " user element: <label> , cycloidal uniform 1D ,\n"
664 " <aircraft_node_label> ,\n"
665 " [ orientation , (OrientationMatrix) <orientation> , ]\n"
666 " <rotor_node_label>\n"
667 " (bool) <average> ,\n"
668 " <rotor_radius> ,\n"
669 " <blade_span>\n"
670 " [ , delay , (DriveCaller) <delay> ]\n"
671 " [ , omegacut , <cut_frequency> ]\n"
672 " [ , kappa , <hover_correction_coefficient> ]\n"
673 " [ , timestep , <time_step> ]\n"
674 " [ , <output_data> ]\n"
675 " ;\n"
676  << std::endl);
677 
678  if (!HP.IsArg()) {
679  /*
680  * Exit quietly if nothing else is provided
681  */
682  throw NoErr(MBDYN_EXCEPT_ARGS);
683  }
684  }
685 
686  if (!ReadRotorData(pDM, HP, uLabel, pCraft, RRot, pRotor)) {
688  }
689 
690  DriveCaller *pdW = 0;
691  doublereal dOmegaFilter;
692  doublereal dDeltaT;
693  if (!ReadUniform(pDM, HP, uLabel, bFlagAverage, dRadius, dSpan, pdW, dOmegaFilter, dKappa, dDeltaT)) {
695  }
696 
697  ppRes = ReadResSets(pDM, HP);
698 
700 
701  dArea = 2*dRadius*dSpan;
702  Weight.Set(pdW);
703 
704  SetFilterCoefficients(dOmegaFilter, dDeltaT);
705 }
flag fReadOutput(MBDynParser &HP, const T &t) const
Definition: dataman.h:1064
void SetFilterCoefficients(doublereal dOmegaFilter, doublereal dDeltaT)
const Vec3 Zero3(0., 0., 0.)
long int flag
Definition: mbdyn.h:43
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
ResForceSet ** ppRes
Definition: indvel.h:116
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
static bool ReadRotorData(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, const StructNode *&pCraft, Mat3x3 &rrot, const StructNode *&pRotor)
CyclocopterInflow(unsigned int uL, const DofOwner *pDO)
const StructNode * pRotor
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
static bool ReadUniform(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, bool &bFlagAve, doublereal &dR, doublereal &dL, DriveCaller *&pdW, doublereal &dOmegaFilter, doublereal &dKappa, doublereal &dDeltaT)
unsigned int uLabel
Definition: withlab.h:44
ResForceSet ** ReadResSets(DataManager *pDM, MBDynParser &HP)
Definition: resforces.cc:263
Definition: except.h:79
virtual bool IsArg(void)
Definition: parser.cc:807
void Set(const DriveCaller *pDC)
Definition: drive.cc:647
virtual void SetOutputFlag(flag f=flag(1))
Definition: output.cc:896
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
double doublereal
Definition: colamd.c:52
const StructNode * pCraft
Definition: indvel.h:111

Here is the call graph for this function:

CyclocopterUniform1D::~CyclocopterUniform1D ( void  )
virtual

Definition at line 707 of file module-cyclocopter.cc.

References NO_OP.

708 {
709  NO_OP;
710 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from InducedVelocity.

Definition at line 819 of file module-cyclocopter.cc.

References ResForces::AddForce(), InducedVelocity::AddForce(), ResForces::AddForces(), grad::atan2(), bFlagIsFirstBlade, ToBeOutput::bToBeOutput(), dAzimuth, StructDispNode::GetXCurr(), CyclocopterInflow::pRotor, InducedVelocity::Res, and CyclocopterInflow::RRotorTranspose.

820 {
821 
822  /* colcolo la posizione azimutale della prima pala */
823  if (bFlagIsFirstBlade == true) {
824  Vec3 XRel(RRotorTranspose*(X - pRotor->GetXCurr()));
825  doublereal d1 = XRel(2);
826  doublereal d2 = XRel(3);
827  dAzimuth = atan2(d2, d1);
828  bFlagIsFirstBlade = false;
829  }
830 
831 
832  /* Sole se deve fare l'output calcola anche il momento */
833  if (bToBeOutput()) {
834  Res.AddForces(F, M, X);
835  InducedVelocity::AddForce(pEl, pNode, F, M, X);
836 
837  } else {
838  Res.AddForce(F);
839  }
840 }
ExternResForces Res
Definition: indvel.h:114
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
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
const StructNode * pRotor
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
void AddForce(const Vec3 &f)
Definition: resforces.cc:58
GradientExpression< BinaryExpr< FuncAtan2, LhsExpr, RhsExpr > > atan2(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2962
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

void CyclocopterUniform1D::AfterConvergence ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from CyclocopterInflow.

Definition at line 742 of file module-cyclocopter.cc.

References InducedVelocity::AfterConvergence(), CyclocopterInflow::bFlagAverage, bFlagIsFirstBlade, copysign(), CyclocopterInflow::dArea, dAzimuth, dAzimuthPrev, DriveOwner::dGet(), AirPropOwner::dGetAirDensity(), CyclocopterInflow::dKappa, dTz, dTzMean, CyclocopterInflow::dUindMean, dUindMeanPrev, CyclocopterInflow::dWeight, F, FMean, FMeanOut, WithLabel::GetLabel(), InducedVelocity::GetXCurr(), iStepCounter, grad::sqrt(), Uk, Uk_1, Uk_2, CyclocopterInflow::Weight, Yk, Yk_1, Yk_2, and Zero3.

743 {
744  bFlagIsFirstBlade = true;
745  /* calcolo la forza media sul giro generata dal rotore */
746  dTzMean += dTz;
747  FMean += F;
748  iStepCounter++;
749  // if ((dAzimuth > 0. && dAzimuthPrev < 0.) || (dAzimuth < 0. && dAzimuthPrev > 0.)) {
750  if ((dAzimuth > 0. && dAzimuthPrev < 0.)) {
751  FMean /= iStepCounter;
752  FMeanOut = FMean;
753  if (bFlagAverage) {
756  dUindMean = dKappa*copysign(std::sqrt(std::abs(dTzMean)/(2*dRho*dArea)), dTzMean);
758  dTzMean = 0.;
759  }
760  FMean = ::Zero3;
761  iStepCounter = 0;
762  }
764 
765  /* aggiorno ingressi e uscite del filtro */
766  Yk_2 = Yk_1;
767  Yk_1 = Yk;
768  Uk_2 = Uk_1;
769  Uk_1 = Uk;
770 
772 
773  dWeight = Weight.dGet();
774  if (dWeight < 0.) {
775  silent_cout("Rotor(" << GetLabel() << "): "
776  "delay < 0.0; using 0.0" << std::endl);
777  dWeight = 0.;
778  } else if (dWeight > 1.) {
779  silent_cout("Rotor(" << GetLabel() << "): "
780  "delay > 1.0; using 1.0" << std::endl);
781  dWeight = 1.;
782  }
783 
785 }
virtual doublereal dGetAirDensity(const Vec3 &X) const
Definition: aerodyn.cc:736
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: indvel.cc:170
const Vec3 Zero3(0., 0., 0.)
virtual const Vec3 & GetXCurr(void) const
Definition: indvel.h:159
doublereal copysign(doublereal x, doublereal y)
Definition: gradient.h:97
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
double doublereal
Definition: colamd.c:52
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 788 of file module-cyclocopter.cc.

References CyclocopterInflow::a1, CyclocopterInflow::a2, CyclocopterInflow::b0, CyclocopterInflow::b1, CyclocopterInflow::b2, CyclocopterInflow::bFlagAverage, copysign(), CyclocopterInflow::dArea, AirPropOwner::dGetAirDensity(), CyclocopterInflow::dKappa, dTz, CyclocopterInflow::dUindMean, dUindMeanPrev, CyclocopterInflow::dWeight, F, ResForces::Force(), StructNode::GetRCurr(), Mat3x3::GetVec(), InducedVelocity::GetXCurr(), InducedVelocity::pCraft, InducedVelocity::Res, InducedVelocity::ResetForce(), VectorHandler::Resize(), CyclocopterInflow::RRot, RRot3, RRotor, CyclocopterInflow::RRotorTranspose, grad::sqrt(), Mat3x3::Transpose(), Uk, Uk_1, Uk_2, Yk, Yk_1, and Yk_2.

792 {
793  /* UNIFORM induced velocity (Moble version)*/
794  /* Trasporta della matrice di rotazione del rotore */
795  RRotor = pCraft->GetRCurr()*RRot;
796  RRot3 = RRotor.GetVec(3);
798  /* Forze nel sistema rotore */
800  dTz = RRot3*Res.Force();
801  if (!bFlagAverage) {
802  /* filtro le forze */
803  Uk = dTz;
804  Yk = -Yk_1*a1 - Yk_2*a2 + Uk*b0 + Uk_1*b1 + Uk_2*b2;
805  dTz = Yk;
807  dUindMean = dKappa*copysign(std::sqrt(std::abs(dTz)/(2*dRho*dArea)), dTz);
808 
810  }
811 
812  ResetForce();
813  WorkVec.Resize(0);
814 
815  return WorkVec;
816 }
ExternResForces Res
Definition: indvel.h:114
virtual doublereal dGetAirDensity(const Vec3 &X) const
Definition: aerodyn.cc:736
virtual void ResetForce(void)
Definition: indvel.cc:276
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual const Vec3 & Force(void) const
Definition: resforces.cc:103
virtual const Vec3 & GetXCurr(void) const
Definition: indvel.h:159
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
doublereal copysign(doublereal x, doublereal y)
Definition: gradient.h:97
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
double doublereal
Definition: colamd.c:52
virtual void Resize(integer iNewSize)=0
const StructNode * pCraft
Definition: indvel.h:111

Here is the call graph for this function:

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

Implements InducedVelocity.

Definition at line 843 of file module-cyclocopter.cc.

References CyclocopterInflow::dUindMean, and RRot3.

845 {
846  return RRot3*dUindMean;
847 }
virtual doublereal CyclocopterUniform1D::GetPsi ( const Vec3 X) const
inlinevirtual

Definition at line 624 of file module-cyclocopter.cc.

624  {
625  return 0.;
626  };
virtual Mat3x3 CyclocopterUniform1D::GetRRotor ( const Vec3 X) const
inlinevirtual

Definition at line 628 of file module-cyclocopter.cc.

References Zero3x3.

628  {
630  };
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual doublereal CyclocopterUniform1D::GetW ( const Vec3 X) const
inlinevirtual

Definition at line 620 of file module-cyclocopter.cc.

620  {
621  return 0.;
622  };
void CyclocopterUniform1D::Output ( OutputHandler OH) const
virtual

Reimplemented from CyclocopterInflow.

Definition at line 713 of file module-cyclocopter.cc.

References ToBeOutput::bToBeOutput(), dAzimuth, CyclocopterInflow::dUindMean, FMeanOut, ResForces::Force(), WithLabel::GetLabel(), iStepCounter, OutputHandler::Loadable(), ResForces::Moment(), InducedVelocity::ppRes, InducedVelocity::Res, and CyclocopterInflow::RRotorTranspose.

714 {
715  if (bToBeOutput()) {
716  OH.Loadable()
717  << std::setw(8) << GetLabel() /* 1 */
718  << " " << RRotorTranspose*Res.Force() /* 2-4 */
719  << " " << RRotorTranspose*Res.Moment() /* 5-7 */
720  << " " << dUindMean /* 8 */
721  << " " << dAzimuth /* 9 */
722  << " " << iStepCounter /* 10 */
723  << " " << "0." /* 11 */
724  << " " << "0." /* 12 */
725  << " " << "0." /* 13 */
726  << " " << FMeanOut /* 14 */
727  << std::endl;
728 
729  /* FIXME: check for parallel stuff ... */
730  for (int i = 0; ppRes && ppRes[i]; i++) {
731  OH.Loadable()
732  << std::setw(8) << GetLabel()
733  << ":" << ppRes[i]->GetLabel()
734  << " " << ppRes[i]->pRes->Force()
735  << " " << ppRes[i]->pRes->Moment()
736  << std::endl;
737  }
738  }
739 }
ExternResForces Res
Definition: indvel.h:114
virtual bool bToBeOutput(void) const
Definition: output.cc:890
ResForceSet ** ppRes
Definition: indvel.h:116
virtual const Vec3 & Force(void) const
Definition: resforces.cc:103
virtual const Vec3 & Moment(void) const
Definition: resforces.cc:109
std::ostream & Loadable(void) const
Definition: output.h:506
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

Member Data Documentation

bool CyclocopterUniform1D::bFlagIsFirstBlade
protected

Definition at line 566 of file module-cyclocopter.cc.

Referenced by AddForce(), and AfterConvergence().

doublereal CyclocopterUniform1D::dAzimuth
protected

Definition at line 568 of file module-cyclocopter.cc.

Referenced by AddForce(), AfterConvergence(), and Output().

doublereal CyclocopterUniform1D::dAzimuthPrev
protected

Definition at line 568 of file module-cyclocopter.cc.

Referenced by AfterConvergence().

doublereal CyclocopterUniform1D::dTz
protected

Definition at line 570 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

doublereal CyclocopterUniform1D::dTzMean
protected

Definition at line 570 of file module-cyclocopter.cc.

Referenced by AfterConvergence().

doublereal CyclocopterUniform1D::dUindMeanPrev
mutableprotected

Definition at line 564 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

Vec3 CyclocopterUniform1D::F
protected

Definition at line 571 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

Vec3 CyclocopterUniform1D::FMean
protected

Definition at line 571 of file module-cyclocopter.cc.

Referenced by AfterConvergence().

Vec3 CyclocopterUniform1D::FMeanOut
protected

Definition at line 571 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and Output().

unsigned int CyclocopterUniform1D::iStepCounter
protected

Definition at line 573 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and Output().

Vec3 CyclocopterUniform1D::RRot3
protected

Definition at line 561 of file module-cyclocopter.cc.

Referenced by AssRes(), and GetInducedVelocity().

Mat3x3 CyclocopterUniform1D::RRotor
protected

Definition at line 562 of file module-cyclocopter.cc.

Referenced by AssRes().

doublereal CyclocopterUniform1D::Uk
protected

Definition at line 576 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

doublereal CyclocopterUniform1D::Uk_1
protected

Definition at line 576 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

doublereal CyclocopterUniform1D::Uk_2
protected

Definition at line 576 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

doublereal CyclocopterUniform1D::Yk
protected

Definition at line 576 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

doublereal CyclocopterUniform1D::Yk_1
protected

Definition at line 576 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().

doublereal CyclocopterUniform1D::Yk_2
protected

Definition at line 576 of file module-cyclocopter.cc.

Referenced by AfterConvergence(), and AssRes().


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