Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
lin3DShell4 Class Reference

Class for creating a 3D linearized four-node shell element in a mesh. More...

#include <lin3DShell4.hpp>

Inheritance diagram for lin3DShell4:
Collaboration diagram for lin3DShell4:

Public Member Functions

 lin3DShell4 (const std::vector< unsigned int > nodes, std::unique_ptr< Section > &section, const std::string quadrature="GAUSS", const unsigned int nGauss=9)
 Creates a lin3DShell4 in a finite element Mesh. More...
 
 ~lin3DShell4 ()
 Destroys this lin3DShell4 object. More...
 
void CommitState ()
 Save the material states in the element. More...
 
void ReverseState ()
 Reverse the material/section states to previous converged state in this element. More...
 
void InitialState ()
 Brings the material/section state to its initial state in this element. More...
 
void UpdateState ()
 Update the material states in the element. More...
 
void SetDomain (std::map< unsigned int, std::shared_ptr< Node > > &nodes)
 Sets the finite element dependance among objects. More...
 
void SetDamping (const std::shared_ptr< Damping > &damping)
 Sets the damping model. More...
 
std::vector< unsigned int > GetTotalDegreeOfFreedom () const
 Gets the list of total-degree of freedom of this Element. More...
 
Eigen::MatrixXd GetStrain () const
 Gets the material/section (generalised) strain. More...
 
Eigen::MatrixXd GetStress () const
 Gets the material/section (generalised) stress. More...
 
Eigen::MatrixXd GetStrainRate () const
 Gets the material/section (generalised) strain-rate. More...
 
Eigen::MatrixXd GetStrainAt (double x3, double x2) const
 Gets the material strain in section at coordinate (x3,x2). More...
 
Eigen::MatrixXd GetStressAt (double x3, double x2) const
 Gets the material stress in section at coordinate (x3,x2). More...
 
Eigen::VectorXd GetVTKResponse (std::string response) const
 Gets the element internal response in VTK format for Paraview display. More...
 
double ComputeEnergy ()
 Computes the element energy for a given deformation. More...
 
Eigen::MatrixXd ComputeMassMatrix ()
 Compute the lumped/consistent mass matrix of the element. More...
 
Eigen::MatrixXd ComputeStiffnessMatrix ()
 Compute the stiffness matrix of the element using gauss-integration. More...
 
Eigen::MatrixXd ComputeDampingMatrix ()
 Compute the damping matrix of the element using gauss-integration. More...
 
Eigen::MatrixXd ComputePMLMatrix ()
 Compute the PML history matrix using gauss-integration. More...
 
Eigen::VectorXd ComputeInternalForces ()
 Compute the internal (elastic) forces acting on the element. More...
 
Eigen::VectorXd ComputeInternalDynamicForces ()
 Compute the elastic, inertial, and viscous forces acting on the element. More...
 
Eigen::VectorXd ComputeSurfaceForces (const std::shared_ptr< Load > &surface, unsigned int face)
 Compute the surface forces acting on the element. More...
 
Eigen::VectorXd ComputeBodyForces (const std::shared_ptr< Load > &body, unsigned int k=0)
 Compute the body forces acting on the element. More...
 
Eigen::VectorXd ComputeDomainReductionForces (const std::shared_ptr< Load > &drm, unsigned int k)
 Compute the domain reduction forces acting on the element. More...
 
- Public Member Functions inherited from Element
 Element (std::string name, const std::vector< unsigned int > nodes, unsigned int ndofs, unsigned int VTKcell, unsigned int SVLcell)
 Creates an Element in a finite element Mesh. More...
 
virtual ~Element ()=0
 Destroys this Element object. More...
 
std::string GetName () const
 Gets the Element Name. More...
 
unsigned int GetVTKCellType () const
 Gets the Element VTK cell type. More...
 
unsigned int GetVTKGroupType () const
 Gets the Element VTK group type. More...
 
unsigned int GetNumberOfNodes () const
 Returns the number of nodes in element. More...
 
