MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialDMCreep.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_DMCREEP_H_
26#define _GEMA_PLUGIN_MECHANICALMATERIAL_DMCREEP_H_
27
28#include "gmpMechanicalConfig.h"
29#include <gmpFemPhysics.h>
30#include <gmMathUtils.h>
31
32#include <gmpMaterialCreep.h>
33#include "gmpMechanicPoint.h"
34
35class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialDMCreep : public GmpMaterialCreep
36{
37protected:
52
53public:
54
56 GmpMaterialDMCreep(int typeIndex, QString typeName, const GmLogCategory& logger)
57 : GmpMaterialCreep(typeIndex, typeName, logger) {}
58
61
63 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
64 {
65 Q_UNUSED(simulation);
66 return new GmpMaterialDMCreep(typeIndex, typeName, logger);
67 }
68
69 // Returns a map with material associated properties.
70 virtual const QVariantMap* materialMetaDataMap()
71 {
72 S_TRACE();
73 static QVariantMap m;
74 if (m.isEmpty())
75 {
76 // read the material attribute map from elastic interface material
78
79 // Adds material properties
80 GmpFemPhysicsCommon::ValueList matDMProp = m["properties"].value<GmpFemPhysicsCommon::ValueList>();
81 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(QT_ID, "QT", QObject::tr("Thermal activation energy"), "J/mol", true));
82 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(R_ID, "R", QObject::tr("Universal gas constant"), "J/(mol*K)", true));
83 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(DEDT_ID, "DEDT", QObject::tr("Threshold creep rate"), "1/s", true));
84 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(So_ID, "So", QObject::tr("Threshold deviatoric stress"), "kPa", true));
85 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(To_ID, "To", QObject::tr("Threshold temperature"), "K", true));
86 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(AN1_ID, "AN1", QObject::tr("Dislocation creep"), "", true));
87 matDMProp.append(GmpFemPhysicsCommon::ScalarValue(AN2_ID, "AN2", QObject::tr("Steady state cracking"), "", true));
88 m["properties"] = matDMProp;
89 }
90 return &m;
91 }
92
93 // Returns the stresses according to the material behavior adopted
94 virtual double fillCreepStrainRate(const GmElement* e, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, double MISES) const
95 {
96 S_TRACE();
97 assert(e); Q_UNUSED(Time);
98
99 double eCreepRate, NP, So, Eo, QT, Rg, To, TEMP;
100
101 unsigned pointIndex = mp->_index.localData();
102
103 // Reads DM creep Properties
104 So = thresholdDevStress(e, coord, pointIndex);
105 Eo = thresholdCreepRate(e, coord, pointIndex);
106 QT = thermalActEnergy(e, coord, pointIndex);
107 Rg = universalGasConstant(e, coord, pointIndex);
108 To = thresholdTemperature(e, coord, pointIndex);
109
110 // Read the Temperature at integration point
111 if (nodeAttrAc(T_NA_ID)!= NULL)
112 {
113 TEMP = fillTemperatureFromNodalAttr(e, coord);
114 }
115 else
116 {
117 TEMP = temperatureProperty(e, coord, pointIndex);
118 }
119
120 // Set the suitable stress power
121 if (MISES < So)
122 {
123 NP = disCreep(e, coord, pointIndex);
124 }
125 else
126 {
127 NP = steadyStateCracking(e, coord, pointIndex);
128 }
129
130 // Computes the creep strain rate
131 eCreepRate = Eo*exp(QT / (Rg*To))*exp((-1.0)*QT / (Rg*TEMP))* pow(MISES / So, NP);
132
133 return eCreepRate;
134 }
135
137 double thermalActEnergy(const GmElement* e, const GmVector* coord, int ip) const
138 {
139 return propertyAc(QT_ID)->scalarValueAt(e, coord, ip);
140 }
141
143 double universalGasConstant(const GmElement* e, const GmVector* coord, int ip) const
144 {
145 return propertyAc(R_ID)->scalarValueAt(e, coord, ip);
146 }
147
149 double thresholdCreepRate(const GmElement* e, const GmVector* coord, int ip) const
150 {
151 return propertyAc(DEDT_ID)->scalarValueAt(e, coord, ip);
152 }
153
155 double thresholdDevStress(const GmElement* e, const GmVector* coord, int ip) const
156 {
157 return propertyAc(So_ID)->scalarValueAt(e, coord, ip);
158 }
159
161 double thresholdTemperature(const GmElement* e, const GmVector* coord, int ip) const
162 {
163 return propertyAc(To_ID)->scalarValueAt(e, coord, ip);
164 }
165
167 double disCreep(const GmElement* e, const GmVector* coord, int ip) const
168 {
169 return propertyAc(AN1_ID)->scalarValueAt(e, coord, ip);
170 }
171
173 double steadyStateCracking(const GmElement* e, const GmVector* coord, int ip) const
174 {
175 return propertyAc(AN2_ID)->scalarValueAt(e, coord, ip);
176 }
177};
178
179#endif
T & localData(int tid)
Definition gmpMaterialCreep.h:36
virtual double fillTemperatureFromNodalAttr(const GmElement *e, const GmVector *coord) const
Return temperature at integration point using the nodal Temperature field.
Definition gmpMaterialCreep.cpp:401
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialCreep.h:47
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpMaterialCreep.cpp:38
virtual double temperatureProperty(const GmElement *e, const GmVector *coord, int ip) const
Returns the Temperature from property table.
Definition gmpMaterialCreep.h:124
Definition gmpMaterialDMCreep.h:36
virtual ~GmpMaterialDMCreep()
Virtual destructor.
Definition gmpMaterialDMCreep.h:60
double thermalActEnergy(const GmElement *e, const GmVector *coord, int ip) const
Returns the Thermal activation energy QT.
Definition gmpMaterialDMCreep.h:137
double thresholdCreepRate(const GmElement *e, const GmVector *coord, int ip) const
Returns the Threshold creep rate.
Definition gmpMaterialDMCreep.h:149
double disCreep(const GmElement *e, const GmVector *coord, int ip) const
Returns the Dislocation creep.
Definition gmpMaterialDMCreep.h:167
GmpMaterialDMCreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialDMCreep.h:56
double thresholdTemperature(const GmElement *e, const GmVector *coord, int ip) const
Returns the test temperature To.
Definition gmpMaterialDMCreep.h:161
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpMaterialDMCreep.h:70
double thresholdDevStress(const GmElement *e, const GmVector *coord, int ip) const
Returns the Threshold deviatoric stress.
Definition gmpMaterialDMCreep.h:155
double steadyStateCracking(const GmElement *e, const GmVector *coord, int ip) const
Returns the Steady state cracking.
Definition gmpMaterialDMCreep.h:173
double universalGasConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the Universal gas constant R.
Definition gmpMaterialDMCreep.h:143
virtual double fillCreepStrainRate(const GmElement *e, const GmpMechanicPoint *mp, const GmVector *coord, const GmVector &Time, double MISES) const
Computes the creep deformation rate.
Definition gmpMaterialDMCreep.h:94
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialDMCreep.h:40
@ R_ID
Id for retrieving the Universal gas constant accessor.
Definition gmpMaterialDMCreep.h:42
@ To_ID
Id for retrieving the Temperature accessor.
Definition gmpMaterialDMCreep.h:45
@ So_ID
Id for retrieving the Threshold deviatoric stress accessor.
Definition gmpMaterialDMCreep.h:44
@ AN1_ID
Id for retrieving the Dislocation creep accessor.
Definition gmpMaterialDMCreep.h:46
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialDMCreep.h:50
@ DEDT_ID
Id for retrieving the Threshold creep rate accessor.
Definition gmpMaterialDMCreep.h:43
@ AN2_ID
Id for retrieving the Steady state cracking accessor.
Definition gmpMaterialDMCreep.h:47
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 gmpMaterialDMCreep.h:63
Definition gmpMechanicPoint.h:33
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpMechanicPoint class.
Declaration of useful configuration definitions for the plugin library.
QString tr(const char *sourceText, const char *disambiguation, int n)