103 virtual std::ostream&
Restart(std::ostream& out)
const;
141 RRotorTranspose(::
Eye3),
143 a1(0.), a2(0.), b0(1.), b1(0.), b2(0.)
194 <<
":" << ppRes[i]->GetLabel()
195 <<
" " << ppRes[i]->pRes->Force()
196 <<
" " << ppRes[i]->pRes->Moment()
205 return out <<
"# cyclocopter: not implemented yet" << std::endl;
225 connectedNodes.resize(2);
226 connectedNodes[0] =
pCraft;
227 connectedNodes[1] =
pRotor;
276 if (dDeltaT > 0. && dOmegaFilter > 0.) {
277 doublereal dTmp = 4. + 2.*
sqrt(2.)*dOmegaFilter*dDeltaT + dDeltaT*dDeltaT*dOmegaFilter*dOmegaFilter;
278 a1 = (-8. + 2.*dDeltaT*dDeltaT*dOmegaFilter*dOmegaFilter)/dTmp;
279 a2 = (4. - 2.*
sqrt(2.)*dOmegaFilter*dDeltaT + dDeltaT*dDeltaT*dOmegaFilter*dOmegaFilter)/dTmp;
281 dTmp = dOmegaFilter*dOmegaFilter*dDeltaT*dDeltaT/dTmp;
306 silent_cerr(
"InducedVelocity(" << uLabel <<
"): deprecated keyword \"hinge\"; use \"orientation\" instead at line " << HP.
GetLineData() << std::endl);
334 silent_cerr(
"ReadUniform(" << uLabel <<
"): "
335 "illegal null or negative radius"
336 "for rotor" << uLabel <<
" at line " << HP.
GetLineData()
343 silent_cerr(
"ReadUniform(" << uLabel <<
"): "
344 "illegal null or negative blade"
345 "length for rotor" << uLabel
362 if (dOmegaFilter <= 0) {
363 silent_cerr(
"Illegal null or negative filter"
364 "cut frequency for rotor" << uLabel
377 silent_cerr(
"Illegal null or negative hover"
378 "correction coefficient" << uLabel
389 silent_cerr(
"Illegal null or negative time"
390 "step for rotor" << uLabel
429 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const;
464 "Module: Cyclocopter \n"
465 "Author: Pierangelo Masarati <pierangelo.masarati@polimi.it> \n"
466 "based on work by \n"
467 " Mattia Mattaboni <mattia.mattaboni@mail.polimi.it> \n"
468 "Organization: Dipartimento di Scienze e Tecnologie Aerospaziali \n"
469 " Politecnico di Milano \n"
470 " http://www.aero.polimi.it/ \n"
471 " Description: This module implements induced velocity models \n"
472 " for cycloidal rotors. \n"
474 " All rights reserved. \n"
477 " user element: <label> , cycloidal no inflow ,\n"
478 " <aircraft_node_label> ,\n"
479 " [ orientation , (OrientationMatrix) <orientation> , ]\n"
480 " <rotor_node_label>\n"
481 " [ , <output_data> ]\n"
536 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const
605 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const;
640 bFlagIsFirstBlade(
true),
641 dAzimuth(0.), dAzimuthPrev(0.),
642 dTz(0.), dTzMean(0.),
645 Uk(0.), Uk_1(0.), Uk_2(0.), Yk(0.), Yk_1(0.), Yk_2(0.)
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"
660 " All rights reserved. \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"
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"
733 <<
":" << ppRes[i]->GetLabel()
734 <<
" " << ppRes[i]->pRes->Force()
735 <<
" " << ppRes[i]->pRes->Moment()
775 silent_cout(
"Rotor(" <<
GetLabel() <<
"): "
776 "delay < 0.0; using 0.0" << std::endl);
779 silent_cout(
"Rotor(" <<
GetLabel() <<
"): "
780 "delay > 1.0; using 1.0" << std::endl);
844 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const
908 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const;
942 bFlagIsFirstBlade(
true),
943 dAzimuth(0.), dAzimuthPrev(0.),
951 "Module: Cyclocopter \n"
952 "Author: Pierangelo Masarati <pierangelo.masarati@polimi.it> \n"
953 "based on work by \n"
954 " Mattia Mattaboni <mattia.mattaboni@mail.polimi.it> \n"
955 "Organization: Dipartimento di Scienze e Tecnologie Aerospaziali \n"
956 " Politecnico di Milano \n"
957 " http://www.aero.polimi.it/ \n"
958 " Description: This module implements induced velocity models \n"
959 " for cycloidal rotors. \n"
961 " All rights reserved. \n"
964 " user element: <label> , cycloidal uniform 2D ,\n"
965 " <aircraft_node_label> ,\n"
966 " [ orientation , (OrientationMatrix) <orientation> , ]\n"
967 " <rotor_node_label>\n"
968 " (bool) <average> ,\n"
969 " <rotor_radius> ,\n"
971 " [ , delay , (DriveCaller) <delay> ]\n"
972 " [ , omegacut , <cut_frequency> ]\n"
973 " [ , kappa , <hover_correction_coefficient> ]\n"
974 " [ , timestep , <time_step> ]\n"
975 " [ , <output_data> ]\n"
1032 <<
":" << ppRes[i]->GetLabel()
1033 <<
" " << ppRes[i]->pRes->Force()
1034 <<
" " << ppRes[i]->pRes->Moment()
1061 if (dT > std::numeric_limits<doublereal>::epsilon()) {
1090 if (dT > std::numeric_limits<doublereal>::epsilon()) {
1115 silent_cout(
"Rotor(" <<
GetLabel() <<
"): "
1116 "delay < 0.0; using 0.0" << std::endl);
1120 silent_cout(
"Rotor(" <<
GetLabel() <<
"): "
1121 "delay > 1.0; using 1.0" << std::endl);
1153 if (dT > std::numeric_limits<doublereal>::epsilon()) {
1195 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const
1275 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const;
1310 bFlagIsFirstBlade(
true),
1311 dAzimuth(0.), dAzimuthPrev(0.),
1315 iCounter(0), iRotationCounter(0),
1322 "Module: Cyclocopter \n"
1323 "Author: Pierangelo Masarati <pierangelo.masarati@polimi.it> \n"
1324 "based on work by \n"
1325 " Mattia Mattaboni <mattia.mattaboni@mail.polimi.it> \n"
1326 "Organization: Dipartimento di Scienze e Tecnologie Aerospaziali \n"
1327 " Politecnico di Milano \n"
1328 " http://www.aero.polimi.it/ \n"
1329 " Description: This module implements induced velocity models \n"
1330 " for cycloidal rotors. \n"
1332 " All rights reserved. \n"
1335 " user element: <label> , cycloidal Polimi ,\n"
1336 " <aircraft_node_label> ,\n"
1337 " [ orientation , (OrientationMatrix) <orientation> , ]\n"
1338 " <rotor_node_label>\n"
1339 " (bool) <average> ,\n"
1340 " <rotor_radius> ,\n"
1342 " [ , delay , (DriveCaller) <delay> ]\n"
1343 " [ , omegacut , <cut_frequency> ]\n"
1344 " [ , kappa , <hover_correction_coefficient> ]\n"
1345 " [ , timestep , <time_step> ]\n"
1346 " [ , <output_data> ]\n"
1404 if (dT > std::numeric_limits<doublereal>::epsilon()) {
1431 silent_cout(
"Rotor(" <<
GetLabel() <<
"): "
1432 "delay < 0.0; using 0.0" << std::endl);
1436 silent_cout(
"Rotor(" <<
GetLabel() <<
"): "
1437 "delay > 1.0; using 1.0" << std::endl);
1463 <<
":" << ppRes[i]->GetLabel()
1464 <<
" " << ppRes[i]->pRes->Force()
1465 <<
" " << ppRes[i]->pRes->Moment()
1496 if (dT > std::numeric_limits<doublereal>::epsilon()) {
1539 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const
1557 #if 0 // KARI NOT IMPLEMENTED YET!
1576 class CyclocopterKARI
1579 CyclocopterKARI(
unsigned int uL,
const DofOwner* pDO,
1581 virtual ~CyclocopterKARI(
void);
1592 virtual std::ostream&
Restart(std::ostream& out)
const;
1610 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const;
1620 CyclocopterKARI::CyclocopterKARI(
unsigned int uL,
const DofOwner* pDO,
1636 CyclocopterKARI::~CyclocopterKARI(
void)
1654 CyclocopterKARI::Restart(std::ostream& out)
const
1656 return out <<
"# cyclocopter: not implemented yet" << std::endl;
1677 CyclocopterKARI::GetInducedVelocity(
Elem::Type type,
1678 unsigned uLabel,
unsigned uPnt,
const Vec3& X)
const
1684 CyclocopterKARI::GetConnectedNodes(std::vector<const Node *>& connectedNodes)
const
1686 connectedNodes.resize(1);
1687 connectedNodes[0] = pCraft;
1692 #endif // KARI NOT IMPLEMENTED YET!
1700 if (!
SetUDE(
"cyclocopter" "no" "inflow", rf)) {
1703 silent_cerr(
"module-cyclocopter: "
1704 "unable to register \"cyclocopter no inflow\""
1711 if (!
SetUDE(
"cyclocopter" "uniform" "1D", rf)) {
1714 silent_cerr(
"module-cyclocopter: "
1715 "unable to register \"cyclocopter uniform 1D\""
1722 if (!
SetUDE(
"cyclocopter" "uniform" "2D", rf)) {
1725 silent_cerr(
"module-cyclocopter: "
1726 "unable to register \"cyclocopter uniform 2D\""
1733 if (!
SetUDE(
"cyclocopter" "Polimi", rf)) {
1736 silent_cerr(
"module-cyclocopter: "
1737 "unable to register \"cyclocopter Polimi\""
1745 if (!
SetUDE(
"cyclocopter" "KARI", rf)) {
1748 silent_cerr(
"module-cyclocopter: "
1749 "unable to register \"cyclocopter KARI\""
1762 module_init(
const char *module_name,
void *pdm,
void *php)
1765 silent_cerr(
"cyclocopter: "
1766 "module_init(" << module_name <<
") "
1767 "failed" << std::endl);
1774 #endif // MBDYN_MODULE
flag fReadOutput(MBDynParser &HP, const T &t) const
virtual doublereal dGetAirDensity(const Vec3 &X) const
Mat3x3 GetRotRel(const ReferenceFrame &rf)
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
void SetFilterCoefficients(doublereal dOmegaFilter, doublereal dDeltaT)
const Vec3 Zero3(0., 0., 0.)
virtual bool bToBeOutput(void) const
virtual void ResetForce(void)
#define MBDYN_EXCEPT_ARGS
virtual void Output(OutputHandler &OH) const
virtual void ResizeReset(integer)
unsigned int iRotationCounter
virtual const Mat3x3 & GetRCurr(void) const
virtual doublereal GetPsi(const Vec3 &X) const
virtual const Vec3 & Force(void) const
virtual Vec3 GetInducedVelocity(Elem::Type type, unsigned uLabel, unsigned uPnt, const Vec3 &X) const
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
virtual ~CyclocopterPolimi(void)
std::vector< Hint * > Hints
virtual const Vec3 & Moment(void) const
virtual const Vec3 & GetXCurr(void) const
Vec3 GetVec(unsigned short int i) const
virtual void SetInitialValue(VectorHandler &X)
virtual unsigned int iGetInitialNumDof(void) const
virtual bool GetYesNoOrBool(bool bDefval=false)
virtual ~CyclocopterInflow(void)
static bool ReadRotorData(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, const StructNode *&pCraft, Mat3x3 &rrot, const StructNode *&pRotor)
virtual void Output(OutputHandler &OH) const
virtual Elem::Type GetElemType(void) const
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual void AddForce(const Elem *pEl, const StructNode *pNode, const Vec3 &F, const Vec3 &M, const Vec3 &X)
CyclocopterInflow(unsigned int uL, const DofOwner *pDO)
void AddForces(const Vec3 &f, const Vec3 &c, const Vec3 &x)
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
#define SAFENEW(pnt, item)
virtual std::ostream & Restart(std::ostream &out) const
const StructNode * pRotor
virtual bool IsKeyWord(const char *sKeyWord)
int module_init(const char *module_name, void *pdm, void *php)
std::ostream & Loadable(void) const
CyclocopterNoInflow(unsigned int uL, const DofOwner *pDO, DataManager *pDM, MBDynParser &HP)
virtual InducedVelocity::Type GetInducedVelocityType(void) const
virtual Vec3 GetInducedVelocity(Elem::Type type, unsigned uLabel, unsigned uPnt, const Vec3 &X) const =0
CyclocopterPolimi(unsigned int uL, const DofOwner *pDO, DataManager *pDM, MBDynParser &HP)
doublereal copysign(doublereal x, doublereal y)
static bool ReadUniform(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, bool &bFlagAve, doublereal &dR, doublereal &dL, DriveCaller *&pdW, doublereal &dOmegaFilter, doublereal &dKappa, doublereal &dDeltaT)
#define ASSERT(expression)
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
virtual const Vec3 & GetXCurr(void) const
ResForceSet ** ReadResSets(DataManager *pDM, MBDynParser &HP)
virtual Vec3 GetInducedVelocity(Elem::Type type, unsigned uLabel, unsigned uPnt, const Vec3 &X) const
unsigned int iStepCounter
virtual Mat3x3 GetRRotor(const Vec3 &X) const
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph)
virtual Mat3x3 GetRRotor(const Vec3 &X) const
Mat3x3 Transpose(void) const
void AddForce(const Vec3 &f)
bool SetUDE(const std::string &s, UserDefinedElemRead *rude)
void Set(const DriveCaller *pDC)
virtual doublereal GetPsi(const Vec3 &X) const
doublereal dGet(const doublereal &dVar) const
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
bool mbdyn_cyclocopter_set(void)
virtual ~CyclocopterNoInflow(void)
virtual doublereal GetW(const Vec3 &X) const
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
DriveCaller * GetDriveCaller(bool bDeferred=false)
virtual void AddForce(const Elem *pEl, const StructNode *pNode, const Vec3 &F, const Vec3 &M, const Vec3 &X)
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual void AddForce(const Elem *pEl, const StructNode *pNode, const Vec3 &F, const Vec3 &M, const Vec3 &X)
virtual void SetOutputFlag(flag f=flag(1))
GradientExpression< BinaryExpr< FuncAtan2, LhsExpr, RhsExpr > > atan2(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
virtual HighParser::ErrOut GetLineData(void) const
unsigned int GetLabel(void) const
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Node * ReadNode(MBDynParser &HP, Node::Type type) const
virtual doublereal GetW(const Vec3 &X) const
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual void Resize(integer iNewSize)=0
const StructNode * pCraft
virtual doublereal GetReal(const doublereal &dDefval=0.0)