unsigned int GetNumberOfDegreeOfFreedom () const
 Returns total number of degree of freedom in the element. More...
 
const std::vector< unsigned int > & GetNodes () const
 Returns the Node Connectivity Indexes. More...
 
bool HasFixedNode (const std::vector< std::shared_ptr< Node > > &nodes) const
 Returns if the element has fixed nodes. More...
 

Private Member Functions

double ComputeTotalMass ()
 Computes the total element mass. More...
 
Eigen::MatrixXd ComputeLocalAxes () const
 Compute/update the local axis-1-2-3 of the element. More...
 
Eigen::MatrixXd ComputeRotation () const
 Compute/update the projection axis of the element. More...
 
Eigen::MatrixXd ComputeLocalCoordinates () const
 Compute/update the node coordinates in axis-1-2-3 of the element. More...
 
Eigen::VectorXd ComputeStrain (Eigen::MatrixXd &BM12, Eigen::MatrixXd &xyloc, double ri, double si)
 Update strain in the element. More...
 
Eigen::VectorXd ComputeStrainRate (Eigen::MatrixXd &BM12, Eigen::MatrixXd &xyloc, double ri, double si)
 Update strain rate in the element. More...
 
Eigen::MatrixXd ComputeConstantTensionMatrix ()
 Correction matrix to Enforce Constant Tension for membrane effect (wilson). More...
 
void AssemblePlateMembraneEffects (Eigen::MatrixXd &A, const Eigen::MatrixXd &Am, const Eigen::MatrixXd &Ap)
 Assembles the membrane and plate effects into a single matrix. More...
 
void ConstantTensionMatrix (const double ri, const double si, const Eigen::MatrixXd &xyloc, Eigen::MatrixXd &BM12, Eigen::MatrixXd &Jij)
 Evaluates the Constant Tension matrix and Jacobian for membrane effect at a given Gauss point. More...
 
void ComputeLoadShapeFunctionMatrix (const double ri, const double si, const Eigen::MatrixXd &xyloc, Eigen::MatrixXd &Hij, Eigen::MatrixXd &Jij)
 Evaluates the shape function matrix for plate at a given Gauss point. More...
 
void ComputePlateShapeFunctionMatrix (const double ri, const double si, const Eigen::MatrixXd &xyloc, Eigen::MatrixXd &Hij, Eigen::MatrixXd &Jij)
 Evaluates the shape function matrix for plate at a given Gauss point. More...
 
void ComputeMembraneShapeFunctionMatrix (const double ri, const double si, const Eigen::MatrixXd &xyloc, Eigen::MatrixXd &Hij, Eigen::MatrixXd &Jij)
 Evaluates the shape function matrix for membrane at a given Gauss point. More...
 
void ComputePlateStrainDisplacementMatrix (const double ri, const double si, const Eigen::MatrixXd &xyloc, Eigen::MatrixXd &Bij, Eigen::MatrixXd &Jij)
 Evaluates the strain-displacement matrix for a plate effect at a given Gauss point. More...
 
void ComputeMembraneStrainDisplacementMatrix (const double ri, const double si, const Eigen::MatrixXd &xyloc, const Eigen::MatrixXd &Bij, Eigen::MatrixXd &BM12, Eigen::MatrixXd &Pij, Eigen::MatrixXd &Jij)
 Evaluates the strain-displacement matrix for membrane effect at a given Gauss point. More...
 
Eigen::MatrixXd ComputeInitialStiffnessMatrix ()
 Compute the initial stiffness matrix of the element. More...
 

Private Attributes

std::shared_ptr< DampingtheDamping
 The Damping model. More...
 
std::vector< std::shared_ptr< Node > > theNodes
 The Element's Nodes. More...
 
std::vector< std::unique_ptr< Section > > theSection
 The Element's Sections. More...
 
std::unique_ptr< QuadratureRuleQuadraturePoints
 Coordinate of Gauss points. More...
 

Detailed Description

Class for creating a 3D linearized four-node shell element in a mesh.

See also
Element.hpp Mesh.hpp

