19 #ifndef _AERODYNAMICS_H
20 #define _AERODYNAMICS_H
22 #include "mbsim/links/floating_frame_link.h"
24 #include "mbsim/utils/boost_parameters.h"
25 #include "mbsim/utils/openmbv_utils.h"
29 template <
class Sig>
class Function;
32 namespace MBSimPhysics {
38 void init(InitStage stage,
const MBSim::InitConfigSet &config)
override;
39 void initializeUsingXML(xercesc::DOMElement *element)
override;
43 using FloatingFrameLink::connect;
45 void connect(
MBSim::Frame *frame_) { frame[1] = frame_; }
48 void setCoefficientFunction(
MBSim::Function<fmatvec::Vec3(fmatvec::Vec2)> *func);
49 void setReferenceSurface(
double A_) { A = A_; }
50 void setWindSpeed(
const fmatvec::Vec3 &vW_) { vW <<= vW_; }
52 void updateGeneralizedPositions()
override { updrrel =
false; }
53 void updateGeneralizedVelocities()
override { updvrel =
false; }
54 void updatelaF()
override;
56 bool isActive()
const override {
return true; }
57 bool gActiveChanged()
override {
return false; }
58 bool isSingleValued()
const override {
return true; }
60 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBV, MBSim::tag, (optional (sideOfInteraction,(MBSim::OpenMBVInteractionArrow::SideOfInteraction),MBSim::OpenMBVInteractionArrow::action)(scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(MBSim::OpenMBVArrow::ReferencePoint),MBSim::OpenMBVArrow::toPoint)(colorRepresentation,(MBSim::OpenMBVArrow::ColorRepresentation),MBSim::OpenMBVArrow::none)(minimalColorValue,(
double),0)(maximalColorValue,(
double),1)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0)(pointSize,(
double),0)(lineWidth,(
double),0))) {
61 ombvArrow = std::shared_ptr<MBSim::OpenMBVInteractionArrow>(
new MBSim::OpenMBVInteractionArrow(sideOfInteraction,scaleLength,scaleSize,MBSim::OpenMBVArrow::toHead,referencePoint,colorRepresentation,minimalColorValue,maximalColorValue,diffuseColor,transparency,pointSize,lineWidth));
70 std::shared_ptr<MBSim::OpenMBVInteractionArrow> ombvArrow;
71 std::vector<std::shared_ptr<OpenMBV::Arrow>> openMBVForce;
Definition: aerodynamics.h:34
Definition: aerodynamics.h:29