|
| Fem3DElementCorotationalTetrahedron (std::array< size_t, 4 > nodeIds) |
| Constructor. More...
|
|
virtual void | initialize (const SurgSim::Math::OdeState &state) override |
| Initialize the FemElement once everything has been set. More...
|
|
virtual void | addForce (const SurgSim::Math::OdeState &state, SurgSim::Math::Vector *F, double scale=1.0) override |
| Adds the element force (computed for a given state) to a complete system force vector F (assembly) More...
|
|
virtual void | addStiffness (const SurgSim::Math::OdeState &state, SurgSim::Math::Matrix *K, double scale=1.0) override |
| Adds the element stiffness matrix K (= -df/dx) (computed for a given state) to a complete system stiffness matrix K (assembly) More...
|
|
virtual void | addMatVec (const SurgSim::Math::OdeState &state, double alphaM, double alphaD, double alphaK, const SurgSim::Math::Vector &vector, SurgSim::Math::Vector *result) override |
| Adds the element matrix-vector contribution F += (alphaM.M + alphaD.D + alphaK.K).x (computed for a given state) into a complete system data structure F (assembly) More...
|
|
virtual bool | update (const SurgSim::Math::OdeState &state) override |
| Update the element co-rotational frame. More...
|
|
| Fem3DElementTetrahedron (std::array< size_t, 4 > nodeIds) |
| Constructor. More...
|
|
virtual double | getVolume (const SurgSim::Math::OdeState &state) const override |
| Get the element volume based on the input state. More...
|
|
virtual void | addMass (const SurgSim::Math::OdeState &state, SurgSim::Math::Matrix *M, double scale=1.0) override |
| Adds the element mass matrix M (computed for a given state) to a complete system mass matrix M (assembly) More...
|
|
virtual void | addDamping (const SurgSim::Math::OdeState &state, SurgSim::Math::Matrix *D, double scale=1.0) override |
| Adds the element damping matrix D (= -df/dv) (comuted for a given state) to a complete system damping matrix D (assembly) More...
|
|
virtual void | addFMDK (const SurgSim::Math::OdeState &state, SurgSim::Math::Vector *F, SurgSim::Math::Matrix *M, SurgSim::Math::Matrix *D, SurgSim::Math::Matrix *K) override |
| Adds the element force vector, mass, stiffness and damping matrices (computed for a given state) into a complete system data structure F, M, D, K (assembly) More...
|
|
virtual SurgSim::Math::Vector | computeCartesianCoordinate (const SurgSim::Math::OdeState &state, const SurgSim::Math::Vector &naturalCoordinate) const override |
| Computes a given natural coordinate in cartesian coordinates. More...
|
|
virtual SurgSim::Math::Vector | computeNaturalCoordinate (const SurgSim::Math::OdeState &state, const SurgSim::Math::Vector &cartesianCoordinate) const override |
| Computes a natural coordinate given a global coordinate. More...
|
|
| FemElement () |
| Constructor. More...
|
|
virtual | ~FemElement () |
| Virtual destructor. More...
|
|
size_t | getNumDofPerNode () const |
| Gets the number of degree of freedom per node. More...
|
|
size_t | getNumNodes () const |
| Gets the number of nodes connected by this element. More...
|
|
size_t | getNodeId (size_t elementNodeId) const |
| Gets the elementNodeId-th node id. More...
|
|
const std::vector< size_t > & | getNodeIds () const |
| Gets the node ids for this element. More...
|
|
void | setYoungModulus (double E) |
| Sets the Young modulus (in N.m-2) More...
|
|
double | getYoungModulus () const |
| Gets the Young modulus (in N.m-2) More...
|
|
void | setPoissonRatio (double nu) |
| Sets the Poisson ratio (unitless) More...
|
|
double | getPoissonRatio () const |
| Gets the Poisson ratio (unitless) More...
|
|
void | setMassDensity (double rho) |
| Sets the mass density (in Kg.m-3) More...
|
|
double | getMassDensity () const |
| Gets the mass density (in Kg.m-3) More...
|
|
double | getMass (const SurgSim::Math::OdeState &state) const |
| Gets the element mass based on the input state (in Kg) More...
|
|
bool | isValidCoordinate (const SurgSim::Math::Vector &naturalCoordinate) const |
| Determines whether a given natural coordinate is valid. More...
|
|
|
SurgSim::Math::Matrix33d | m_rotation |
| The element rigid rotation. More...
|
|
Eigen::Matrix< double, 12, 12 > | m_corotationalStiffnessMatrix |
| The co-rotational stiffness matrix. More...
|
|
SurgSim::Math::Matrix44d | m_Vinverse |
| The constant inverse matrix of the undeformed tetrahedron homogeneous 4 points coordinates. More...
|
|
double | m_restVolume |
| Shape functions: Tetrahedron rest volume. More...
|
|
std::array< double, 4 > | m_ai |
| Shape functions coefficients Ni(x,y,z) = 1/6V ( ai + x.bi + y.ci + z.di ) More...
|
|
std::array< double, 4 > | m_bi |
|
std::array< double, 4 > | m_ci |
|
std::array< double, 4 > | m_di |
|
Eigen::Matrix< double, 12, 1 > | m_x0 |
| The tetrahedon rest state. More...
|
|
Eigen::Matrix< double, 6, 6 > | m_Em |
| Elasticity material matrix (contains the elastic properties of the material) More...
|
|
Eigen::Matrix< double, 6, 12 > | m_strain |
| Strain matrix. More...
|
|
Eigen::Matrix< double, 6, 12 > | m_stress |
| Stress matrix. More...
|
|
Eigen::Matrix< double, 12, 12 > | m_M |
| Mass matrix. More...
|
|
Eigen::Matrix< double, 12, 12 > | m_K |
| Stiffness matrix. More...
|
|
size_t | m_numDofPerNode |
| Number of degree of freedom per node for this element. More...
|
|
std::vector< size_t > | m_nodeIds |
| Node ids connected by this element. More...
|
|
double | m_rho |
| Mass density (in Kg.m-3) More...
|
|
double | m_E |
| Young modulus (in N.m-2) More...
|
|
double | m_nu |
| Poisson ratio (unitless) More...
|
|
|
void | computeShapeFunctions (const SurgSim::Math::OdeState &state, double *volume, std::array< double, 4 > *ai, std::array< double, 4 > *bi, std::array< double, 4 > *ci, std::array< double, 4 > *di) const |
| Computes the tetrahedron shape functions. More...
|
|
void | computeStiffness (const SurgSim::Math::OdeState &state, Eigen::Matrix< double, 12, 12 > *k) |
| Computes the tetrahedron stiffness matrix. More...
|
|
void | computeMass (const SurgSim::Math::OdeState &state, Eigen::Matrix< double, 12, 12 > *m) |
| Computes the tetrahedron mass matrix. More...
|
|
void | addForce (const SurgSim::Math::OdeState &state, const Eigen::Matrix< double, 12, 12 > &k, SurgSim::Math::Vector *F, double scale=1.0) |
| Adds the element force (computed for a given state) to a complete system force vector F (assembly) This method relies on a given stiffness matrix and does not evaluate it from the state. More...
|
|
void | setNumDofPerNode (size_t numDofPerNode) |
| Sets the number of degrees of freedom per node. More...
|
|
Fem Element 3D co-rotational based on a tetrahedron volume discretization.
- Note
- This class derives from the linear version of the FEM 3D element tetrahedron, adding a rigid frame
-
attached to the tetrahedron element to follow its rigid motion. Therefore it computes deformation in the
-
local coordinate system of the tetrahedron. This class is based on 2 papers:
-
"Interactive Virtual Materials", Muller, Gross. Graphics Interface 2004
-
"Exact Corotational Linear FEM Stiffness Matrix", Jernej Barbic. Technical Report USC 2012.
-
Only the force and stiffness calculation are different, involving some changes as well in addMatVec
-
(it uses the updated stiffness matrix).
-
The update method takes care of extracting the rigid motion of the element.
-
This element is updating its stiffness matrix at each new time step, which means that it cannot
-
be used with any OdeSolverLinearXXX, it needs an ode solver that recomputes the data at each iteration.