CoupledHMFemPhysics
The GeMA Coupled Hydro-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpHMEmbeddedFractureConductive.h
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_PLUGIN_HYDROMECHANICAL_EMBEDDED_FRACTURE_CONDUCTIVE_H_
25#define _GEMA_PLUGIN_HYDROMECHANICAL_EMBEDDED_FRACTURE_CONDUCTIVE_H_
26
27#include "gmpHydroMechanical.h"
29#include <gmpFemPhysicsCoupled.h>
30#include <gmpHydraulicEmbeddedFracture.h>
31#include <gmpMechanicalSolid.h>
32#include <gmpMechanicalEmbeddedFracture.h>
33#include <gmTrace.h>
34#include <gmDiscontinuitySet.h>
35#include <gmDiscontinuity.h>
37
38class GmGaussAccessor;
39
42{
43public:
44 // constructor
45 GmpHMEmbeddedFractureConductive(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
46 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
47
48 // destructor
50
51 // set physic map
52 virtual const QVariantMap* physicsMetaDataMap();
53
54 // Comments on the base class
56
57 // Comments on the base class
58 bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
59
60 // Fill the element old displacement vector
62
63 // Fill the element old pressure vector
65
66 // Comments on the base class
68
69 // Sets the initial conditions for embedded fracture models.
70 virtual bool setInitialConditions();
71
72 // Comments on the base class
73 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
74
75 // Discretizes the system of equations in time using a fully implicit scheme.
76 virtual FemResultType fullyImplicitTimeDiscretization(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors, GmMatrix& elemK, GmMatrix& elemC, GmVector& elemFi);
77
78 // Compute the element matrices and vectors for the elements with embedded discontinuities
79 virtual FemResultType fillEnrichedElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
80
81 // Assemble the element matrix and vector
82 void assembleElementData(const GmElement* e, GmMatrix& A, GmVector& b, GmMatrix& Al, GmVector& bl, bool needsLHS, bool needsRHS);
83 void assembleElementDofVector(const GmElement* e, GmVector& dof, GmMatrix& dof_u, GmVector& dof_p);
84
85 // Solves the local equations associated with the enriched dofs
86 FemResultType solveLocalEquations(const GmElement* e, GmMatrix& A_rr, GmMatrix& A_re, GmMatrix& A_er, GmMatrix& A_ee, GmVector& b_r, GmVector& b_e, GmVector& dof_e);
87
88 // Fill the system sub-matrices and vectors for the enriched element
89 FemResultType fillSystemSubData(const GmElement* e, GmMatrix& A_rr, GmMatrix& A_re, GmMatrix& A_er, GmMatrix& A_ee, GmVector& b_r, GmVector& b_e, GmVector& dof_e, GmMatrix& stressCoeffs, QMap<int, int> dNodesGlobalToLocal);
90
91 // Fill the system sub-matrices and vectors for the enriched element
92 FemResultType fillElementSubData(const GmElement* e, QMap<QString, GmMatrix>& sub_matrices, QMap<QString, GmVector>& sub_vectors, GmVector& dof_ur, GmVector& dof_ue, GmVector& dof_pc, GmMatrix& stressCoeffs, QMap<int, int> dNodesGlobalToLocal);
93
94 // Initialize the element sub-matrices and sub-vectors
95 void initializeSubMatrices(QMap<QString, GmMatrix>& sub_matrices, QMap<QString, GmVector>& sub_vectors, int ndofs_ur, int ndofs_ue, int ndofs_pc, int ndofs_pd);
96
97 // Update the discontinuity elements hydromechanical coupling parameters
99 bool updateHMCouplingParameters(const GmElement* e, const GmVector* coord, int ip);
100 bool updateAperture(const GmElement* e, const GmVector* coord, int ip);
101
102 // Fill the coupling hydromechanical sub-matrices
103 FemResultType fillHMCouplingData(const GmElement* e, GmMatrix& Quc, GmMatrix& Qac, GmMatrix& Qad, GmMatrix& Qca, GmMatrix& stressCoeffs, QMap<int, int> dNodesGlobalToLocal);
104 FemResultType fillContinuumHMCouplingData(const GmElement* e, GmMatrix& Quc, GmMatrix& Qac, GmMatrix& Qca, GmMatrix& stressCoeffs);
105 FemResultType fillDiscontinuitySetHMCouplingData(const GmElement* e, GmMatrix& Qad, QMap<int, int> dNodesGlobalToLocal);
106
109 {
112
113 // ------ NO ADDING BELOW THIS LINE
115 };
116protected:
117 GmpHydraulicEmbeddedFractureConductive* _embeddedHydroPhys;
118 GmpMechanicalEmbeddedFracture* _embeddedMechPhys;
119private:
122};
123
124#endif
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpCoupledHMFemPhysics.h:73
Hydro-Mechanical Physics with conductive embedded fractures.
Definition gmpHMEmbeddedFractureConductive.h:42
FemResultType fillSystemSubData(const GmElement *e, GmMatrix &A_rr, GmMatrix &A_re, GmMatrix &A_er, GmMatrix &A_ee, GmVector &b_r, GmVector &b_e, GmVector &dof_e, GmMatrix &stressCoeffs, QMap< int, int > dNodesGlobalToLocal)
Fills the jacobian sub-matrices and residual sub-vectors. Jac = [ Jac_rr Jac_re ] ,...
Definition gmpHMEmbeddedFractureConductive.cpp:548
GmValueAccessor * _pOldAcc
Accessor to the old pore pressure.
Definition gmpHMEmbeddedFractureConductive.h:121
GmpMechanicalEmbeddedFracture * _embeddedMechPhys
The mechanical physics providing parameters and matrices to the coupling equation.
Definition gmpHMEmbeddedFractureConductive.h:118
virtual bool checkAndLoadDiscontinuitySetAccessors(LuaTable &table)
Reimplementation of the common function to set initial gauss attributes.
Definition gmpHMEmbeddedFractureConductive.cpp:201
void fillElementOldPorePressure(const GmElement *e, GmVector &pe)
Given an element, fills the vector pe with nodal old pore pressure. The vector should have size equal...
Definition gmpHMEmbeddedFractureConductive.cpp:194
GmpHMEmbeddedFractureConductive(const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
Constructor. Will be called by the plugin loading code.
Definition gmpHMEmbeddedFractureConductive.cpp:53
GmValueAccessor * _uOldAcc
Accessor to the old displacement.
Definition gmpHMEmbeddedFractureConductive.h:120
bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to init the _hmaterialPointAccessor structure.
Definition gmpHMEmbeddedFractureConductive.cpp:151
void initializeSubMatrices(QMap< QString, GmMatrix > &sub_matrices, QMap< QString, GmVector > &sub_vectors, int ndofs_ur, int ndofs_ue, int ndofs_pc, int ndofs_pd)
Initializes the sub-matrices and sub-vectors for the element.
Definition gmpHMEmbeddedFractureConductive.cpp:656
virtual FemResultType fillEnrichedElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a enriched element.
Definition gmpHMEmbeddedFractureConductive.cpp:363
FemResultType updateDiscontinuitySetHMCouplingParameters(const GmElement *e)
Update the discontinuity elements integration points flow status. It updates based on the mechanical ...
Definition gmpHMEmbeddedFractureConductive.cpp:741
FemResultType fillDiscontinuitySetHMCouplingData(const GmElement *e, GmMatrix &Qad, QMap< int, int > dNodesGlobalToLocal)
Fills the hydromechanical coupling data from the discontinuity set.
Definition gmpHMEmbeddedFractureConductive.cpp:967
FemResultType fillElementSubData(const GmElement *e, QMap< QString, GmMatrix > &sub_matrices, QMap< QString, GmVector > &sub_vectors, GmVector &dof_ur, GmVector &dof_ue, GmVector &dof_pc, GmMatrix &stressCoeffs, QMap< int, int > dNodesGlobalToLocal)
Fills the element sub-matrices and sub-vectors for a enriched element.
Definition gmpHMEmbeddedFractureConductive.cpp:688
FemResultType fillHMCouplingData(const GmElement *e, GmMatrix &Quc, GmMatrix &Qac, GmMatrix &Qad, GmMatrix &Qca, GmMatrix &stressCoeffs, QMap< int, int > dNodesGlobalToLocal)
Fills the hydromechanical coupling data.
Definition gmpHMEmbeddedFractureConductive.cpp:857
virtual const QVariantMap * physicsMetaDataMap()
Extends the HM physics meta data map to include the discontinuity set and state variables with histor...
Definition gmpHMEmbeddedFractureConductive.cpp:103
FemResultType fillContinuumHMCouplingData(const GmElement *e, GmMatrix &Quc, GmMatrix &Qac, GmMatrix &Qca, GmMatrix &stressCoeffs)
Fills the hydromechanical coupling data from the continuum.
Definition gmpHMEmbeddedFractureConductive.cpp:878
void assembleElementDofVector(const GmElement *e, GmVector &dof, GmMatrix &dof_u, GmVector &dof_p)
Fills the element dof vector.
Definition gmpHMEmbeddedFractureConductive.cpp:461
void assembleElementData(const GmElement *e, GmMatrix &A, GmVector &b, GmMatrix &Al, GmVector &bl, bool needsLHS, bool needsRHS)
Assemble the element matrix and vector The matrix A and vector b are the global ones,...
Definition gmpHMEmbeddedFractureConductive.cpp:437
virtual ~GmpHMEmbeddedFractureConductive()
Destructor.
Definition gmpHMEmbeddedFractureConductive.cpp:97
embeddedPhysicsAttributeIds
IDs for physics attributes.
Definition gmpHMEmbeddedFractureConductive.h:109
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpHMEmbeddedFractureConductive.h:114
@ UPDATE_DSET_APERTURE
Id of the physics attributes.
Definition gmpHMEmbeddedFractureConductive.h:111
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic element.
Definition gmpHMEmbeddedFractureConductive.cpp:235
bool updateAperture(const GmElement *e, const GmVector *coord, int ip)
Updates the normal aperture of the discontinuity element integration points.
Definition gmpHMEmbeddedFractureConductive.cpp:794
bool checkAndLoadPrivateData(LuaTable &table)
Overloads default checkAndLoadPrivateData() to be able to setup materials.
Definition gmpHMEmbeddedFractureConductive.cpp:129
virtual FemResultType fullyImplicitTimeDiscretization(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors, GmMatrix &elemK, GmMatrix &elemC, GmVector &elemFi)
Discretizes the system of equations in time using a fully implicit scheme.
Definition gmpHMEmbeddedFractureConductive.cpp:285
virtual bool setInitialConditions()
Sets the initial conditions for embedded fracture models.
Definition gmpHMEmbeddedFractureConductive.cpp:220
GmpHydraulicEmbeddedFractureConductive * _embeddedHydroPhys
The hydraulic physics providing parameters and matrices to the coupling equation.
Definition gmpHMEmbeddedFractureConductive.h:117
void fillElementOldDisplacement(const GmElement *e, GmVector &ur)
Given an element, fills the vector ue with nodal old displacement vector. The vector should have size...
Definition gmpHMEmbeddedFractureConductive.cpp:185
bool updateHMCouplingParameters(const GmElement *e, const GmVector *coord, int ip)
Updates the hydromechanical coupling parameters of the discontinuity element integration points.
Definition gmpHMEmbeddedFractureConductive.cpp:780
FemResultType solveLocalEquations(const GmElement *e, GmMatrix &A_rr, GmMatrix &A_re, GmMatrix &A_er, GmMatrix &A_ee, GmVector &b_r, GmVector &b_e, GmVector &dof_e)
Solves the local equilibrium equations associated with the discontinuities.
Definition gmpHMEmbeddedFractureConductive.cpp:487
Dual flow hydraulic 2D & 3D for Quad, Tri, Hex and Tet.
Definition gmpHydroMechanical.h:38
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpCoupledHMFemPhysics class.
Declaration of the gmpHydroMechanical classes.