MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialMACreep.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
24#ifndef _GEMA_PLUGIN_MECHANICALMATERIAL_MACREEP_H_
25#define _GEMA_PLUGIN_MECHANICALMATERIAL_MACREEP_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 GmpMaterialMACreep : public GmpMechanicalMaterialElastic
35{
36protected:
51
54 {
59
60
61 // ------ NO ADDING BELOW THIS LINE
63 };
64
65public:
66
68 GmpMaterialMACreep(int typeIndex, QString typeName, const GmLogCategory& logger)
69 : GmpMechanicalMaterialElastic(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 GmpMaterialMACreep(typeIndex, typeName, logger);
79 }
80
81 // Returns a map with material associated properties.
82 virtual const QVariantMap* materialMetaDataMap();
83
84 // Returns the stresses according to the material behavior adopted
85 virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, unsigned nc, bool ips) const;
86
88 virtual bool isIsotropic() const { return true; }
89
91 virtual double firstprimarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
92 {
93 return propertyAc(C1_ID)->scalarValueAt(e, coord, ip);
94 }
95
97 virtual double secondprimarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
98 {
99 return propertyAc(C2_ID)->scalarValueAt(e, coord, ip);
100 }
101
103 virtual double firstsecondarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
104 {
105 return propertyAc(A1_ID)->scalarValueAt(e, coord, ip);
106 }
107
109 virtual double firsttertiarycreepConstant(const GmElement* e, const GmVector* coord, int ip) const
110 {
111 return propertyAc(A2_ID)->scalarValueAt(e, coord, ip);
112 }
113
115 virtual double stressExponential(const GmElement* e, const GmVector* coord, int ip) const
116 {
117 return propertyAc(N_ID)->scalarValueAt(e, coord, ip);
118 }
119
121 virtual double firstdamageConstant(const GmElement* e, const GmVector* coord, int ip) const
122 {
123 return propertyAc(B_ID)->scalarValueAt(e, coord, ip);
124 }
125
127 virtual double seconddamageConstant(const GmElement* e, const GmVector* coord, int ip) const
128 {
129 return propertyAc(R_ID)->scalarValueAt(e, coord, ip);
130 }
131
132 // Computes the elastic stiffness using lame and G
133 void elasticStiffness(const GmElement*, unsigned, GmMatrix&, const GmVector*, unsigned, int) const;
134
135};
136
137#endif
Definition gmpMaterialMACreep.h:35
virtual double firstprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of primary creep.
Definition gmpMaterialMACreep.h:91
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 gmpMaterialMACreep.h:75
GmpMaterialMACreep(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialMACreep.h:68
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition gmpMaterialMACreep.h:88
virtual double secondprimarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second parameter of primary creep.
Definition gmpMaterialMACreep.h:97
virtual double seconddamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the second damage constant.
Definition gmpMaterialMACreep.h:127
virtual double firstsecondarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of secondary creep.
Definition gmpMaterialMACreep.h:103
virtual ~GmpMaterialMACreep()
Virtual destructor.
Definition gmpMaterialMACreep.h:72
GaussAttributeIds
IDs for material Gauss attributes.
Definition gmpMaterialMACreep.h:54
@ EC_GA_ID
Base Id for Gauss attribute(s) used to store the calculated creep strain at the current state.
Definition gmpMaterialMACreep.h:55
@ SDVOLD_GA_ID
Id for retrieving the damage variable accessor at the previous state.
Definition gmpMaterialMACreep.h:58
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpMaterialMACreep.h:62
@ ECOLD_GA_ID
Id for retrieving the creep strain accessor at the previous state (old creep strain)
Definition gmpMaterialMACreep.h:56
@ SDV_GA_ID
Base Id for Gauss attribute(s) used to store the damage variable at the current state.
Definition gmpMaterialMACreep.h:57
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialMACreep.h:39
@ N_ID
Id for retrieving the stress exponential.
Definition gmpMaterialMACreep.h:44
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialMACreep.h:49
@ C2_ID
Id for retrieving the second parameter of primary creep equation.
Definition gmpMaterialMACreep.h:41
@ R_ID
Id for retrieving the second damage parameter.
Definition gmpMaterialMACreep.h:46
@ B_ID
Id for retrieving the first damage parameter.
Definition gmpMaterialMACreep.h:45
@ A2_ID
Id for retrieving the first parameter of tertiary creep equation.
Definition gmpMaterialMACreep.h:43
@ A1_ID
Id for retrieving the first parameter of secondary creep equation.
Definition gmpMaterialMACreep.h:42
virtual double firsttertiarycreepConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first parameter of tertiary creep.
Definition gmpMaterialMACreep.h:109
virtual double firstdamageConstant(const GmElement *e, const GmVector *coord, int ip) const
Returns the first damage constant.
Definition gmpMaterialMACreep.h:121
virtual double stressExponential(const GmElement *e, const GmVector *coord, int ip) const
Returns the stress exponential.
Definition gmpMaterialMACreep.h:115
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.