chrono::fea::ChElementBase Class Referenceabstract

Description

Base class for all finite elements, that can be used in the ChMesh physics item.

#include <ChElementBase.h>

Inheritance diagram for chrono::fea::ChElementBase:

Public Member Functions

virtual int GetNnodes ()=0
 Gets the number of nodes used by this element.
 
virtual int GetNdofs ()=0
 Gets the number of coordinates in the field used by the referenced nodes. More...
 
virtual int GetNodeNdofs (int n)=0
 Get the number of coordinates from the n-th node that are used by this element. More...
 
virtual std::shared_ptr< ChNodeFEAbaseGetNodeN (int n)=0
 Access the nth node.
 
virtual void GetStateBlock (ChMatrixDynamic<> &mD)=0
 Fills the D vector (column matrix) with the current field values at the nodes of the element, with proper ordering. More...
 
virtual void ComputeMmatrixGlobal (ChMatrix<> &M)=0
 Sets M as the mass matrix. More...
 
virtual void ComputeNodalMass ()
 Compute element's nodal masses.
 
virtual void ComputeKRMmatricesGlobal (ChMatrix<> &H, double Kfactor, double Rfactor=0, double Mfactor=0)=0
 Sets H as the stiffness matrix K, scaled by Kfactor. More...
 
virtual void ComputeInternalForces (ChMatrixDynamic<> &Fi)=0
 Computes the internal forces (ex. More...
 
virtual void SetupInitial (ChSystem *system)
 Initial setup: This is used mostly to precompute matrices that do not change during the simulation, i.e. More...
 
virtual void Update ()
 Update: this is called at least at each time step. More...
 
virtual void EleIntLoadResidual_F (ChVectorDynamic<> &R, const double c)
 Adds the internal forces (pasted at global nodes offsets) into a global vector R, multiplied by a scaling factor c, as R += forces * c.
 
virtual void EleIntLoadResidual_Mv (ChVectorDynamic<> &R, const ChVectorDynamic<> &w, const double c)
 Adds the product of element mass M by a vector w (pasted at global nodes offsets) into a global vector R, multiplied by a scaling factor c, as R += M * v * c.
 
virtual void InjectKRMmatrices (ChSystemDescriptor &mdescriptor)=0
 Tell to a system descriptor that there are item(s) of type ChKblock in this object (for further passing it to a solver) Basically does nothing, but inherited classes must specialize this. More...
 
virtual void KRMmatricesLoad (double Kfactor, double Rfactor, double Mfactor)=0
 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.)
 Adds the internal forces, expressed as nodal forces, into the encapsulated ChVariables, in the 'fb' part: qf+=forces*factor WILL BE DEPRECATED - see EleIntLoadResidual_F.
 
virtual void VariablesFbIncrementMq ()
 Adds M*q (internal masses multiplied current 'qb') to Fb, ex. More...
 

Member Function Documentation

virtual void chrono::fea::ChElementBase::ComputeInternalForces ( ChMatrixDynamic<> &  Fi)
pure virtual

Computes the internal forces (ex.

the actual position of nodes is not in relaxed reference position) and set values in the Fi vector, with n.rows = n.of dof of element. CHLDREN CLASSES MUST IMPLEMENT THIS!!!

Implemented in chrono::fea::ChElementHexa_20, chrono::fea::ChElementTetra_4_P, chrono::fea::ChElementBeamEuler, chrono::fea::ChElementTetra_10, chrono::fea::ChElementCableANCF, chrono::fea::ChElementHexa_8, chrono::fea::ChElementShellReissner4, chrono::fea::ChElementTetra_4, chrono::fea::ChElementShellANCF, chrono::fea::ChElementBeamANCF, chrono::fea::ChElementBar, and chrono::fea::ChElementSpring.

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

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