Constructor & Destructor Documentation

◆ lin3DShell4()

lin3DShell4::lin3DShell4 ( const std::vector< unsigned int >  nodes,
std::unique_ptr< Section > &  section,
const std::string  quadrature = "GAUSS",
const unsigned int  nGauss = 9 
)

Creates a lin3DShell4 in a finite element Mesh.

Parameters
nodesThe Node connectivity array of this Element.
sectionPointer to the Section that this Element is made out of.
nGaussNumber of Gauss-integration points.
quadratureThe integration rule to be employed.
Note
More details can be found at lin3DShell4.
See also
lin3DShell4::theNodes, lin3DShell4::theMaterial, lin3DShell4::QuadraturePoints.

◆ ~lin3DShell4()

lin3DShell4::~lin3DShell4 ( )

Destroys this lin3DShell4 object.

Member Function Documentation

◆ AssemblePlateMembraneEffects()

void lin3DShell4::AssemblePlateMembraneEffects ( Eigen::MatrixXd &  A,
const Eigen::MatrixXd &  Am,
const Eigen::MatrixXd &  Ap 
)
private

Assembles the membrane and plate effects into a single matrix.

Parameters
AThe matrix with the shell behavior.
AmThe matrix with the membrane contribution.
ApThe matrix with the plate contribution.

◆ CommitState()

void lin3DShell4::CommitState ( )
virtual

Save the material states in the element.

Note
This function sets the trial states as converged ones in Material.

Implements Element.

◆ ComputeBodyForces()

Eigen::VectorXd lin3DShell4::ComputeBodyForces ( const std::shared_ptr< Load > &  body,
unsigned int  k = 0 
)
virtual

Compute the body forces acting on the element.

Parameters
bodyPointer to the Load object that contains this information.
kThe time step at which the body load is evaluated.
Returns
Vector with the Element surface force.
Note
The body force vector can be revisited in ZeroLength1D.
See also
Assembler::ComputeExternalForceVector(), Integrator::ComputeEffectiveForce().

Implements Element.

◆ ComputeConstantTensionMatrix()

Eigen::MatrixXd lin3DShell4::ComputeConstantTensionMatrix ( )
private

Correction matrix to Enforce Constant Tension for membrane effect (wilson).

◆ ComputeDampingMatrix()

Eigen::MatrixXd lin3DShell4::ComputeDampingMatrix ( )
virtual

Compute the damping matrix of the element using gauss-integration.

Returns
Matrix with the Element damping matrix.
Note
The damping matrix can be revisited in lin3DShell4.
See also
Assembler::ComputeDampingMatrix(), Integrator::ComputeEffectiveStiffness().

Implements Element.

◆ ComputeDomainReductionForces()

Eigen::VectorXd lin3DShell4::ComputeDomainReductionForces ( const std::shared_ptr< Load > &  drm,
unsigned int  k 
)
virtual

Compute the domain reduction forces acting on the element.

Parameters
drmPointer to the DRM Load object that contains this information.
kThe time step at which the body load is evaluated.
Returns
Vector with the Element domain reduction forces.
Note
The DRM force vector can be revisited in ZeroLength1D.
See also
Assembler::ComputeExternalForceVector(), Integrator::ComputeEffectiveForce().

Implements Element.

◆ ComputeEnergy()

double lin3DShell4::ComputeEnergy ( )
virtual

Computes the element energy for a given deformation.

Returns
Scalar with the element deformation energy.

Implements Element.

◆ ComputeInitialStiffnessMatrix()

Eigen::MatrixXd lin3DShell4::ComputeInitialStiffnessMatrix ( )
private

Compute the initial stiffness matrix of the element.

Returns
Matrix with the initial Tanget stiffness matrix.
Note
This matrix is computed when the strain deformation is zero.

◆ ComputeInternalDynamicForces()

Eigen::VectorXd lin3DShell4::ComputeInternalDynamicForces ( )
virtual

Compute the elastic, inertial, and viscous forces acting on the element.

