HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
gmpHydraulicMaterialMultiPhase.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
24#ifndef _GEMA_PLUGIN_HYDRAULIC_MATERIAL_MULTIPHASE_H_
25#define _GEMA_PLUGIN_HYDRAULIC_MATERIAL_MULTIPHASE_H_
26
28
29class GMP_HYDRAULIC_PHYSICS_API_EXPORT GmpHydraulicMaterialMultiPhase: public GmpFemPhysicsCommonMaterial
30{
31protected:
55
56public:
57
59 GmpHydraulicMaterialMultiPhase(int typeIndex, QString typeName, const GmLogCategory& logger)
60 : GmpFemPhysicsCommonMaterial(typeIndex, typeName, logger) {}
61
62 // Sets multiPhase material map
63 virtual const QVariantMap* materialMetaDataMap();
64
66 virtual void hydraulicConstitutiveModel(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Kw, GmMatrix& Kc, double Sw, const GmpHydraulic::HMaterialPointAccessors& mp, int d) const ;
67
69 virtual void permeabilityStiffness(const GmElement* e, const GmVector* coord, int ip, GmMatrix& K) const;
70
72 virtual double waterSaturation(const GmElement* e, const GmVector* coord, int ip, double pc) const = 0;
73
75 virtual double derivativeWaterSaturation(const GmElement* e, const GmVector* coord, int ip, double pc) const = 0;
76
78 virtual double effectiveSaturation(const GmElement* e, const GmVector* coord, int ip, double Sw) const;
79
81 virtual double waterRelativePermeability(const GmElement* e, const GmVector* coord, int ip, double Sw) const = 0;
82
84 virtual double gasRelativePermeability(const GmElement* e, const GmVector* coord, int ip, double Sw) const = 0;
85
87 virtual double intrinsicPermeability(const GmElement* e, const GmVector* coord, int ip) const
88 {
89 return propertyAc(K_ID)->scalarValueAt(e, coord, ip);
90 }
92 virtual double porosity(const GmElement* e, const GmVector* coord, int ip) const
93 {
94 return propertyAc(Pht_ID)->scalarValueAt(e, coord, ip);
95 }
96
98 double universalGasConstant(const GmElement* e, const GmVector* coord, int ip) const
99 {
100 return propertyAc(R_ID)->scalarValueAt(e, coord, ip);
101 }
102
104 virtual double temperature(const GmElement* e, const GmVector* coord, int ip) const
105 {
106 return propertyAc(T_ID)->scalarValueAt(e, coord, ip);
107 }
108
110 virtual double molarMass(const GmElement* e, const GmVector* coord, int ip) const
111 {
112 if (propertyAc(Mg_ID) == NULL)
113 {
114 return 0.0;
115 }
116 return propertyAc(Mg_ID)->scalarValueAt(e, coord, ip);
117 }
118
120 virtual double poreCompressibility(const GmElement* e, const GmVector* coord, int ip) const
121 {
122 if (propertyAc(Bp_ID) == NULL)
123 {
124 return 0.0;
125 }
126 return propertyAc(Bp_ID)->scalarValueAt(e, coord, ip);
127 }
128
130 virtual double waterBulkModulus(const GmElement* e, const GmVector* coord, int ip) const
131 {
132 if (propertyAc(Kww_ID) == NULL)
133 {
134 return 1.0e25;
135 }
136 return propertyAc(Kww_ID)->scalarValueAt(e, coord, ip);
137 }
138
140 virtual double gasBulkModulus(const GmElement* e, const GmVector* coord, int ip) const
141 {
142 if (propertyAc(Kgg_ID) == NULL)
143 {
144 return 1.0e25;
145 }
146 return propertyAc(Kgg_ID)->scalarValueAt(e, coord, ip);
147 }
148
150 virtual double waterViscosity(const GmElement* e, const GmVector* coord, int ip) const
151 {
152 if (propertyAc(Uw_ID) == NULL)
153 {
154 return 1.0e25;
155 }
156 return propertyAc(Uw_ID)->scalarValueAt(e, coord, ip);
157 }
158
160 virtual double gasViscosity(const GmElement* e, const GmVector* coord, int ip) const
161 {
162 if (propertyAc(Ug_ID) == NULL)
163 {
164 return 1.0e25;
165 }
166 return propertyAc(Ug_ID)->scalarValueAt(e, coord, ip);
167 }
168
170 virtual double waterDensity(const GmElement* e, const GmVector* coord, int ip) const
171 {
172 if (propertyAc(Rhow_ID) == NULL)
173 {
174 return 0.0;
175 }
176 return propertyAc(Rhow_ID)->scalarValueAt(e, coord, ip);
177 }
178
180 virtual double gasDensity(const GmElement* e, const GmVector* coord, int ip) const
181 {
182 if (propertyAc(Rhog_ID) == NULL)
183 {
184 return 0.0;
185 }
186 return propertyAc(Rhog_ID)->scalarValueAt(e, coord, ip);
187 }
188
190 virtual double residualWaterSaturation(const GmElement* e, const GmVector* coord, int ip) const
191 {
192 if (propertyAc(SWR_ID) == NULL)
193 {
194 return 0.0;
195 }
196 return propertyAc(SWR_ID)->scalarValueAt(e, coord, ip);
197 }
198
200 virtual double residualGasSaturation(const GmElement* e, const GmVector* coord, int ip) const
201 {
202 if (propertyAc(SGR_ID) == NULL)
203 {
204 return 0.0;
205 }
206 return propertyAc(SGR_ID)->scalarValueAt(e, coord, ip);
207 }
208
210 virtual double gasEntryPressure(const GmElement* e, const GmVector* coord, int ip) const
211 {
212 if (propertyAc(Pd_ID) == NULL)
213 {
214 return 0.0;
215 }
216 return propertyAc(Pd_ID)->scalarValueAt(e, coord, ip);
217 }
218};
219
220#endif
Definition gmpHydraulicMaterialMultiPhase.h:30
double universalGasConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the Universal gas constant R.
Definition gmpHydraulicMaterialMultiPhase.h:98
virtual double gasDensity(const GmElement *e, const GmVector *coord, int ip) const
Returns the fluid density.
Definition gmpHydraulicMaterialMultiPhase.h:180
virtual double gasRelativePermeability(const GmElement *e, const GmVector *coord, int ip, double Sw) const =0
Returns the gas relative permeability.
virtual double waterRelativePermeability(const GmElement *e, const GmVector *coord, int ip, double Sw) const =0
Returns the water relative permeability.
virtual double waterDensity(const GmElement *e, const GmVector *coord, int ip) const
Returns the water density.
Definition gmpHydraulicMaterialMultiPhase.h:170
virtual double waterBulkModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the water bulk modulus.
Definition gmpHydraulicMaterialMultiPhase.h:130
GmpHydraulicMaterialMultiPhase(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpHydraulicMaterialMultiPhase.h:59
MultiPhasePropertyIds
IDs for saturated material element properties.
Definition gmpHydraulicMaterialMultiPhase.h:34
@ Rhow_ID
Id for retrieving the water density accessor.
Definition gmpHydraulicMaterialMultiPhase.h:43
@ Ug_ID
Id for retrieving the gas dynamic viscosity accessor.
Definition gmpHydraulicMaterialMultiPhase.h:42
@ Rhog_ID
Id for retrieving the gas density accessor.
Definition gmpHydraulicMaterialMultiPhase.h:44
@ Bp_ID
Id for retrieving the pore compressibility accessor.
Definition gmpHydraulicMaterialMultiPhase.h:38
@ Pht_ID
Id for retrieving the porosity accessor.
Definition gmpHydraulicMaterialMultiPhase.h:37
@ Pd_ID
Id for retrieving the pressure associated with the gas-entry value.
Definition gmpHydraulicMaterialMultiPhase.h:50
@ K_ID
Id for retrieving the intrinsic permeability accessor.
Definition gmpHydraulicMaterialMultiPhase.h:36
@ T_ID
Id for retrieving the temperature accessor.
Definition gmpHydraulicMaterialMultiPhase.h:46
@ Kww_ID
Id for retrieving the water bulk modulus accessor
Definition gmpHydraulicMaterialMultiPhase.h:39
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpHydraulicMaterialMultiPhase.h:53
@ SWR_ID
Id for retrieving the residual water saturation degree.
Definition gmpHydraulicMaterialMultiPhase.h:48
@ Kgg_ID
Id for retrieving the gas bulk modulus accessor.
Definition gmpHydraulicMaterialMultiPhase.h:40
@ SGR_ID
Id for retrieving the residual water saturation degree.
Definition gmpHydraulicMaterialMultiPhase.h:49
@ Uw_ID
Id for retrieving the water dynamic viscosity accessor.
Definition gmpHydraulicMaterialMultiPhase.h:41
@ Mg_ID
Id for retrieving the molar mass accessor.
Definition gmpHydraulicMaterialMultiPhase.h:47
@ R_ID
Id for retrieving the gas density accessor.
Definition gmpHydraulicMaterialMultiPhase.h:45
virtual double intrinsicPermeability(const GmElement *e, const GmVector *coord, int ip) const
Returns the intrinsic permeability.
Definition gmpHydraulicMaterialMultiPhase.h:87
virtual double derivativeWaterSaturation(const GmElement *e, const GmVector *coord, int ip, double pc) const =0
Returns the dSw/dPc.
virtual double molarMass(const GmElement *e, const GmVector *coord, int ip) const
Returns the material pore compressibility.
Definition gmpHydraulicMaterialMultiPhase.h:110
virtual double poreCompressibility(const GmElement *e, const GmVector *coord, int ip) const
Returns the material pore compressibility.
Definition gmpHydraulicMaterialMultiPhase.h:120
virtual double temperature(const GmElement *e, const GmVector *coord, int ip) const
Returns the Temperature from property table.
Definition gmpHydraulicMaterialMultiPhase.h:104
virtual double waterViscosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the water dynamic viscosity.
Definition gmpHydraulicMaterialMultiPhase.h:150
virtual double porosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the material porosity.
Definition gmpHydraulicMaterialMultiPhase.h:92
virtual double residualWaterSaturation(const GmElement *e, const GmVector *coord, int ip) const
Returns the value of the residual water saturation degree.
Definition gmpHydraulicMaterialMultiPhase.h:190
virtual double gasEntryPressure(const GmElement *e, const GmVector *coord, int ip) const
Returns the value of the pressure associated with the gas-entry value.
Definition gmpHydraulicMaterialMultiPhase.h:210
virtual double waterSaturation(const GmElement *e, const GmVector *coord, int ip, double pc) const =0
Returns the water saturation.
virtual double gasBulkModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the bulk modulus of another fluid.
Definition gmpHydraulicMaterialMultiPhase.h:140
virtual double gasViscosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the fluid dynamic viscosity.
Definition gmpHydraulicMaterialMultiPhase.h:160
virtual double residualGasSaturation(const GmElement *e, const GmVector *coord, int ip) const
Returns the value of the residual water saturation degree.
Definition gmpHydraulicMaterialMultiPhase.h:200
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpHydraulicMaterialSaturated class.
Definition gmpHydraulic.h:47