chrono::fea::ChElementTetra_10 Class Reference

Description

Tetrahedron FEA element with 10 nodes.

This is a quadratic element for displacements; stress and strain are interpolated depending on Gauss points.

#include <ChElementTetra_10.h>

Inheritance diagram for chrono::fea::ChElementTetra_10:
Collaboration diagram for chrono::fea::ChElementTetra_10:

Public Member Functions

virtual int GetNnodes () override
 Gets the number of nodes used by this element.
 
virtual int GetNdofs () override
 Gets the number of coordinates in the field used by the referenced nodes. More...
 
virtual int GetNodeNdofs (int n) override
 Get the number of coordinates from the n-th node that are used by this element. More...
 
virtual std::shared_ptr< ChNodeFEAbaseGetNodeN (int n) override
 Access the nth node.
 
virtual void SetNodes (std::shared_ptr< ChNodeFEAxyz > nodeA, std::shared_ptr< ChNodeFEAxyz > nodeB, std::shared_ptr< ChNodeFEAxyz > nodeC, std::shared_ptr< ChNodeFEAxyz > nodeD, std::shared_ptr< ChNodeFEAxyz > nodeE, std::shared_ptr< ChNodeFEAxyz > nodeF, std::shared_ptr< ChNodeFEAxyz > nodeG, std::shared_ptr< ChNodeFEAxyz > nodeH, std::shared_ptr< ChNodeFEAxyz > nodeI, std::shared_ptr< ChNodeFEAxyz > nodeJ)
 
virtual void ShapeFunctions (ChMatrix<> &N, double r, double s, double t)
 Fills the N shape function matrix with the values of shape functions at zi parametric coordinates, where r=1 at 2nd vertex, s=1 at 3rd, t=1 at 4th. More...
 
virtual void GetStateBlock (ChMatrixDynamic<> &mD) override
 Fills the D vector (displacement) column matrix with the current field values at the nodes of the element, with proper ordering. More...
 
double ComputeVolume ()
 Approximation!! not the exact volume This returns an exact value only in case of Constant Metric Tetrahedron.
 
virtual void ComputeJacobian (ChMatrixDynamic<> &Jacobian, double zeta1, double zeta2, double zeta3, double zeta4)
 Puts inside 'Jacobian' the Jacobian matrix of the element zeta1,...,zeta4 are the four natural coordinates of the integration point note: in case of tetrahedral elements natural coord. More...
 
virtual void ComputeMatrB (ChMatrixDynamic<> &mmatrB, double zeta1, double zeta2, double zeta3, double zeta4, double &JacobianDet)
 Computes the matrix of partial derivatives and puts data in "mmatrB" evaluated at natural coordinates zeta1,...,zeta4 note: in case of tetrahedral elements natural coord. More...
 
