MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialModifiedCamClay.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2016 by Nilthson NoreƱa
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_MODIFIEDCAMCLAY_H_
25 #define _GEMA_PLUGIN_MECHANICALMATERIAL_MODIFIEDCAMCLAY_H_
26 
28 #include "gmpMechanicPoint.h"
29 #include "gmpFemPhysics.h"
30 #include "gmMathUtils.h"
31 
32 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialModifiedCamClay : public GmpMaterialElastoplastic
33 {
34 protected:
37  {
39  l_ID,
40  k_ID,
43 
44  // --- NO ADDING BELOW THIS LINE
46  };
47 
49  {
51 
52  // ------ NO ADDING BELOW THIS LINE
54  };
55 
56 public:
57 
59  GmpMaterialModifiedCamClay(int typeIndex, QString typeName, const GmLogCategory& logger)
60  : GmpMaterialElastoplastic(typeIndex, typeName, logger) {}
61 
64 
66  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
67  {
68  Q_UNUSED(simulation);
69  return new GmpMaterialModifiedCamClay(typeIndex, typeName, logger);
70  }
71 
72 
73  // Returns a map with material associated properties.
74  virtual const QVariantMap* materialMetaDataMap();
75 
77  virtual bool isIsotropic() const { return true; }
78 
80  virtual double CriticalFrictionSlope(const GmElement* e, const GmVector* coord, int ip) const
81  {
82  return propertyAc(M_ID)->scalarValueAt(e, coord, ip);
83  }
84 
86  double BetaParameter(const GmElement* e, const GmVector& s, const GmVector* coord, int ip, unsigned st) const
87  {
89  //Hidrostatic stress
90  const double p_ = -GmpMechanicUtils::stressInvariantI1(s, st) / 3;
91  //const double p_ = GmpMechanicUtils::hydrostaticStress(s, st);
92  //von Mises Stress
93  const double q_ = sqrt(GmpMechanicUtils::deviatoricInvariantJ2(s, st) * 3);
94  //const double q_ = GmpMechanicUtils::vonMisesStress(s, st);
95 
96  //Critical line slope
97  const double M_ = CriticalFrictionSlope(e, coord, ip);
98 
99  //Beta parameter
100  double beta_ = 1.0;
101  GmCellAccessor* B_ = propertyAc(beta_ID);
102  if (B_ != NULL && p_ > -1 * M_*q_)
103  beta_ = propertyAc(beta_ID)->scalarValueAt(e, coord, ip);
104 
105  return beta_;
106  }
107 
109  virtual double IsotropicLineSlope(const GmElement* e, const GmVector* coord, int ip) const
110  {
111  return propertyAc(l_ID)->scalarValueAt(e, coord, ip);
112  }
113 
115  virtual double ReloadingLineSlope(const GmElement* e, const GmVector* coord, int ip) const
116  {
117  return propertyAc(k_ID)->scalarValueAt(e, coord, ip);
118  }
119 
121  virtual double InitialVoidRatio(const GmElement* e, const GmVector* coord, int ip) const
122  {
123  return propertyAc(e0_ID)->scalarValueAt(e, coord, ip);
124  }
125 
126  //yield criterion
127  virtual double yieldCriterion(const GmElement*, const GmVector&, const GmVector*, int, unsigned) const;
128  virtual bool yieldStressGradient(const GmElement*, GmVector&, const GmVector&, const GmVector*, int, unsigned, bool) const;
129  virtual double yielddP(const GmElement*, const GmVector&, const GmVector*, int, unsigned) const;
130 
131  //plastic potential
132  virtual bool flowVector(const GmElement*, GmVector&, const GmVector&, const GmVector*, int, unsigned, bool) const;
133  virtual bool flowVectorStressGradient(const GmElement*, GmMatrix&, const GmVector&, const GmVector*, int, unsigned, bool) const;
134  virtual bool plasticdsdp(const GmElement*, GmVector&, const GmVector&, const GmVector*, int, unsigned) const;
135 
136  //internal variable
137  virtual double CamClayHardeningLaw(const GmElement*, const GmVector&, const GmVector*, int, unsigned, bool) const;
138  virtual bool CamClayHardeningGradient(const GmElement*, GmVector&, const GmVector&, const GmVector*, int, unsigned, bool) const;
139  double CamClayHardeningGradientP(const GmElement*, const GmVector&, const GmVector*, int, unsigned, bool) const;
140 
141  //Returns the stresses according to the material behavior adopted
142  virtual bool mechanicalConstitutiveModel(const GmElement*, GmMatrix&, const GmpMechanicPoint*, const GmVector*, const GmVector&, unsigned, bool) const;
143 
145  virtual double yieldStrengthRatio(const GmElement* e, const GmVector& S, const GmVector* coord, int ip, unsigned sc) const;
146 
147  //Returns the current void ratio scalar
148  void voidratio(const GmElement*, const GmpMechanicPoint*, const GmVector*, unsigned) const;
149 
150  //Returns the constitutive elastic matrix
151  void ElasticModulus(const GmElement*, const GmpMechanicPoint*, GmMatrix&, const GmVector*, unsigned) const;
152 
153  //Returns the second order unit tensor
154  GmVector I2(unsigned) const;
155 
156  //Returns the symmetric fourth order unit tensor
157  GmMatrix I4symm(unsigned) const;
158 
159 };
160 
161 #endif
virtual double ReloadingLineSlope(const GmElement *e, const GmVector *coord, int ip) const
Returns the material reloading line slope.
Definition: gmpMaterialModifiedCamClay.h:115
Id for retrieving the reloading line slope accessor.
Definition: gmpMaterialModifiedCamClay.h:40
Definition: gmpMaterialModifiedCamClay.h:32
The number of gauss attributes.
Definition: gmpMaterialElastoplastic.h:92
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: gmpMaterialModifiedCamClay.h:66
The number of property ids above.
Definition: gmpMaterialModifiedCamClay.h:45
ElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialElastic.h:38
The number of property ids above.
Definition: gmpMaterialElastoplastic.h:79
virtual double InitialVoidRatio(const GmElement *e, const GmVector *coord, int ip) const
Returns the material initial void ratio.
Definition: gmpMaterialModifiedCamClay.h:121
Definition: gmpMechanicPoint.h:32
The number of gauss attributes.
Definition: gmpMaterialModifiedCamClay.h:53
GmpMaterialModifiedCamClay(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialModifiedCamClay.h:59
Declaration of the gmpMaterialElastoplastic classes.
virtual double CriticalFrictionSlope(const GmElement *e, const GmVector *coord, int ip) const
Returns the material critical friction slope.
Definition: gmpMaterialModifiedCamClay.h:80
virtual double yieldStrengthRatio(const GmElement *e, const GmVector &S, const GmVector *coord, int ip, unsigned sc) const =0
Returns the Yield Strength Ratio (Ysr)
Id for retrieving the isotropic compression line slope accessor.
Definition: gmpMaterialModifiedCamClay.h:39
Id for retrieveng the beta parameter accessor.
Definition: gmpMaterialModifiedCamClay.h:42
Declaration of the GmpMechanicPoint class.
Id for retrieving the initial void ratio accessor.
Definition: gmpMaterialModifiedCamClay.h:41
GaussAttributeIds
Definition: gmpMaterialModifiedCamClay.h:48
virtual bool mechanicalConstitutiveModel(const GmElement *, GmMatrix &, const GmpMechanicPoint *, const GmVector *, const GmVector &, unsigned, bool) const
Returns the updated stresses after the return mapping process.
Definition: gmpMaterialElastoplastic.cpp:82
virtual double IsotropicLineSlope(const GmElement *e, const GmVector *coord, int ip) const
Returns the material isotropic compression line slope.
Definition: gmpMaterialModifiedCamClay.h:109
double BetaParameter(const GmElement *e, const GmVector &s, const GmVector *coord, int ip, unsigned st) const
Returns the material beta coeficient for the wet side.
Definition: gmpMaterialModifiedCamClay.h:86
arma::vec GmVector
Definition: gmpMaterialElastoplastic.h:35
virtual ~GmpMaterialModifiedCamClay()
Virtual destructor.
Definition: gmpMaterialModifiedCamClay.h:63
arma::mat GmMatrix
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material/Gauus attribute map, built when the function is called for the firs...
Definition: gmpMaterialElastoplastic.cpp:45
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition: gmpMaterialModifiedCamClay.h:77