MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialMACreep.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_MECHANICALMATERIAL_MACREEP_H_
25 #define _GEMA_PLUGIN_MECHANICALMATERIAL_MACREEP_H_
26 
27 #include "gmpMechanicalConfig.h"
28 #include <gmpFemPhysics.h>
29 #include <gmMathUtils.h>
30 
31 #include <gmpMaterialElastic.h>
32 #include "gmpMechanicPoint.h"
33 
34 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialMACreep : public GmpMechanicalMaterialElastic
35 {
36 protected:
39  {
44  N_ID,
45  B_ID,
46  R_ID,
47 
48  // --- NO ADDING BELOW THIS LINE
50  };
51 
54  {
59 
60 
61  // ------ NO ADDING BELOW THIS LINE
63  };
64 
65 public:
66 
68  GmpMaterialMACreep(int typeIndex, QString typeName, const GmLogCategory& logger)
69  : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
70 
72  virtual ~GmpMaterialMACreep() {}
73 
75  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
76  {
77  Q_UNUSED(simulation);
78  return new GmpMaterialMACreep(typeIndex, typeName, logger);
79  }
80 
81  // Returns a map with material associated properties.
82  virtual const QVariantMap* materialMetaDataMap();
83 
84  // Returns the stresses according to the material behavior adopted
85  virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, unsigned nc, bool ips) const;
86 
88  virtual bool isIsotropic() const { return true; }
89 
91  virtual double firstprimarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
92  {
93  return propertyAc(C1_ID)->scalarValueAt(e, coord, ip);
94  }
95 
97  virtual double secondprimarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
98  {
99  return propertyAc(C2_ID)->scalarValueAt(e, coord, ip);
100  }
101 
103  virtual double firstsecondarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
104  {
105  return propertyAc(A1_ID)->scalarValueAt(e, coord, ip);
106  }
107 
109  virtual double firsttertiarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
110  {
111  return propertyAc(A2_ID)->scalarValueAt(e, coord, ip);
112  }
113 
115  virtual double stressExponential(const GmElement* e, const GmVector* coord, int ip) const
116  {
117  return propertyAc(N_ID)->scalarValueAt(e, coord, ip);
118  }
119 
121  virtual double firstdamageConstant(const GmElement* e, const GmVector* coord, int ip) const
122  {
123  return propertyAc(B_ID)->scalarValueAt(e, coord, ip);
124  }
125 
127  virtual double seconddamageConstant(const GmElement* e, const GmVector* coord, int ip) const
128  {
129  return propertyAc(R_ID)->scalarValueAt(e, coord, ip);
130  }
131 
132  // Computes the elastic stiffness using lame and G
133  void elasticStiffness(const GmElement*, unsigned, GmMatrix&, const GmVector*, unsigned, int) const;
134 
135 };
136 
137 #endif
virtual double firstsecondarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of secondary creep.
Definition: gmpMaterialMACreep.h:103
The number of property ids above.
Definition: gmpMaterialElastic.h:46
Id for retrieving the second parameter of primary creep equation.
Definition: gmpMaterialMACreep.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: gmpMaterialMACreep.h:75
Id for retrieving the first parameter of secondary creep equation.
Definition: gmpMaterialMACreep.h:42
Id for retrieving the creep strain accessor at the previous state (old creep strain)
Definition: gmpMaterialMACreep.h:56
Id for retrieving the damage variable accessor at the previous state.
Definition: gmpMaterialMACreep.h:58
ElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialElastic.h:38
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition: gmpMaterialMACreep.h:88
Definition: gmpMaterialElastic.h:34
Base Id for Gauss attribute(s) used to store the damage variable at the current state.
Definition: gmpMaterialMACreep.h:57
virtual double firsttertiarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of tertiary creep.
Definition: gmpMaterialMACreep.h:109
virtual double firstdamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first damage constant.
Definition: gmpMaterialMACreep.h:121
Definition: gmpMechanicPoint.h:32
Id for retrieving the second damage parameter.
Definition: gmpMaterialMACreep.h:46
Id for retrieving the first parameter of tertiary creep equation.
Definition: gmpMaterialMACreep.h:43
Base Id for Gauss attribute(s) used to store the calculated creep strain at the current state.
Definition: gmpMaterialMACreep.h:55
virtual double seconddamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second damage constant.
Definition: gmpMaterialMACreep.h:127
virtual double stressExponential(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress exponential.
Definition: gmpMaterialMACreep.h:115
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 double firstprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of primary creep.
Definition: gmpMaterialMACreep.h:91
virtual double secondprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second parameter of primary creep.
Definition: gmpMaterialMACreep.h:97
The number of Gauss attribute ids above.
Definition: gmpMaterialMACreep.h:62
Declaration of the GmpMechanicPoint class.
GmpMaterialMACreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialMACreep.h:68
Declaration of the GmpMechanicalMaterialElastic class.
The number of property ids above.
Definition: gmpMaterialMACreep.h:49
Id for retrieving the first damage parameter.
Definition: gmpMaterialMACreep.h:45
Declaration of usefull configuration definitions for the plugin library.
GaussAttributeIds
IDs for material Gauss attributes.
Definition: gmpMaterialMACreep.h:53
arma::vec GmVector
void elasticStiffness(GmMatrix &De, double E, double nu, unsigned sc, unsigned ips)
Computes the elastic stiffness matrix using E and Nu.
Definition: gmpMechanicalMaterial.cpp:874
arma::mat GmMatrix
Definition: gmpMaterialMACreep.h:34
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
Id for retrieving the stress exponential.
Definition: gmpMaterialMACreep.h:44
virtual ~GmpMaterialMACreep()
Virtual destructor.
Definition: gmpMaterialMACreep.h:72