MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
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
35class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialMDCreep : public GmpMaterialDPCreep
36{
37protected:
53
64
65public:
66
68 GmpMaterialMDCreep(int typeIndex, QString typeName, const GmLogCategory& logger)
69 : GmpMaterialDPCreep(typeIndex, typeName, logger) {}
70
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 unsigned pointIndex = mp->_index.localData();
124 // Reads elastic parameters
125 eE = elasticModulus(e, coord, pointIndex);
126 eNU = poissonRatio(e, coord, pointIndex);
127 eG = GmpMechanicUtils::shearModulus(eE, eNU);
128
129 // Reads time parameters
130 dTime = Time(0)-Time(1);
131
132 // Reads steady-state creep parameters
133 Rg = universalGasConstant(e, coord, pointIndex);
134 A1 = structureFactorDCL(e, coord, pointIndex);
135 n1 = stressPowerDCL(e, coord, pointIndex);
136 Q1 = thermalActivEnergyDCL(e, coord, pointIndex);
137 A2 = structureFactorUMC(e, coord, pointIndex);
138 n2 = stressPowerUMC(e, coord, pointIndex);
139 Q2 = thermalActivEnergyUMC(e, coord, pointIndex);
140 B1 = structureFactorDGL1(e, coord, pointIndex);
141 B2 = structureFactorDGL2(e, coord, pointIndex);
142 So = thresholdDevStress(e, coord, pointIndex);
143 Xq = stressConstant(e, coord, pointIndex);
144
145 // Reads the transient creep parameters
146 Xc = theoreticalConstant(e, coord, pointIndex);
147 Xm = theoreticalPower(e, coord, pointIndex);
148 XKo = transientParameter(e, coord, pointIndex);
149 alphaH = fittingParamHard1(e, coord, pointIndex);
150 betaH = fittingParamHard2(e, coord, pointIndex);
151 deltaMin = softParameter(e, coord, pointIndex);
152
153 // Reads the current value of the internal isotropic hardening variable
154 GmGaussAccessor* zetaAcc = gaussAttrAc(zeta_GA_ID);
155 GmGaussAccessor* zetaOldAcc = gaussAttrAc(zetaOld_GA_ID);
156 zeta = zetaOldAcc->scalarValueAt(e, pointIndex, coord);
157
158 // No creep for Misses equal to zero
159 if (MISES == 0.0)
160 {
161 return 0.0;
162 }
163
164 // Reads the temperature at integration point
165 if (nodeAttrAc(T_NA_ID)!= NULL)
166 {
167 TEMP = fillTemperatureFromNodalAttr(e, coord);
168 }
169 else
170 {
171 TEMP = temperatureProperty(e, coord, pointIndex);
172 }
173
174 // Calculations
175 creepSSRateDCL = A1 * exp(-1.0 * Q1/(Rg*TEMP)) * pow(MISES/eG , n1);
176 creepSSRateUMC = A2 * exp(-1.0 * Q2/(Rg*TEMP)) * pow(MISES/eG , n2);
177 creepSSRateDGL = 0.0;
178
179 if (MISES > So)
180 {
181 creepSSRateDGL = (B1 * exp(-1.0 * Q1/(Rg * TEMP)) + B2 * exp(-1.0 * Q2/(Rg * TEMP))) * sinh(Xq * (MISES-So)/eG);
182 }
183
184 // Stady-state creep rate
185 creepSSRate = creepSSRateDCL + creepSSRateUMC + creepSSRateDGL;
186
187 // Transient creep limit
188 creepTrLim = XKo * pow((MISES / eG), Xm) * exp(Xc * TEMP);
189
190 // Hardening parameter
191 deltaMai = alphaH + betaH * log10(MISES / eG);
192
193 // Evaluates the transient function Ft
194 if (zeta <= creepTrLim)
195 {
196 creepTrFunction = exp(deltaMai*pow((1.0 - zeta / creepTrLim), 2.0));
197 }
198 else // (zeta > creepTrLim)
199 {
200 creepTrFunction = exp(-1.0*deltaMin*pow((1.0 - zeta / creepTrLim), 2.0));
201 }
202
203 // Evaluates and saves the internal isotropic hardening variable for the next increment
204 dzeta = (creepTrFunction - 1.0)*(creepSSRate)*dTime;
205 zeta = zeta + dzeta;
206 zetaAcc->setScalarValue(e, pointIndex, zeta);
207 // Saves the transient function Ft
208 gaussAttrAc(FT_GA_ID)->setScalarValue(e, pointIndex, creepTrFunction);
209 // Saves the steady-state creep rate
210 gaussAttrAc(EcSS_GA_ID)->setScalarValue(e, pointIndex, creepSSRate);
211
212 // Calculates the creep strain rate
213 creepRate = creepTrFunction * creepSSRate;
214
215 return creepRate;
216 }
217
219 double structureFactorDGL1(const GmElement* e, const GmVector* coord, int ip) const
220 {
221 return propertyAc(B1_ID)->scalarValueAt(e, coord, ip);
222 }
223
225 double structureFactorDGL2(const GmElement* e, const GmVector* coord, int ip) const
226 {
227 return propertyAc(B2_ID)->scalarValueAt(e, coord, ip);
228 }
229
231 double stressConstant(const GmElement* e, const GmVector* coord, int ip) const
232 {
233 return propertyAc(Xq_ID)->scalarValueAt(e, coord, ip);
234 }
235
237 virtual double theoreticalConstant(const GmElement* e, const GmVector* coord, int ip) const
238 {
239 return propertyAc(Xc_ID)->scalarValueAt(e, coord, ip);
240 }
241
243 double theoreticalPower(const GmElement* e, const GmVector* coord, int ip) const
244 {
245 return propertyAc(Xm_ID)->scalarValueAt(e, coord, ip);
246 }
247
249 double transientParameter(const GmElement* e, const GmVector* coord, int ip) const
250 {
251 return propertyAc(XKo_ID)->scalarValueAt(e, coord, ip);
252 }
253
255 double fittingParamHard1(const GmElement* e, const GmVector* coord, int ip) const
256 {
257 return propertyAc(alphaH_ID)->scalarValueAt(e, coord, ip);
258 }
259
261 double fittingParamHard2(const GmElement* e, const GmVector* coord, int ip) const
262 {
263 return propertyAc(betaH_ID)->scalarValueAt(e, coord, ip);
264 }
265
267 double softParameter(const GmElement* e, const GmVector* coord, int ip) const
268 {
269 return propertyAc(deltaMin_ID)->scalarValueAt(e, coord, ip);
270 }
271
272};
273
274#endif
T & localData(int tid)
virtual double fillTemperatureFromNodalAttr(const GmElement *e, const GmVector *coord) const
Return temperature at integration point using the nodal Temperature field.
Definition gmpMaterialCreep.cpp:401
virtual double poissonRatio(const GmElement *e, const GmVector *coord, int ip) const
Returns the material poisson ratio.
Definition gmpMaterialCreep.h:119
virtual double temperatureProperty(const GmElement *e, const GmVector *coord, int ip) const
Returns the Temperature from property table.
Definition gmpMaterialCreep.h:124
virtual double elasticModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus.
Definition gmpMaterialCreep.h:114
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpMaterialCreep.h:57
Definition gmpMaterialDPCreep.h:37
double stressPowerDCL(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress power for DCL.
Definition gmpMaterialDPCreep.h:143
double stressPowerUMC(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress power for UMC.
Definition gmpMaterialDPCreep.h:161
double structureFactorDCL(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for DCL.
Definition gmpMaterialDPCreep.h:131
double universalGasConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the Universal gas constant R.
Definition gmpMaterialDPCreep.h:173
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
double thermalActivEnergyDCL(const GmElement *e, const GmVector *coord, int ip) const
Returns the Thermal activation energy for DCL.
Definition gmpMaterialDPCreep.h:137
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialDPCreep.h:52
double thresholdDevStress(const GmElement *e, const GmVector *coord, int ip) const
Returns the Threshold deviatoric stress.
Definition gmpMaterialDPCreep.h:167
double structureFactorUMC(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for UMC.
Definition gmpMaterialDPCreep.h:149
double thermalActivEnergyUMC(const GmElement *e, const GmVector *coord, int ip) const
Returns the Thermal activation energy for UMC.
Definition gmpMaterialDPCreep.h:155
Definition gmpMaterialMDCreep.h:36
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
double theoreticalPower(const GmElement *e, const GmVector *coord, int ip) const
Returns the Theoretical power.
Definition gmpMaterialMDCreep.h:243
double transientParameter(const GmElement *e, const GmVector *coord, int ip) const
Returns the Transient parameter.
Definition gmpMaterialMDCreep.h:249
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialMDCreep.h:40
@ Xc_ID
Id for retrieving the theoretical constant accessor.
Definition gmpMaterialMDCreep.h:44
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialMDCreep.h:51
@ Xm_ID
Id for retrieving the theoretical power accessor.
Definition gmpMaterialMDCreep.h:45
@ deltaMin_ID
Id for retrieving the softening parameter accessor.
Definition gmpMaterialMDCreep.h:49
@ alphaH_ID
Id for retrieving the fitting parameter for hardening accessor.
Definition gmpMaterialMDCreep.h:47
@ betaH_ID
Id for retrieving the fitting parameter for hardening accessor.
Definition gmpMaterialMDCreep.h:48
@ Xq_ID
Id for retrieving the stress constant accessor.
Definition gmpMaterialMDCreep.h:43
@ XKo_ID
Id for retrieving the transient parameter accessor
Definition gmpMaterialMDCreep.h:46
@ B2_ID
Id for retrieving the structure factor 2 for DGL accessor.
Definition gmpMaterialMDCreep.h:42
virtual double theoreticalConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the Theoretical constant.
Definition gmpMaterialMDCreep.h:237
double fittingParamHard1(const GmElement *e, const GmVector *coord, int ip) const
Returns the Fitting parameter for hardening 1.
Definition gmpMaterialMDCreep.h:255
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
double stressConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress constant for DGL.
Definition gmpMaterialMDCreep.h:231
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 fittingParamHard2(const GmElement *e, const GmVector *coord, int ip) const
Returns the Fitting parameter for hardening 2.
Definition gmpMaterialMDCreep.h:261
GmpMaterialMDCreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialMDCreep.h:68
virtual ~GmpMaterialMDCreep()
Virtual destructor.
Definition gmpMaterialMDCreep.h:72
double structureFactorDGL1(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for DGL1.
Definition gmpMaterialMDCreep.h:219
double softParameter(const GmElement *e, const GmVector *coord, int ip) const
Returns the Softening parameter.
Definition gmpMaterialMDCreep.h:267
GaussAttributeIds
IDs for material Gauss attributes.
Definition gmpMaterialMDCreep.h:56
@ FT_GA_ID
Base Id for Gauss attribute(s) used to store the transient function.
Definition gmpMaterialMDCreep.h:59
@ EcSS_GA_ID
Base Id for Gauss attribute(s) used to store the steady-state creep rate.
Definition gmpMaterialMDCreep.h:60
@ zetaOld_GA_ID
Id for retrieving the hardening parameter accessor at the previous state (old Zeta)
Definition gmpMaterialMDCreep.h:58
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpMaterialMDCreep.h:62
double structureFactorDGL2(const GmElement *e, const GmVector *coord, int ip) const
Returns the structure factor for DGL2.
Definition gmpMaterialMDCreep.h:225
Definition gmpMechanicPoint.h:33
#define S_TRACE()
arma::vec GmVector
Declaration of the gmpMaterialDPCreep class.
Declaration of the GmpMechanicPoint class.
Declaration of useful configuration definitions for the plugin library.
double shearModulus(double E, double nu)
Returns the shear modulus (G) from Young's modulus (E) and Poisson's Coefficient (nu)
Definition gmpMechanicalMaterial.cpp:68
QString tr(const char *sourceText, const char *disambiguation, int n)