MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMaterialMDCreep.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_MDCREEP_H_
26 #define _GEMA_PLUGIN_MECHANICALMATERIAL_MDCREEP_H_
27 
28 #include "gmpMechanicalConfig.h"
29 #include <gmpFemPhysics.h>
30 #include <gmMathUtils.h>
31 
32 #include <gmpMaterialDPCreep.h>
33 #include "gmpMechanicPoint.h"
34 
35 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialMDCreep : public GmpMaterialDPCreep
36 {
37 protected:
40  {
41  B1_ID = GmpMaterialDPCreep::ElementPropertyIds::NUM_PROPERTY_IDS,
50 
52  };
53 
56  {
57  zeta_GA_ID = GmpMaterialDPCreep::GaussAttributeIds::NUM_GA_IDS,
61 
63  };
64 
65 public:
66 
68  GmpMaterialMDCreep(int typeIndex, QString typeName, const GmLogCategory& logger)
69  : GmpMaterialDPCreep(typeIndex, typeName, logger) {}
70 
72  virtual ~GmpMaterialMDCreep() {}
73 
75  static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
76  {
77  Q_UNUSED(simulation);
78  return new GmpMaterialMDCreep(typeIndex, typeName, logger);
79  }
80 
81  // Returns a map with material associated properties.
82  virtual const QVariantMap* materialMetaDataMap()
83  {
84  S_TRACE();
85  static QVariantMap m;
86  if (m.isEmpty())
87  {
88  // read the material attribute map from elastic interface material
90 
91  // Adds material properties
92  m["properties"] = m["properties"].value<GmpFemPhysicsCommon::ValueList>()
93  <<GmpFemPhysicsCommon::ScalarValue(B1_ID, "B1", QObject::tr("Structure factor for DGL 1"), "1/s", true)
94  <<GmpFemPhysicsCommon::ScalarValue(B2_ID, "B2", QObject::tr("Structure factor for DGL 2"), "1/s", true)
95  <<GmpFemPhysicsCommon::ScalarValue(Xq_ID, "Xq", QObject::tr("Stress constant"), "", true)
96  <<GmpFemPhysicsCommon::ScalarValue(Xc_ID, "Xc", QObject::tr("Theoretical constant"), "1/K", true)
97  <<GmpFemPhysicsCommon::ScalarValue(Xm_ID, "Xm", QObject::tr("Theoretical power"), "", true)
98  <<GmpFemPhysicsCommon::ScalarValue(XKo_ID, "XKo", QObject::tr("Transient parameter"), "", true)
99  <<GmpFemPhysicsCommon::ScalarValue(alphaH_ID, "alphaH", QObject::tr("Fitting parameter for hardening 1"), "", true)
100  <<GmpFemPhysicsCommon::ScalarValue(betaH_ID, "betaH", QObject::tr("Fitting parameter for hardening 2"), "", true)
101  <<GmpFemPhysicsCommon::ScalarValue(deltaMin_ID, "deltaMin", QObject::tr("Softening parameter"), "", true);
102 
103  // Adds Gauss attributes
104  m["gaussAttributes"] = m["gaussAttributes"].value<GmpFemPhysicsCommon::ValueList>()
105  << GmpFemPhysicsCommon::ScalarValue(zeta_GA_ID, "zeta", QObject::tr("Isotropic hardening variable"), " ", true, false, 2, "12.4f")
106  << GmpFemPhysicsCommon::HistoryValue(zetaOld_GA_ID, zeta_GA_ID, 1, true)
107  << GmpFemPhysicsCommon::ScalarValue(FT_GA_ID, "Ft", QObject::tr("Hardening parameter"), " ", true, false, 1, "12.4f")
108  << GmpFemPhysicsCommon::ScalarValue(EcSS_GA_ID, "Ecss", QObject::tr("Steady-state creep rate"), " ", true, false, 1, "12.4f");
109  }
110  return &m;
111  }
112 
113  // Returns the stresses according to the material behavior adopted
114  virtual double fillCreepStrainRate(const GmElement* e, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, double MISES) const
115  {
116  S_TRACE();
117  assert(e);
118  // Variable definition
119  double eE, eNU, eG, TEMP, Rg, A1, n1, Q1, A2, n2, Q2, B1, B2, So, Xq;
120  double Xc, Xm, XKo, alphaH, betaH, deltaMin, zeta, dzeta, creepTrLim, deltaMai;
121  double dTime, creepRate, creepSSRate, creepSSRateDCL, creepSSRateUMC, creepSSRateDGL, creepTrFunction;
122 
123  // Reads elastic parameters
124  eE = elasticModulus(e, coord, mp->_index);
125  eNU = poissonRatio(e, coord, mp->_index);
126  eG = GmpMechanicUtils::shearModulus(eE, eNU);
127 
128  // Reads time parameters
129  dTime = Time(0)-Time(1);
130 
131  // Reads steady-state creep parameters
132  Rg = universalGasConstant(e, coord, mp->_index);
133  A1 = structureFactorDCL(e, coord, mp->_index);
134  n1 = stressPowerDCL(e, coord, mp->_index);
135  Q1 = thermalActivEnergyDCL(e, coord, mp->_index);
136  A2 = structureFactorUMC(e, coord, mp->_index);
137  n2 = stressPowerUMC(e, coord, mp->_index);
138  Q2 = thermalActivEnergyUMC(e, coord, mp->_index);
139  B1 = structureFactorDGL1(e, coord, mp->_index);
140  B2 = structureFactorDGL2(e, coord, mp->_index);
141  So = thresholdDevStress(e, coord, mp->_index);
142  Xq = stressConstant(e, coord, mp->_index);
143 
144  // Reads the transient creep parameters
145  Xc = theoreticalConstant(e, coord, mp->_index);
146  Xm = theoreticalPower(e, coord, mp->_index);
147  XKo = transientParameter(e, coord, mp->_index);
148  alphaH = fittingParamHard1(e, coord, mp->_index);
149  betaH = fittingParamHard2(e, coord, mp->_index);
150  deltaMin = softParameter(e, coord, mp->_index);
151 
152  // Reads the current value of the internal isotropic hardening variable
153  GmGaussAccessor* zetaAcc = gaussAttrAc(zeta_GA_ID);
154  GmGaussAccessor* zetaOldAcc = gaussAttrAc(zetaOld_GA_ID);
155  zeta = zetaOldAcc->scalarValueAt(e, mp->_index, coord);
156 
157  // No creep for Misses equal to zero
158  if (MISES == 0.0)
159  {
160  return 0.0;
161  }
162 
163  // Reads the temperature at integration point
164  if (nodeAttrAc(T_NA_ID)!= NULL)
165  {
166  TEMP = fillTemperatureFromNodalAttr(e, coord);
167  }
168  else
169  {
170  TEMP = temperatureProperty(e, coord, mp->_index);
171  }
172 
173  // Calculations
174  creepSSRateDCL = A1 * exp(-1.0 * Q1/(Rg*TEMP)) * pow(MISES/eG , n1);
175  creepSSRateUMC = A2 * exp(-1.0 * Q2/(Rg*TEMP)) * pow(MISES/eG , n2);
176  creepSSRateDGL = 0.0;
177 
178  if (MISES > So)
179  {
180  creepSSRateDGL = (B1 * exp(-1.0 * Q1/(Rg * TEMP)) + B2 * exp(-1.0 * Q2/(Rg * TEMP))) * sinh(Xq * (MISES-So)/eG);
181  }
182 
183  // Stady-state creep rate
184  creepSSRate = creepSSRateDCL + creepSSRateUMC + creepSSRateDGL;
185 
186  // Transient creep limit
187  creepTrLim = XKo * pow((MISES / eG), Xm) * exp(Xc * TEMP);
188 
189  // Hardening parameter
190  deltaMai = alphaH + betaH * log10(MISES / eG);
191 
192  // Evaluates the transient function Ft
193  if (zeta <= creepTrLim)
194  {
195  creepTrFunction = exp(deltaMai*pow((1.0 - zeta / creepTrLim), 2.0));
196  }
197  else // (zeta > creepTrLim)
198  {
199  creepTrFunction = exp(-1.0*deltaMin*pow((1.0 - zeta / creepTrLim), 2.0));
200  }
201 
202  // Evaluates and saves the internal isotropic hardening variable for the next increment
203  dzeta = (creepTrFunction - 1.0)*(creepSSRate)*dTime;
204  zeta = zeta + dzeta;
205  zetaAcc->setScalarValue(e, mp->_index, zeta);
206  // Saves the transient function Ft
207  gaussAttrAc(FT_GA_ID)->setScalarValue(e, mp->_index, creepTrFunction);
208  // Saves the steady-state creep rate
209  gaussAttrAc(EcSS_GA_ID)->setScalarValue(e, mp->_index, creepSSRate);
210 
211  // Calculates the creep strain rate
212  creepRate = creepTrFunction * creepSSRate;
213 
214  return creepRate;
215  }
216 
218  double structureFactorDGL1(const GmElement* e, const GmVector* coord, int ip) const
219  {
220  return propertyAc(B1_ID)->scalarValueAt(e, coord, ip);
221  }
222 
224  double structureFactorDGL2(const GmElement* e, const GmVector* coord, int ip) const
225  {
226  return propertyAc(B2_ID)->scalarValueAt(e, coord, ip);
227  }
228 
230  double stressConstant(const GmElement* e, const GmVector* coord, int ip) const
231  {
232  return propertyAc(Xq_ID)->scalarValueAt(e, coord, ip);
233  }
234 
236  virtual double theoreticalConstant(const GmElement* e, const GmVector* coord, int ip) const
237  {
238  return propertyAc(Xc_ID)->scalarValueAt(e, coord, ip);
239  }
240 
242  double theoreticalPower(const GmElement* e, const GmVector* coord, int ip) const
243  {
244  return propertyAc(Xm_ID)->scalarValueAt(e, coord, ip);
245  }
246 
248  double transientParameter(const GmElement* e, const GmVector* coord, int ip) const
249  {
250  return propertyAc(XKo_ID)->scalarValueAt(e, coord, ip);
251  }
252 
254  double fittingParamHard1(const GmElement* e, const GmVector* coord, int ip) const
255  {
256  return propertyAc(alphaH_ID)->scalarValueAt(e, coord, ip);
257  }
258 
260  double fittingParamHard2(const GmElement* e, const GmVector* coord, int ip) const
261  {
262  return propertyAc(betaH_ID)->scalarValueAt(e, coord, ip);
263  }
264 
266  double softParameter(const GmElement* e, const GmVector* coord, int ip) const
267  {
268  return propertyAc(deltaMin_ID)->scalarValueAt(e, coord, ip);
269  }
270 
271 };
272 
273 #endif
double thermalActivEnergyDCL(const GmElement *e, const GmVector *coord, int ip) const
Returns the Thermal activation energy for DCL.
Definition: gmpMaterialDPCreep.h:136
Id for retrieving the stress constant accessor.
Definition: gmpMaterialMDCreep.h:43
virtual double elasticModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus.
Definition: gmpMaterialCreep.h:114
The number of property ids above.
Definition: gmpMaterialMDCreep.h:51
ElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialCreep.h:39
GaussAttributeIds
IDs for material Gauss attributes.
Definition: gmpMaterialCreep.h:51
virtual double poissonRatio(const GmElement *e, const GmVector *coord, int ip) const
Returns the material poisson ratio.
Definition: gmpMaterialCreep.h:119
#define S_TRACE()
GmpMaterialMDCreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialMDCreep.h:68
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition: gmpMaterialDPCreep.h:72
The number of Gauss attribute ids above.
Definition: gmpMaterialMDCreep.h:62
double structureFactorDGL1(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for DGL1.
Definition: gmpMaterialMDCreep.h:218
double transientParameter(const GmElement *e, const GmVector *coord, int ip) const
Returns the Transient parameter.
Definition: gmpMaterialMDCreep.h:248
Base Id for Gauss attribute(s) used to store the transient function.
Definition: gmpMaterialMDCreep.h:59
QString tr(const char *sourceText, const char *disambiguation, int n)
Declaration of the gmpMaterialDPCreep class.
Id for retrieving the softening parameter accessor.
Definition: gmpMaterialMDCreep.h:49
Id for retrieving the theoretical constant accessor.
Definition: gmpMaterialMDCreep.h:44
double universalGasConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the Universal gas constant R.
Definition: gmpMaterialDPCreep.h:172
Definition: gmpMechanicPoint.h:32
virtual double fillTemperatureFromNodalAttr(const GmElement *e, const GmVector *coord) const
Return temperature at integration point using the nodal Temperature field.
Definition: gmpMaterialCreep.cpp:400
double stressPowerDCL(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress power for DCL.
Definition: gmpMaterialDPCreep.h:142
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: gmpMaterialMDCreep.h:75
virtual double temperatureProperty(const GmElement *e, const GmVector *coord, int ip) const
Returns the Temperature from property table.
Definition: gmpMaterialCreep.h:124
Definition: gmpMaterialDPCreep.h:36
double stressPowerUMC(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress power for UMC.
Definition: gmpMaterialDPCreep.h:160
double structureFactorUMC(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for UMC.
Definition: gmpMaterialDPCreep.h:148
virtual double theoreticalConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the Theoretical constant.
Definition: gmpMaterialMDCreep.h:236
double shearModulus(double E, double nu)
Returns the shear modulus (G) from Young's modulus (E) and Poisson's Coefficient (nu)
Definition: gmpMechanicalMaterial.cpp:44
double stressConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress constant for DGL.
Definition: gmpMaterialMDCreep.h:230
Declaration of the GmpMechanicPoint class.
Declaration of usefull configuration definitions for the plugin library.
Definition: gmpMaterialMDCreep.h:35
virtual double fillCreepStrainRate(const GmElement *e, const GmpMechanicPoint *mp, const GmVector *coord, const GmVector &Time, double MISES) const
Computes the creep deformation rate.
Definition: gmpMaterialMDCreep.h:114
double softParameter(const GmElement *e, const GmVector *coord, int ip) const
Returns the Softening parameter.
Definition: gmpMaterialMDCreep.h:266
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition: gmpMaterialMDCreep.h:82
Id for retrieving the theoretical power accessor.
Definition: gmpMaterialMDCreep.h:45
Id for retrieving the transient parameter accessor.
Definition: gmpMaterialMDCreep.h:46
double thresholdDevStress(const GmElement *e, const GmVector *coord, int ip) const
Returns the Threshold deviatoric stress.
Definition: gmpMaterialDPCreep.h:166
double structureFactorDGL2(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for DGL2.
Definition: gmpMaterialMDCreep.h:224
double theoreticalPower(const GmElement *e, const GmVector *coord, int ip) const
Returns the Theoretical power.
Definition: gmpMaterialMDCreep.h:242
double fittingParamHard2(const GmElement *e, const GmVector *coord, int ip) const
Returns the Fitting parameter for hardening 2.
Definition: gmpMaterialMDCreep.h:260
double thermalActivEnergyUMC(const GmElement *e, const GmVector *coord, int ip) const
Returns the Thermal activation energy for UMC.
Definition: gmpMaterialDPCreep.h:154
Id for retrieving the structure factor 2 for DGL accessor.
Definition: gmpMaterialMDCreep.h:42
Id for retrieving the fitting parameter for hardening accessor.
Definition: gmpMaterialMDCreep.h:47
arma::vec GmVector
virtual ~GmpMaterialMDCreep()
Virtual destructor.
Definition: gmpMaterialMDCreep.h:72
double structureFactorDCL(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for DCL.
Definition: gmpMaterialDPCreep.h:130
Base Id for Gauss attribute(s) used to store the steady-state creep rate.
Definition: gmpMaterialMDCreep.h:60
Id for retrieving the fitting parameter for hardening accessor.
Definition: gmpMaterialMDCreep.h:48
Id for retrieving the hardening parameter accessor at the previous state (old Zeta)
Definition: gmpMaterialMDCreep.h:58
double fittingParamHard1(const GmElement *e, const GmVector *coord, int ip) const
Returns the Fitting parameter for hardening 1.
Definition: gmpMaterialMDCreep.h:254