virtual void ComputeStiffnessMatrix ()
 Computes the local STIFFNESS MATRIX of the element: K = sum (w_i * [B]' * [D] * [B]) More...
 
void GetParameterForNodeID (const int nodeID, double &z1, double &z2, double &z3, double &z4)
 Given the node ID, gets the 4 parameters of the shape function.
 
ChStrainTensor GetStrain (double z1, double z2, double z3, double z4)
 Returns the strain tensor at given parameters. More...
 
ChStressTensor GetStress (double z1, double z2, double z3, double z4)
 Returns the stress tensor at given parameters. More...
 
virtual void SetupInitial (ChSystem *system) override
 Initial setup: This is used mostly to precompute matrices that do not change during the simulation, i.e. More...
 
virtual void UpdateRotation () override
 Given the actual position of the nodes, recompute the cumulative rotation matrix A. More...
 
virtual void ComputeKRMmatricesGlobal (ChMatrix<> &H, double Kfactor, double Rfactor=0, double Mfactor=0) override
 Sets H as the global stiffness matrix K, scaled by Kfactor. More...
 
virtual void ComputeInternalForces (ChMatrixDynamic<> &Fi) override
 Computes the internal forces (ex. More...
 
void SetMaterial (std::shared_ptr< ChContinuumElastic > my_material)
 Set the material of the element.
 
std::shared_ptr< ChContinuumElasticGetMaterial ()
 
ChMatrixGetMatrB (int n)
 Get the partial derivatives matrix MatrB and the StiffnessMatrix.
 
ChMatrixGetStiffnessMatrix ()
 
virtual int LoadableGet_ndof_x () override
 Gets the number of DOFs affected by this element (position part)
 
virtual int LoadableGet_ndof_w () override
 Gets the number of DOFs affected by this element (speed part)
 
virtual void LoadableGetStateBlock_x (int block_offset, ChState &mD) override
 Gets all the DOFs packed in a single vector (position part)
 
virtual void LoadableGetStateBlock_w (int block_offset, ChStateDelta &mD) override
 Gets all the DOFs packed in a single vector (speed part)
 
virtual void LoadableStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv) override
 Increment all DOFs using a delta.
 
virtual int Get_field_ncoords () override
 Number of coordinates in the interpolated field: here the {x,y,z} displacement.
 
virtual int GetSubBlocks () override
 Tell the number of DOFs blocks (ex. =1 for a body, =4 for a tetrahedron, etc.)
 
virtual unsigned int GetSubBlockOffset (int nblock) override
 Get the offset of the i-th sub-block of DOFs in global vector.
 
virtual unsigned int GetSubBlockSize (int nblock) override
 Get the size of the i-th sub-block of DOFs in global vector.
 
virtual void LoadableGetVariables (std::vector< ChVariables * > &mvars) override
 Get the pointers to the contained ChVariables, appending to the mvars vector.
 
virtual void ComputeNF (const double U, const double V, const double W, ChVectorDynamic<> &Qi, double &detJ, const ChVectorDynamic<> &F, ChVectorDynamic<> *state_x, ChVectorDynamic<> *state_w) override
 Evaluate N'*F , where N is some type of shape function evaluated at U,V,W coordinates of the volume, each ranging in -1..+1 F is a load, N'*F is the resulting generalized load Returns also det[J] with J=[dx/du,..], that might be useful in gauss quadrature. More...
 
virtual double GetDensity () override
 This is needed so that it can be accessed by ChLoaderVolumeGravity.
 
virtual bool IsTetrahedronIntegrationNeeded () override
 If true, use quadrature over u,v,w in [0..1] range as tetrahedron volumetric coords, with z=1-u-v-w otherwise use quadrature over u,v,w in [-1..+1] as box isoparametric coords. More...
 
- Public Member Functions inherited from chrono::fea::ChElementTetrahedron
virtual void Update ()
 Update: this is called at least at each time step. More...
 
- Public Member Functions inherited from chrono::fea::ChElement3D
double GetVolume ()
 
- Public Member Functions inherited from chrono::fea::ChElementGeneric
ChKblockGenericKstiffness ()
 Access the proxy to stiffness, for sparse solver.
 
virtual void EleIntLoadResidual_F (ChVectorDynamic<> &R, const double c) override
 (This is a default (a bit unoptimal) book keeping so that in children classes you can avoid implementing this EleIntLoadResidual_F function, unless you need faster code)
 
virtual void EleIntLoadResidual_Mv (ChVectorDynamic<> &R, const ChVectorDynamic<> &w, const double c) override
 (This is a default (VERY UNOPTIMAL) book keeping so that in children classes you can avoid implementing this EleIntLoadResidual_Mv function, unless you need faster code.)
 
virtual void ComputeMmatrixGlobal (ChMatrix<> &M) override
 Returns the global mass matrix. More...
 
virtual void InjectKRMmatrices (ChSystemDescriptor &mdescriptor) override
 Tell to a system descriptor that there are item(s) of type ChKblock in this object (for further passing it to a solver)
 
virtual void KRMmatricesLoad (double Kfactor, double Rfactor, double Mfactor) override
 Adds the current stiffness K and damping R and mass M matrices in encapsulated ChKblock item(s), if any. More...
 
virtual void VariablesFbLoadInternalForces (double factor=1.) override
 Adds the internal forces, expressed as nodal forces, into the encapsulated ChVariables, in the 'fb' part: qf+=forces*factor (This is a default (a bit unoptimal) book keeping so that in children classes you can avoid implementing this VariablesFbLoadInternalForces function, unless you need faster code)
 
virtual void VariablesFbIncrementMq () override
 Adds M*q (internal masses multiplied current 'qb') to Fb, ex. More...
 
- Public Member Functions inherited from chrono::fea::ChElementBase
virtual void ComputeNodalMass ()
 Compute element's nodal masses.
 
- Public Member Functions inherited from chrono::fea::ChElementCorotational
ChMatrix33Rotation ()
 Access the cumulative rotation matrix of the element, The rotation is expressed relative to initial reference position of element. More...
 

Protected Attributes

std::vector< std::shared_ptr< ChNodeFEAxyz > > nodes
 
std::shared_ptr< ChContinuumElasticMaterial
 
std::vector< ChMatrixDynamic<> > MatrB
 
ChMatrixDynamic StiffnessMatrix
 
ChMatrixNM< double, 4, 4 > mM
 
- Protected Attributes inherited from chrono::fea::ChElement3D
double Volume
 
- Protected Attributes inherited from chrono::fea::ChElementGeneric
ChKblockGeneric Kmatr
 
- Protected Attributes inherited from chrono::fea::ChElementCorotational
ChMatrix33 A
 

Additional Inherited Members

- Public Attributes inherited from chrono::fea::ChElementTetrahedron
int ID
 

Member Function Documentation

virtual void chrono::fea::ChElementTetra_10::ComputeInternalForces ( ChMatrixDynamic<> &  Fi)
overridevirtual

Computes the internal forces (ex.

the actual position of nodes is not in relaxed reference position) and set values in the Fi vector.

Implements chrono::fea::ChElementBase.

virtual void chrono::fea::ChElementTetra_10::ComputeJacobian ( ChMatrixDynamic<> &  Jacobian,
double  zeta1,
double  zeta2,
double  zeta3,
double  zeta4 
)
virtual

Puts inside 'Jacobian' the Jacobian matrix of the element zeta1,...,zeta4 are the four natural coordinates of the integration point note: in case of tetrahedral elements natural coord.

vary in the range 0 ... +1

virtual void chrono::fea::ChElementTetra_10::ComputeKRMmatricesGlobal ( ChMatrix<> &  H,
double  Kfactor,
double  Rfactor = 0,
double  Mfactor = 0 
)
overridevirtual

Sets H as the global stiffness matrix K, scaled by Kfactor.

Optionally, also superimposes global damping matrix R, scaled by Rfactor, and global mass matrix M multiplied by Mfactor.

Implements chrono::fea::ChElementBase.

virtual void chrono::fea::ChElementTetra_10::ComputeMatrB ( ChMatrixDynamic<> &  mmatrB,
double  zeta1,
double  zeta2,
double  zeta3,
double  zeta4,
double &  JacobianDet 
)
virtual

Computes the matrix of partial derivatives and puts data in "mmatrB" evaluated at natural coordinates zeta1,...,zeta4 note: in case of tetrahedral elements natural coord.

vary in the range 0 ... +1

virtual void chrono::fea::ChElementTetra_10::ComputeNF ( const double  U,
const double  V,
const double  W,
ChVectorDynamic<> &  Qi,
double &  detJ,
const ChVectorDynamic<> &  F,
ChVectorDynamic<> *  state_x,
ChVectorDynamic<> *  state_w 
)
overridevirtual

Evaluate N'*F , where N is some type of shape function evaluated at U,V,W coordinates of the volume, each ranging in -1..+1 F is a load, N'*F is the resulting generalized load Returns also det[J] with J=[dx/du,..], that might be useful in gauss quadrature.

Parameters
Uparametric coordinate in volume
Vparametric coordinate in volume
Wparametric coordinate in volume
QiReturn result of N'*F here, maybe with offset block_offset
detJReturn det[J] here
FInput F vector, size is = n.field coords.
state_xif != 0, update state (pos. part) to this, then evaluate Q
state_wif != 0, update state (speed part) to this, then evaluate Q

Implements chrono::ChLoadableUVW.

virtual void chrono::fea::ChElementTetra_10::ComputeStiffnessMatrix ( )
virtual

Computes the local STIFFNESS MATRIX of the element: K = sum (w_i * [B]' * [D] * [B])

!! => because the canonical interval is -1 ... +1, but we want to integrate

virtual int chrono::fea::ChElementTetra_10::GetNdofs ( )
overridevirtual

Gets the number of coordinates in the field used by the referenced nodes.

This is for example the size (n.of rows/columns) of the local stiffness matrix.

Implements chrono::fea::ChElementBase.

virtual int chrono::fea::ChElementTetra_10::GetNodeNdofs ( int  n)
overridevirtual

Get the number of coordinates from the n-th node that are used by this element.

Note that this may be different from the value returned by GetNodeN(n)->Get_ndof_w();

Implements chrono::fea::ChElementBase.

virtual void chrono::fea::ChElementTetra_10::GetStateBlock ( ChMatrixDynamic<> &  mD)
overridevirtual

Fills the D vector (displacement) column matrix with the current field values at the nodes of the element, with proper ordering.

If the D vector has not the size of this->GetNdofs(), it will be resized. For corotational elements, field is assumed in local reference!

Implements chrono::fea::ChElementBase.

ChStrainTensor chrono::fea::ChElementTetra_10::GetStrain ( double  z1,
double  z2,
double  z3,
double  z4 
)

Returns the strain tensor at given parameters.

The tensor is in the original undeformed unrotated reference.

ChStressTensor chrono::fea::ChElementTetra_10::GetStress ( double  z1,
double  z2,
double  z3,
double  z4 
)

Returns the stress tensor at given parameters.

The tensor is in the original undeformed unrotated reference.

virtual bool chrono::fea::ChElementTetra_10::IsTetrahedronIntegrationNeeded ( )
overridevirtual

If true, use quadrature over u,v,w in [0..1] range as tetrahedron volumetric coords, with z=1-u-v-w otherwise use quadrature over u,v,w in [-1..+1] as box isoparametric coords.

Reimplemented from chrono::ChLoadableUVW.

virtual void chrono::fea::ChElementTetra_10::SetupInitial ( ChSystem system)
overridevirtual

Initial setup: This is used mostly to precompute matrices that do not change during the simulation, i.e.

the local stiffness of each element, if any, the mass, etc.

Reimplemented from chrono::fea::ChElementBase.

virtual void chrono::fea::ChElementTetra_10::ShapeFunctions ( ChMatrix<> &  N,
double  r,
double  s,
double  t 
)
virtual

Fills the N shape function matrix with the values of shape functions at zi parametric coordinates, where r=1 at 2nd vertex, s=1 at 3rd, t=1 at 4th.

All ranging in [0...1]. The last, u (=1 at 1st vertex) is computed form the first 3. It stores the Ni(r,s,t) values in a 1 row, 10 columns matrix.

virtual void chrono::fea::ChElementTetra_10::UpdateRotation ( )
overridevirtual

Given the actual position of the nodes, recompute the cumulative rotation matrix A.

CHLDREN CLASSES MUST IMPLEMENT THIS!!!

Implements chrono::fea::ChElementCorotational.