MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialEquivalentContinuum.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2016 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_MECHANICALMATERIAL_EQUIVALENTCONTINUUM_H_
25 #define _GEMA_PLUGIN_MECHANICALMATERIAL_EQUIVALENTCONTINUUM_H_
26 
27 #include "gmpMechanicalConfig.h"
28 #include "gmpFemPhysics.h"
29 #include "gmMathUtils.h"
30 
31 #include "gmpMechanicalMaterial.h"
32 #include "gmpMaterialElastic.h"
33 #include "gmpMechanicPoint.h"
34 
35 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalMaterialEquivalentContinuum : public GmpMechanicalMaterialElastic
36 {
37 protected:
40  {
48 
49  // --- NO ADDING BELOW THIS LINE
51  };
52 
55  {
59 
60 
61  // --- NO ADDING BELOW THIS LINE
63  };
64 
65 public:
66 
68  GmpMechanicalMaterialEquivalentContinuum(int typeIndex, QString typeName, const GmLogCategory& logger)
69  : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
70 
73 
75  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
76  {
77  Q_UNUSED(simulation);
78  return new GmpMechanicalMaterialEquivalentContinuum(typeIndex, typeName, logger);
79  }
80 
83  {
86 
87  // ------ NO ADDING BELOW THIS LINE
89  };
90 
91  // Returns a map with material associated properties.
92  virtual const QVariantMap* materialMetaDataMap();
93 
94  // Sets the initial conditions required by fractured rock material
95  virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
96 
97  // Returns the stresses according to the material behavior adopted
98  virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector&, unsigned nc, bool ips) const;
99 
100  // calculates derived results
101  virtual bool calcDerivedResults(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
102 
104  virtual GmVector normalElasticStiffnessFracture(const GmElement* e, const GmVector* coord, int ip) const
105  {
106  S_TRACE();
107  GmVector Kn;
108  GmCellAccessor* knAc = propertyAc(Knf_ID);
109  // Fills property values
110  vectorPropertyValue(e, knAc, Kn, coord, ip);
111  return Kn;
112  }
113 
115  virtual GmVector shearElasticStiffnessFracture(const GmElement* e, const GmVector* coord, int ip) const
116  {
117  S_TRACE();
118  GmVector Ks;
119  GmCellAccessor* ksAc = propertyAc(Ksf_ID);
120  // Fills property values
121  vectorPropertyValue(e, ksAc, Ks, coord, ip);
122  return Ks;
123  }
124 
126  virtual GmVector fractureSpacing(const GmElement* e, const GmVector* coord, int ip) const
127  {
128  S_TRACE();
129  GmVector Sf;
130  GmCellAccessor* sfAc = propertyAc(Sfr_ID);
131  // Fills property values
132  vectorPropertyValue(e, sfAc, Sf, coord, ip);
133  return Sf;
134  }
135 
137  virtual GmVector fracturedDip(const GmElement* e, const GmVector* coord, int ip) const
138  {
139  S_TRACE();
140  GmVector Dip;
141  GmCellAccessor* dipAc = propertyAc(DIP_ID);
142  // Fills property values
143  vectorPropertyValue(e, dipAc, Dip, coord, ip);
144  return Dip;
145  }
146 
148  virtual GmVector fractureStrike(const GmElement* e, const GmVector* coord, int ip) const
149  {
150  S_TRACE();
151  GmVector Strike;
152  GmCellAccessor* strikeAc = propertyAc(STRIKE_ID);
153  if (!vectorPropertyValue(e, strikeAc, Strike, coord, ip)) {
154  Strike.set_size(1);
155  return Strike.fill(0);
156  }
157  return Strike;
158  }
159 
161  virtual GmVector fractureAperture(const GmElement* e, const GmVector* coord, int ip) const
162  {
163  S_TRACE();
164  GmVector Aperture;
165  GmCellAccessor* apertureAc = propertyAc(Bfr_ID);
166  // Fills property values
167  vectorPropertyValue(e, apertureAc, Aperture, coord, ip);
168 
169  return Aperture;
170  }
171 
173  virtual closureModel fractureClosureModel(const GmElement* e, const GmVector* coord, int ip) const
174  {
175  S_TRACE();
176  assert(e);
178 
179  if (propertyAc(Closure_ID) == NULL)
180  {
181  return GmpMechanicalMaterialEquivalentContinuum::closureModel::normal;
182  }
183 
184  int closureType = propertyAc(Closure_ID)->scalarValueAt(e, coord, ip);
185  //
186  if (closureType == 1)
187  {
188  type = GmpMechanicalMaterialEquivalentContinuum::closureModel::hardStiffness;
189  }
190  else if (closureType == 2)
191  {
192  type = GmpMechanicalMaterialEquivalentContinuum::closureModel::bartonBandis;
193  }
194  else
195  {
196  type = GmpMechanicalMaterialEquivalentContinuum::closureModel::normal;
197  }
198 
199  return type;
200  }
201 
203  virtual GmVector updatedFractureAperture(const GmElement* e, const GmVector* coord, int ip) const;
204 
205  virtual void stiffness(const GmElement*, unsigned, GmMatrix&, GmMatrix& Cf, const GmVector*, unsigned, int) const;
206 
207  virtual void factureFlexibility(GmMatrix& Cf, double Kn, double Ks, double Sf, int ns) const;
208 
209 };
210 
211 #endif
The number of property ids above.
Definition: gmpMaterialElastic.h:46
Base Id for Gauss attribute(s) used to store the maximum fracture apertures.
Definition: gmpMaterialEquivalentContinuum.h:84
Id for retrieving the shear elastic stiffness accessor.
Definition: gmpMaterialEquivalentContinuum.h:42
Base Id for Gauss attribute(s) used to store the fracture apertures.
Definition: gmpMaterialEquivalentContinuum.h:85
#define S_TRACE()
The number of gauss attributes.
Definition: gmpMaterialEquivalentContinuum.h:88
Declaration of the GmpMechanicalMaterial class.
virtual GmVector fractureStrike(const GmElement *e, const GmVector *coord, int ip) const
Returns the angle of strike.
Definition: gmpMaterialEquivalentContinuum.h:148
Definition: gmpMaterialElastic.h:34
virtual GmVector fractureSpacing(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture spacing.
Definition: gmpMaterialEquivalentContinuum.h:126
FracRockElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialEquivalentContinuum.h:39
Definition: gmpMaterialEquivalentContinuum.h:35
virtual GmVector shearElasticStiffnessFracture(const GmElement *e, const GmVector *coord, int ip) const
Returns the shear elastic stiffness.
Definition: gmpMaterialEquivalentContinuum.h:115
closureModel
Fracture closure models.
Definition: gmpMaterialEquivalentContinuum.h:54
The number of fracture closure models.
Definition: gmpMaterialEquivalentContinuum.h:62
Definition: gmpMechanicPoint.h:32
virtual ~GmpMechanicalMaterialEquivalentContinuum()
Virtual destructor.
Definition: gmpMaterialEquivalentContinuum.h:72
The number of property ids above.
Definition: gmpMaterialEquivalentContinuum.h:50
Id for retrieving the closure model.
Definition: gmpMaterialEquivalentContinuum.h:47
virtual bool mechanicalConstitutiveModel(const GmElement *e, GmMatrix &Dep, const GmpMechanicPoint *mp, const GmVector *coord, const GmVector &Time, unsigned nc, bool ips) const
Evaluates stress and tangent matrix according to the material behavior adopted.
Definition: gmpMaterialElastic.cpp:83
virtual GmVector normalElasticStiffnessFracture(const GmElement *e, const GmVector *coord, int ip) const
Returns the normal elastic stiffness.
Definition: gmpMaterialEquivalentContinuum.h:104
virtual bool calcDerivedResults(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned sc) const
Calculates the derived results required by materials.
Definition: gmpMechanicalMaterial.h:86
virtual closureModel fractureClosureModel(const GmElement *e, const GmVector *coord, int ip) const
Returns the type of fracture closure model.
Definition: gmpMaterialEquivalentContinuum.h:173
Id for retrieving the fracture spacing accessor.
Definition: gmpMaterialEquivalentContinuum.h:43
Declaration of the GmpMechanicPoint class.
Declaration of the GmpMechanicalMaterialElastic class.
Declaration of usefull configuration definitions for the plugin library.
fracturedRockGaussAttrIds
IDs for Gauss attributes of fractured rock material.
Definition: gmpMaterialEquivalentContinuum.h:82
Id for retrieving the angle of dip accessor.
Definition: gmpMaterialEquivalentContinuum.h:44
virtual bool setInitialConditions(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned sc) const
Sets the initial conditions required by Solid materials.
Definition: gmpMechanicalMaterial.h:68
Fracture closure considering Hard Stiffness.
Definition: gmpMaterialEquivalentContinuum.h:57
virtual GmVector fracturedDip(const GmElement *e, const GmVector *coord, int ip) const
Returns the angle of dip.
Definition: gmpMaterialEquivalentContinuum.h:137
GmpMechanicalMaterialEquivalentContinuum(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialEquivalentContinuum.h:68
arma::vec GmVector
Normal closure without contact.
Definition: gmpMaterialEquivalentContinuum.h:56
virtual GmVector fractureAperture(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture aperture.
Definition: gmpMaterialEquivalentContinuum.h:161
arma::mat GmMatrix
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition: gmpMaterialElastic.cpp:40
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: gmpMaterialEquivalentContinuum.h:75
Id for retrieving the frature aperture accessor.
Definition: gmpMaterialEquivalentContinuum.h:46
Id for retrieving the angle of strike accessor.
Definition: gmpMaterialEquivalentContinuum.h:45
Fracture closure considering Barton-Bandis model.
Definition: gmpMaterialEquivalentContinuum.h:58