CoupledHMFemPhysics
The GeMA Coupled Hydro-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpCoupledHMMaterial.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_COUPLED_HM_MATERIAL_H_
25#define _GEMA_PLUGIN_COUPLED_HM_MATERIAL_H_
26
27#include "gmpCoupledHMConfig.h"
28
29#include <gmpFemPhysicsCommonMaterial.h>
30#include <gmpMechanicalMaterial.h>
31#include <gmpInterfaceMaterial.h>
32#include <gmpHydraulicMaterial.h>
33#include <gmpMaterialInterfaceFlow.h>
34#include <gmpHydraulicMaterialTwoPhase.h>
35#include <gmpMaterialInterfaceMultiPhaseFlow.h>
36
40class GMP_COUPLED_HM_PHYSICS_API_EXPORT GmpCoupledHMMaterial : public GmpFemPhysicsCommonMaterial
41{
42public:
43
45 GmpCoupledHMMaterial(int typeIndex, QString typeName, const GmLogCategory& logger)
46 : GmpFemPhysicsCommonMaterial(typeIndex, typeName, logger)
47 {
48 _hydroMaterial = NULL;
49 _mechanoMaterial = NULL;
50 }
51
54
56 static GmpFemPhysicsCommonMaterial* instance(int typeIndex, QString typeName, const GmLogCategory& logger)
57 {
58 return new GmpCoupledHMMaterial(typeIndex, typeName, logger);
59 }
60
61 virtual const QVariantMap* materialMetaDataMap();
62
64 void setPhysicsMaterials(GmpFemPhysicsCommonMaterial* hydro, GmpFemPhysicsCommonMaterial* mechano)
65 {
66 _hydroMaterial = hydro;
67 _mechanoMaterial = mechano;
68 }
69
71 GmpHydraulicMaterial* hydro() const { return dynamic_cast<GmpHydraulicMaterial*>(_hydroMaterial); }
72
74 GmpHydraulicMaterialTwoPhase* twoPhaseHydro() const { return dynamic_cast<GmpHydraulicMaterialTwoPhase*>(_hydroMaterial); }
75
77 GmpMaterialInterfaceMultiPhaseFlow* twoPhaseInterfaceFlow() const { return dynamic_cast<GmpMaterialInterfaceMultiPhaseFlow*>(_hydroMaterial); }
78
80 GmpMaterialInterfaceFlow* interfaceFlow() const { return dynamic_cast<GmpMaterialInterfaceFlow*>(_hydroMaterial); }
81
83 GmpMechanicalMaterial* mechanical() const { return dynamic_cast<GmpMechanicalMaterial*>(_mechanoMaterial); }
84
86 GmpInterfaceMaterial* interface() const { return dynamic_cast<GmpInterfaceMaterial*>(_mechanoMaterial); }
87
89 GmGaussAccessor* getApertureAccessor() const;
90
92 GmGaussAccessor* getOldApertureAccessor() const;
93
95 QString flowMaterialTypeName() const;
96
98 virtual void hydroMechanicalConstitutiveModel(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Kper) const;
99
101 virtual void updatePermeabilityPoroElastic(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Kper) const;
102
104 virtual void updatePermeabilityEquivalentContinuum(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Kper) const;
105
106private:
107 GmpFemPhysicsCommonMaterial* _hydroMaterial;
108 GmpFemPhysicsCommonMaterial* _mechanoMaterial;
109};
110
111#endif
112
Basic class for a coupled hydro-mechanical material object, storing references for a mechanical and a...
Definition gmpCoupledHMMaterial.h:41
GmpFemPhysicsCommonMaterial * _mechanoMaterial
Mechanical material. Ps: The mechanical plugin does not have a base class common to all materials.
Definition gmpCoupledHMMaterial.h:108
virtual ~GmpCoupledHMMaterial()
Destructor.
Definition gmpCoupledHMMaterial.h:53
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
GmpMaterialInterfaceMultiPhaseFlow * twoPhaseInterfaceFlow() const
Returns the Two-Phase hydraulic material or NULL if none was configured.
Definition gmpCoupledHMMaterial.h:77
GmpMaterialInterfaceFlow * interfaceFlow() const
Returns the hydraulic interface material or NULL if none was configured.
Definition gmpCoupledHMMaterial.h:80
GmpFemPhysicsCommonMaterial * _hydroMaterial
Hydraulic material.
Definition gmpCoupledHMMaterial.h:107
GmpHydraulicMaterialTwoPhase * twoPhaseHydro() const
Returns the Two-Phase hydraulic material or NULL if none was configured.
Definition gmpCoupledHMMaterial.h:74
GmpHydraulicMaterial * hydro() const
Returns the hydraulic material or NULL if none was configured.
Definition gmpCoupledHMMaterial.h:71
GmpInterfaceMaterial * interface() const
Returns the mechancial interface material or NULL if none was configured or if the material is not an...
Definition gmpCoupledHMMaterial.h:86
GmpCoupledHMMaterial(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpCoupledHMMaterial.h:45
void setPhysicsMaterials(GmpFemPhysicsCommonMaterial *hydro, GmpFemPhysicsCommonMaterial *mechano)
Sets the hydraulic and mechanical materials for this material. Materials CAN be NULL for a physics.
Definition gmpCoupledHMMaterial.h:64
static GmpFemPhysicsCommonMaterial * instance(int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition gmpCoupledHMMaterial.h:56
arma::mat GmMatrix
arma::vec GmVector
Declaration of useful configuration definitions for the plugin library.