MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
GmpMechanicalPhysics Class Referenceabstract

Basic class for the mechanical physics plugin object. More...

#include <gmpMechanicalPhysics.h>

Inheritance diagram for GmpMechanicalPhysics:
Inheritance graph
[legend]
Collaboration diagram for GmpMechanicalPhysics:
Collaboration graph
[legend]

Public Types

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,
  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, 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, NUM_GA_IDS
}
 IDs for physics Gauss attributes. More...
 
enum  ElementPropertyIds {
  THICKNESS_ID, BF_ID, GRAV_ID, DENS_ID,
  DENSB_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

 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 const QVariantMap * physicsMetaDataMap ()
 Returns a reference for the single mechanical physics attribute map, built when the function is called for the first time.
 
virtual bool supportsStateDumping ()
 
virtual unsigned stress_state (void)
 Returns the number of stress components. More...
 
virtual FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)=0
 
virtual bool fixedNodalForcesBc (QList< int > &nodes, QList< int > &dof, QList< double > &values) const
 See comments on base class. Fills vectors with prescribed nodal concentrated forces.
 
virtual bool fixedNodalDofsBc (QList< int > &nodes, QList< int > &dof, QList< 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. More...
 
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. More...
 
virtual bool calcDerivedResults (bool nonLinearSolver)
 Calc stress component on nodes and/or Gauss points, ADDING the calculated value to the current result.
 
virtual bool calcMaterialDerivedResults () const
 The virtual function used by calcDerivedResults() to effectively calculate gauss attributes required by the Material.
 
virtual double fillBuMatrix (const GmElement *e, const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmVector &N, const GmMatrix &J, GmMatrix &Bu)=0
 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. More...
 
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. More...
 
virtual void fillMiddleCoordinates (const GmElement *e, GmMatrix Xnode, GmMatrix &MX) const
 
virtual double axisymmetricFactor (const GmElement *e, const GmMatrix &X, const GmVector &N)
 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.
 
GmMatrixdep ()
 Returns a reference to the physics constitutive tangent matrix.
 
virtual GmVector timeSim () const
 Returns the simulation time used by the simulation. More...
 

Protected Attributes

GmpMechanicalContact _mecContact
 Object with general contact methods.
 
GmpMechanicPoint_mechanicPoint
 Access to mechanical material point.
 
GmMatrix _Dep
 Constitutive tangent matrix (2 x 2)
 
bool _setInitialCond
 Sets the initial conditions required by the physics.
 

Private Attributes

const char * _pluginType
 The plugin type name.
 

Detailed Description

Basic class for the mechanical physics plugin object.

Member Enumeration Documentation

◆ BoundaryConditionIds

IDs for accepted boundary condition types.

Enumerator
FIXED_U_BC_ID 

Id for fixed node displacement boundary condition.

FIXED_CF_BC_ID 

Id for fixed concentrated node force boundary condition.

PL_BC_ID 

Id for pressure load boundary condition.

HL_BC_ID 

Id for hydraulic pressure load boundary condition.

WP_BC_ID 

Id for water pressure on the seabed or water sheet pressure boundary condition.

NUM_BC_IDS 

The number of boundary conditions ids above.

◆ BoundaryConditionValueIds

IDs for property values from accepted boundary condition types.

Enumerator
BC_UX_ID 

Nodal displacement for fixed node displacement boundary condition.

BC_UY_ID 

Nodal displacement for fixed node displacement boundary condition.

BC_UZ_ID 

Nodal displacement for fixed node displacement boundary condition.

BC_CF_ID 

Nodal force for fixed node force boundary condition.

BC_PL_ID 

edge or face pressure load boundary condition

BC_HLR_ID 

Reference of hydraulic load boundary condition.

BC_HL_ID 

edge or

BC_NRL_ID 

Nivel of reference level of water.

BC_SWF_ID 

Specific weight of fluid.

NUM_BCV_IDS 

The number of boundary conditions value ids above.

◆ ContactBCIds

IDs for accepted contact boundary conditions.

Enumerator
LOCAL_CBC_ID 

Id for local contact boundary.

GLOBAL_CBC_ID 

Id for global contact boundary.

NUM_CBC_IDS 

The number of boundary conditions ids above.

◆ ContactBCValueIds

IDs for property values from accepted Contact boundary condition (CBC)

Enumerator
CBC_KCN_ID 

Normal elastic stiffness of contact boundary.

CBC_KSN_ID 

Shear elastic stiffness of contact boundary.

CBC_MU_ID 

Friction coefficient of contact boundary surface.

NUM_CBCV_IDS 

The number of boundary conditions value ids above.

◆ ElementPropertyIds

IDs for physics element properties.

Enumerator
THICKNESS_ID 

Id for retrieving the plane width accessor.

BF_ID 

Id for retrieving the self weight for body force.

GRAV_ID 

Id for retrieving the gravity accessor.

DENS_ID 

Id for retrieving the dry density accessor.

DENSB_ID 

Id for retrieving the bulk density accessor.

NUM_PROPER_IDS 

The number of property ids above.

◆ ExternalLoadsIds

IDs for Mechanical physics state vars.

Enumerator
PRESSURE_ID 

Id for retrieving the accessor to the pressure state var.

THERMAL_ID 

Id for retrieving the accessor to the temperature state var.

NUM_EXTLOADS_IDS 

The number of state var ids above.

◆ GaussAttributeIds

IDs for physics Gauss attributes.

Enumerator
S_GA_ID 

Base Id for Gauss attribute(s) used to store the calculated stress at the current state.

SOLD_GA_ID 

Id for retrieving the stress accessor at the previous state (old stress)

RS_GA_ID 

Id for retrieving the stress accessor at the residual state.

E_GA_ID 

Base Id for Gauss attribute(s) used to store the calculated strain at the current state.

EOLD_GA_ID 

Id for retrieving the strain accessor at the previous state (old strain)

YSR_GA_ID 

Id for retrieving the yield strength ratio at the current state.

YSROLD_GA_ID 

Id for retrieving the yield strength ratio at the previous state.

ST_GA_ID 

Id for retrieving the material point state accessor at the current state.

STOLD_GA_ID 

Id for retrieving the material point state accessor at the previous state.

ITER_GA_ID 

Id for retrieving the iteration numbers of the return mapping.

ITEROLD_GA_ID 

Id for retrieving the iteration numbers of the return mapping at the previous state.

SUBSTEP_GA_ID 

Id for retrieving the substep numbers of the return mapping.

SUBSTEPOLD_GA_ID 

Id for retrieving the substep numbers of the return mapping at the previous state.

LINESEARCH_GA_ID 

Id for retrieving the line search numbers of the return mapping.

LINESEARCHOLD_GA_ID 

Id for retrieving the line search numbers of the return mapping at the previous state.

NUM_GA_IDS 

The number of Gauss attribute ids above.

◆ NodeAttributeIds

IDs for physics node attributes.

Enumerator
S_NA_ID 

Base Id for node attribute(s) used to store the calculated stress.

E_NA_ID 

Base Id for node attribute(s) used to store the calculated strain.

RF_NA_ID 

Base Id for node attribute used to store the calculated Reaction Force.

CF_NA_ID 

Base Id for node attribute used to store the calculated contact Force.

CD_NA_ID 

Base Id for node attribute used to store the calculated contact Displacement.

CIV_NA_ID 

Base Id for node attribute used to store the calculated contact internal variables.

CIVOLD_NA_ID 

Id for retrieving the contact internal variale accessor at the previous state (old contact displacement)

NUM_NA_IDS 

The number of node attribute ids above.

◆ PhysicsAttributeIds

IDs for physics attributes.

Enumerator
ISOPARAMETRIC_ID 

Id for retrieving the isoParametric physics attribute.

STRESS_MODE_ID 

Id for retrieving the stress physics attribute.

STRAIN_MODE_ID 

Id for retrieving the strain physics attribute.

P_STRAIN_MODE_ID 

Id for retrieving the plastic strain physics attribute.

BODY_FORCE_ID 

Id for retreiving the body force enabled attribute.

CGRAV_ID 

Id for retrieving the gravity attribute.

GEOMETRIC_ID 

Id for retrieving the geometric attribute.

RF_MODE_ID 

Id for retrieving the reactionForceMode physics attribute.

RMAPPINGINFO_ID 

Id for retrieving the return mapping info physics attribute.

K0MODE_ID 

Id for retrieving the K0 mode attribute.

STRAIN_RESET_ID 

Id for retrieving the strain reset attribute.

CONTACT_ID 

Id for retrieving the strain reset attribute.

NUM_ATTRI_IDS 

The number of physics attribute ids above.

◆ StateVarIds

IDs for Mechanical physics state vars.

Enumerator
U_ID 

Id for retrieving the accessor to the displacement state var.

NUM_STATEVAR_IDS 

The number of state var ids above.

Member Function Documentation

◆ fillBuMatrix()

virtual double GmpMechanicalPhysics::fillBuMatrix ( const GmElement e,
const GmShape shape,
const GmVector ncoord,
const GmMatrix X,
const GmVector N,
const GmMatrix J,
GmMatrix Bu 
)
pure 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.

Implemented in GmpMechanicalLargeDisplacementSolid, GmpBar, and GmpSpring.

◆ fillContactData()

GmpFemPhysics::FemResultType GmpMechanicalPhysics::fillContactData ( const GmContactBoundaryCondition cbc,
int  bcIndex1,
int  bcIndex2,
GmMatrixDof dofMap,
GmpFemMatrixSet &  matrixSet,
GmpFemVectorSet &  vecSet 
)
virtual

Fills the contact boundary contribution.

Fills the contact data K_con, Fi_con and Fe_con.

◆ fillElementDataForBc()

GmpFemPhysics::FemResultType GmpMechanicalPhysics::fillElementDataForBc ( const GmElement e,
const GmBoundaryCondition bc,
int  bcIndex,
int  bcListIndex,
int  border,
GmpFemMatrixSet &  elemMatrices,
GmpFemVectorSet &  elemVectors 
)
virtual

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.

Reference: "Programing the finite element Mthod", I.M. Smith and D. V. Griffits

◆ fillElementDisplacements()

void GmpMechanicalPhysics::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.

See comments on base class. Fills the vector ue with nodal displacements.

Values are stored in 'ue' by node. For a two nodes element with 3 dimensions ue is filled with [ux1, uy1, uz1, ux2, uy2, uz2]

◆ stress_state()

unsigned GmpMechanicalPhysics::stress_state ( void  )
virtual

Returns the number of stress components.

See comments on base class. Returns the number of stress components.

◆ timeSim()

GmVector GmpMechanicalPhysics::timeSim ( ) const
virtual

Returns the simulation time used by the simulation.

Returns a time vector with the current and the previous times.


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