MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
GmpBar Class Reference

Basic class for the standard stress bar physics plugin object. More...

#include <gmpBar.h>

Inheritance diagram for GmpBar:
Collaboration diagram for GmpBar:

Public Types

enum  barPropertyIds { AREA_ID = GmpMechanicalPhysics::NUM_PROPER_IDS , NUM_PROPER_IDS }
 IDs for physics element properties. More...
 
- Public Types inherited from GmpMechanicalPhysics
enum  PhysicsAttributeIds {
  ISOPARAMETRIC_ID , STRESS_MODE_ID , STRAIN_MODE_ID , P_STRAIN_MODE_ID ,
  BODY_FORCE_ID , CGRAV_ID , GEOMETRIC_ID , RF_MODE_ID ,
  RMAPPINGINFO_ID , K0MODE_ID , STRAIN_RESET_ID , CONTACT_ID ,
  STRAIN_T_ID , NUM_ATTRI_IDS
}
 IDs for physics attributes. More...
 
enum  StateVarIds { U_ID , NUM_STATEVAR_IDS }
 IDs for Mechanical physics state vars. More...
 
enum  ExternalLoadsIds { PRESSURE_ID , THERMAL_ID , TREF_ID , NUM_EXTLOADS_IDS }
 IDs for Mechanical physics state vars. More...
 
enum  NodeAttributeIds {
  S_NA_ID , E_NA_ID , RF_NA_ID , CF_NA_ID ,
  CD_NA_ID , CIV_NA_ID , CIVOLD_NA_ID , NUM_NA_IDS
}
 IDs for physics node attributes. More...
 
enum  GaussAttributeIds {
  S_GA_ID , SOLD_GA_ID , RS_GA_ID , E_GA_ID ,
  EOLD_GA_ID , YSR_GA_ID , YSROLD_GA_ID , ST_GA_ID ,
  STOLD_GA_ID , ITER_GA_ID , ITEROLD_GA_ID , SUBSTEP_GA_ID ,
  SUBSTEPOLD_GA_ID , LINESEARCH_GA_ID , LINESEARCHOLD_GA_ID , ET_GA_ID ,
  NUM_GA_IDS
}
 IDs for physics Gauss attributes. More...
 
enum  ElementPropertyIds {
  THICKNESS_ID , BF_ID , GRAV_ID , DENS_ID ,
  DENSB_ID , ALPHA_ID , NUM_PROPER_IDS
}
 IDs for physics element properties. More...
 
enum  BoundaryConditionIds {
  FIXED_U_BC_ID , FIXED_CF_BC_ID , PL_BC_ID , HL_BC_ID ,
  WP_BC_ID , NUM_BC_IDS
}
 IDs for accepted boundary condition types. More...
 
enum  BoundaryConditionValueIds {
  BC_UX_ID , BC_UY_ID , BC_UZ_ID , BC_CF_ID ,
  BC_PL_ID , BC_HLR_ID , BC_HL_ID , BC_NRL_ID ,
  BC_SWF_ID , NUM_BCV_IDS
}
 IDs for property values from accepted boundary condition types. More...
 
enum  ContactBCIds { LOCAL_CBC_ID , GLOBAL_CBC_ID , NUM_CBC_IDS }
 IDs for accepted contact boundary conditions. More...
 
enum  ContactBCValueIds { CBC_KCN_ID , CBC_KSN_ID , CBC_MU_ID , NUM_CBCV_IDS }
 IDs for property values from accepted Contact boundary condition (CBC) More...
 

Public Member Functions

 GmpBar (const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
 Constructor.

 
virtual ~GmpBar ()
 Destructor.
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a reference for the single Hydraulics attribute map, built when the function is called for the first time.
 
virtual double fillBuMatrix (const GmElement *e, const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmVector &N, const GmMatrix &J, GmMatrix &Bp)
 Given a point 'ncood', the element coordinate matrix 'X', the point shape functions 'N' and the transformation Jacobian 'J', fills the matrix with cartesian partial derivatives Bu using the provided shape function and returns the scaled jacobian determinant.
 
virtual FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element internal force and stiffness.
 
virtual bool calcDerivedResults (bool nonLinearSolver)
 Recovers per element stresses for bar elements, storing the results in an element attribute.
 
virtual void updateNodalCoordinates (const GmElement *e, GmMatrix &Xe, const GmVector &ue) const
 Updates the nodal coordinates using nodal displacements Xen = Xe + ue.
 
- Public Member Functions inherited from GmpMechanicalPhysics
 GmpMechanicalPhysics (const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
 Constructor. Will be called by the plugin loading code.
 
virtual ~GmpMechanicalPhysics ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual bool supportsStateDumping ()
 
virtual unsigned stress_state (void) const
 Returns the number of stress components.
 
virtual bool fixedNodalForcesBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const
 See comments on base class. Fills vectors with prescribed nodal concentrated forces.
 
virtual bool fixedNodalDofsBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
 See comments on base class. Fills vectors with prescribed node displacements.
 
virtual FemResultType fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element stiffness matrix elemK and/or the force vector elemF for element 'e', taking into account pressure load and/or point generation boundary conditions, as indicated by the bc parameter.
 
virtual FemResultType fillElementDataForLoads (const GmElement *e, int loadId, GmpFemVectorSet &elemVectors)
 
virtual FemResultType fillElementDataPressBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmMatrix &elemMat, GmVector &elemVec)
 calc nodal equivalent force vector due uniforme pressure load.
 
virtual FemResultType fillElementDataHydPressBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmMatrix &elemMat, GmVector &elemVec)
 calc nodal equivalent force vector due hydraulic pressure load. Information is provided from two vertical reference coordinates with the respective
 
