23#include "mbsimFlexibleBody/contours/contour2s.h"
24#include "mbsimFlexibleBody/frames/node_frame.h"
25#include "mbsimFlexibleBody/utils/contact_utils.h"
27#include "openmbvcppinterface/nurbsdisk.h"
28#include "mbsim/utils/boost_parameters.h"
29#include <mbsim/utils/openmbv_utils.h>
31#include "nurbs++/nurbs.h"
32#include "nurbs++/nurbsS.h"
33#include "nurbs++/vector.h"
39namespace MBSimFlexibleBody {
70 void init(
InitStage stage,
const MBSim::InitConfigSet &config)
override;
74 fmatvec::Vec3 evalPosition(
const fmatvec::Vec2 &zeta)
override;
75 fmatvec::Vec3 evalWs(
const fmatvec::Vec2 &zeta)
override;
76 fmatvec::Vec3 evalWt(
const fmatvec::Vec2 &zeta)
override;
77 fmatvec::Vec3 evalWu(
const fmatvec::Vec2 &zeta)
override {
return evalWs(zeta); }
78 fmatvec::Vec3 evalWv(
const fmatvec::Vec2 &zeta)
override {
return evalWt(zeta); }
79 fmatvec::Vec3 evalWn(
const fmatvec::Vec2 &zeta)
override;
81 bool isZetaOutside(
const fmatvec::Vec2 &zeta)
override {
return zeta(0) < etaNodes[0] or zeta(0) > etaNodes[etaNodes.size()-1]; }
86 void updateJacobians(
MBSim::Frame *frame,
int j=0)
override;
87 void updateGyroscopicAccelerations(
MBSim::Frame *frame)
override;
89 fmatvec::Vec3 evalPosition();
90 fmatvec::SqrMat3 evalOrientation();
94 MBSim::ContactKinematics * findContactPairingWith(
const std::type_info &type0,
const std::type_info &type1)
override {
return findContactPairingFlexible(type0, type1); }
96 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBV, MBSim::tag, (optional (diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
97 openMBVNurbsDisk = OpenMBV::ObjectFactory::create<OpenMBV::NurbsDisk>();
111 fmatvec::Vec
transformCW(
const fmatvec::Vec& WrPoint);
183 double computeError(
const fmatvec::Vec &Vec1,
const fmatvec::Vec &Vec2);
206 std::shared_ptr<OpenMBV::NurbsDisk> openMBVNurbsDisk;
233 PLib::Vector<double> *uVec;
234 PLib::Vector<double> *vvec;
235 PLib::Vector<double> *vVec;
basic contour described by two contour parameters
Definition: contour2s.h:33
2s flexible
Definition: nurbs_disk_2s.h:54
int RefDofs
number of reference dofs of the flexible body
Definition: nurbs_disk_2s.h:189
int testInsideBounds(const fmatvec::Vec &s)
Definition: nurbs_disk_2s.cc:511
PLib::Vector< double > * uvec
knot vectors, used for the U und V coordinates of the surface
Definition: nurbs_disk_2s.h:232
fmatvec::Vec getControlPoints(const int u, const int v)
Definition: nurbs_disk_2s.cc:483
void computeSurfaceVelocities()
interpolates the velocities of the surface with the node-data from the body
Definition: nurbs_disk_2s.cc:437
PlNurbsSurfaced * SurfaceVelocities
interpolated velocities of the surface-points
Definition: nurbs_disk_2s.h:217
fmatvec::Mat computeCurvatures(const double &radius, const double &phi)
Definition: nurbs_disk_2s.cc:308
std::vector< PlNurbsSurfaced > SurfaceJacobiansOfRotation
interpolated Jacobians of Rotation on the surface
Definition: nurbs_disk_2s.h:227
double computeError(const fmatvec::Vec &Vec1, const fmatvec::Vec &Vec2)
Definition: nurbs_disk_2s.cc:521
void computeVVector(const int NbPts)
computes the V-vector of the surface for an open interpolation
Definition: nurbs_disk_2s.cc:331
fmatvec::Vec transformCW(const fmatvec::Vec &WrPoint)
transformation cartesian to cylinder system
Definition: nurbs_disk_2s.cc:279
std::vector< PlNurbsSurfaced > SurfaceJacobiansOfTranslation
interpolated Jacobians of Translation on the surface
Definition: nurbs_disk_2s.h:222
void computeSurface()
interpolates the surface with node-data from body
Definition: nurbs_disk_2s.cc:354
fmatvec::Mat computeDirectionalDerivatives(const double &radius, const double &phi, const int °)
Definition: nurbs_disk_2s.cc:283
fmatvec::Vec getVVector()
Definition: nurbs_disk_2s.cc:502
double Ri
inner and outer radius
Definition: nurbs_disk_2s.h:204
NurbsDisk2s(const std::string &name)
constructor
Definition: nurbs_disk_2s.cc:40
int nj
number of elements in azimuthal and radial direction
Definition: nurbs_disk_2s.h:194
PlNurbsSurfaced * Surface
interpolated surface of the contour
Definition: nurbs_disk_2s.h:212
void computeUVector(const int NbPts)
computes the U vector of the surface for a closed interpolation
Definition: nurbs_disk_2s.cc:312
~NurbsDisk2s() override
destructor
Definition: nurbs_disk_2s.cc:49
fmatvec::Vec getUVector()
Definition: nurbs_disk_2s.cc:493
void computeSurfaceJacobians()
interpolates the Jacobians of translation of the surface with the node-data from the body
Definition: nurbs_disk_2s.cc:454
int degU
interpolation degree azimuthal and radial
Definition: nurbs_disk_2s.h:199