CoupledHMFemPhysics
The GeMA Coupled Hydro-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpPorousElasticMaterial.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_POROUS_ELASTIC_MATERIAL_H_
25#define _GEMA_PLUGIN_POROUS_ELASTIC_MATERIAL_H_
26
27#include <gmpFemPhysicsCommonMaterial.h>
29#include <gmpHydraulicMaterial.h>
30
31#include "gmpMechanicalMaterial.h"
32#include "gmpMaterialElastic.h"
33#include "gmpMechanicPoint.h"
34
36{
37protected:
40 {
42
43 // --- NO ADDING BELOW THIS LINE
45 };
46
47public:
48
50 GmpPorousElasticMaterial(int typeIndex, QString typeName, const GmLogCategory& logger)
51 : GmpCoupledHMMaterial(typeIndex, typeName, logger)
52 {
53 }
54
57
59 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
60 {
61 Q_UNUSED(simulation);
62 return new GmpPorousElasticMaterial(typeIndex, typeName, logger);
63 }
64
65 // Returns a map with material associated properties.
66 virtual const QVariantMap* materialMetaDataMap();
67
69 virtual double solidBulkModulus(const GmElement* e, const GmVector* coord, int ip) const
70 {
71 if (propertyAc(KSS_ID) == NULL)
72 {
73 return 1.0e25;
74 }
75 // read solid
76 double Kss = propertyAc(KSS_ID)->scalarValueAt(e, coord, ip);
77 if (Kss <= 0.0) { Kss = 1.0e25; }
78
79 return Kss;
80 }
81
82 // Returns the bulk modulus of the porous skeleton
83 virtual double porousBulkModulus(const GmElement* e, const GmVector* coord, int ip) const
84 {
85 const GmpMechanicalMaterialElastic* mmat = dynamic_cast<const GmpMechanicalMaterialElastic*>(mechanical());
86 assert(mmat);
87 return mmat->bulkModulus(e, coord, ip);
88 }
89
90 // Returns the bulk modulus of the porous skeleton
91 virtual double biotCoeffient(const GmElement* e, const GmVector* coord, int ip) const
92 {
93 const GmpMechanicalMaterialElastic* mmat = dynamic_cast<const GmpMechanicalMaterialElastic*>(mechanical());
94 assert(mmat);
95 double Kb = mmat->bulkModulus(e, coord, ip);
96 double Ks = solidBulkModulus(e, coord, ip);
97 double alpha = 1.0 - (Kb / Ks);
98 return alpha;
99 }
100
101//private:
102
103};
104
105#endif
Basic class for a coupled hydro-mechanical material object, storing references for a mechanical and a...
Definition gmpCoupledHMMaterial.h:41
GmpMechanicalMaterial * mechanical() const
Returns the mechancial material or NULL if none was configured or if the material is an interface mat...
Definition gmpCoupledHMMaterial.h:83
Definition gmpPorousElasticMaterial.h:36
GmpPorousElasticMaterial(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpPorousElasticMaterial.h:50
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpPorousElasticMaterial.cpp:40
ElementPropertyIds
IDs for material element properties.
Definition gmpPorousElasticMaterial.h:40
@ KSS_ID
Id for retrieving the solid grain bulk Modulus accessor.
Definition gmpPorousElasticMaterial.h:41
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpPorousElasticMaterial.h:44
virtual ~GmpPorousElasticMaterial()
Destructor.
Definition gmpPorousElasticMaterial.h:56
virtual double solidBulkModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the solid grain bulk modulus.
Definition gmpPorousElasticMaterial.h:69
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 gmpPorousElasticMaterial.h:59
arma::vec GmVector
Declaration of the GmpCoupledHMMaterial class.