MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialPowerLawCreep.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_POWERLAWCREEP_H_
26#define _GEMA_PLUGIN_MECHANICALMATERIAL_POWERLAWCREEP_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 GmpMaterialPowerLawCreep : public GmpMaterialCreep
36{
37protected:
49
50public:
51
53 GmpMaterialPowerLawCreep(int typeIndex, QString typeName, const GmLogCategory& logger)
54 : GmpMaterialCreep(typeIndex, typeName, logger) {}
55
58
60 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
61 {
62 Q_UNUSED(simulation);
63 return new GmpMaterialPowerLawCreep(typeIndex, typeName, logger);
64 }
65
66 // Returns a map with material associated properties.
67 virtual const QVariantMap* materialMetaDataMap()
68 {
69 S_TRACE();
70 static QVariantMap m;
71 if (m.isEmpty())
72 {
73 // read the material attribute map from elastic interface material
75
76 // Adds material properties
77 GmpFemPhysicsCommon::ValueList matPLProp = m["properties"].value<GmpFemPhysicsCommon::ValueList>();
78 matPLProp.append(GmpFemPhysicsCommon::ScalarValue(Af_ID, "Af", QObject::tr("Structure factor of PL"), "", true));
79 matPLProp.append(GmpFemPhysicsCommon::ScalarValue(An_ID, "An", QObject::tr("Stress power of PL"), "", true));
80 matPLProp.append(GmpFemPhysicsCommon::ScalarValue(Am_ID, "Am", QObject::tr("Time power of PL"), "", true));
81 matPLProp.append(GmpFemPhysicsCommon::ScalarValue(Ak_ID, "Ak", QObject::tr("Temperature power of PL"), "", true));
82 m["properties"] = matPLProp;
83 }
84 return &m;
85 }
86
87 // Returns the stresses according to the material behavior adopted
88 virtual double fillCreepStrainRate(const GmElement* e, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, double MISES) const
89 {
90 S_TRACE();
91 assert(e);
92
93 double creepRate = 0.0, A, k, n, m;
94 double cTime, TEMP; //pTime, dTime,
95
96 // Reads time parameters
97 cTime = Time(0);
98 //pTime = Time(1);
99 //dTime = cTime - pTime;
100
101 unsigned pointIndex = mp->_index.localData();
102 // Reads steady-state creep parameters
103 A = structureFactorPL(e, coord, pointIndex); // Power law multiplier
104 n = stressPowerPL(e, coord, pointIndex); // stress power
105 m = timePowerPL(e, coord, pointIndex); // time power
106 k = temperaturePowerPL(e, coord, pointIndex); // Temperature power PL
107
108 // No creep for Misses equal to zero
109 if (MISES == 0.0)
110 {
111 return 0.0;
112 }
113
114 // Read the Temperature at integration point
115 if (nodeAttrAc(T_NA_ID) != NULL)
116 {
117 TEMP = fillTemperatureFromNodalAttr(e, coord);
118 }
119 else
120 {
121 TEMP = temperatureProperty(e, coord, pointIndex);
122 }
123
124 // Computes the creep strain rate
125 if (cTime > 0)
126 {
127 creepRate = A * pow(TEMP, k) * pow(MISES, n) * pow(cTime, m);
128 }
129
130#if 0
131
132 if (dTime > 0)
133 eCreepRate = (A * pow(MISES, n) * pow(TEMP, k) / (m + 1)) * (pow(cTime, (m + 1)) - pow(pTime, (m + 1))) * (1 / dTime);
134 else
135 eCreepRate = 0;
136#endif // 0
137
138 return creepRate;
139 }
140
142 double timePowerPL(const GmElement* e, const GmVector* coord, int ip) const
143 {
144 return propertyAc(Am_ID)->scalarValueAt(e, coord, ip);
145 }
146
148 double structureFactorPL(const GmElement* e, const GmVector* coord, int ip) const
149 {
150 return propertyAc(Af_ID)->scalarValueAt(e, coord, ip);
151 }
152
154 double temperaturePowerPL(const GmElement* e, const GmVector* coord, int ip) const
155 {
156 return propertyAc(Ak_ID)->scalarValueAt(e, coord, ip);
157 }
158
160 double stressPowerPL(const GmElement* e, const GmVector* coord, int ip) const
161 {
162 return propertyAc(An_ID)->scalarValueAt(e, coord, ip);
163 }
164};
165
166#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 gmpMaterialPowerLawCreep.h:36
virtual ~GmpMaterialPowerLawCreep()
Virtual destructor.
Definition gmpMaterialPowerLawCreep.h:57
GmpMaterialPowerLawCreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialPowerLawCreep.h:53
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 gmpMaterialPowerLawCreep.h:60
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpMaterialPowerLawCreep.h:67
double structureFactorPL(const GmElement *e, const GmVector *coord, int ip) const
Returns the power law multiplier.
Definition gmpMaterialPowerLawCreep.h:148
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialPowerLawCreep.h:40
@ An_ID
Id for retrieving the stress power for DCL accessor.
Definition gmpMaterialPowerLawCreep.h:42
@ Ak_ID
Id for retrieving the structure factor for UMC accessor.
Definition gmpMaterialPowerLawCreep.h:44
@ Am_ID
Id for retrieving the thermal activation energy for DCL accessor
Definition gmpMaterialPowerLawCreep.h:43
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialPowerLawCreep.h:47
double stressPowerPL(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress power for PL.
Definition gmpMaterialPowerLawCreep.h:160
virtual double fillCreepStrainRate(const GmElement *e, const GmpMechanicPoint *mp, const GmVector *coord, const GmVector &Time, double MISES) const
Computes the creep deformation rate.
Definition gmpMaterialPowerLawCreep.h:88
double temperaturePowerPL(const GmElement *e, const GmVector *coord, int ip) const
Returns the temperature power for PL.
Definition gmpMaterialPowerLawCreep.h:154
double timePowerPL(const GmElement *e, const GmVector *coord, int ip) const
Returns the time power for PL.
Definition gmpMaterialPowerLawCreep.h:142
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)