|
| Fem3DElementCube (std::array< size_t, 8 > nodeIds) |
| Constructor. More...
|
|
virtual void | initialize (const SurgSim::Math::OdeState &state) override |
| Initializes the element once everything has been set. More...
|
|
virtual double | getVolume (const SurgSim::Math::OdeState &state) const override |
| Gets the element volume based on the input state. 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 | 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) (computed for a given state) to a complete system damping matrix D (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 | 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 void | addMatVec (const SurgSim::Math::OdeState &state, double alphaM, double alphaD, double alphaK, const SurgSim::Math::Vector &x, SurgSim::Math::Vector *F) 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 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...
|
|
virtual bool | update (const SurgSim::Math::OdeState &state) |
| Update the element based on a given state. More...
|
|
bool | isValidCoordinate (const SurgSim::Math::Vector &naturalCoordinate) const |
| Determines whether a given natural coordinate is valid. More...
|
|
|
void | buildConstitutiveMaterialMatrix (Eigen::Matrix< double, 6, 6 > *constitutiveMatrix) |
| Build the constitutive material 6x6 matrix. More...
|
|
void | computeStiffness (const SurgSim::Math::OdeState &state, Eigen::Matrix< double, 6, 24 > *strain, Eigen::Matrix< double, 6, 24 > *stress, Eigen::Matrix< double, 24, 24 > *k) |
| Computes the cube stiffness matrix along with the strain and stress matrices. More...
|
|
void | computeMass (const SurgSim::Math::OdeState &state, Eigen::Matrix< double, 24, 24 > *m) |
| Computes the cube mass matrix. More...
|
|
void | addForce (const SurgSim::Math::OdeState &state, const Eigen::Matrix< double, 24, 24 > &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 | addStrainStressStiffnessAtPoint (const SurgSim::Math::OdeState &state, const SurgSim::Math::gaussQuadraturePoint &epsilon, const SurgSim::Math::gaussQuadraturePoint &eta, const SurgSim::Math::gaussQuadraturePoint &mu, Eigen::Matrix< double, 6, 24 > *strain, Eigen::Matrix< double, 6, 24 > *stress, Eigen::Matrix< double, 24, 24 > *k) |
| Helper method to evaluate strain-stress and stiffness integral terms with a discrete sum using a Gauss quadrature rule. More...
|
|
void | addMassMatrixAtPoint (const SurgSim::Math::OdeState &state, const SurgSim::Math::gaussQuadraturePoint &epsilon, const SurgSim::Math::gaussQuadraturePoint &eta, const SurgSim::Math::gaussQuadraturePoint &mu, Eigen::Matrix< double, 24, 24 > *m) |
| Helper method to evaluate mass integral terms with a discrete sum using a Gauss quadrature rule. More...
|
|
void | evaluateJ (const SurgSim::Math::OdeState &state, double epsilon, double eta, double mu, SurgSim::Math::Matrix33d *J, SurgSim::Math::Matrix33d *Jinv, double *detJ) const |
| Helper method to evaluate matrix J = d(x,y,z)/d(epsilon,eta,mu) at a given 3D parametric location J expresses the 3D space coordinate frames variation w.r.t. More...
|
|
void | evaluateStrainDisplacement (double epsilon, double eta, double mu, const SurgSim::Math::Matrix33d &Jinv, Eigen::Matrix< double, 6, 24 > *B) const |
| Helper method to evaluate the strain-displacement matrix at a given 3D parametric location c.f. More...
|
|
double | shapeFunction (size_t i, double epsilon, double eta, double mu) const |
| Shape functions \(N_i(\epsilon, \eta, \mu) = (1\pm\epsilon)(1\pm\eta)(1\pm\mu)/8\). More...
|
|
double | dShapeFunctiondepsilon (size_t i, double epsilon, double eta, double mu) const |
| Shape functions derivative \(dN_i/d\epsilon(\epsilon, \eta, \mu) = \pm(1\pm\eta)(1\pm\mu)/8\). More...
|
|
double | dShapeFunctiondeta (size_t i, double epsilon, double eta, double mu) const |
| Shape functions derivative \(dN_i/d\eta(\epsilon, \eta, \mu) = \pm(1\pm\epsilon)(1\pm\mu)/8\). More...
|
|
double | dShapeFunctiondmu (size_t i, double epsilon, double eta, double mu) const |
| Shape functions derivative \(dN_i/d\mu(\epsilon, \eta, \mu) = \pm(1\pm\epsilon)(1\pm\eta)/8\). More...
|
|
void | setNumDofPerNode (size_t numDofPerNode) |
| Sets the number of degrees of freedom per node. More...
|
|
|
double | m_restVolume |
| Cube rest volume. More...
|
|
Eigen::Matrix< double, 24, 1 > | m_elementRestPosition |
| The cube rest state (nodes ordered by m_nodeIds) More...
|
|
Eigen::Matrix< double, 6, 24 > | m_strain |
| Strain matrix (usually noted \(\epsilon\)) More...
|
|
Eigen::Matrix< double, 6, 24 > | m_stress |
| Stress matrix (usually noted \(\sigma\)) More...
|
|
Eigen::Matrix< double, 6, 6 > | m_constitutiveMaterial |
| Constitutive material matrix (Hooke's law in this case) defines the relationship between stress and strain. More...
|
|
Eigen::Matrix< double, 24, 24 > | m_mass |
| Mass matrix (usually noted \(M\)) More...
|
|
Eigen::Matrix< double, 24, 24 > | m_stiffness |
| Stiffness matrix (usually noted \(K\)) More...
|
|
|
std::array< double, 8 > | m_shapeFunctionsEpsilonSign |
|
std::array< double, 8 > | m_shapeFunctionsEtaSign |
|
std::array< double, 8 > | m_shapeFunctionsMuSign |
|
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...
|
|
Class for Fem Element 3D based on a cube volume discretization.
- Note
- The stiffness property of the cube is derived from
-
http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch11.d/AFEM.Ch11.pdf
-
The mass property of the cube is derived from the kinetic energy computed on the cube's volume
-
(c.f. internal documentation on cube mass matrix computation for details).
-
Integral terms over the volume are evaluated using the Gauss-Legendre 2-points quadrature.
-
http://en.wikipedia.org/wiki/Gaussian_quadrature
-
Note that this technique is accurate for any polynomial evaluation up to degree 3.
-
In our case, the shape functions \(N_i\) are linear (of degree 1). So for exmaple,
-
in the mass matrix we have integral terms like \(\int_V N_i.N_j dV\), which are of degree 2.