Xfem
The Xfem Plugin
Loading...
Searching...
No Matches
xfemHydraulicEmbeddedFracture.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2017 by Geomechanic group - Tecgraf/Puc-Rio
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
23#ifndef _GEMA_XFEM_HYDRAULIC_EMBEDDEDFRACTURE_H_
24#define _GEMA_XFEM_HYDRAULIC_EMBEDDEDFRACTURE_H_
25
26#include <gmpFemPhysicsCoupled.h>
27#include <gmpHydraulic.h>
28#include <gmDiscontinuitySet.h>
29#include <gmDiscontinuity.h>
32
33#include "xfemMesh.h"
34
35class GmpHydraulicPhysics;
36class GmGaussAccessor;
37
40class XfemHydraulicEmbeddedFracture : public GmpFemPhysicsCoupled
41{
42public:
43 // constructor
44 XfemHydraulicEmbeddedFracture(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
45 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
46 // destructor
48
49 // Comments on the base class
50 virtual const char* pluginName() const { return "Xfem"; }
51
52 virtual const char* pluginType() const { return _pluginType; }
53
54 // set physic map
55 virtual const QVariantMap* physicsMetaDataMap();
56
57 // Comments on the base class
58
59 virtual bool dofByElement(bool* fixed, bool* addOnly, bool* trackChanges) const;
60
61 virtual const GmElementDof* dofMapping(const GmElement* e) const;
62
63 virtual bool fixedNodalDofsBc(QList<int>& nodes, QList<int>&dof, QList<double>& values, bool* constantValues) const;
64
65 virtual bool fixedNodalForcesBc(QList<int>& nodes, QList<int>&dof, QList<double>& values) const;
66
67 virtual FemResultType fillElementDataForBc(const GmElement* e, const GmBoundaryCondition* bc, int bcIndex, int bcListIndex,
68 int border, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
69
70 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
71
72 virtual FemResultType fillEnrichedElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
73
74 virtual FemResultType fillEnrichedElementSubData(const GmElement* e, GmVector& pe, GmVector& Dpe, int nRegDofs, int nEnrDof, GmMatrix& Scc, GmMatrix& Scd, GmMatrix& Sdd, GmMatrix& Hcc, GmMatrix& Hcd, GmMatrix& Hdd, GmVector& qic, GmVector& qid);
75
76protected:
77
80 {
83
84 // ------ NO ADDING BELOW THIS LINE
86 };
87
90 {
94
95 // ------ NO ADDING BELOW THIS LINE
97 };
98
99
102 {
104
105
106 // ------ NO ADDING BELOW THIS LINE
108 };
109
112 {
116
117 // ------ NO ADDING BELOW THIS LINE
119 };
120
121 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
122 virtual bool checkAndLoadPrivateData(LuaTable& table);
123 virtual void fillElementPressureJumps(const GmElement* e, GmVector& Dpe);
124 virtual void oldElementDisplacementJumps(const GmElement* e, GmVector& we);
125 virtual void fillDiscontinuitySetElementData(const GmElement* e, GmVector& we, GmMatrix& Kd, GmVector& fid);
126 virtual void assembleElementData(bool needsK, bool needsFi, GmMatrix& elemK, GmMatrix& Kuu, GmMatrix& Kuw, GmMatrix& Kww, GmVector& elemFi, GmVector& fiu, GmVector& fiw);
127 virtual void get2DDiscontinuityRotationMatrix(const GmCompact2DSegmentCellIntersection* discontinuitySeg, GmMatrix& R);
128 virtual void discontinuityCohesiveLaw(double ks, double kn, GmVector& w, GmVector& td, GmMatrix& Td);
129 virtual void fillPressureJumpMappingMatrix(const GmElement* e, GmMatrix& Xe, GmMatrix& Mp);
130 virtual void get2DDiscontinuityGeometry(const GmCompact2DSegmentCellIntersection* discontinuitySeg, GmVector& Xref, GmVector& m, GmVector& nd);
131 virtual void fillEnrichedBuMatrix(const GmElement* e, const GmShape* elemShape, const GmVector& Xn, GmMatrix& Xe, GmMatrix& Mu, GmMatrix& Bu, GmMatrix& Buenr);
132 double heavisideFunction(GmVector& X, GmVector& Xref, GmVector& nd);
133 int getNumberEnrichedDofs(const GmElement* e);
134 virtual void fillHeavisideMatrix(GmMatrix& Hd, GmMatrix& Xe, GmVector& Xref, GmVector& nd);
135
136 virtual double fillBpMatrix(const GmShape* shape, const GmVector& ncoord, const GmMatrix& X, const GmVector& N, const GmMatrix& J, GmMatrix& Bp)
137 {
138 S_TRACE();
139 Q_UNUSED(X); Q_UNUSED(N);
140 return shape->shapeCartesianPartialsFromJacobian(ncoord, J, Bp, true);
141 }
142
143 const char* _pluginType;
145 GmpHydraulic* _hydroPhys;
146 //GmSimulationData* _SimulationData; //!< Simulation data
147
148private:
149 GmDiscontinuitySet* _discontinuitySet;
150};
151#endif
virtual double shapeCartesianPartialsFromJacobian(const GmVector &ncoord, const GmMatrix &J, GmMatrix &dN, bool transposed=false) const
Basic class for the hydraulic embedded physics plugin object.
Definition xfemHydraulicEmbeddedFracture.h:41
embeddedPhysicsAttributeIds
IDs for physics attributes.
Definition xfemHydraulicEmbeddedFracture.h:90
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition xfemHydraulicEmbeddedFracture.h:96
@ ISOPARAMETRIC_ID
Id for retrieving the isoParametric physics attribute.
Definition xfemHydraulicEmbeddedFracture.h:91
@ CONDENSATION_TOL
Tolerance for the static condensation process.
Definition xfemHydraulicEmbeddedFracture.h:93
@ CONDENSATION_ID
Id for retrieving the static condensation physics attribute.
Definition xfemHydraulicEmbeddedFracture.h:92
GmMatrix _Dsn
Constitutive tangent matrix (2 x 2)
Definition xfemHydraulicEmbeddedFracture.h:144
virtual bool checkAndLoadPrivateData(LuaTable &table)
Overloads default checkAndLoadPrivateData() to be able to setup materials.
Definition xfemHydraulicEmbeddedFracture.cpp:146
XfemHydraulicEmbeddedFracture(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 xfemHydraulicEmbeddedFracture.cpp:60
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for generic elements.
Definition xfemHydraulicEmbeddedFracture.cpp:323
embeddedBCValueIds
IDs for property values from accepted boundary condition types.
Definition xfemHydraulicEmbeddedFracture.h:112
@ BC_WZ_ID
Nodal jump displacement boundary condition in z.
Definition xfemHydraulicEmbeddedFracture.h:115
@ BC_WY_ID
Nodal jump displacement boundary condition in y.
Definition xfemHydraulicEmbeddedFracture.h:114
@ BC_WX_ID
Nodal jump displacement boundary condition in x.
Definition xfemHydraulicEmbeddedFracture.h:113
@ NUM_BCV_IDS
The number of boundary conditions value ids above.
Definition xfemHydraulicEmbeddedFracture.h:118
int getNumberEnrichedDofs(const GmElement *e)
Gets the number of enrichment degrees of freedom in the given element TODO: Generalize to consider th...
Definition xfemHydraulicEmbeddedFracture.cpp:458
virtual FemResultType fillEnrichedElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a enriched element.
Definition xfemHydraulicEmbeddedFracture.cpp:360
GmpHydraulic * _hydroPhys
The mechanical physics providing parameters and matrices to the coupling equation.
Definition xfemHydraulicEmbeddedFracture.h:145
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the Xfem mechanical physics attribute map, built when the function is called ...
Definition xfemHydraulicEmbeddedFracture.cpp:95
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 pore pressures (TODO fill Pd)
Definition xfemHydraulicEmbeddedFracture.cpp:242
const char * _pluginType
The plugin type name.
Definition xfemHydraulicEmbeddedFracture.h:143
embeddedStateVarIds
IDs for Mechanical xfem state vars.
Definition xfemHydraulicEmbeddedFracture.h:80
@ P_ID
Id for retrieving the accessor to the pore-pressure state var.
Definition xfemHydraulicEmbeddedFracture.h:81
@ Pd_ID
Id for retrieving the accessor to the discontinuity pore-pressure state var
Definition xfemHydraulicEmbeddedFracture.h:82
@ NUM_STATEVAR_IDS
The number of state var ids above.
Definition xfemHydraulicEmbeddedFracture.h:85
embeddedBC_Ids
IDs for accepted boundary condition types.
Definition xfemHydraulicEmbeddedFracture.h:102
@ NUM_BC_IDS
The number of boundary conditions ids above.
Definition xfemHydraulicEmbeddedFracture.h:107
@ FIXED_W_BC_ID
Id for fixed Jump displacement boundary condition.
Definition xfemHydraulicEmbeddedFracture.h:103
virtual ~XfemHydraulicEmbeddedFracture()
Destructor.
Definition xfemHydraulicEmbeddedFracture.cpp:89
virtual FemResultType fillEnrichedElementSubData(const GmElement *e, GmVector &pe, GmVector &Dpe, int nRegDofs, int nEnrDof, GmMatrix &Scc, GmMatrix &Scd, GmMatrix &Sdd, GmMatrix &Hcc, GmMatrix &Hcd, GmMatrix &Hdd, GmVector &qic, GmVector &qid)
Fills the enriched element sub-matrices and sub-vectors.
Definition xfemHydraulicEmbeddedFracture.cpp:490
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the XfemMesh class.