Elas2DQ4 Class Reference
[Solid Mechanics]
#include <Elas2DQ4.h>

Detailed Description
To build element equations for 2-D linearized elasticity using 4-node quadrilaterals.
This class enables building finite element arrays for linearized isotropic elasticity problem in 2-D domains using 4-Node quadrilaterals.
Unilateral contact is handled using a penalty function.
Note that members calculating element arrays have as an argument a double coef that is multiplied by the contribution of the current element. This makes possible testing different algorithms.
Public Member Functions | |
| T_ * | A () |
| Return element matrix as a C-array. | |
| T_ * | b () |
| Return element right-hand side as a C-array. | |
| void | BodyRHS (const Vect< double > &bf, int opt=LOCAL_ARRAY) |
| Add body right-hand side term to right hand side. | |
| void | BodyRHS (UserData< double > &ud) |
| Add body right-hand side term to right hand side after multiplication by coef. | |
| void | BoundaryRHS (const Vect< double > &sf, int opt=LOCAL_ARRAY) |
| Add boundary right-hand side term to right hand side. | |
| void | BoundaryRHS (UserData< double > &ud) |
| Add boundary right-hand side term to right hand side after multiplication by coef. | |
| void | Deviator (double coef=1.) |
| Add element deviatoric matrix to left-hand side after multiplication by coef. | |
| void | DeviatorToRHS (double coef=1.) |
| Add element deviatoric contribution to right-hand side after multiplication by coef. | |
| void | DiagBC (int dof_type=NODE_DOF, int dof=0) |
| Update element matrix to impose bc by diagonalization technique. | |
| void | Dilatation (double coef=1.) |
| Add element dilatational contribution to left-hand side after multiplication by coef. | |
| void | DilatationToRHS (double coef=1.) |
| Add element dilatational contribution to right hand side after multiplication by coef. | |
| LocalMatrix< T_, NEE_, NEE_ > & | EA () |
| Return element matrix as a LocalMatrix instance. | |
| LocalVect< T_, NEE_ > & | Eb () |
| Return element right-hand side as a LocalVect instance. | |
| Elas2DQ4 (const Side *side, const Vect< double > &u, const double &time=0.) | |
| Constructor using side and previous time data. | |
| Elas2DQ4 (const Element *element, const Vect< double > &u, const double &time=0.) | |
| Constructor using element and previous time data. | |
| Elas2DQ4 (const Side *sd) | |
| Constructor using side data. | |
| Elas2DQ4 (const Element *el) | |
| Constructor using element data. | |
| Elas2DQ4 () | |
| Default Constructor Constructs an empty equation. | |
| void | ElementVector (const Vect< T_ > &b, int dof=0, int dof_type=NODE_DOF) |
| Localize Element Vector. | |
| LocalVect< T_, NEE_ > & | Ep () |
| Return element matrix as a C-array. | |
| LinearSolver< T_ > & | getLinearSolver () |
| Return reference to linear solver instance. | |
| size_t | getNbEq () const |
| Return number of element equations. | |
| size_t | getNbNodes () const |
| Return number of element nodes. | |
| void | LMass (double coef) |
| Add element lumped mass contribution to matrix and right-hand side after multiplication by coef. | |
| void | LMassToLHS (double coef=1.) |
| Add element lumped mass contribution to matrix after multiplication by coef. | |
| void | LMassToRHS (double coef=1.) |
| Add element lumped mass contribution to right-hand side after multiplication by coef. | |
| void | LocalNodeVector (AbsVect< T_ > *b) |
| Localize Element Vector from a NodeVect instance. | |
| void | Mass (double coef=1.) |
| Add element consistent mass contribution to matrix and right-hand side after multiplication by coef. | |
| virtual void | MassToLHS (double coef=1) |
| Add consistent mass contribution to left-hand side. | |
| virtual void | MassToRHS (double coef=1) |
| Add consistent mass contribution to right-hand side. | |
| void | PlaneStrain (double E, double nu) |
| Set plane strain hypothesis by giving values of Young's modulus and Poisson ratio. | |
| void | PlaneStrain () |
| Set plane strain hypothesis. | |
| void | PlaneStress (double E, double nu) |
| Set plane stress hypothesis by giving values of Young's modulus and Poisson ratio. | |
| void | PlaneStress () |
| Set plane stress hypothesis. | |
| T_ * | Prev () |
| Return element matrix as a C-array. | |
| LocalMatrix< T_, NSE_, NSE_ > & | SA () |
| Return side matrix as a LocalMatrix instance. | |
| void | setDeviator () |
| Add deviator matrix to left and/or right-hand side taking into account time integration scheme. | |
| void | setInitialSolution (const Vect< T_ > &u) |
| Set initial solution (previous time step). | |
| void | setLumpedMass () |
| Add lumped mass contribution to left and right-hand sides taking into account time integration scheme. | |
| void | setMass () |
| Add consistent mass contribution to left and right-hand sides taking into account time integration scheme. | |
| double | setMaterialProperty (const string &exp, const string &prop) |
| Define a material property by an algebraic expression. | |
| void | setMesh (class Mesh &m) |
| Define mesh and renumber DOFs after removing imposed ones. | |
| void | setStiffness () |
| Add convection contribution to left and/or right-hand side taking into account time integration scheme. | |
| void | SideVector (const Vect< T_ > &b) |
| Localize Side Vector. | |
| void | SignoriniContact (UserData< double > &ud, double coef=1.e07) |
| Penalty Signorini contact contribution to matrix and right-hand side. | |
| virtual void | Stiffness (double coef=1) |
| Add stiffness matrix to left-hand side taking into account time integration scheme. | |
| virtual void | StiffnessToRHS (double coef=1) |
| Add stiffness matrix to right-hand side taking into account time integration scheme. | |
| void | Strain (LocalVect< double, 3 > &eps) |
| Calculate strains at element barycenter. | |
| void | Stress (LocalVect< double, 3 > &sigma, LocalVect< double, 3 > &s, double &vm) |
| Calculate principal stresses and Von-Mises stress at element barycenter. | |
| void | Stress (LocalVect< double, 3 > &s, double &vm) |
| Calculate principal stresses and Von-Mises stress at element barycenter. | |
| void | updateBC (const Vect< T_ > &bc) |
| Update Right-Hand side by taking into account essential boundary conditions. | |
| ~Elas2DQ4 () | |
| Destructor. | |
Protected Member Functions | |
| void | Density (const char *exp) |
| Set density given by an algebraic expression. | |
| void | Density (const double &rho) |
| Set (constant) density. | |
| void | Init (const Side *sd) |
| Set side arrays to zero. | |
| void | Init (const Element *el) |
| Set element arrays to zero. | |
| void | Poisson (const char *exp) |
| Set Poisson ratio given by an algebraic expression. | |
| void | Poisson (const double &nu) |
| Set (constant) Poisson ratio. | |
| void | setMaterial () |
| Set material properties. | |
| void | Young (const char *exp) |
| Set Young modulus given by an algebraic expression. | |
| void | Young (const double &E) |
| set (constant) Young modulus | |
Constructor & Destructor Documentation
| Elas2DQ4 | ( | ) |
Default Constructor Constructs an empty equation.
Constructor using element and previous time data.
- Parameters:
-
[in] element Pointer to element [in] u Vect instance containing solution at previous time step [in] time Current time value
Constructor using side and previous time data.
- Parameters:
-
[in] side Pointer to side [in] u Vect instance containing solution at previous time step [in] time Current time value
Member Function Documentation
| void BodyRHS | ( | const Vect< double > & | bf, | |
| int | opt = LOCAL_ARRAY | |||
| ) |
Add body right-hand side term to right hand side.
- Parameters:
-
[in] bf Vector containing source at element nodes (DOF by DOF). [in] opt Vector is local (LOCAL_ARRAY) with size 8 or global (GLOBAL_ARRAY) with size = Number of element DOF.
| void BodyRHS | ( | UserData< double > & | ud | ) |
Add body right-hand side term to right hand side after multiplication by coef.
Body forces are deduced from UserData instance ud.
| void BoundaryRHS | ( | const Vect< double > & | sf, | |
| int | opt = LOCAL_ARRAY | |||
| ) |
Add boundary right-hand side term to right hand side.
- Parameters:
-
[in] sf Vector containing source at element nodes (DOF by DOF). [in] opt Vector is local (LOCAL_ARRAY) with size 4 or global (GLOBAL_ARRAY) with size = Number of side DOF.
| void BoundaryRHS | ( | UserData< double > & | ud | ) |
Add boundary right-hand side term to right hand side after multiplication by coef.
Boundary forces are deduced from UserData instance ud.
| void DiagBC | ( | int | dof_type = NODE_DOF, |
|
| int | dof = 0 | |||
| ) | [inherited] |
Update element matrix to impose bc by diagonalization technique.
- Parameters:
-
[in] dof_type DOF type option. To choose among the enumerated values: - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
[in] dof DOF setting: - = 0, All DOFs are taken into account [ default ]
- != 0, Only DOF No. dof is handled in the sustem
References Side::getCode(), Node::getCode(), and Node::getLabel().
| void DilatationToRHS | ( | double | coef = 1. |
) |
Add element dilatational contribution to right hand side after multiplication by coef.
To use for explicit formulations
| void ElementVector | ( | const Vect< T_ > & | b, | |
| int | dof = 0, |
|||
| int | dof_type = NODE_DOF | |||
| ) | [inherited] |
Localize Element Vector.
- Parameters:
-
[in] b Global vector to be localized [in] dof_type DOF type option. To choose among the enumerated values: - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
[in] dof DOF setting: - = 0, All DOFs are taken into account [ default ]
- != 0, Only DOF No. dof is handled in the sustem
References Equation::b(), Side::getDOF(), Node::getDOF(), Side::getNbDOF(), and Node::getNbDOF().
| void LocalNodeVector | ( | AbsVect< T_ > * | b | ) | [inherited] |
Localize Element Vector from a NodeVect instance.
- Parameters:
-
[in] b Pointer to global vector to be localized. The resulting local vector can be accessed by attribute ePrev. This member function is to be used if a constructor with Element was invoked.
References Node::getLabel(), and Node::getNbDOF().
| virtual void MassToLHS | ( | double | coef = 1 |
) | [virtual, inherited] |
Add consistent mass contribution to left-hand side.
- Parameters:
-
[in] coef coefficient to multiply by the matrix before adding [default: 1]
| virtual void MassToRHS | ( | double | coef = 1 |
) | [virtual, inherited] |
Add consistent mass contribution to right-hand side.
- Parameters:
-
[in] coef coefficient to multiply by the vector before adding [default: 1]
| void PlaneStrain | ( | double | E, | |
| double | nu | |||
| ) |
Set plane strain hypothesis by giving values of Young's modulus and Poisson ratio.
- Parameters:
-
[in] E Young's modulus [in] nu Poisson ratio
| void PlaneStress | ( | double | E, | |
| double | nu | |||
| ) |
Set plane stress hypothesis by giving values of Young's modulus and Poisson ratio.
- Parameters:
-
[in] E Young's modulus [in] nu Poisson ratio
| double setMaterialProperty | ( | const string & | exp, | |
| const string & | prop | |||
| ) | [inherited] |
Define a material property by an algebraic expression.
- Parameters:
-
[in] exp Algebraic expression [in] prop Property name
- Return values:
-
ret Return value in expression evaluation: - ret=0, Normal evaluation
- ret!=0, An error message is displayed.
Referenced by Equa_Therm< double, 4, 4, 3, 3 >::Conduc(), Equa_Solid< double, 4, 8, 2, 4 >::Density(), Equa_Fluid< double, 4, 8, 2, 4 >::Density(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::ElectricConductivity(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::ElectricResistivity(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::MagneticPermeability(), Equa_Solid< double, 4, 8, 2, 4 >::Poisson(), Equa_Therm< double, 4, 4, 3, 3 >::RhoCp(), Equa_Fluid< double, 4, 8, 2, 4 >::ThermalExpansion(), Equa_Fluid< double, 4, 8, 2, 4 >::Viscosity(), and Equa_Solid< double, 4, 8, 2, 4 >::Young().
| void SideVector | ( | const Vect< T_ > & | b | ) | [inherited] |
Localize Side Vector.
- Parameters:
-
[in] b Global vector to be localized - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
References Equation::b(), Node::getDOF(), and Node::getNbDOF().
| void Strain | ( | LocalVect< double, 3 > & | eps | ) |
Calculate strains at element barycenter.
- Parameters:
-
[out] eps Vector containing strains in element
Calculate principal stresses and Von-Mises stress at element barycenter.
- Parameters:
-
[out] sigma Vector containing principal stresses in element [out] s Vector containing principal stresses in element [out] vm Value of Von-Mises stress in element
| void Stress | ( | LocalVect< double, 3 > & | s, | |
| double & | vm | |||
| ) |
Calculate principal stresses and Von-Mises stress at element barycenter.
- Parameters:
-
[out] s LocalVect containing principal stresses in element [out] vm Value of Von-Mises stress in element
| void updateBC | ( | const Vect< T_ > & | bc | ) | [inherited] |
Update Right-Hand side by taking into account essential boundary conditions.
Init solution.
- Parameters:
-
[in] bc Vector that contains imposed values at all DOFs