Returns
Vector with the Element dynamic internal force.
Note
The internal force vector can be revisited in Element.
See also
Assembler::ComputeDynamicInternalForceVector().

Implements Element.

◆ ComputeInternalForces()

Eigen::VectorXd lin3DShell4::ComputeInternalForces ( )
virtual

Compute the internal (elastic) forces acting on the element.

Returns
Vector with the Element internal force.
Note
The internal force vector can be revisited in lin3DShell4.
See also
Assembler::ComputeInternalForceVector(), Integrator::ComputeEffectiveForce().

Implements Element.

◆ ComputeLoadShapeFunctionMatrix()

void lin3DShell4::ComputeLoadShapeFunctionMatrix ( const double  ri,
const double  si,
const Eigen::MatrixXd &  xyloc,
Eigen::MatrixXd &  Hij,
Eigen::MatrixXd &  Jij 
)
private

Evaluates the shape function matrix for plate at a given Gauss point.

Parameters
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.
xylocNode coordinates in 3D projected into r-s plane.
HijThe shape function matrix evaluated at (ri,si).
JijThe Jacobian matrix evaluated at (ri,si).

◆ ComputeLocalAxes()

Eigen::MatrixXd lin3DShell4::ComputeLocalAxes ( ) const
private

Compute/update the local axis-1-2-3 of the element.

Returns
Matrix with the local axis transformation.
Note
Axes transformation are according to lin3DShell4.

◆ ComputeLocalCoordinates()

Eigen::MatrixXd lin3DShell4::ComputeLocalCoordinates ( ) const
private

Compute/update the node coordinates in axis-1-2-3 of the element.

return The xyloc Node coordinates in 3D projected into r-s plane.

◆ ComputeMassMatrix()

Eigen::MatrixXd lin3DShell4::ComputeMassMatrix ( )
virtual

Compute the lumped/consistent mass matrix of the element.

Returns
Matrix with the Element mass matrix.
Note
The mass matrix can be revisited in lin3DShell4.
See also
Assembler::ComputeMassMatrix(), Integrator::ComputeEffectiveStiffness().

Implements Element.

◆ ComputeMembraneShapeFunctionMatrix()

void lin3DShell4::ComputeMembraneShapeFunctionMatrix ( const double  ri,
const double  si,
const Eigen::MatrixXd &  xyloc,
Eigen::MatrixXd &  Hij,
Eigen::MatrixXd &  Jij 
)
private

Evaluates the shape function matrix for membrane at a given Gauss point.

Parameters
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.
xylocNode coordinates in 3D projected into r-s plane.
HijThe membrane shape function matrix evaluated at (ri,si).
JijThe Jacobian matrix evaluated at (ri,si).

◆ ComputeMembraneStrainDisplacementMatrix()

void lin3DShell4::ComputeMembraneStrainDisplacementMatrix ( const double  ri,
const double  si,
const Eigen::MatrixXd &  xyloc,
const Eigen::MatrixXd &  Bij,
Eigen::MatrixXd &  BM12,
Eigen::MatrixXd &  Pij,
Eigen::MatrixXd &  Jij 
)
private

Evaluates the strain-displacement matrix for membrane effect at a given Gauss point.

Parameters
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.
xylocNode coordinates in 3D projected into r-s plane.
BijThe membrane strain-displacement matrix evaluated at (ri,si).
BM12Matrix to enforce constant Tension (wilson) inside element.
PijThe membrane penalty matrix evaluated at (ri,si).
JijThe Jacobian matrix evaluated at (ri,si).

◆ ComputePlateShapeFunctionMatrix()

void lin3DShell4::ComputePlateShapeFunctionMatrix ( const double  ri,
const double  si,
const Eigen::MatrixXd &  xyloc,
Eigen::MatrixXd &  Hij,
Eigen::MatrixXd &  Jij 
)
private

Evaluates the shape function matrix for plate at a given Gauss point.

Parameters
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.
xylocNode coordinates in 3D projected into r-s plane.
HijThe plate shape function matrix evaluated at (ri,si).
JijThe Jacobian matrix evaluated at (ri,si).

