MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialPorousElastic.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2016 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_POROUSELASTIC_H_
26#define _GEMA_PLUGIN_MECHANICALMATERIAL_POROUSELASTIC_H_
27
28#include "gmpMechanicalConfig.h"
29#include "gmpFemPhysics.h"
31#include "gmMathUtils.h"
32
34#include "gmpMaterialElastic.h"
35
36class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalMaterialPorousElastic : public GmpMechanicalMaterialElastic
37{
38protected:
41 {
43
44
45 // --- NO ADDING BELOW THIS LINE
47 };
48
51 {
54
55
56 // ------ NO ADDING BELOW THIS LINE
58 };
59
60public:
61
63 GmpMechanicalMaterialPorousElastic(int typeIndex, QString typeName, const GmLogCategory& logger)
64 : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
65
68
70 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
71 {
72 Q_UNUSED(simulation);
73 return new GmpMechanicalMaterialPorousElastic(typeIndex, typeName, logger);
74 }
75
76 // Returns a map with material associated properties.
77 virtual const QVariantMap* materialMetaDataMap();
78
79 // Returns the stresses according to the material behavior adopted
80 virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& , unsigned nc, bool ips) const;
81
83 virtual bool isIsotropic() const { return true; }
84
86 virtual double swellingCompressionCoefficient(const GmElement* e, const GmVector* coord, int ip) const
87 {
88 if (propertyAc(ksc_ID) != NULL)
89 {
90 return propertyAc(ksc_ID)->scalarValueAt(e, coord, ip);
91 }
92 return 0.0;
93 }
94
95 virtual void elasticMatrixKG(const GmElement*, unsigned, GmMatrix&, const GmVector*, unsigned, int, const GmVector* = NULL) const;
96};
97
98#endif
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
Definition gmpMaterialPorousElastic.h:37
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 gmpMaterialPorousElastic.h:70
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition gmpMaterialPorousElastic.h:83
virtual ~GmpMechanicalMaterialPorousElastic()
Virtual destructor.
Definition gmpMaterialPorousElastic.h:67
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialPorousElastic.h:41
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialPorousElastic.h:46
GmpMechanicalMaterialPorousElastic(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialPorousElastic.h:63
GaussAttributeIds
IDs for material Gauss attributes.
Definition gmpMaterialPorousElastic.h:51
@ Pht_GA_ID
Base Id for Gauss attribute(s) used to store the calculated porosity at the current state.
Definition gmpMaterialPorousElastic.h:52
@ PhtOLD_GA_ID
Id for retrieving the porosity accessor at the previous state (old porosity)
Definition gmpMaterialPorousElastic.h:53
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpMaterialPorousElastic.h:57
virtual double swellingCompressionCoefficient(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus.
Definition gmpMaterialPorousElastic.h:86
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpMechanicalMaterialElastic class.
Declaration of useful configuration definitions for the plugin library.
Declaration of the GmpMechanicalMaterial class.
Declaration of the GmpMechanicalPhysics class.