HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialDualPorosity.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_DUALPOROSITY_H_
26#define _GEMA_PLUGIN_HYDRAULIC_MATERIAL_DUALPOROSITY_H_
27
30
31class GMP_HYDRAULIC_PHYSICS_API_EXPORT GmpHydraulicMaterialDualPorosity: public GmpHydraulicMaterialSaturated
32{
33protected:
54
55public:
56
58 GmpHydraulicMaterialDualPorosity(int typeIndex, QString typeName, const GmLogCategory& logger)
59 : GmpHydraulicMaterialSaturated(typeIndex, typeName, logger) {}
60
62 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
63 {
64 Q_UNUSED(simulation);
65 return new GmpHydraulicMaterialDualPorosity(typeIndex, typeName, logger);
66 }
67
68 enum shapeFactorType{
69 warrenRoot,
70 kazemi,
71 limAzis,
72 coat,
73 user,
74 none
75 };
76
77 // set dual porosity material map
78 virtual const QVariantMap* materialMetaDataMap();
79
81 virtual double fractureSpacingX(const GmElement* e, const GmVector* coord, int ip) const
82 {
83 S_TRACE(); assert(e);
84 if (propertyAc(Sx_ID) == NULL)
85 {
86 return 0;
87 }
88 return propertyAc(Sx_ID)->scalarValueAt(e, coord, ip);
89 }
90
92 virtual double fractureApertureX(const GmElement* e, const GmVector* coord, int ip) const
93 {
94 S_TRACE(); assert(e);
95 if (propertyAc(Bx_ID) == NULL)
96 {
97 return 0;
98 }
99 return propertyAc(Bx_ID)->scalarValueAt(e, coord, ip);
100 }
101
103 virtual double fractureSpacingY(const GmElement* e, const GmVector* coord, int ip) const
104 {
105 S_TRACE(); assert(e);
106 if (propertyAc(Sy_ID) == NULL)
107 {
108 return 0;
109 }
110 return propertyAc(Sy_ID)->scalarValueAt(e, coord, ip);
111 }
112
114 virtual double fractureApertureY(const GmElement* e, const GmVector* coord, int ip) const
115 {
116 S_TRACE(); assert(e);
117 if (propertyAc(By_ID) == NULL)
118 {
119 return 0;
120 }
121 return propertyAc(By_ID)->scalarValueAt(e, coord, ip);
122 }
123
125 virtual double fractureSpacingZ(const GmElement* e, const GmVector* coord, int ip) const
126 {
127 S_TRACE(); assert(e);
128 if (propertyAc(Sz_ID) == NULL)
129 {
130 return 0;
131 }
132 return propertyAc(Sz_ID)->scalarValueAt(e, coord, ip);
133 }
134
136 virtual double fractureApertureZ(const GmElement* e, const GmVector* coord, int ip) const
137 {
138 S_TRACE(); assert(e);
139 if (propertyAc(Bz_ID) == NULL)
140 {
141 return 0;
142 }
143 return propertyAc(Bz_ID)->scalarValueAt(e, coord, ip);
144 }
145
147 virtual double fracturePoreCompressibility(const GmElement* e, const GmVector* coord, int ip) const
148 {
149 S_TRACE(); assert(e);
150 if (propertyAc(Bpf_ID) == NULL)
151 {
152 return 0;
153 }
154 return propertyAc(Bpf_ID)->scalarValueAt(e, coord, ip);
155 }
156
158 virtual double fractureViscosity(const GmElement* e, const GmVector* coord, int ip) const
159 {
160 S_TRACE(); assert(e);
161 return propertyAc(Uf_ID)->scalarValueAt(e, coord, ip);
162 }
163
165 virtual double userDefinedFracturePorosity(const GmElement* e, const GmVector* coord, int ip) const
166 {
167 S_TRACE(); assert(e);
168 return propertyAc(PorF_User_ID)->scalarValueAt(e, coord, ip);
169 }
170
172 virtual void userDefinedFracturePermeability(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Kf) const
173 {
174 S_TRACE();
175 assert(e);
176 GmpFemPhysicsCommon::fillMatrixFromPropertyAc(propertyAc(Kf_User_ID), e, coord, ip, Kf);
177 }
178
180 virtual double userDefinedShapeFactor(const GmElement* e, const GmVector* coord, int ip) const
181 {
182 S_TRACE(); assert(e);
183 return propertyAc(Wff_User_ID)->scalarValueAt(e, coord, ip);
184 }
185
187 virtual bool shapeFactorModel(const GmElement* e, GmpHydraulicMaterialDualPorosity::shapeFactorType& type, const GmVector* coord, int ip) const;
189 virtual void setfrac(double& sx, double& sy, double&sz, int& fx, int& fy, int&fz, int&n, double&sm) const;
191 virtual double fillFracturePorosity(const GmElement* e, const GmVector* coord, int ip) const;
193 virtual bool fillFracturePermeability(const GmElement* e, GmMatrix& Kper, const GmVector* coord, int ip) const;
195 virtual bool fillShapeFactor(const GmElement* e, double& ws, GmMatrix Km, const GmVector* coord, int ip)const;
196
197};
198
199
200#endif
Definition gmpMaterialDualPorosity.h:32
virtual double userDefinedFracturePorosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the user-defined fracture porosity.
Definition gmpMaterialDualPorosity.h:165
DualPorosityElementPropertyIds
IDs for saturated material element properties.
Definition gmpMaterialDualPorosity.h:36
@ Bx_ID
Id for retrieving the frature aperture along x.
Definition gmpMaterialDualPorosity.h:38
@ Kf_User_ID
Id for retrieving the user defined fracture hydraulic conductivity tensor accessor.
Definition gmpMaterialDualPorosity.h:46
@ Bpf_ID
Id for retrieving the Pore compressibility of fracture.
Definition gmpMaterialDualPorosity.h:43
@ PorF_User_ID
Id for retrieving the user defined fracture porosity accessor.
Definition gmpMaterialDualPorosity.h:47
@ Sy_ID
Id for retrieving the fracture spacing along y.
Definition gmpMaterialDualPorosity.h:39
@ Uf_ID
Id for retrieving the fracture dynamic viscosity.
Definition gmpMaterialDualPorosity.h:44
@ Sz_ID
Id for retrieving the fracture spacing along z.
Definition gmpMaterialDualPorosity.h:41
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialDualPorosity.h:52
@ Wff_User_ID
Id for retrieving the user defined shape factor accessor.
Definition gmpMaterialDualPorosity.h:48
@ shapeFactor_ID
Id for retrieving the type of shape factor.
Definition gmpMaterialDualPorosity.h:45
@ Bz_ID
Id for retrieving the frature aperture along z.
Definition gmpMaterialDualPorosity.h:42
@ By_ID
Id for retrieving the frature aperture along y
Definition gmpMaterialDualPorosity.h:40
virtual double fractureSpacingX(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture spacing along x.
Definition gmpMaterialDualPorosity.h:81
virtual double fractureViscosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture dynamic viscosity.
Definition gmpMaterialDualPorosity.h:158
GmpHydraulicMaterialDualPorosity(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialDualPorosity.h:58
virtual double fractureSpacingY(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture spacing along y.
Definition gmpMaterialDualPorosity.h:103
virtual double fractureApertureY(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture aperture along y.
Definition gmpMaterialDualPorosity.h:114
virtual void userDefinedFracturePermeability(const GmElement *e, const GmVector *coord, int ip, GmMatrix &Kf) const
Returns the user-defined fracture permeability.
Definition gmpMaterialDualPorosity.h:172
virtual double fractureSpacingZ(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture spacing along z.
Definition gmpMaterialDualPorosity.h:125
virtual double fractureApertureZ(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture aperture along z.
Definition gmpMaterialDualPorosity.h:136
virtual double userDefinedShapeFactor(const GmElement *e, const GmVector *coord, int ip) const
Returns the user-defined shape factor.
Definition gmpMaterialDualPorosity.h:180
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 gmpMaterialDualPorosity.h:62
virtual double fracturePoreCompressibility(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture pore compressibility.
Definition gmpMaterialDualPorosity.h:147
virtual double fractureApertureX(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture aperture along x.
Definition gmpMaterialDualPorosity.h:92
Definition gmpMaterialSaturated.h:30
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialSaturated.h:39
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpMaterialSaturated.cpp:21
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpHydraulicMaterial classes.
Declaration of the GmpHydraulicMaterialSaturated class.