HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialEnhancedDualPorosity.h
Go to the documentation of this file.
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
25#ifndef _GEMA_PLUGIN_HYDRAULIC_MATERIAL_ENHANCEDDUALPOROSITY_H_
26#define _GEMA_PLUGIN_HYDRAULIC_MATERIAL_ENHANCEDDUALPOROSITY_H_
27
29#include <gmpFemPhysicsData.h>
31
33{
34protected:
35 GmpFemPhysicsData* _matFracData;
36 //GmValueAccessor* _anAcc; //!< fracture aperture accessor
38
47
48public:
49
51 GmpHydraulicMaterialEnhancedDualPorosity(int typeIndex, QString typeName, const GmLogCategory& logger)
52 : GmpHydraulicMaterialGeneralizedDualPorosity(typeIndex, typeName, logger)
53 {
54 _mesh = NULL;
55 _matFracData = NULL;
56 }
57
59 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
60 {
61 Q_UNUSED(simulation);
62 return new GmpHydraulicMaterialEnhancedDualPorosity(typeIndex, typeName, logger);
63 }
64
72
73 // set dual porosity material map
74 virtual const QVariantMap* materialMetaDataMap();
75
77 virtual bool setFractureData(GmpFemPhysicsData* dataF) { _matFracData = dataF; return true; };
78
80 //virtual void setFractureApertureAcc(GmValueAccessor* anAcc) { _anAcc = anAcc; };
81
83 virtual void setMeshAccessor(GmElementMesh* meshAc) { _mesh = meshAc; };
84
86 virtual bool fillFracturePermeability(const GmElement* e, GmMatrix& Kper, const GmVector* coord, int ip) const;
87
89 virtual bool fillShapeFactor(const GmElement* e, double& ws, GmMatrix Km, const GmVector* coord, int ip)const;
90
92 virtual GmMatrix fillFractureLocalPermeability(int dim, double bi, double si) const
93 {
94 GmMatrix Kfrl(dim, dim);
95 Kfrl.fill(0);
96
97 //if ((bi == 0) || (si == 0))
98 //{
99 // return Kfrl;
100 //}
101 // fills fracture permeability
102 if (dim == 2)
103 {
104 // fills bidimensional rotation matrix
105 Kfrl(0, 0) = pow(bi, 3) / (12 * si);
106 }
107 if (dim == 3)
108 {
109 // fills threedimensional rotation matrix
110 Kfrl(0, 0) = pow(bi, 3) / (12 * si);
111 Kfrl(1, 1) = pow(bi, 3) / (12 * si);
112 }
113 return Kfrl;
114 };
115
117 virtual double meanDistance(double dx, double dy) const;
118
120 virtual int checkFractureOrientation(GmVector& data, int d) const;
121
123 virtual double fillShapeFactorOrtogonalFracture(GmMatrix& Xe, GmVector& data) const;
124
126 virtual double fillShapeFactorOrientedFracture(GmMatrix& Xe, GmVector& data) const;
127
129 virtual double fractureAperture(const GmElement* e, const GmVector* coord, int ip) const
130 {
131 S_TRACE();
132 assert(e);
133 return propertyAc(GAP_ID)->scalarValueAt(e, coord, ip);
134 }
135
136private:
138 GmMatrix fillRotationMatrix(const GmMatrix& Xe) const;
139};
140
141#endif
Definition gmpMaterialEnhancedDualPorosity.h:33
static GmpFemPhysicsCommonMaterial * instance(GmSimulationData *simulation, int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition gmpMaterialEnhancedDualPorosity.h:59
DualPorosityElementPropertyIds
IDs for saturated material element properties.
Definition gmpMaterialEnhancedDualPorosity.h:41
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialEnhancedDualPorosity.h:45
virtual GmMatrix fillFractureLocalPermeability(int dim, double bi, double si) const
returns the local fracture permeability matrix
Definition gmpMaterialEnhancedDualPorosity.h:92
GmpHydraulicMaterialEnhancedDualPorosity(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialEnhancedDualPorosity.h:51
GmElementMesh * _mesh
The mesh that this physics.
Definition gmpMaterialEnhancedDualPorosity.h:37
virtual double fractureAperture(const GmElement *e, const GmVector *coord, int ip) const
Returns the initial fracture aperture.
Definition gmpMaterialEnhancedDualPorosity.h:129
GmpFemPhysicsData * _matFracData
Fracture data.
Definition gmpMaterialEnhancedDualPorosity.h:35
virtual bool setFractureData(GmpFemPhysicsData *dataF)
set fracture data
Definition gmpMaterialEnhancedDualPorosity.h:77
virtual void setMeshAccessor(GmElementMesh *meshAc)
set additional fracture properties
Definition gmpMaterialEnhancedDualPorosity.h:83
fracDir
Defines the fracture orientation.
Definition gmpMaterialEnhancedDualPorosity.h:67
@ horizontal
Horizontal fracture.
Definition gmpMaterialEnhancedDualPorosity.h:68
@ oriented
Oriented fracture.
Definition gmpMaterialEnhancedDualPorosity.h:70
@ vertical
Vertical fracture.
Definition gmpMaterialEnhancedDualPorosity.h:69
Definition gmpMaterialGeneralizedDualPorosity.h:32
virtual GmMatrix fillRotationMatrix(int dim, double dip, double strike) const
returns the rotation matrix
Definition gmpMaterialGeneralizedDualPorosity.h:124
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialGeneralizedDualPorosity.h:43
virtual bool fillFracturePermeability(const GmElement *e, GmMatrix &Kper, const GmVector *coord, int ip) const
returns the fracture permeability
Definition gmpMaterialGeneralizedDualPorosity.cpp:84
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpMaterialGeneralizedDualPorosity.cpp:22
virtual bool fillShapeFactor(const GmElement *e, double &ws, GmMatrix Km, const GmVector *coord, int ip) const
returns the shape factor
Definition gmpMaterialGeneralizedDualPorosity.cpp:116
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpHydraulicMaterial classes.
Declaration of the GmpHydraulicMaterialGeneralizedDualPorosity class.