MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialCrackingCrushingDamage.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 
27 #ifndef _GEMA_PLUGIN_MECHANICALMATERIAL_CRACKINGCRUSHINGDAMAGE_H_
28 #define _GEMA_PLUGIN_MECHANICALMATERIAL_CRACKINGCRUSHINGDAMAGE_H_
29 
30 #include "gmpMechanicalConfig.h"
31 #include "gmpFemPhysics.h"
32 #include "gmMathUtils.h"
33 
34 #include "gmpMaterialElastic.h"
35 #include "gmpMechanicPoint.h"
36 
37 
38 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialCrackingCrushingDamage : public GmpMechanicalMaterialElastic
39 {
40 protected:
43  {
56 
57  // --- NO ADDING BELOW THIS LINE
59  };
60 
61 public:
62 
64  GmpMaterialCrackingCrushingDamage(int typeIndex, QString typeName, const GmLogCategory& logger)
65  : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
66 
69 
71  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
72  {
73  Q_UNUSED(simulation);
74  return new GmpMaterialCrackingCrushingDamage(typeIndex, typeName, logger);
75  }
76 
77  // Returns a map with material associated properties.
78  virtual const QVariantMap* materialMetaDataMap();
79 
80  // Checks material loaded data.
81  virtual bool checkLoadedData(const GmElement* e) const;
82 
85  {
92 
93  // ------ NO ADDING BELOW THIS LINE
95  };
96 
97  // Sets the initial conditions required by isotropic damage material
98  virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
99 
100  // Returns the stresses according to the material behavior adopted
101  virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Ded, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, unsigned nc, bool ips) const;
102 
104  virtual double ultimateUniaxialCompressiveStrength(const GmElement* e, const GmVector* coord, int ip) const
105  {
106  return propertyAc(FCM_ID)->scalarValueAt(e, coord, ip);
107  }
108 
110  virtual double strainAtUltimateCompressiveStrength(const GmElement* e, const GmVector* coord, int ip) const
111  {
112  return propertyAc(RCM_ID)->scalarValueAt(e, coord, ip);
113  }
114 
116  virtual double uniaxialTensileStrength(const GmElement* e, const GmVector* coord, int ip) const
117  {
118  return propertyAc(FT0_ID)->scalarValueAt(e, coord, ip);
119  }
120 
122  virtual double biaxialTensileStrength(const GmElement* e, const GmVector* coord, int ip) const
123  {
124  return propertyAc(FBT_ID)->scalarValueAt(e, coord, ip);
125  }
126 
128  virtual double tensileCriterionShapeParameter(const GmElement* e, const GmVector* coord, int ip) const
129  {
130  return propertyAc(FTC_ID)->scalarValueAt(e, coord, ip);
131  }
132 
134  virtual double elasticUniaxialCompressiveLimit(const GmElement* e, const GmVector* coord, int ip) const
135  {
136  return propertyAc(FC0_ID)->scalarValueAt(e, coord, ip);
137  }
138 
140  virtual double biaxialCompressiveStrength(const GmElement* e, const GmVector* coord, int ip) const
141  {
142  return propertyAc(FBC_ID)->scalarValueAt(e, coord, ip);
143  }
144 
146  virtual double parameterRho(const GmElement* e, const GmVector* coord, int ip) const
147  {
148  return propertyAc(RHO_ID)->scalarValueAt(e, coord, ip);
149  }
150 
152  virtual double fractureEnergy(const GmElement* e, const GmVector* coord, int ip) const
153  {
154  return propertyAc(GF_ID)->scalarValueAt(e, coord, ip);
155  }
156 
158  virtual double crushingEnergy(const GmElement* e, const GmVector* coord, int ip) const
159  {
160  return propertyAc(GC_ID)->scalarValueAt(e, coord, ip);
161  }
162 
164  virtual double userDefinedCharacteristicLength(const GmElement* e, const GmVector* coord, int ip) const
165  {
166  S_TRACE(); assert(e);
167  // Get accessor for the user-defined characteristic length
168  GmCellAccessor* lch = propertyAc(LCH_ID);
169 
170  if (lch == NULL)
171  {
172  return 0.0;
173  }
174 
175  return lch->scalarValueAt(e, coord, ip);
176  }
177 
179  virtual double minimumCharacteristicLength(const GmElement* e, const GmVector* coord, int ip) const
180  {
181  S_TRACE(); assert(e);
182  // Get accessor for the minimum characteristic length
183  GmCellAccessor* lchmin = propertyAc(LCHMIN_ID);
184 
185  if (lchmin == NULL)
186  {
187  return 0.0;
188  }
189 
190  return lchmin->scalarValueAt(e, coord, ip);
191  }
192 
193  // Damage criterion definition
194  virtual bool damageCriterion(const GmElement*, const GmpMechanicPoint*, const GmVector*, unsigned, GmVector, double&, double&, GmVector&, GmVector&, unsigned) const;
195 
196  // Damage evolution law definition
197  virtual bool damageLaw(const GmElement*, const GmVector*, const GmpMechanicPoint*, double, double, double&, double&, double& dg) const;
198 
199  // Returns the characteristic length
200  virtual double characteristicLength(const GmElement*, const GmVector*, int, GmValueAccessor*, bool type = false) const;
201 };
202 
203 #endif
The number of gauss attributes.
Definition: gmpMaterialCrackingCrushingDamage.h:94
Id for retrieving the material point state accessor at the previous state.
Definition: gmpMaterialCrackingCrushingDamage.h:91
Id for retrieving the minimum characteristic element length accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:55
Id for retrieving the material point state accessor at the previous state.
Definition: gmpMaterialCrackingCrushingDamage.h:87
ElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialCrackingCrushingDamage.h:42
virtual double parameterRho(const GmElement *e, const GmVector *coord, int ip) const
Returns the triaxial compression adjustment parameter.
Definition: gmpMaterialCrackingCrushingDamage.h:146
The number of property ids above.
Definition: gmpMaterialElastic.h:46
Id for retrieving the fracture energy accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:52
virtual double fractureEnergy(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture energy.
Definition: gmpMaterialCrackingCrushingDamage.h:152
virtual double ultimateUniaxialCompressiveStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the ultimate uniaxial compressive strength of the material.
Definition: gmpMaterialCrackingCrushingDamage.h:104
Id for retrieving the uniaxial compressive stress in which the damage process is initialized accessor...
Definition: gmpMaterialCrackingCrushingDamage.h:49
Id for retrieving the uniaxial tensile strength accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:46
Base Id for Gauss attribute(s) used to store the damage variable at the current state.
Definition: gmpMaterialCrackingCrushingDamage.h:86
#define S_TRACE()
virtual double crushingEnergy(const GmElement *e, const GmVector *coord, int ip) const
Returns the crushing energy.
Definition: gmpMaterialCrackingCrushingDamage.h:158
Definition: gmpMaterialElastic.h:34
Id for retrieving the triaxial compression adjustment parameter accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:51
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: gmpMaterialCrackingCrushingDamage.h:71
Id for retrieving the crushing energy accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:53
virtual double userDefinedCharacteristicLength(const GmElement *e, const GmVector *coord, int ip) const
Returns the user-defined characteristic length.
Definition: gmpMaterialCrackingCrushingDamage.h:164
The number of property ids above.
Definition: gmpMaterialCrackingCrushingDamage.h:58
Definition: gmpMechanicPoint.h:32
virtual double biaxialCompressiveStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the biaxial compressive strength of the material.
Definition: gmpMaterialCrackingCrushingDamage.h:140
Id for retrieving the tensile criterion shape parameter accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:48
virtual double tensileCriterionShapeParameter(const GmElement *e, const GmVector *coord, int ip) const
Returns the tensile criterion shape parameter.
Definition: gmpMaterialCrackingCrushingDamage.h:128
virtual double elasticUniaxialCompressiveLimit(const GmElement *e, const GmVector *coord, int ip) const
Returns the uniaxial compressive stress in which the damage process is initialized.
Definition: gmpMaterialCrackingCrushingDamage.h:134
virtual double strainAtUltimateCompressiveStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the strain that corresponds to the ultimate uniaxial compressive strength of the material.
Definition: gmpMaterialCrackingCrushingDamage.h:110
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
Definition: gmpMaterialCrackingCrushingDamage.h:38
Id for retrieving the biaxial compressive strength accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:50
virtual ~GmpMaterialCrackingCrushingDamage()
Virtual destructor.
Definition: gmpMaterialCrackingCrushingDamage.h:68
virtual double minimumCharacteristicLength(const GmElement *e, const GmVector *coord, int ip) const
Returns the minimum characteristic length.
Definition: gmpMaterialCrackingCrushingDamage.h:179
GmpMaterialCrackingCrushingDamage(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialCrackingCrushingDamage.h:64
Declaration of the GmpMechanicPoint class.
Id for retrieving the strain that corresponds to the ultimate uniaxial compressive strength acessor.
Definition: gmpMaterialCrackingCrushingDamage.h:45
virtual double uniaxialTensileStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the uniaxial tensile strength of the material.
Definition: gmpMaterialCrackingCrushingDamage.h:116
Declaration of the GmpMechanicalMaterialElastic class.
Declaration of usefull configuration definitions for the plugin library.
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
elasticDamageGaussAttrIds
IDs for Gauss attributes of elastic damage material.
Definition: gmpMaterialCrackingCrushingDamage.h:84
Id for retrieving the material point state accessor at the previous state.
Definition: gmpMaterialCrackingCrushingDamage.h:89
Base Id for Gauss attribute(s) used to store the compressive internal state variable at the current s...
Definition: gmpMaterialCrackingCrushingDamage.h:90
virtual double biaxialTensileStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the biaxial tensile strength of the material.
Definition: gmpMaterialCrackingCrushingDamage.h:122
arma::vec GmVector
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
Base Id for Gauss attribute(s) used to store the tensile internal state variable at the current state...
Definition: gmpMaterialCrackingCrushingDamage.h:88
Id for retrieving the biaxial tensile strength of the material accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:47
Id for retrieving the user-defined characteristic element length accessor.
Definition: gmpMaterialCrackingCrushingDamage.h:54