MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialWDTCreep.h
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_WDTCREEP_H_
25 #define _GEMA_PLUGIN_MECHANICALMATERIAL_WDTCREEP_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 GmpMaterialWDTCreep : public GmpMechanicalMaterialElastic
35 {
36 protected:
39  {
41  B_ID,
44  N_ID,
45  F_ID,
46  R_ID,
47  M_ID,
49  T_ID,
50 
51  // --- NO ADDING BELOW THIS LINE
53  };
54 
55 
58  {
64 
65  // ------ NO ADDING BELOW THIS LINE
67  };
68 
69 
72  {
74 
75  // ------ NO ADDING BELOW THIS LINE
77  };
78 
79 public:
80 
82  GmpMaterialWDTCreep(int typeIndex, QString typeName, const GmLogCategory& logger)
83  : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
84 
86  virtual ~GmpMaterialWDTCreep() {}
87 
89  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
90  {
91  Q_UNUSED(simulation);
92  return new GmpMaterialWDTCreep(typeIndex, typeName, logger);
93  }
94 
95  // Returns a map with material associated properties.
96  virtual const QVariantMap* materialMetaDataMap();
97 
98  // Returns the stresses according to the material behavior adopted
99  virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, unsigned nc, bool ips) const;
100 
102  virtual bool isIsotropic() const { return true; }
103 
105  virtual double firstprimarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
106  {
107  return propertyAc(A_ID)->scalarValueAt(e, coord, ip);
108  }
109 
111  virtual double secondprimarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
112  {
113  return propertyAc(B_ID)->scalarValueAt(e, coord, ip);
114  }
115 
117  virtual double secondarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
118  {
119  return propertyAc(C1_ID)->scalarValueAt(e, coord, ip);
120  }
121 
123  virtual double tertiarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
124  {
125  return propertyAc(C2_ID)->scalarValueAt(e, coord, ip);
126  }
127 
129  virtual double stressExponential(const GmElement* e, const GmVector* coord, int ip) const
130  {
131  return propertyAc(N_ID)->scalarValueAt(e, coord, ip);
132  }
133 
135  virtual double firstdamageConstant(const GmElement* e, const GmVector* coord, int ip) const
136  {
137  return propertyAc(F_ID)->scalarValueAt(e, coord, ip);
138  }
139 
141  virtual double seconddamageConstant(const GmElement* e, const GmVector* coord, int ip) const
142  {
143  return propertyAc(R_ID)->scalarValueAt(e, coord, ip);
144  }
145 
147  virtual double temperatureConstant(const GmElement* e, const GmVector* coord, int ip) const
148  {
149  return propertyAc(M_ID)->scalarValueAt(e, coord, ip);
150  }
151 
153  virtual double temprefConstant(const GmElement* e, const GmVector* coord, int ip) const
154  {
155  return propertyAc(Tref_ID)->scalarValueAt(e, coord, ip);
156  }
157 
159  virtual double temperatureProperty(const GmElement* e, const GmVector* coord, int ip) const
160  {
161  return propertyAc(T_ID)->scalarValueAt(e, coord, ip);
162  }
163 
165  virtual double fillTemperatureFromNodalAttr(const GmElement* e, const GmVector* coord) const;
166 
167  // Computes the elastic stiffness using lame and G
168  void elasticStiffness(const GmElement*, unsigned, GmMatrix&, const GmVector*, unsigned, int) const;
169 
170 };
171 
172 #endif
virtual double stressExponential(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress exponential.
Definition: gmpMaterialWDTCreep.h:129
Id for retrieving the first damage parameter.
Definition: gmpMaterialWDTCreep.h:45
The number of property ids above.
Definition: gmpMaterialElastic.h:46
virtual double firstdamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first damage constant.
Definition: gmpMaterialWDTCreep.h:135
Base Id for Gauss attribute(s) used to store the calculated creep strain at the current state.
Definition: gmpMaterialWDTCreep.h:59
GaussAttributeIds
IDs for material Gauss attributes.
Definition: gmpMaterialWDTCreep.h:57
virtual double secondarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the secondary creep parameter.
Definition: gmpMaterialWDTCreep.h:117
Id for retrieving the second damage parameter.
Definition: gmpMaterialWDTCreep.h:46
Id for retrieving the tertiary creep parameter.
Definition: gmpMaterialWDTCreep.h:43
ElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialElastic.h:38
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: gmpMaterialWDTCreep.h:89
Definition: gmpMaterialElastic.h:34
Base Id for node attribute(s) used to store the calculated stress.
Definition: gmpMaterialWDTCreep.h:73
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition: gmpMaterialWDTCreep.h:102
The number of Gauss attribute ids above.
Definition: gmpMaterialWDTCreep.h:66
Definition: gmpMechanicPoint.h:32
virtual double temprefConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the reference temperature.
Definition: gmpMaterialWDTCreep.h:153
NodeAttributeIds
IDs for creep material node attributes.
Definition: gmpMaterialWDTCreep.h:71
Id for retrieving the reference temperature.
Definition: gmpMaterialWDTCreep.h:48
virtual double tertiarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the tertiary creep parameter.
Definition: gmpMaterialWDTCreep.h:123
Base Id for Gauss attribute(s) used to store the damage variable at the current state.
Definition: gmpMaterialWDTCreep.h:63
Id for retrieving the damage variable accessor at the previous state.
Definition: gmpMaterialWDTCreep.h:62
Id for retrieving the temperature exponential.
Definition: gmpMaterialWDTCreep.h:47
Id for retrieving the second parameter of primary creep equation.
Definition: gmpMaterialWDTCreep.h:41
The number of node attribute ids above.
Definition: gmpMaterialWDTCreep.h:76
Id for retrieving the stress exponential.
Definition: gmpMaterialWDTCreep.h:44
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
Id for retrieving the Temperature accessor.
Definition: gmpMaterialWDTCreep.h:49
Id for retrieving the secondary creep parameter.
Definition: gmpMaterialWDTCreep.h:42
virtual double temperatureConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the tenperature exponential.
Definition: gmpMaterialWDTCreep.h:147
Id for retrieving the creep strain accessor at the previous state (old creep strain)
Definition: gmpMaterialWDTCreep.h:60
Declaration of the GmpMechanicPoint class.
Declaration of the GmpMechanicalMaterialElastic class.
virtual double seconddamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second damage constant.
Definition: gmpMaterialWDTCreep.h:141
virtual double firstprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of primary creep.
Definition: gmpMaterialWDTCreep.h:105
Declaration of usefull configuration definitions for the plugin library.
GmpMaterialWDTCreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialWDTCreep.h:82
The number of property ids above.
Definition: gmpMaterialWDTCreep.h:52
Definition: gmpMaterialWDTCreep.h:34
Base Id for Gauss attribute(s) used to store the damage variable at the current state.
Definition: gmpMaterialWDTCreep.h:61
virtual double secondprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second parameter of primary creep.
Definition: gmpMaterialWDTCreep.h:111
virtual ~GmpMaterialWDTCreep()
Virtual destructor.
Definition: gmpMaterialWDTCreep.h:86
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
virtual double temperatureProperty(const GmElement *e, const GmVector *coord, int ip) const
Returns the Temperature from property table.
Definition: gmpMaterialWDTCreep.h:159
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