HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
GmpHydraulicEnhancedDualFlow Class Reference

Dual flow hydraulic 2D & 3D for Quad, Tri, Hex and Tet. More...

#include <gmpHydraulicEnhancedDualFlow.h>

Inheritance diagram for GmpHydraulicEnhancedDualFlow:
Collaboration diagram for GmpHydraulicEnhancedDualFlow:

Public Types

enum  EmbeddedElemPropertyIds { UFw_ID = GmpHydraulicDualFlow::NUM_PROPER_IDS , NUM_PROPER_IDS }
 
- Public Types inherited from GmpHydraulic
enum  HMaterialPointStates { saturated , unsaturated }
 
enum  PhysicsAttributeIds {
  ISOPARAMETRIC_ID , POROSITY_UPDATE_ID , PERMEABILITY_UPDATE_ID , USE_CONSISTENT_MATRIX_ID ,
  VELOCITY_MODE_ID , FLOW_MODE_ID , DIRECT_ID , CGRAV_ID ,
  VF_MODE_ID , NUM_ATTRI_IDS
}
 IDs for physics attributes. More...
 
enum  StateVarIds { P_ID , NUM_STATEVAR_IDS }
 IDs fo physics state vars. More...
 
enum  NodeAttributeIds { V_NA_ID , Q_NA_ID , VF_NA_ID , NUM_NA_IDS }
 IDs for physics node attributes. More...
 
enum  cellAttributeIds { NUM_CA_IDS }
 IDs for physics Cell attributes. More...
 
enum  GaussAttributeIds {
  V_GA_ID , Q_GA_ID , FT_GA_ID , FTOLD_GA_ID ,
  NUM_GA_IDS
}
 IDs for physics Gauss attributes. More...
 
enum  ElementPropertyIds { THICKNESS_ID , GRAV_ID , SOURTERM_ID , NUM_PROPER_IDS }
 IDs for physics element properties. More...
 
enum  BoundaryConditionIds { FIXED_P_BC_ID , FIXED_Q_BC_ID , FIXED_SPF_BC_ID , NUM_BC_IDS }
 IDs for accepted boundary condition types. More...
 
enum  BoundaryConditionValueIds { BC_P_ID , BC_QW_ID , BC_IF_ID , NUM_BCV_IDS }
 IDs for property values from accepted boundary condition types. More...
 

