MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
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"
30 #include "gmpMechanicalPhysics.h"
31 #include "gmMathUtils.h"
32 
33 #include "gmpMechanicalMaterial.h"
34 #include "gmpMaterialElastic.h"
35 
36 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalMaterialPorousElastic : public GmpMechanicalMaterialElastic
37 {
38 protected:
41  {
43 
44 
45  // --- NO ADDING BELOW THIS LINE
47  };
48 
51  {
54 
55 
56  // ------ NO ADDING BELOW THIS LINE
58  };
59 
60 public:
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
The number of property ids above.
Definition: gmpMaterialPorousElastic.h:46
The number of property ids above.
Definition: gmpMaterialElastic.h:46
Declaration of the GmpMechanicalPhysics class.
Declaration of the GmpMechanicalMaterial class.
ElementPropertyIds
IDs for material element properties.
Definition: gmpMaterialElastic.h:38
Definition: gmpMaterialElastic.h:34
Definition: gmpMechanicPoint.h:32
Definition: gmpMaterialPorousElastic.h:36
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition: gmpMaterialPorousElastic.h:83
Base Id for Gauss attribute(s) used to store the calculated porosity at the current state.
Definition: gmpMaterialPorousElastic.h:52
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 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
GmpMechanicalMaterialPorousElastic(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition: gmpMaterialPorousElastic.h:63
Declaration of the GmpMechanicalMaterialElastic class.
Declaration of usefull configuration definitions for the plugin library.
virtual ~GmpMechanicalMaterialPorousElastic()
Virtual destructor.
Definition: gmpMaterialPorousElastic.h:67
The number of Gauss attribute ids above.
Definition: gmpMaterialPorousElastic.h:57
Id for retrieving the porosity accessor at the previous state (old porosity)
Definition: gmpMaterialPorousElastic.h:53
virtual double swellingCompressionCoefficient(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus.
Definition: gmpMaterialPorousElastic.h:86
arma::vec GmVector
arma::mat GmMatrix
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
GaussAttributeIds
IDs for material Gauss attributes.
Definition: gmpMaterialPorousElastic.h:50