virtual FemResultType fillElementDataWaterSheepPressBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmMatrix &elemMat, GmVector &elemVec)
 calc nodal equivalent force vector due water sheet pressure load. Information is provided from reference coordinates to level of water with the respective
 
virtual FemResultType fillContactData (const GmContactBoundaryCondition *cbc, int bcIndex1, int bcIndex2, GmMatrixDof &dofMap, GmpFemMatrixSet &matrixSet, GmpFemVectorSet &vecSet)
 Fills the contact boundary contribution.
 
virtual bool calcMaterialDerivedResults () const
 The virtual function used by calcDerivedResults() to effectively calculate gauss attributes required by the Material.
 
void fillElementDisplacements (const GmElement *e, GmVector &ue)
 Given an element, fills the vector 'ue' with nodal displacements. The vector should have size equal to n * d where n is the number of element nodes and d is the node dimension.
 
void fillElementThermalIncrement (const GmElement *e, GmVector &dTe)
 The virtual function to fill the nodal thermal increment.
 
virtual double axisymmetricFactor (const GmElement *e, const GmMatrix &X, const GmVector &N) const
 Returns the factor that should be applied when using axis symetric elements. 1.0 for other etypes.
 
virtual bool isPlaneStress ()
 Returns the factor that should be applied when using axis symetric elements. 1.0 for other etypes.
 
virtual bool isAxisymmetric ()
 Returns TRUE only for axisymmetric models.
 
GmpMechanicPointmechanicPoint ()
 Returns the physics mechanical material point.
 
virtual bool evaluatesThermalStrain (const GmElement *e, GmVector &strainT, GmVector &NT, GmVector &dT, double alpha) const
 Returns The thermal strain.
 
GmMatrixdep ()
 Returns a reference to the physics constitutive tangent matrix.
 

Protected Member Functions

virtual bool checkAndLoadAttributeAccessors (LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
 Reimplementation of the common function to init the _mechanicPoint structure.
 

Private Member Functions

double calcElementStress (GmElement *e)
 Calculates the bar internal stress.
 

Additional Inherited Members

- Protected Attributes inherited from GmpMechanicalPhysics
GmpMechanicPoint_mechanicPoint
 Access to mechanical material point.
 
GmTLS< GmMatrix, true > _Dep
 Constitutive tangent matrix (2 x 2)
 
bool _setInitialCond
 Sets the initial conditions required by the physics.
 

Detailed Description

Basic class for the standard stress bar physics plugin object.

This physics plugin calculates deformations and stress values for bars using the model described by Felippa.

Parameters:

  • stateVars: Optional. If missing, calculated results will be placed in state variables named 'u', which should be a vector state variable with dimension equal to the mesh node dimension
  • properties: Optional. If missing, physics routines will look for element properties in the following standard names:
    • A for bar cross section area

Member Enumeration Documentation

◆ barPropertyIds

IDs for physics element properties.

Enumerator
AREA_ID 

Id for retrieving the accessor of cross section area.

NUM_PROPER_IDS 

The number of property ids above.

Member Function Documentation

◆ calcDerivedResults()

bool GmpBar::calcDerivedResults ( bool nonLinearSolver)
virtual

Recovers per element stresses for bar elements, storing the results in an element attribute.

Reimplemented from GmpMechanicalPhysics.

◆ calcElementStress()

double GmpBar::calcElementStress ( GmElement * e)
private

Calculates the bar internal stress.

To compute the internal stress we need only to recover the bar elongation d. and remember that the internal force is equal to (E * A * d)/L. The computation below follows Felippa, equation 3.19 (page 3-8) and the formulation in figure 21.9 (page 21-10), remembering that the stress is equal to the internal force divided by A

◆ fillBuMatrix()

double GmpBar::fillBuMatrix ( const GmElement * e,
const GmShape * shape,
const GmVector & ncoord,
const GmMatrix & X,
const GmVector & N,
const GmMatrix & J,
GmMatrix & Bu )
virtual

Given a point 'ncood', the element coordinate matrix 'X', the point shape functions 'N' and the transformation Jacobian 'J', fills the matrix with cartesian partial derivatives Bu using the provided shape function and returns the scaled jacobian determinant.

The shape function given as parameter is the shape function that should be used to calculate the partial derivatives. It will be a linear function in case of iso-parametric elements and the element shape function otherwise.

Matrices J, X and N should have been calculated using the element shape function even in an iso-parametric setting.

Implements GmpMechanicalPhysics.

◆ fillElementData()

GmpFemPhysics::FemResultType GmpBar::fillElementData ( const GmElement * e,
GmpFemMatrixSet & elemMatrices,
GmpFemVectorSet & elemVectors )
virtual

Fills the element internal force and stiffness.

Implements GmpMechanicalPhysics.

◆ physicsMetaDataMap()

const QVariantMap * GmpBar::physicsMetaDataMap ( )
virtual

Returns a reference for the single Hydraulics attribute map, built when the function is called for the first time.

Reimplemented from GmpMechanicalPhysics.

◆ updateNodalCoordinates()

void GmpBar::updateNodalCoordinates ( const GmElement * e,
GmMatrix & Xe,
const GmVector & ue ) const
virtual

Updates the nodal coordinates using nodal displacements Xen = Xe + ue.

Updates the nodal coordinates Xen = Xe + ue.


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