Optionally, also superimposes global damping matrix R, scaled by Rfactor, and mass matrix M, scaled by Mfactor. Matrices are expressed in global reference. Corotational elements can take the local Kl & Rl matrices and rotate them. CHLDREN CLASSES MUST IMPLEMENT THIS!!!

Implemented in chrono::fea::ChElementHexa_20, chrono::fea::ChElementTetra_4_P, chrono::fea::ChElementTetra_10, chrono::fea::ChElementCableANCF, chrono::fea::ChElementBeamEuler, chrono::fea::ChElementShellReissner4, chrono::fea::ChElementHexa_8, chrono::fea::ChElementShellANCF, chrono::fea::ChElementTetra_4, chrono::fea::ChElementBeamANCF, chrono::fea::ChElementBar, and chrono::fea::ChElementSpring.

virtual void chrono::fea::ChElementBase::ComputeMmatrixGlobal ( ChMatrix<> &  M)
pure virtual

Sets M as the mass matrix.

The matrix is expressed in global reference. CHLDREN CLASSES MUST IMPLEMENT THIS!!!

Implemented in chrono::fea::ChElementCableANCF, chrono::fea::ChElementShellReissner4, chrono::fea::ChElementShellANCF, chrono::fea::ChElementBeamANCF, and chrono::fea::ChElementGeneric.

virtual int chrono::fea::ChElementBase::GetNodeNdofs ( int  n)
pure virtual
virtual void chrono::fea::ChElementBase::GetStateBlock ( ChMatrixDynamic<> &  mD)
pure virtual

Fills the D vector (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! CHLDREN CLASSES MUST IMPLEMENT THIS!!!

Implemented in chrono::fea::ChElementTetra_4_P, chrono::fea::ChElementShellReissner4, chrono::fea::ChElementShellANCF, chrono::fea::ChElementBeamEuler, chrono::fea::ChElementBeamANCF, chrono::fea::ChElementHexa_20, chrono::fea::ChElementCableANCF, chrono::fea::ChElementTetra_10, chrono::fea::ChElementHexa_8, chrono::fea::ChElementTetra_4, chrono::fea::ChElementBar, and chrono::fea::ChElementSpring.

virtual void chrono::fea::ChElementBase::InjectKRMmatrices ( ChSystemDescriptor mdescriptor)
pure virtual

Tell to a system descriptor that there are item(s) of type ChKblock in this object (for further passing it to a solver) Basically does nothing, but inherited classes must specialize this.

Implemented in chrono::fea::ChElementGeneric.

virtual void chrono::fea::ChElementBase::KRMmatricesLoad ( double  Kfactor,
double  Rfactor,
double  Mfactor 
)
pure virtual

Adds the current stiffness K and damping R and mass M matrices in encapsulated ChKblock item(s), if any.

The K, R, M matrices are added with scaling values Kfactor, Rfactor, Mfactor.

Implemented in chrono::fea::ChElementGeneric.

virtual void chrono::fea::ChElementBase::SetupInitial ( ChSystem system)
virtual
virtual void chrono::fea::ChElementBase::Update ( )
virtual

Update: this is called at least at each time step.

If the element has to keep updated some auxiliary data, such as the rotation matrices for corotational approach, this is the proper place.

Reimplemented in chrono::fea::ChElementShellReissner4, chrono::fea::ChElementShellANCF, chrono::fea::ChElementBeamANCF, chrono::fea::ChElementBeamEuler, chrono::fea::ChElementCableANCF, chrono::fea::ChElementHexahedron, and chrono::fea::ChElementTetrahedron.

virtual void chrono::fea::ChElementBase::VariablesFbIncrementMq ( )
virtual

Adds M*q (internal masses multiplied current 'qb') to Fb, ex.

if qb is initialized with v_old using VariablesQbLoadSpeed, this method can be used in timestepping schemes that do: M*v_new = M*v_old + forces*dt WILL BE DEPRECATED

Reimplemented in chrono::fea::ChElementGeneric.