CoupledTMFemPhysics
The GeMA Coupled Thermo-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialIsotropicTMDamage.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
25#ifndef _GEMA_PLUGIN_COUPLED_TM_MATERIALISOTROPICTMDAMAGE_H_
26#define _GEMA_PLUGIN_COUPLED_TM_MATERIALISOTROPICTMDAMAGE_H_
27
28#include "gmpCoupledTMConfig.h"
30
31#include <gmpFemPhysics.h>
32#include <gmMathUtils.h>
33#include <gmpMechanicPoint.h>
34#include <gmpFemPhysicsCommonMaterial.h>
35
36
37class GMP_COUPLED_TM_PHYSICS_API_EXPORT GmpMaterialIsotropicTMDamage : public GmpCoupledTMMaterial
38{
39protected:
42 {
46
47 // --- NO ADDING BELOW THIS LINE
49 };
50
53 {
58
59 // ------ NO ADDING BELOW THIS LINE
61 };
62
65 {
68
69 // --- NO ADDING BELOW THIS LINE
71 };
72
73public:
74
76 GmpMaterialIsotropicTMDamage(int typeIndex, QString typeName, const GmLogCategory& logger)
77 : GmpCoupledTMMaterial(typeIndex, typeName, logger) {}
78
81
83 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
84 {
85 Q_UNUSED(simulation);
86 return new GmpMaterialIsotropicTMDamage(typeIndex, typeName, logger);
87 }
88
89 // Returns a map with material associated properties.
90 virtual const QVariantMap* materialMetaDataMap();
91
92 // Checks material loaded data.
93 virtual bool checkLoadedData(const GmElement* e) const;
94
95 // Sets the initial conditions required by isotropic damage material
96 virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
97
98 // Returns the stresses according to the material behavior adopted
99 virtual bool thermoMechanicalConstitutiveModel(const GmElement* e, GmMatrix& Ded, const GmpMechanicPoint* mp, const GmVector* coord,
100 const GmVector& Time, double Tg, unsigned nc, bool ips) const;
101
103 virtual double thermalExpansionCoeff(const GmElement* e, const GmVector* coord, int ip) const
104 {
105 return propertyAc(ALPHA_ID)->scalarValueAt(e, coord, ip);
106 }
107
109 virtual double thermalDamageThreshold(const GmElement* e, const GmVector* coord, int ip) const
110 {
111 return propertyAc(TD0_ID)->scalarValueAt(e, coord, ip);
112 }
113
115 virtual int thermalDamageLaw(const GmElement* e, const GmVector* coord, int ip) const //alterei
116 {
117 S_TRACE(); assert(e);
118 GmCellAccessor* TDLawAcc = propertyAc(TDAMLAW_ID);
119 if (TDLawAcc == NULL)
120 {
121 return 0;
122 }
123 return TDLawAcc->scalarValueAt(e, coord, ip);
124 }
125
126 // Thermal damage Law definition
127 virtual bool thermalDamageCriterion(const GmElement*, const GmpMechanicPoint*, const GmVector*, unsigned, double, double& rtd, unsigned) const;
128 //virtual bool thermalDamageCriterion(const GmElement*, const GmpMechanicPoint*, const GmVector*, unsigned, double, double, double, GmVector&, unsigned) const;
129
130
131 // Thermal damage Law definition
132 virtual bool thermalDamageLaw(const GmElement* e, const GmVector* coord, const GmpMechanicPoint* mp, unsigned sc, double& g, double rtd, double& dgt, double Tg) const;
133
134};
135
136#endif
Basic class for a coupled hydro-mechanical material object, storing references for a mechanical and a...
Definition gmpCoupledTMMaterial.h:37
virtual bool setInitialConditions(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned sc) const
Set the initial conditions required by the isotropic damage material.
Definition gmpCoupledTMMaterial.cpp:69
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpCoupledTMMaterial.cpp:38
Definition gmpMaterialIsotropicTMDamage.h:38
DamageGaussAttrIds
IDs for Gauss attributes of elastic damage material.
Definition gmpMaterialIsotropicTMDamage.h:53
@ TDAMOLD_GA_ID
Id for retrieving the material point state accessor at the previous state.
Definition gmpMaterialIsotropicTMDamage.h:55
@ TISVOLD_GA_ID
Id for retrieving the material point state accessor at the previous state.
Definition gmpMaterialIsotropicTMDamage.h:57
@ TISV_GA_ID
Base Id for Gauss attribute(s) used to store the thermal internal state variable at the current state...
Definition gmpMaterialIsotropicTMDamage.h:56
@ TDAM_GA_ID
Base Id for Gauss attribute(s) used to store the thermal damage variable at the current state.
Definition gmpMaterialIsotropicTMDamage.h:54
@ NUM_GA_IDS
The number of gauss attributes.
Definition gmpMaterialIsotropicTMDamage.h:60
virtual double thermalDamageThreshold(const GmElement *e, const GmVector *coord, int ip) const
Returns the thermal damage threshold.
Definition gmpMaterialIsotropicTMDamage.h:109
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialIsotropicTMDamage.h:42
@ ALPHA_ID
Id for retrieving the thermal expansion accessor.
Definition gmpMaterialIsotropicTMDamage.h:44
@ TD0_ID
Id for retrieving the thermal damage threshold accessor.
Definition gmpMaterialIsotropicTMDamage.h:45
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialIsotropicTMDamage.h:48
@ TDAMLAW_ID
Id for retrieving the thermal damage law accessor.
Definition gmpMaterialIsotropicTMDamage.h:43
virtual double thermalExpansionCoeff(const GmElement *e, const GmVector *coord, int ip) const
Returns the thermal expansion.
Definition gmpMaterialIsotropicTMDamage.h:103
GmpMaterialIsotropicTMDamage(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialIsotropicTMDamage.h:76
virtual int thermalDamageLaw(const GmElement *e, const GmVector *coord, int ip) const
Returns the thermal damage law.
Definition gmpMaterialIsotropicTMDamage.h:115
virtual ~GmpMaterialIsotropicTMDamage()
Virtual destructor.
Definition gmpMaterialIsotropicTMDamage.h:80
ThermalDamageLaw
Thermal damage evolution law.
Definition gmpMaterialIsotropicTMDamage.h:65
@ NUM_THERMALDAMAGELAW_IDS
The number of damage initiation criterion.
Definition gmpMaterialIsotropicTMDamage.h:70
@ luccioni
Thermal damage law proposed by Luccioni.
Definition gmpMaterialIsotropicTMDamage.h:67
@ pearce
Thermal damage law proposed by Pearce.
Definition gmpMaterialIsotropicTMDamage.h:66
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 gmpMaterialIsotropicTMDamage.h:83
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of useful configuration definitions for the plugin library.
Declaration of the GmpCoupledTMMaterial class.