◆ ComputePlateStrainDisplacementMatrix()

void lin3DShell4::ComputePlateStrainDisplacementMatrix ( const double  ri,
const double  si,
const Eigen::MatrixXd &  xyloc,
Eigen::MatrixXd &  Bij,
Eigen::MatrixXd &  Jij 
)
private

Evaluates the strain-displacement matrix for a plate effect at a given Gauss point.

Parameters
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.
xylocNode coordinates in 3D projected into r-s plane.
BijThe plate strain-displacement matrix evaluated at (ri,si).
JijThe Jacobian matrix evaluated at (ri,si).

◆ ComputePMLMatrix()

Eigen::MatrixXd lin3DShell4::ComputePMLMatrix ( )
virtual

Compute the PML history matrix using gauss-integration.

Returns
Matrix with the PML Element matrix.
Note
The PML matrix is none existent for this element.
See also
Assembler::ComputePMLHistoryMatrix(), Integrator::ComputeEffectiveStiffness().

Implements Element.

◆ ComputeRotation()

Eigen::MatrixXd lin3DShell4::ComputeRotation ( ) const
private

Compute/update the projection axis of the element.

Returns
Matrix with the local axes x1-x2-x3 transformation.
Note
Axes transformation are according to lin3DShell4.

◆ ComputeStiffnessMatrix()

Eigen::MatrixXd lin3DShell4::ComputeStiffnessMatrix ( )
virtual

Compute the stiffness matrix of the element using gauss-integration.

Returns
Matrix with the Element stiffness matrix.
Note
The stiffness matrix can be revisited in lin3DShell4.
See also
Assembler::ComputeStiffnessMatrix(), Integrator::ComputeEffectiveStiffness().

Implements Element.

◆ ComputeStrain()

Eigen::VectorXd lin3DShell4::ComputeStrain ( Eigen::MatrixXd &  BM12,
Eigen::MatrixXd &  xyloc,
double  ri,
double  si 
)
private

Update strain in the element.

Parameters
xylocNode coordinates in 3D projected into r-s plane.
BM12Matrix to enforce constant Tension (wilson) inside element.
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.

◆ ComputeStrainRate()

Eigen::VectorXd lin3DShell4::ComputeStrainRate ( Eigen::MatrixXd &  BM12,
Eigen::MatrixXd &  xyloc,
double  ri,
double  si 
)
private

Update strain rate in the element.

Parameters
xylocNode coordinates in 3D projected into r-s plane.
BM12Matrix to enforce constant Tension (wilson) inside element.
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.

◆ ComputeSurfaceForces()

Eigen::VectorXd lin3DShell4::ComputeSurfaceForces ( const std::shared_ptr< Load > &  surface,
unsigned int  face 
)
virtual

Compute the surface forces acting on the element.

Parameters
surfacePointer to the Load object that contains this information.
kThe time step at which the surface load is evaluated.
Returns
Vector with the Element surface force.
Note
The surface force vector can be revisited in ZeroLength1D.
See also
Assembler::ComputeExternalForceVector(), Integrator::ComputeEffectiveForce().

Implements Element.

◆ ComputeTotalMass()

double lin3DShell4::ComputeTotalMass ( )
private

Computes the total element mass.

◆ ConstantTensionMatrix()

void lin3DShell4::ConstantTensionMatrix ( const double  ri,
const double  si,
const Eigen::MatrixXd &  xyloc,
Eigen::MatrixXd &  BM12,
Eigen::MatrixXd &  Jij 
)
private

Evaluates the Constant Tension matrix and Jacobian for membrane effect at a given Gauss point.

Parameters
riThe i-th Gauss coordinate in the r-axis.
siThe i-th Gauss coordinate in the s-axis.
xylocNode coordinates in 3D projected into r-s plane.
BM12Matrix to enforce constant Tension (wilson) inside element.
JijThe Jacobian matrix evaluated at (ri,si).

◆ GetStrain()

Eigen::MatrixXd lin3DShell4::GetStrain ( ) const
virtual

