HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialShearLaw.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_SHEARLAW_H_
25#define _GEMA_PLUGIN_HYDRAULIC_MATERIAL_SHEARLAW_H_
26
27#include <gmTrace.h>
28#include <assert.h>
29
31
32class GMP_HYDRAULIC_PHYSICS_API_EXPORT GmpMaterialShearLaw : public GmpMaterialInterfaceFlow
33{
34protected:
37 {
38 //GAP_ID = GmpMaterialInterfaceFlow::NUM_PROPERTY_IDS, //!< Id for retrieving the parameter that controls the shape of the curve Sw x pc
39
40 // --- NO ADDING BELOW THIS LINE
42 };
43
44public:
45
47 GmpMaterialShearLaw(int typeIndex, QString typeName, const GmLogCategory& logger)
48 : GmpMaterialInterfaceFlow(typeIndex, typeName, logger) {}
49
51 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
52 {
53 Q_UNUSED(simulation);
54 return new GmpMaterialShearLaw(typeIndex, typeName, logger);
55 }
56
61 virtual void hydraulicConstitutiveModel(const GmElement* e, GmVector& flowParam, const GmVector* coord, int ip) const
62 {
63 S_TRACE();
64 assert(e);
65 flowParam.fill(0.0);
66 double gap = fractureOpening(e, coord, ip);
67 double uf = fluidViscosity(e, coord, ip);
68 double Ap = gaussAttrAc(AnOLD_GA_ID)->scalarValueAt(e, ip, coord);
69 double k0 = gap * gap / 12.0;
70 double kf = k0;
71 if (Ap > 0.0)
72 {
73 kf = k0 + 1E-4 * pow(Ap, 2.0);
74 }
75 double An = sqrt(12.0 * kf);
76 //Compute the longitudinal conductivity according to cubic's law.
77 flowParam(0) = An *kf/ uf;
78 //computes the leakoff coefficients
79 flowParam(1) = leakoffTop(e, coord, ip);
80 flowParam(2) = leakoffBottom(e, coord, ip);
81 }
82
83};
84
85#endif
Definition gmpMaterialInterfaceFlow.h:33
virtual double fractureOpening(const GmElement *e, const GmVector *coord, int ip) const
Returns the initial fracture opening.
Definition gmpMaterialInterfaceFlow.h:70
virtual double leakoffTop(const GmElement *e, const GmVector *coord, int ip) const
Returns the leakoff coefficient at the top.
Definition gmpMaterialInterfaceFlow.h:98
virtual double fluidViscosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the dynamic fluid viscosity.
Definition gmpMaterialInterfaceFlow.h:78
virtual double leakoffBottom(const GmElement *e, const GmVector *coord, int ip) const
Returns the leakoff coefficient at the Bottom.
Definition gmpMaterialInterfaceFlow.h:110
Definition gmpMaterialShearLaw.h:33
virtual void hydraulicConstitutiveModel(const GmElement *e, GmVector &flowParam, const GmVector *coord, int ip) const
Fills the hydraulic conductivity for longitudinal and normal fluid flow. The longitudinal conductivit...
Definition gmpMaterialShearLaw.h:61
CubicLawPropIds
IDs for saturated material element properties.
Definition gmpMaterialShearLaw.h:37
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialShearLaw.h:41
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 gmpMaterialShearLaw.h:51
GmpMaterialShearLaw(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialShearLaw.h:47
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpMaterialInterfaceFlow class.