MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
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
34class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialWDTCreep : public GmpMechanicalMaterialElastic
35{
36protected:
54
55
58 {
64
65 // ------ NO ADDING BELOW THIS LINE
67 };
68
69
72 {
74
75 // ------ NO ADDING BELOW THIS LINE
77 };
78
79public:
80
82 GmpMaterialWDTCreep(int typeIndex, QString typeName, const GmLogCategory& logger)
83 : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
84
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
Definition gmpMaterialWDTCreep.h:35
virtual double temprefConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the reference temperature.
Definition gmpMaterialWDTCreep.h:153
virtual double temperatureProperty(const GmElement *e, const GmVector *coord, int ip) const
Returns the Temperature from property table.
Definition gmpMaterialWDTCreep.h:159
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialWDTCreep.h:39
@ T_ID
Id for retrieving the Temperature accessor.
Definition gmpMaterialWDTCreep.h:49
@ N_ID
Id for retrieving the stress exponential.
Definition gmpMaterialWDTCreep.h:44
@ C2_ID
Id for retrieving the tertiary creep parameter.
Definition gmpMaterialWDTCreep.h:43
@ M_ID
Id for retrieving the temperature exponential.
Definition gmpMaterialWDTCreep.h:47
@ Tref_ID
Id for retrieving the reference temperature.
Definition gmpMaterialWDTCreep.h:48
@ R_ID
Id for retrieving the second damage parameter.
Definition gmpMaterialWDTCreep.h:46
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialWDTCreep.h:52
@ F_ID
Id for retrieving the first damage parameter.
Definition gmpMaterialWDTCreep.h:45
@ C1_ID
Id for retrieving the secondary creep parameter.
Definition gmpMaterialWDTCreep.h:42
@ B_ID
Id for retrieving the second parameter of primary creep equation.
Definition gmpMaterialWDTCreep.h:41
virtual double temperatureConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the tenperature exponential.
Definition gmpMaterialWDTCreep.h:147
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
virtual double firstprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of primary creep.
Definition gmpMaterialWDTCreep.h:105
GaussAttributeIds
IDs for material Gauss attributes.
Definition gmpMaterialWDTCreep.h:58
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpMaterialWDTCreep.h:66
@ ECOLD_GA_ID
Id for retrieving the creep strain accessor at the previous state (old creep strain)
Definition gmpMaterialWDTCreep.h:60
@ SDV2_GA_ID
Base Id for Gauss attribute(s) used to store the damage variable at the current state
Definition gmpMaterialWDTCreep.h:63
@ EC_GA_ID
Base Id for Gauss attribute(s) used to store the calculated creep strain at the current state.
Definition gmpMaterialWDTCreep.h:59
@ SDV_GA_ID
Base Id for Gauss attribute(s) used to store the damage variable at the current state.
Definition gmpMaterialWDTCreep.h:61
@ SDVOLD_GA_ID
Id for retrieving the damage variable accessor at the previous state.
Definition gmpMaterialWDTCreep.h:62
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
virtual double stressExponential(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress exponential.
Definition gmpMaterialWDTCreep.h:129
virtual double tertiarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the tertiary creep parameter.
Definition gmpMaterialWDTCreep.h:123
virtual double firstdamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first damage constant.
Definition gmpMaterialWDTCreep.h:135
NodeAttributeIds
IDs for creep material node attributes.
Definition gmpMaterialWDTCreep.h:72
@ NUM_NA_IDS
The number of node attribute ids above.
Definition gmpMaterialWDTCreep.h:76
@ T_NA_ID
Base Id for node attribute(s) used to store the calculated stress.
Definition gmpMaterialWDTCreep.h:73
virtual double secondarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the secondary creep parameter.
Definition gmpMaterialWDTCreep.h:117
virtual double seconddamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second damage constant.
Definition gmpMaterialWDTCreep.h:141
GmpMaterialWDTCreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialWDTCreep.h:82
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition gmpMaterialWDTCreep.h:102
Definition gmpMechanicPoint.h:33
Definition gmpMaterialElastic.h:35
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
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
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialElastic.h:46
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpMechanicalMaterialElastic class.
Declaration of the GmpMechanicPoint class.
Declaration of useful configuration definitions for the plugin library.