16 #ifndef SURGSIM_PHYSICS_FEM2DELEMENTTRIANGLE_H 17 #define SURGSIM_PHYSICS_FEM2DELEMENTTRIANGLE_H 21 #include "SurgSim/Physics/Fem.h" 22 #include "SurgSim/Physics/FemElement.h" 29 SURGSIM_STATIC_REGISTRATION(Fem2DElementTriangle);
53 typedef Eigen::Matrix<double, 3, 3> Matrix33Type;
55 typedef Eigen::Matrix<double, 3, 6> Matrix36Type;
56 typedef Eigen::Matrix<double, 6, 6> Matrix66Type;
58 typedef Eigen::Matrix<double, 3, 9> Matrix39Type;
59 typedef Eigen::Matrix<double, 9, 9> Matrix99Type;
74 explicit Fem2DElementTriangle(std::shared_ptr<FemElementStructs::FemElementParameter> elementData);
109 Eigen::Matrix<double, 18, 18>* localStiffnessMatrix);
120 Eigen::Matrix<double, 18, 18>* localMassMatrix);
130 Eigen::Matrix<double, 18, 1>
m_x0;
191 std::array<double, 9>
batozDhxDxi(
double xi,
double eta)
const;
195 std::array<double, 9>
batozDhxDeta(
double xi,
double eta)
const;
199 std::array<double, 9>
batozDhyDxi(
double xi,
double eta)
const;
203 std::array<double, 9>
batozDhyDeta(
double xi,
double eta)
const;
214 Eigen::Matrix<double, 18, 18>* localMassMatrix);
222 Eigen::Matrix<double, 18, 18>* localMassMatrix);
228 void computeIntegral_dTd();
234 void computeIntegral_HxHxT();
240 void computeIntegral_HyHyT();
247 #endif // SURGSIM_PHYSICS_FEM2DELEMENTTRIANGLE_H void computeShapeFunctionsParameters(const SurgSim::Math::OdeState &restState)
Compute the various shape functions (membrane and plate deformations) parameters. ...
Definition: Fem2DElementTriangle.cpp:693
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Matrix39Type batozStrainDisplacement(double xi, double eta) const
Batoz strain displacement matrix evaluated at a given point.
Definition: Fem2DElementTriangle.cpp:894
double getVolume(const SurgSim::Math::OdeState &state) const override
Gets the element volume based on the input state (in m-3)
Definition: Fem2DElementTriangle.cpp:81
Eigen::Matrix< double, 18, 18 > m_MLocal
Stiffness matrix (in local coordinate frame)
Definition: Fem2DElementTriangle.h:136
void computeStiffness(const SurgSim::Math::OdeState &state, SurgSim::Math::Matrix *stiffnessMatrix)
Computes the triangle's stiffness matrix.
Definition: Fem2DElementTriangle.cpp:252
std::array< double, 9 > batozDhxDeta(double xi, double eta) const
Batoz derivative dHx/deta.
Definition: Fem2DElementTriangle.cpp:833
SurgSim::Math::Vector computeCartesianCoordinate(const SurgSim::Math::OdeState &state, const SurgSim::Math::Vector &naturalCoordinate) const override
Computes a given natural coordinate in cartesian coordinates.
Definition: Fem2DElementTriangle.cpp:306
void computeMass(const SurgSim::Math::OdeState &state, SurgSim::Math::Matrix *massMatrix)
Computes the triangle's mass matrix.
Definition: Fem2DElementTriangle.cpp:164
double m_thickness
Thickness of the element.
Definition: Fem2DElementTriangle.h:144
SurgSim::Math::Vector3d m_ek
Batoz variable .
Definition: Fem2DElementTriangle.h:172
double m_restArea
The triangle rest area.
Definition: Fem2DElementTriangle.h:141
void setThickness(double thickness)
Sets the triangle's thickness.
Definition: Fem2DElementTriangle.cpp:68
SurgSim::Math::Matrix33d m_membraneShapeFunctionsParameters
Membrane (in-plane) deformation.
Definition: Fem2DElementTriangle.h:153
double getThickness() const
Gets the triangle's thickness.
Definition: Fem2DElementTriangle.cpp:76
2D FemElement based on a triangle with a constant thickness
Definition: Fem2DElementTriangle.h:51
SurgSim::Math::Vector3d m_lij_sqr
Batoz variable .
Definition: Fem2DElementTriangle.h:167
std::array< double, 9 > batozDhxDxi(double xi, double eta) const
Batoz derivative dHx/dxi.
Definition: Fem2DElementTriangle.cpp:811
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
Base class for all Fem Element (1D, 2D, 3D) It handles the node ids to which it is connected and requ...
Definition: FemElement.h:45
SurgSim::Math::Vector3d m_yij
Batoz variable .
Definition: Fem2DElementTriangle.h:166
virtual void computeLocalStiffness(const SurgSim::Math::OdeState &state, Eigen::Matrix< double, 18, 18 > *localStiffnessMatrix)
Computes the triangle's local stiffness matrix.
Definition: Fem2DElementTriangle.cpp:182
SurgSim::Math::Matrix m_integralHyiHyj
Plate mass matrix: integral terms related to the dof .
Definition: Fem2DElementTriangle.h:184
std::array< double, 9 > batozDhyDxi(double xi, double eta) const
Batoz derivative dHy/dxi.
Definition: Fem2DElementTriangle.cpp:854
SurgSim::Math::Vector3d m_bk
Batoz variable .
Definition: Fem2DElementTriangle.h:169
Eigen::Matrix< double, 18, 18 > m_KLocal
Stiffness matrix (in local coordinate frame)
Definition: Fem2DElementTriangle.h:138
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
virtual void computeLocalMass(const SurgSim::Math::OdeState &state, Eigen::Matrix< double, 18, 18 > *localMassMatrix)
Computes the triangle's local mass matrix.
Definition: Fem2DElementTriangle.cpp:156
SurgSim::Math::Vector3d m_tk
Batoz variable .
Definition: Fem2DElementTriangle.h:178
SurgSim::Math::Matrix33d computeRotation(const SurgSim::Math::OdeState &state)
Computes the triangle element's rotation given a state.
Definition: Fem2DElementTriangle.cpp:270
SurgSim::Math::Matrix m_integral_dT_d
Plate mass matrix: integral terms related to the dof .
Definition: Fem2DElementTriangle.h:183
SurgSim::Math::Matrix33d m_initialRotation
Initial rotation matrix for the element.
Definition: Fem2DElementTriangle.h:133
SurgSim::Math::Vector3d m_qk
Batoz variable .
Definition: Fem2DElementTriangle.h:177
Eigen::Matrix< double, 18, 1 > m_x0
The element's rest state.
Definition: Fem2DElementTriangle.h:130
std::array< double, 9 > batozDhyDeta(double xi, double eta) const
Batoz derivative dHy/deta.
Definition: Fem2DElementTriangle.cpp:874
SurgSim::Math::Vector3d m_dk
Batoz variable .
Definition: Fem2DElementTriangle.h:171
SurgSim::Math::Matrix m_integralHxiHxj
Plate mass matrix: integral terms related to the dof .
Definition: Fem2DElementTriangle.h:185
SurgSim::Math::Vector3d m_rk
Batoz variable .
Definition: Fem2DElementTriangle.h:179
Eigen::Matrix< double, 3, 3, Eigen::RowMajor > Matrix33d
A 3x3 matrix of doubles.
Definition: Matrix.h:51
void initializeMembers()
Initializes variables needed before Initialize() is called.
Definition: Fem2DElementTriangle.cpp:90
SurgSim::Math::Vector3d m_ck
Batoz variable .
Definition: Fem2DElementTriangle.h:170
SurgSim::Math::Vector3d m_ak
Batoz variable .
Definition: Fem2DElementTriangle.h:168
Fem2DElementTriangle()
Constructor.
Definition: Fem2DElementTriangle.cpp:44
void initialize(const SurgSim::Math::OdeState &state) override
Initialize the FemElement once everything has been set.
Definition: Fem2DElementTriangle.cpp:99
void doUpdateFMDK(const Math::OdeState &state, int options) override
Update the FemElement based on the given state.
Definition: Fem2DElementTriangle.cpp:325
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
SurgSim::Math::Vector3d m_Pk
Batoz variable .
Definition: Fem2DElementTriangle.h:176
SurgSim::Math::Vector computeNaturalCoordinate(const SurgSim::Math::OdeState &state, const SurgSim::Math::Vector &cartesianCoordinate) const override
Computes a natural coordinate given a global coordinate.
Definition: Fem2DElementTriangle.cpp:317
SurgSim::Math::Vector3d m_xij
Batoz variable .
Definition: Fem2DElementTriangle.h:165