MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialCohesiveLinearSoftening.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 
25 #ifndef _GEMA_PLUGIN_MECHANICALMATERIAL_COHESIVELINEARSOFTENING_H_
26 #define _GEMA_PLUGIN_MECHANICALMATERIAL_COHESIVELINEARSOFTENING_H_
27 
28 
29 #include "gmpMaterialElasticInterface.h"
30 #include "gmpMechanicPoint.h"
31 #include "gmpFemPhysics.h"
32 #include "gmMathUtils.h"
33 
34 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpCohesiveLinearSoftening: public GmpElasticInterface
35 {
36 protected:
39  {
45 
46 
47  // --- NO ADDING BELOW THIS LINE
49  };
50 
53  {
55  maxS,
56 
57 
58  // --- NO ADDING BELOW THIS LINE
60  };
61 
62  // Check the damage initiation criteria
63  virtual double damageInitiationCriteria(const GmElement* e, GmVector stress, const GmVector* coord, int ip, int nc) const;
64 
65  // returns the scalar damage value "Sdvg"
66  virtual double scalarDamageVariable(const GmElement* e, const GmVector* coord, int ip, double de, double di, double df) const;
67 
68  // returns the gradient of the damage variable in relation to the equivalente displacement
69  // Hd = d(Sdvg)/d(del_e)
70  virtual double deriveDamage(const GmElement* e, const GmVector* coord, int ip, double de, double di, double df) const;
71 
72 public:
74  GmpCohesiveLinearSoftening(int typeIndex, QString typeName, const GmLogCategory& logger)
75  :GmpElasticInterface(typeIndex, typeName, logger){}
76 
79 
81  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
82  {
83  Q_UNUSED(simulation);
84  return new GmpCohesiveLinearSoftening(typeIndex, typeName, logger);
85  }
86 
87  // Returns a map with material associated properties.
88  virtual const QVariantMap* materialMetaDataMap();
89 
92  {
98 
99 
100  // ------ NO ADDING BELOW THIS LINE
102  };
103 
104  // Returns the stresses according to the material behavior adopted
105  virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, unsigned nc) const;
106 
107  //Sets the initial conditions required by interface materials
108  virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned nc) const;
109 
111  virtual double normalStrength(const GmElement* e, const GmVector* coord, int ip) const
112  {
113  return propertyAc(Sni_ID)->scalarValueAt(e, coord, ip);
114  }
115 
117  virtual double shearStrength(const GmElement* e, const GmVector* coord, int ip) const
118  {
119  return propertyAc(Tsi_ID)->scalarValueAt(e, coord, ip);
120  }
121 
123  virtual double shearStrengthTwo(const GmElement* e, const GmVector* coord, int ip) const
124  {
125  return propertyAc(Tti_ID)->scalarValueAt(e, coord, ip);
126  }
127 
129  virtual double equivalentSeparation(const GmElement* e, const GmVector* coord, int ip) const
130  {
131  return propertyAc(Ed_ID)->scalarValueAt(e, coord, ip);
132  }
133 
135  virtual damageCriteria damageCriterion(const GmElement* e, const GmVector* coord, int ip) const
136  {
137  S_TRACE();
138  assert(e);
140 
141  if (propertyAc(DamIni_ID) == NULL)
142  {
143  return GmpCohesiveLinearSoftening::damageCriteria::quadS;
144  }
145 
146  int criterionType = propertyAc(DamIni_ID)->scalarValueAt(e, coord, ip);
147  //
148  if (criterionType == 1)
149  {
150  type = GmpCohesiveLinearSoftening::damageCriteria::maxS;
151  }
152  else
153  {
154  type = GmpCohesiveLinearSoftening::damageCriteria::quadS;
155  }
156 
157  return type;
158  }
159 
160 };
161 #endif
virtual bool setInitialConditions(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned nc) const
Sets the initial conditions.
Definition: gmpMaterialElasticInterface.cpp:304
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: gmpMaterialCohesiveLinearSoftening.h:81
The number of property ids above.
Definition: gmpMaterialElasticInterface.h:47
The number of gauss attributes.
Definition: gmpMaterialElasticInterface.h:86
virtual damageCriteria damageCriterion(const GmElement *e, const GmVector *coord, int ip) const
Returns the criterion of damage initiation.
Definition: gmpMaterialCohesiveLinearSoftening.h:135
Id for retrieving the tangential strength.
Definition: gmpMaterialCohesiveLinearSoftening.h:43
virtual double shearStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the shear strength at direction 1 of the interface element.
Definition: gmpMaterialCohesiveLinearSoftening.h:117
virtual ~GmpCohesiveLinearSoftening()
Virtual destructor.
Definition: gmpMaterialCohesiveLinearSoftening.h:78
virtual double normalStrength(const GmElement *e, const GmVector *coord, int ip) const
Returns the normal strength of the interface element.
Definition: gmpMaterialCohesiveLinearSoftening.h:111
GmpCohesiveLinearSoftening(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialCohesiveLinearSoftening.h:74
virtual bool mechanicalConstitutiveModel(const GmElement *e, GmMatrix &Dep, const GmpMechanicPoint *mp, const GmVector *coord, unsigned nc) const
Returns the cohesive stress tensor according to the material behavior adopted.
Definition: gmpMaterialElasticInterface.cpp:194
Definition: gmpMaterialCohesiveLinearSoftening.h:34
#define S_TRACE()
Id for retrieving the damage variable accessor at the previous state.
Definition: gmpMaterialCohesiveLinearSoftening.h:94
Id for retrieving the normal strength.
Definition: gmpMaterialCohesiveLinearSoftening.h:41
Id for retrieving the damage initiation criterion.
Definition: gmpMaterialCohesiveLinearSoftening.h:44
virtual double shearStrengthTwo(const GmElement *e, const GmVector *coord, int ip) const
Returns the shear strength at direction 2 of the interface element.
Definition: gmpMaterialCohesiveLinearSoftening.h:123
Definition: gmpMechanicPoint.h:32
damageCriteria
Damage initiation criteria.
Definition: gmpMaterialCohesiveLinearSoftening.h:52
Definition: gmpMaterialElasticInterface.h:34
cohesiveGaussAttributeIds
IDs for Gauss attributes of cohesive linear softening material.
Definition: gmpMaterialCohesiveLinearSoftening.h:91
Declaration of the GmpMechanicPoint class.
Quadratic stress criterion.
Definition: gmpMaterialCohesiveLinearSoftening.h:54
CohesiveLinearPropertyIds
IDs for elastic interface material properties.
Definition: gmpMaterialCohesiveLinearSoftening.h:38
virtual double equivalentSeparation(const GmElement *e, const GmVector *coord, int ip) const
Returns the normal elastic stiffness of the interface element.
Definition: gmpMaterialCohesiveLinearSoftening.h:129
Id for retrieving the shear strength.
Definition: gmpMaterialCohesiveLinearSoftening.h:42
arma::vec GmVector
Id for retrieving the initial offset for HF with geostatic.
Definition: gmpMaterialCohesiveLinearSoftening.h:97
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition: gmpMaterialElasticInterface.cpp:35
arma::mat GmMatrix
Id for retrieving the internal variable accessor at the previous state.
Definition: gmpMaterialCohesiveLinearSoftening.h:96
Base Id for Gauss attribute(s) used to store the internal variable at the current state.
Definition: gmpMaterialCohesiveLinearSoftening.h:95
The number of damage initiation criterion.
Definition: gmpMaterialCohesiveLinearSoftening.h:59
Maximum stress criterion.
Definition: gmpMaterialCohesiveLinearSoftening.h:55
The number of property ids above.
Definition: gmpMaterialCohesiveLinearSoftening.h:48
The number of gauss attributes.
Definition: gmpMaterialCohesiveLinearSoftening.h:101