Gets the material/section (generalised) strain.

Returns
Matrix with the strain at each integration point.
Note
The index (i,j) are the strain and Gauss-point respectively.

Implements Element.

◆ GetStrainAt()

Eigen::MatrixXd lin3DShell4::GetStrainAt ( double  x3,
double  x2 
) const
virtual

Gets the material strain in section at coordinate (x3,x2).

Parameters
x3Local coordinate along the x3-axis.
x2Local coordinate along the x2-axis.
Returns
Matrix with the strain at coordinate (x3,x2).
Note
The strains are interpolated at this coordinate.

Implements Element.

◆ GetStrainRate()

Eigen::MatrixXd lin3DShell4::GetStrainRate ( ) const
virtual

Gets the material/section (generalised) strain-rate.

Returns
Matrix with the strain-rate at each integration point.
Note
The index (i,j) are the strain-rate and Gauss-point respectively.

Implements Element.

◆ GetStress()

Eigen::MatrixXd lin3DShell4::GetStress ( ) const
virtual

Gets the material/section (generalised) stress.

Returns
Matrix with the stress at each integration point.
Note
The index (i,j) are the stress and Gauss-point respectively.

Implements Element.

◆ GetStressAt()

Eigen::MatrixXd lin3DShell4::GetStressAt ( double  x3,
double  x2 
) const
virtual

Gets the material stress in section at coordinate (x3,x2).

Parameters
x3Local coordinate along the x3-axis.
x2Local coordinate along the x2-axis.
Returns
Matrix with the stresses at coordinate (x3,x2).
Note
The stresses are interpolated at this coordinate.

Implements Element.

◆ GetTotalDegreeOfFreedom()

std::vector<unsigned int> lin3DShell4::GetTotalDegreeOfFreedom ( ) const
virtual

Gets the list of total-degree of freedom of this Element.

Returns
Vector with the list of degree-of-freedom of this Element.

Implements Element.

◆ GetVTKResponse()

Eigen::VectorXd lin3DShell4::GetVTKResponse ( std::string  response) const
virtual

Gets the element internal response in VTK format for Paraview display.

Parameters
responseThe response to be display in Paraview.
Returns
Vector with the response at the Element center.
Note
The current responses are: "Strain", "Stress".

Implements Element.

◆ InitialState()

void lin3DShell4::InitialState ( )
virtual

Brings the material/section state to its initial state in this element.

Note
This function returns the meterial states to the beginning.

Implements Element.

◆ ReverseState()

void lin3DShell4::ReverseState ( )
virtual

Reverse the material/section states to previous converged state in this element.

Note
This function returns the trial states to previous converged states at the Material level.

Implements Element.

◆ SetDamping()

void lin3DShell4::SetDamping ( const std::shared_ptr< Damping > &  damping)
virtual

Sets the damping model.

Parameters
dampingPointer to the damping model.
Note
Several Element objects can share the same damping model.

Implements Element.

◆ SetDomain()

void lin3DShell4::SetDomain ( std::map< unsigned int, std::shared_ptr< Node > > &  nodes)
virtual

Sets the finite element dependance among objects.

Parameters
nodesThe Node list of the Mesh object.
Note
This function sets the relation between Node and Element objects.
See also
lin2DQuad4::theNodes.

Implements Element.

◆ UpdateState()

void lin3DShell4::UpdateState ( )
virtual

Update the material states in the element.

Note
This function update the trial states at the Material level.

Implements Element.

Member Data Documentation

◆ QuadraturePoints

std::unique_ptr<QuadratureRule> lin3DShell4::QuadraturePoints
private

Coordinate of Gauss points.

◆ theDamping

std::shared_ptr<Damping> lin3DShell4::theDamping
private

The Damping model.

◆ theNodes

std::vector<std::shared_ptr<Node> > lin3DShell4::theNodes
private

The Element's Nodes.

◆ theSection

std::vector<std::unique_ptr<Section> > lin3DShell4::theSection
private

The Element's Sections.