Public Member Functions

 GmpHydraulicEnhancedDualFlow (const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
 
virtual ~GmpHydraulicEnhancedDualFlow ()
 Destructor.
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a reference for the Hydraulics dual flow attribute map, built when the function is called for the first time.
 
virtual FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element matrices and vectors for a generic dual flow element.
 
virtual FemResultType fillContinuousEnrichedElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element matrices and vectors for a enriched element.
 
virtual bool assemblyFractureFlowMatrix (GmMatrix &Kf, GmMatrix &Ke, GmVector &iPe)
 
void getPermeabilityAndShapeFactor (const GmElement *e, GmMatrix &Km, double &Gw, double &factor)
 Fill the permeability and shape factor.
 
double getEquivalentDistance (const GmElement *e, const GmElement *ef)
 get the equivalent distance
 
virtual bool setInitialConditions ()
 Sets the initial conditions required by interface elements. An = normal aperture.
 
int getNumberOfDiscontinuities (const GmElement *e)
 Returns the number of discontinuities that intersect a given element.
 
int getNumberOfDiscontinuityElements (const GmElement *e)
 Returns the number of discontinuity subelements (bar (2D)/triangle (3D)) that intersect a given element.
 
void getDiscontinuityGeometry (const GmElement *e, int idiscontinuity, GmVector &Xref, GmMatrix &mn)
 Get the discontinuity geometric properties.
 
void get2DDiscontinuityGeometry (const GmElement *e, int idiscontinuity, GmVector &Xref, GmMatrix &mn)
 Get the 2D discontinuity geometric properties.
 
void get3DDiscontinuityGeometry (const GmElement *e, int idiscontinuity, GmVector &Xref, GmMatrix &mn)
 Get the 3D discontinuity geometric properties.
 
void getIdDiscontinuitySubElementInMesh (const GmElement *e, int k, int &idDiscontinuityMesh)
 Get the id of the discontinuity sub-element (bar (2D)/triangle (3D)) k in the mesh.
 
bool fillDiscontinuityNodesGlobalToLocalMap (const GmElement *e, QMap< int, int > &globalToLocal)
 Fill the map with the global to local ids of the discontinuity elements nodes.
 
FemResultType fillDiscontinuitySetElementData (const GmElement *e, GmMatrix &Hd, GmMatrix &Wf, GmMatrix &Sd, GmMatrix &Tcd, const QMap< int, int > &globalToLocal)
 Fills the element matrices and vectors of the discontinuity elements.
 
void getDiscontinuitySubElementLocalData (const GmElement *e, int k, int &idDiscontinuityElem, QVector< int > &dof, const GmElement *ef, const QMap< int, int > &dNodesGlobalToLocal)
 Get the ids of the discontinuity sub-element (bar (2D)/triangle (3D)) k locally in the element and fill its local dof vector.
 
void assembleDiscontinuityElementMatrix (GmMatrix &Kg, const GmMatrix &Kl, const QVector< int > &dof) const
 Assemble the contribution of the discontinuity element.
 
- Public Member Functions inherited from GmpHydraulicDualFlow
 GmpHydraulicDualFlow (const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
 
virtual ~GmpHydraulicDualFlow ()
 Destructor.
 
virtual bool fixedNodalForcesBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const
 See comments on base class. Fills vectors with prescribed nodal forces - flow.
 
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 pore pressures.
 
virtual void fillFractureStorageCompMatrix (const GmElement *e, const GmVector *coord, int ip, GmMatrix &Sfc, const GmVector &N, double c) const
 Calculates the stiffness matrix of "storage / compressibility of fluid" for element 'e' at the given integration point (coord, ip) storing the result at the Sfc matrix. N is the shape function vector and c a constant equal to w * h * detJ.
 
virtual void fillTransferMatrix (const GmElement *e, const GmVector *coord, int ip, GmMatrix &Wfm, const GmVector &N, double c) const
 Fills the Transfer matrix with the computed scalar "shape factor" Returns Wfm = ws * c * N * N.t, where: ws is the shape factor.
 
virtual void fillFluidFlowMatrix (const GmElement *e, const GmVector *coord, int ip, GmMatrix &Kfc, const GmMatrix &Bp, double c) const
 Calculates the flow stiffness matrix of fluid 2 due to permeability contribution or permeability matrix for element 'e' at the given integration point (coord, ip) storing the result at the Kfc matrix. Bp is the strain pore pressure matrix and c a constant equal to w * h * detJ.
 
virtual void fillElementFluidPorePressure (const GmElement *e, GmVector &Pfe)
 Given an element, fills the vector pfe with nodal pore pressureof the seconf fluid. The vector should have size equal to the number of calculated nodes.
 
virtual void fillDampingMatrix (const GmElement *e, GmMatrix &C, const GmMatrix &Sc, const GmMatrix &Sfc, const QVector< int > &iPe, const QVector< int > &iPfe) const
 Fills the Damping matrix with the computed "storage/compressibility" Matrizes Returns C = Sc + Sfc, where: Sc is the "storage/compressibility" Matrix of the medium Sfc is the "storage/compressibility" Matrix of the fluid.
 
virtual void fillStiffnessMatrix (const GmElement *e, GmMatrix &K, const GmMatrix &Kc, const GmMatrix &Kfc, const GmMatrix &Wfm, const QVector< int > &iPe, const QVector< int > &iPfe) const
 Fills the Stiffness matrix with the computed "permeability" Matrizes Returns K = Kc + Kfc, where: Kc is the permeability Matrix of the medium Kfc is the permeability Matrix of the fluid.
 
virtual void fillInternalForceVector (const GmElement *e, GmVector &Fi, const GmMatrix &Kc, const GmMatrix &Kfc, const GmMatrix &Wfm, const GmVector &pe, const GmVector &pfe, const QVector< int > &iPe, const QVector< int > &iPfe) const
 Fills the Internal force vector for both fluids Returns fi = Kc*pe + Kfc*pfe, where: Kc is the permeability Matrix of the medium Kfc is the permeability Matrix of the fluid.
 
virtual void FillDofIndexPosition (const GmElement *e, QVector< int > &iPe, QVector< int > &iPfe) const
 Fills the position index of the two hydraulic degrees of freedom. the implementation supports order of the defined state variables i.e {P, Pf} or {Pf, P}.
 
virtual bool calcDerivedResults (bool nonLinearSolver)
 Calc velocity and flow on nodes and/or Gauss points.
 
virtual GmPropertySetfracturePropertySet (int id) const
 
- Public Member Functions inherited from GmpHydraulic
 GmpHydraulic (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 ~GmpHydraulic ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual bool supportsStateDumping ()
 
virtual FemResultType fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 
virtual FemResultType fillElementDataBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmMatrix &elemMat, GmVector &elemVec)
 
virtual void fillStorageCompMatrix (const GmElement *e, const GmVector *coord, int ip, GmMatrix &Sc, const GmVector &N, double c)
 Calculates the stiffness matrix of "storage / compressibility" for element 'e' at the given integration point (coord, ip) storing the result at the Sc matrix. N is the shape function vector and c a constant equal to w * h * detJ.
 
virtual void fillFlowMatrix (const GmElement *e, const GmVector *coord, int ip, GmMatrix &Kc, const GmMatrix &Bp, double c) const
 Calculates the flow stiffness matrix due to permeability contribution or permeability matrix for element 'e' at the given integration point (coord, ip) storing the result at the Kc matrix. Bp is the strain pore pressure matrix and c a constant equal to w * h * detJ.
 
virtual void fillFluidVelocity (const GmElement *e, const GmVector *coord, int ip, GmVector &Vip, const GmVector &Pe, const GmMatrix &Bp) const
 Evaluates velocity at integration points (it should be improved to consider gravity effect)
 
virtual void fillElementPorePressure (const GmElement *e, GmVector &pe)
 Given an element, fills the vector pe with nodal pore pressure. The vector should have size equal to the number of calculated nodes.
 
virtual void gravitySupplyFluid (const GmElement *e, const GmVector *coord, int ip, GmVector &qext_gsf, GmMatrix &Bp, double c)
 
virtual void fillSourceTermVector (const GmElement *e, const GmVector *coord, int ip, GmVector &St, const GmVector &N, double c)
 Calculates the source term due the porosity rate of porous eskeleton for element 'e' at the given integration point (coord, ip) storing the result at external vector. N is the shape function vector and c a constant equal to w * h * detJ.
 
virtual double fillBpMatrix (const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmVector &N, const GmMatrix &J, GmMatrix &Bp)=0
 Given a point 'ncoord', the element coordinate matrix 'X', the point shape functions 'N' and the transformation Jacobian 'J', fills the matrix with cartesian partial derivatives Bp using the provided shape function and returns the scaled jacobian determinant.
 
virtual void gravityVector (const GmElement *e, const GmVector *coord, int ip, GmVector &grav) const
 Returns the gravity accelaration vector.
 
virtual bool isAxisymmetric ()
 Returns TRUE only for axisymmetric models.
 
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.
 
HMaterialPointAccessorshydraulicMaterialPoint ()
 Returns the hydraulic material point accessor.
 

Protected Member Functions

virtual bool checkAndLoadDiscontinuitySetAccessors (LuaTable &table)
 Reimplementation of the common function to set initial gauss attributes.
 
- Protected Member Functions inherited from GmpHydraulicDualFlow
virtual const GmElementDofdofMapping (GmCellType type) const
 
virtual bool checkAndLoadPrivateData (LuaTable &table)
 
virtual void calcElementDerivedResultAtPoints (const GmElement *e, int resultId, const GmMatrix &evalPoints, bool evalAtIp, GmMatrix &result)
 The virtual function used by calcDerivedResults() to effectivelly calculate the velocity (resultId = 0) or the flow (resultId = 1) at the given evaluation points.
 
void calcElementVelocityAtPoints (const GmElement *e, const GmMatrix &evalPoints, GmMatrix &v)
 The function responsible for effectivelly calculating the velocity at the given evaluation points, filling v.
 
void calcElementFlowAtPoints (const GmElement *e, const GmMatrix &evalPoints, bool evalAtIp, GmMatrix &q)
 The function responsible for effectivelly calculating the flow at the given evaluation points, filling q.
 
- Protected Member Functions inherited from GmpHydraulic
virtual bool checkAndLoadAttributeAccessors (LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
 Checks the loaded data.
 
void calcElementVelocityAtPoints (const GmElement *e, const GmMatrix &evalPoints, GmMatrix &v)
 The function responsible for effectivelly calculating the velocity at the given evaluation points, filling v.
 
void calcElementFlowAtPoints (const GmElement *e, const GmMatrix &evalPoints, bool evalAtIp, GmMatrix &q)
 The function responsible for effectivelly calculating the flow at the given evaluation points, filling q.
 

Private Attributes

const char * _pluginType
 The plugin type name.
 

Additional Inherited Members

- Protected Types inherited from GmpHydraulicDualFlow
enum  DualFlowStateVarIds { PF_ID = GmpHydraulic::NUM_STATEVAR_IDS , NUM_STATEVAR_IDS }
 IDs fo physics state vars. More...
 
enum  DualFlowNodeAttributeIds { VFF_NA_ID = GmpHydraulic::NUM_NA_IDS , VEF_NA_ID , NUM_NA_IDS }
 IDs for physics node attributes. More...
 
enum  DualFlowGaussAttributeIds { VEF_GA_ID = GmpHydraulic::NUM_GA_IDS , NUM_GA_IDS }
 IDs for physics Gauss attributes. More...
 
enum  DualFlowBoundaryConditionIds { FIXED_PF_BC_ID = GmpHydraulic::NUM_BC_IDS , FIXED_QF_BC_ID , NUM_BC_IDS }
 IDs for accepted boundary condition types. More...
 
enum  DualFlowBoundaryConditionValueIds { BC_PF_ID = GmpHydraulic::NUM_BCV_IDS , BC_QWF_ID , NUM_BCV_IDS }
 IDs for property values from accepted boundary condition types. More...
 
enum  DualFlowPhysicsAttributeIds { FRACPROPSET_ID = GmpHydraulic::NUM_ATTRI_IDS , NUM_ATTRI_IDS }
 IDs for physics attributes. More...
 
- Protected Attributes inherited from GmpHydraulicDualFlow
GmpFemPhysicsData _fractureData
 fracture data
 
GmValueAccessor_anAcc
 fracture aperture accessor
 
- Protected Attributes inherited from GmpHydraulic
HMaterialPointAccessors _hmaterialPointAccessor
 Access to hydraulic material point.
 
bool _setInitialCond
 Sets the initial conditions required by the physics.
 

Detailed Description

Dual flow hydraulic 2D & 3D for Quad, Tri, Hex and Tet.

This physics plugin calculates pore pressure in the porous matrix and fracture system

Member Enumeration Documentation

◆ EmbeddedElemPropertyIds

Enumerator
UFw_ID 

Id for retrieving the initial fracture aperture.

NUM_PROPER_IDS 

The number of property ids above.

Member Function Documentation

◆ fillElementData()

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

Fills the element matrices and vectors for a generic dual flow element.

Reimplemented from GmpHydraulicDualFlow.

◆ physicsMetaDataMap()

const QVariantMap * GmpHydraulicEnhancedDualFlow::physicsMetaDataMap ( )
virtual

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

Reimplemented from GmpHydraulicDualFlow.


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