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

Detailed Description
To build element equations for 2-D linearized elasticity using 3-node triangles.
This class enables building finite element arrays for linearized isotropic elasticity problem in 2-D domains using 3-Node triangles.
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 NodeVect< double > &f, 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 (SideVect< double > &f) |
| 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 | ContactPressure (const SideVect< double > &f, double penal, Point< double > &p) |
| Calculate contact pressure. | |
| 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. | |
| Elas2DT3 (const Side *sd, const Vect< double > &u, double time, double deltat, int scheme) | |
| Constructor for a side (transient case) with specification of time integration scheme. | |
| Elas2DT3 (const Side *sd, const Vect< double > &u, double time=0.) | |
| Constructor using side, previous time solution u and time value. | |
| Elas2DT3 (const Element *el, const Vect< double > &u, double time, double deltat, int scheme) | |
| Constructor for an element (transient case) with specification of time integration scheme. | |
| Elas2DT3 (const Element *el, const Vect< double > &u, double time=0.) | |
| Constructor using element, previous time solution u and time value. | |
| Elas2DT3 (const Side *sd) | |
| Constructor using side data. | |
| Elas2DT3 (const Element *el) | |
| Constructor using element data. | |
| Elas2DT3 () | |
| Default Constructor. | |
| void | ElementSet (const Element *el) |
| Element Settings. | |
| 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=1.) |
| 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. | |
| void | MassToLHS (double coef=1.) |
| Add element consistent mass contribution to matrix after multiplication by coef. | |
| void | MassToRHS (double coef=1.) |
| Add element consistent mass contribution to right-hand side after multiplication by coef. | |
| void | Media (double E, double nu, double rho) |
| Set media properties. | |
| void | Periodic (double coef=1.e20) |
| Add contribution of periodic boundary condition (by a penalty technique). | |
| void | PlaneStrain (double E, double nu) |
| Set plane strain hypothesis by giving values of Young's modulus E and Poisson ratio nu. | |
| void | PlaneStrain () |
| Set plane strain hypothesis. | |
| void | PlaneStress (double E, double nu) |
| Set plane stress hypothesis by giving values of Young's modulus E and Poisson ratio nu. | |
| void | PlaneStress () |
| Set plane stress hypothesis. | |
| T_ * | Prev () |
| Return element matrix as a C-array. | |
| void | Reaction (SideVect< double > &r) |
| Calculate reactions. | |
| 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 | SideSet (const Side *sd) |
| Side Settings. | |
| void | SideVector (const Vect< T_ > &b) |
| Localize Side Vector. | |
| int | SignoriniContact (SideVect< double > &f, double coef=1.e07) |
| Penalty Signorini contact contribution to matrix and right-hand side. | |
| int | 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 (Vect< double > &eps) |
| Calculate strains in element. | |
| void | Stress (Vect< double > &s, double &vm) |
| Calculate principal stresses and Von-Mises stress in element. | |
| void | updateBC (const Vect< T_ > &bc) |
| Update Right-Hand side by taking into account essential boundary conditions. | |
| ~Elas2DT3 () | |
| 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
| Elas2DT3 | ( | ) |
Default Constructor.
Constructs an empty equation.
Constructor using element, previous time solution u and time value.
- Parameters:
-
[in] el Pointer to element. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0).
Constructor for an element (transient case) with specification of time integration scheme.
- Parameters:
-
[in] el Pointer to element. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0). [in] deltat Time step. [in] scheme Time Integration Scheme ()
Constructor using side, previous time solution u and time value.
- Parameters:
-
[in] sd Pointer to side. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0).
Constructor for a side (transient case) with specification of time integration scheme.
- Parameters:
-
[in] sd Pointer to side. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0). [in] deltat Time step. [in] scheme Time Integration Scheme
Member Function Documentation
| void BodyRHS | ( | const NodeVect< double > & | f, | |
| int | opt = LOCAL_ARRAY | |||
| ) |
Add body right-hand side term to right hand side.
- Parameters:
-
[in] f Vector containing source at element nodes (DOF by DOF). [in] opt Vector is local (LOCAL_ARRAY) with size 6 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 | ( | UserData< double > & | ud | ) |
Add boundary right-hand side term to right hand side after multiplication by coef.
- Parameters:
-
[in] ud UserData instance defining boundary forces
Calculate contact pressure.
This function can be invoked in postprocessing.
| void Deviator | ( | double | coef = 1. |
) | [virtual] |
Add element deviatoric matrix to left-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
Reimplemented from Equa_Solid< double, 3, 6, 2, 4 >.
| void DeviatorToRHS | ( | double | coef = 1. |
) | [virtual] |
Add element deviatoric contribution to right-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
Reimplemented from Equa_Solid< double, 3, 6, 2, 4 >.
| 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 Dilatation | ( | double | coef = 1. |
) |
Add element dilatational contribution to left-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
| void DilatationToRHS | ( | double | coef = 1. |
) |
Add element dilatational contribution to right-hand side after multiplication by coef.
To use for explicit formulations.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
| 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 LMass | ( | double | coef = 1. |
) |
Add element lumped mass contribution to matrix and right-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
References Elas2DT3::LMassToLHS(), and Elas2DT3::LMassToRHS().
| void LMassToLHS | ( | double | coef = 1. |
) | [virtual] |
Add element lumped mass contribution to matrix after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
Reimplemented from Equa_Solid< double, 3, 6, 2, 4 >.
Referenced by Elas2DT3::LMass().
| void LMassToRHS | ( | double | coef = 1. |
) | [virtual] |
Add element lumped mass contribution to right-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
Reimplemented from Equa_Solid< double, 3, 6, 2, 4 >.
Referenced by Elas2DT3::LMass().
| 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().
| void Mass | ( | double | coef = 1. |
) |
Add element consistent mass contribution to matrix and right-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
References Elas2DT3::MassToLHS(), and Elas2DT3::MassToRHS().
| void MassToLHS | ( | double | coef = 1. |
) | [virtual] |
Add element consistent mass contribution to matrix after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
Reimplemented from Equa_Solid< double, 3, 6, 2, 4 >.
Referenced by Elas2DT3::Mass().
| void MassToRHS | ( | double | coef = 1. |
) | [virtual] |
Add element consistent mass contribution to right-hand side after multiplication by coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term [default=1].
Reimplemented from Equa_Solid< double, 3, 6, 2, 4 >.
Referenced by Elas2DT3::Mass().
| void Media | ( | double | E, | |
| double | nu, | |||
| double | rho | |||
| ) |
Set media properties.
Useful to override material properties deduced from mesh file.
| void Periodic | ( | double | coef = 1.e20 |
) |
Add contribution of periodic boundary condition (by a penalty technique).
Boundary nodes where periodic boundary conditions are to be imposed must have codes equal to PERIODIC_A on one side and PERIODIC_B on the opposite side.
- Parameters:
-
[in] coef Value of penalty parameter (default = 1.e20)
| void PlaneStrain | ( | double | E, | |
| double | nu | |||
| ) |
Set plane strain hypothesis by giving values of Young's modulus E and Poisson ratio nu.
| void PlaneStress | ( | double | E, | |
| double | nu | |||
| ) |
Set plane stress hypothesis by giving values of Young's modulus E and Poisson ratio nu.
| void Reaction | ( | SideVect< double > & | r | ) |
Calculate reactions.
This function can be invoked in postprocessing.
| 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().
| int SignoriniContact | ( | UserData< double > & | ud, | |
| double | coef = 1.e07 | |||
| ) |
Penalty Signorini contact contribution to matrix and right-hand side.
- Parameters:
-
[in] ud UserData instance defining contact data, [default=1.e07] [in] coef Value by which the added term is multiplied [Default: 1]
| void Strain | ( | Vect< double > & | eps | ) |
Calculate strains in element.
This function can be invoked in postprocessing.
| void Stress | ( | Vect< double > & | s, | |
| double & | vm | |||
| ) |
Calculate principal stresses and Von-Mises stress in element.
- Parameters:
-
[in] s vector of principal stresses [in] vm Von-Mises stress. This function can be invoked in postprocessing.
| 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