MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialOneDimPlasticity.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Nilthson NoreƱa
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_1DPLASTICITY_H_
25#define _GEMA_PLUGIN_MECHANICALMATERIAL_1DPLASTICITY_H_
26
27#include "gmpMaterialElastic.h"
28#include "gmpMechanicPoint.h"
29#include "gmpFemPhysics.h"
30#include "gmMathUtils.h"
31
32class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialOneDimPlasticity : public GmpMechanicalMaterialElastic
33{
34protected:
37 {
40
41 // --- NO ADDING BELOW THIS LINE
43 };
46 {
52
53 // ------ NO ADDING BELOW THIS LINE
55 };
56public:
57
59 GmpMaterialOneDimPlasticity(int typeIndex, QString typeName, const GmLogCategory& logger)
60 : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
61
64
66 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
67 {
68 Q_UNUSED(simulation);
69 return new GmpMaterialOneDimPlasticity(typeIndex, typeName, logger);
70 }
71
72 // Returns a map with material associated properties.
73 virtual const QVariantMap* materialMetaDataMap();
74
76 virtual bool isIsotropic() const { return true; }
77
79 virtual double initialYieldStress(const GmElement* e, const GmVector* coord, int ip) const
80 {
81 return propertyAc(IYST_ID)->scalarValueAt(e, coord, ip);
82 }
84 virtual double plasticModulus(const GmElement* e, const GmVector* coord, int ip) const
85 {
86 GmCellAccessor* pmAc = propertyAc(PMD_ID);
87 if (pmAc == NULL)
88 {
89 return 0.0;
90 }
91 return pmAc->scalarValueAt(e, coord, ip);
92 }
93
94 // Returns the stresses according to the material behavior adopted
95 virtual bool mechanicalConstitutiveModel(const GmElement*, GmMatrix&, const GmpMechanicPoint*, const GmVector*, const GmVector&, unsigned, bool) const;
96
97 };
98
99#endif
Definition gmpMaterialOneDimPlasticity.h:33
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialOneDimPlasticity.h:37
@ PMD_ID
Id for retrieving the plastic modulus accessor.
Definition gmpMaterialOneDimPlasticity.h:39
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialOneDimPlasticity.h:42
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 gmpMaterialOneDimPlasticity.h:66
GmpMaterialOneDimPlasticity(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialOneDimPlasticity.h:59
virtual double initialYieldStress(const GmElement *e, const GmVector *coord, int ip) const
Returns the material yield stress.
Definition gmpMaterialOneDimPlasticity.h:79
virtual ~GmpMaterialOneDimPlasticity()
Virtual destructor.
Definition gmpMaterialOneDimPlasticity.h:63
elemGaussAttrIds
IDs for Gauss attributes of elastoplastic material.
Definition gmpMaterialOneDimPlasticity.h:46
@ EP_GA_ID
Base Id for Gauss attribute(s) used to store the calculated plastic strain at the current state.
Definition gmpMaterialOneDimPlasticity.h:47
@ DLAMBD_GA_ID
Id for retrieving the plastic multiplier at the plastic state.
Definition gmpMaterialOneDimPlasticity.h:51
@ HARD_GA_ID
Base Id for Gauss attribute(s) used to store the calculated hardening at the current state.
Definition gmpMaterialOneDimPlasticity.h:49
@ NUM_GA_IDS
The number of gauss attributes.
Definition gmpMaterialOneDimPlasticity.h:54
@ EPOLD_GA_ID
Id for retrieving the plastic strain accessor at the previous state (old plastic strain)
Definition gmpMaterialOneDimPlasticity.h:48
@ HARDOLD_GA_ID
Id for retrieving the material point state accessor at the previous state.
Definition gmpMaterialOneDimPlasticity.h:50
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition gmpMaterialOneDimPlasticity.h:76
virtual double plasticModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the material plastic modulus.
Definition gmpMaterialOneDimPlasticity.h:84
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.