Project Chrono: chrono::fea::ChElementTetraCorot_4_P Class Reference

Public Types | Public Member Functions | List of all members
chrono::fea::ChElementTetraCorot_4_P Class Reference
Chrono::Engine » Finite Element Analysis » Elements

## Description

Tetrahedron FEM element with 4 nodes for scalar fields (for Poisson-like problems).

This is a classical element with linear displacement. EXPERIMENTAL

`#include <ChElementTetraCorot_4.h>`

Inheritance diagram for chrono::fea::ChElementTetraCorot_4_P:
[legend]
Collaboration diagram for chrono::fea::ChElementTetraCorot_4_P:
[legend]

## Public Types
using | ShapeVector = ChMatrixNM<double, 1, 4>

## Public Member Functions
virtual unsigned int | GetNumNodes () override
| Get the number of nodes used by this element.
virtual unsigned int | GetNumCoordsPosLevel () override
| Get the number of coordinates in the field used by the referenced nodes.
virtual unsigned int | GetNodeNumCoordsPosLevel (unsigned int n) override
| Get the number of coordinates from the specified node that are used by this element.
double | GetVolume ()
virtual std::shared_ptr< ChNodeFEAbase > | GetNode (unsigned int n) override
| Access the nth node.
virtual void | SetNodes (std::shared_ptr< ChNodeFEAxyzP > nodeA, std::shared_ptr< ChNodeFEAxyzP > nodeB, std::shared_ptr< ChNodeFEAxyzP > nodeC, std::shared_ptr< ChNodeFEAxyzP > nodeD)
virtual void | Update () override
| Update element at each time step.
virtual void | ShapeFunctions (ShapeVector &N, double z0, double z1, double z2)
| Fills the N shape function matrix with the values of shape functions at zi parametric coordinates, where z0=1 at 1st vertex, z1=1 at second, z2 = 1 at third (volumetric shape functions).
virtual void | GetStateBlock (ChVectorDynamic<> &D) override
| Fills the D vector with the current field values at the nodes of the element, with proper ordering.
double | ComputeVolume ()
virtual void | ComputeStiffnessMatrix ()
| Computes the local STIFFNESS MATRIX of the element: K = Volume * [B]' * [D] * [B].
virtual void | UpdateRotation () override
| Given the actual position of the nodes, recompute the cumulative rotation matrix A.
virtual void | ComputeKRMmatricesGlobal (ChMatrixRef H, double Kfactor, double Rfactor=0, double Mfactor=0) override
| Sets H as the global stiffness matrix K, scaled by Kfactor.
virtual void | ComputeInternalForces (ChVectorDynamic<> &Fi) override
| Computes the internal 'pseudo-forces' and set values in the Fi vector.
void | SetMaterial (std::shared_ptr< ChContinuumPoisson3D > my_material)
| Set the material of the element.
std::shared_ptr< ChContinuumPoisson3D > | GetMaterial ()
const ChMatrixDynamic & | GetMatrB () const
| Get the partial derivatives matrix MatrB and the StiffnessMatrix.
const ChMatrixDynamic & | GetStiffnessMatrix () const
ChVectorN< double, 3 > | GetPgradient ()
| Returns the gradient of P (note that the tetrahedron 4 nodes is a linear element, thus the gradient is constant in the entire volume).
virtual unsigned int | GetLoadableNumCoordsPosLevel () override
| Gets the number of DOFs affected by this element (position part).
virtual unsigned int | GetLoadableNumCoordsVelLevel () override
| Gets the number of DOFs affected by this element (speed part).
virtual void | LoadableGetStateBlockPosLevel (int block_offset, ChState &mD) override
| Gets all the DOFs packed in a single vector (position part).
virtual void | LoadableGetStateBlockVelLevel (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 unsigned int | GetNumFieldCoords () override
| Number of coordinates in the interpolated field: here the {t} temperature.
virtual unsigned int | GetNumSubBlocks () override
| Get the number of DOFs sub-blocks.
virtual unsigned int | GetSubBlockOffset (unsigned int nblock) override
| Get the offset of the specified sub-block of DOFs in global vector.
virtual unsigned int | GetSubBlockSize (unsigned int nblock) override
| Get the size of the specified sub-block of DOFs in global vector.
virtual bool | IsSubBlockActive (unsigned int nblock) const override
| Check if the specified sub-block of DOFs is active.
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 0..+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.
virtual double | GetDensity () override
| Return 0 if not supportable 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.
Public Member Functions inherited from chrono::fea::ChElementGeneric
ChKRMBlock & | Kstiffness ()
| Access the proxy to stiffness, for sparse solver.
virtual void | EleIntLoadResidual_F (ChVectorDynamic<> &R, const double c) override
| Add the internal forces (pasted at global nodes offsets) into a global vector R, multiplied by a scaling factor c, as R += forces * c This default implementation is SLIGHTLY INEFFICIENT.
virtual void | EleIntLoadResidual_Mv (ChVectorDynamic<> &R, const ChVectorDynamic<> &w, const double c) override
| Add 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 * w * c This default implementation is VERY INEFFICIENT.
virtual void | EleIntLoadLumpedMass_Md (ChVectorDynamic<> &Md, double &error, const double c) override
| Adds the lumped mass to a Md vector, representing a mass diagonal matrix.
virtual void | EleIntLoadResidual_F_gravity (ChVectorDynamic<> &R, const ChVector3d &G_acc, const double c) override
| Add the contribution of gravity loads, multiplied by a scaling factor c, as: R += M * g * c This default implementation is VERY INEFFICIENT.
virtual void | ComputeGravityForces (ChVectorDynamic<> &Fg, const ChVector3d &G_acc) override
| Compute the gravitational forces.
virtual void | ComputeMmatrixGlobal (ChMatrixRef M) override
| Calculate the mass matrix, expressed in global reference.
virtual void | InjectKRMMatrices (ChSystemDescriptor &descriptor) override
| Register with the given system descriptor any ChKRMBlock objects associated with this item.
virtual void | LoadKRMMatrices (double Kfactor, double Rfactor, double Mfactor) override
| Compute and load current stiffnes (K), damping (R), and mass (M) matrices in encapsulated ChKRMBlock objects.
virtual void | VariablesFbLoadInternalForces (double factor=1.) override
| Add the internal forces, expressed as nodal forces, into the encapsulated ChVariables.
virtual void | VariablesFbIncrementMq () override
| Add M*q (internal masses multiplied current 'qb').
Public Member Functions inherited from chrono::fea::ChElementBase
virtual unsigned int | GetNumCoordsPosLevelActive ()
| Get the actual number of active degrees of freedom.
virtual unsigned int | GetNodeNumCoordsPosLevelActive (unsigned int n)
| Get the actual number of active coordinates from the specified node that are used by this element.
virtual void | ComputeNodalMass ()
| Compute element's nodal masses.
virtual void | EleDoIntegration ()
| This is optionally implemented if there is some internal state that requires integration.
Public Member Functions inherited from chrono::fea::ChElementCorotational
ChMatrix33 & | Rotation ()
| Access the cumulative rotation matrix of the element.
Public Member Functions inherited from chrono::ChLoadableUVW
virtual bool | IsTrianglePrismIntegrationNeeded ()
| If true, use quadrature over u,v in [0..1] range as triangle natural coords (with z=1-u-v), and use linear quadrature over w in [-1..+1], otherwise use default quadrature over u,v,w in [-1..+1] as box isoparametric coords.

## Additional Inherited Members
Protected Attributes inherited from chrono::fea::ChElementGeneric
ChKRMBlock | Kmatr
Protected Attributes inherited from chrono::fea::ChElementCorotational
ChMatrix33 | A

## Member Function Documentation

## ◆ ComputeInternalForces()

void chrono::fea::ChElementTetraCorot_4_P::ComputeInternalForces | ( | ChVectorDynamic<> & | Fi | ) |
| overridevirtual

Computes the internal 'pseudo-forces' and set values in the Fi vector.

Implements chrono::fea::ChElementBase.

## ◆ ComputeKRMmatricesGlobal()

void chrono::fea::ChElementTetraCorot_4_P::ComputeKRMmatricesGlobal | ( | ChMatrixRef | 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.

## ◆ ComputeNF()

void chrono::fea::ChElementTetraCorot_4_P::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 0..+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

  U | parametric coordinate in volume
  V | parametric coordinate in volume
  W | parametric coordinate in volume
  Qi | Return result of N'*F here, maybe with offset block_offset
  detJ | Return det[J] here
  F | Input F vector, size is = n.field coords.
  state_x | if != 0, update state (pos. part) to this, then evaluate Q
  state_w | if != 0, update state (speed part) to this, then evaluate Q

Implements chrono::ChLoadableUVW.

## ◆ GetDensity()

virtual double chrono::fea::ChElementTetraCorot_4_P::GetDensity | ( |  | ) |
| inlineoverridevirtual

Return 0 if not supportable by ChLoaderVolumeGravity.

Implements chrono::ChLoadableUVW.

## ◆ GetLoadableNumCoordsPosLevel()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetLoadableNumCoordsPosLevel | ( |  | ) |
| inlineoverridevirtual

Gets the number of DOFs affected by this element (position part).

Implements chrono::ChLoadable.

## ◆ GetLoadableNumCoordsVelLevel()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetLoadableNumCoordsVelLevel | ( |  | ) |
| inlineoverridevirtual

Gets the number of DOFs affected by this element (speed part).

Implements chrono::ChLoadable.

## ◆ GetNode()

virtual std::shared_ptr< ChNodeFEAbase > chrono::fea::ChElementTetraCorot_4_P::GetNode | ( | unsigned int | n | ) |
| inlineoverridevirtual

Access the nth node.

Implements chrono::fea::ChElementBase.

## ◆ GetNodeNumCoordsPosLevel()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetNodeNumCoordsPosLevel | ( | unsigned int | n | ) |
| inlineoverridevirtual

Get the number of coordinates from the specified node that are used by this element.

Note that this may be different from the value returned by GetNode(n)->GetNumCoordsVelLevel().

Implements chrono::fea::ChElementBase.

## ◆ GetNumCoordsPosLevel()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetNumCoordsPosLevel | ( |  | ) |
| inlineoverridevirtual

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

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

Implements chrono::fea::ChElementBase.

## ◆ GetNumFieldCoords()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetNumFieldCoords | ( |  | ) |
| inlineoverridevirtual

Number of coordinates in the interpolated field: here the {t} temperature.

Implements chrono::ChLoadable.

## ◆ GetNumNodes()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetNumNodes | ( |  | ) |
| inlineoverridevirtual

Get the number of nodes used by this element.

Implements chrono::fea::ChElementBase.

## ◆ GetNumSubBlocks()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetNumSubBlocks | ( |  | ) |
| inlineoverridevirtual

Get the number of DOFs sub-blocks.

Implements chrono::ChLoadable.

## ◆ GetPgradient()

ChVectorN< double, 3 > chrono::fea::ChElementTetraCorot_4_P::GetPgradient | ( |  | ) |

Returns the gradient of P (note that the tetrahedron 4 nodes is a linear element, thus the gradient is constant in the entire volume).

It is in the original undeformed unrotated reference.

## ◆ GetStateBlock()

void chrono::fea::ChElementTetraCorot_4_P::GetStateBlock | ( | ChVectorDynamic<> & | D | ) |
| overridevirtual

Fills the D vector with the current field values at the nodes of the element, with proper ordering.

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

Implements chrono::fea::ChElementBase.

## ◆ GetSubBlockOffset()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetSubBlockOffset | ( | unsigned int | nblock | ) |
| inlineoverridevirtual

Get the offset of the specified sub-block of DOFs in global vector.

Implements chrono::ChLoadable.

## ◆ GetSubBlockSize()

virtual unsigned int chrono::fea::ChElementTetraCorot_4_P::GetSubBlockSize | ( | unsigned int | nblock | ) |
| inlineoverridevirtual

Get the size of the specified sub-block of DOFs in global vector.

Implements chrono::ChLoadable.

## ◆ IsSubBlockActive()

virtual bool chrono::fea::ChElementTetraCorot_4_P::IsSubBlockActive | ( | unsigned int | nblock | ) | const
| inlineoverridevirtual

Check if the specified sub-block of DOFs is active.

Implements chrono::ChLoadable.

## ◆ IsTetrahedronIntegrationNeeded()

virtual bool chrono::fea::ChElementTetraCorot_4_P::IsTetrahedronIntegrationNeeded | ( |  | ) |
| inlineoverridevirtual

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.

## ◆ LoadableGetStateBlockPosLevel()

void chrono::fea::ChElementTetraCorot_4_P::LoadableGetStateBlockPosLevel | ( | int | block_offset,
|  | ChState & | mD )
| overridevirtual

Gets all the DOFs packed in a single vector (position part).

Implements chrono::ChLoadable.

## ◆ LoadableGetStateBlockVelLevel()

void chrono::fea::ChElementTetraCorot_4_P::LoadableGetStateBlockVelLevel | ( | int | block_offset,
|  | ChStateDelta & | mD )
| overridevirtual

Gets all the DOFs packed in a single vector (speed part).

Implements chrono::ChLoadable.

## ◆ LoadableGetVariables()

void chrono::fea::ChElementTetraCorot_4_P::LoadableGetVariables | ( | std::vector< ChVariables * > & | mvars | ) |
| overridevirtual

Get the pointers to the contained ChVariables, appending to the mvars vector.

Implements chrono::ChLoadable.

## ◆ LoadableStateIncrement()

void chrono::fea::ChElementTetraCorot_4_P::LoadableStateIncrement | ( | const unsigned int | off_x,
|  | ChState & | x_new,
|  | const ChState & | x,
|  | const unsigned int | off_v,
|  | const ChStateDelta & | Dv )
| overridevirtual

Increment all DOFs using a delta.

Implements chrono::ChLoadable.

## ◆ ShapeFunctions()

void chrono::fea::ChElementTetraCorot_4_P::ShapeFunctions | ( | ShapeVector & | N,
|  | double | z0,
|  | double | z1,
|  | double | z2 )
| virtual

Fills the N shape function matrix with the values of shape functions at zi parametric coordinates, where z0=1 at 1st vertex, z1=1 at second, z2 = 1 at third (volumetric shape functions).

The 4th is computed form the first 3. All ranging in [0...1]. NOTE! actually N should be a 3row, 12 column sparse matrix, as N = [n1*eye(3) n2*eye(3) n3*eye(3) n4*eye(3)]; , but to avoid wasting zero and repeated elements, here it stores only the n1 n2 n3 n4 values in a 1 row, 4 columns matrix!

## ◆ Update()

void chrono::fea::ChElementTetraCorot_4_P::Update | ( |  | ) |
| overridevirtual

Update element at each time step.

Reimplemented from chrono::fea::ChElementBase.

## ◆ UpdateRotation()

void chrono::fea::ChElementTetraCorot_4_P::UpdateRotation | ( |  | ) |
| overridevirtual

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

Implements chrono::fea::ChElementCorotational.

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono/fea/ChElementTetraCorot_4.h
- D:/W/B/src/chrono-9.0.1/src/chrono/fea/ChElementTetraCorot_4.cpp