CoupledHMFemPhysics
The GeMA Coupled Hydro-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpTwoPhaseHydroMechanical.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_TWOPHASE_HYDROMECHANICAL_H_
25#define _GEMA_PLUGIN_TWOPHASE_HYDROMECHANICAL_H_
26
27
29#include "gmpHydroMechanical.h"
30#include <gmpFemPhysicsCoupled.h>
31#include <GmpHydraulicMaterialTwoPhase.h>
32#include <gmpHydraulicTwoPhaseFlow.h>
33#include <gmpHydraulicTwoPhaseUtils.h>
34#include <gmTrace.h>
35
36class GmGaussAccessor;
37
38namespace tp = GmpHydraulicTwoPhaseUtils;
39
42{
43public:
44 // constructor
45 GmpTwoPhaseHydroMechanical(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
46 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
47
48 // destructor
50
51 // set physic map
52 virtual const QVariantMap* physicsMetaDataMap();
53 virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
54 //virtual bool getFluidDensities(const GmElement* e, double& rhol, double& rhog, const double PlRef, const double PgRef, const double Pl, const double Pg);
55
56 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
57 virtual bool calcDerivedResults(bool nonLinearSolver);
58 virtual bool updatePorosity();
59 virtual double porosityRate(const GmElement* e, const double phiOld, const double dt);
60 virtual double volumetricStrainRate(const GmElement* e, const double dt);
61 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
62 virtual FemResultType fillElementDataForBc(const GmElement* e, const GmBoundaryCondition* bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
63
64 // See comments on the base class
65 virtual bool checkLoadedData();
66 virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
67
69 //enum TwoPhaseHMPhysicsAttributeIds
70 //{
71 // //!< Id of the physics attributes
72 // UPDATE_DSET_APERTURE = GmpHydroMechanical::NUM_ATTRI_IDS, //!< Flag to update the discontinuity set aperture
73
74 // // ------ NO ADDING BELOW THIS LINE
75 // NUM_ATTRI_IDS, //!< The number of physics attribute ids above
76 //};
77
78protected:
79 // See comments on the base class
80 virtual const GmElementDof* dofMapping(GmCellType type) const;
81 virtual void FillDofIndexPosition(const GmElement* e, QVector<int>& iUe, QVector<int>& iPe, QVector<int>& iPge);
82 virtual bool assembleElementData(const GmElement* e, GmMatrix& J, GmVector& r,
83 GmVector& ru, GmVector& rl, GmVector& rg, GmMatrix& Juu, GmMatrix& Jul, GmMatrix& Jug, GmMatrix& Jlu, GmMatrix& Jgu,
84 tp::jacobianTerms& K, QVector<int>& iUe, QVector<int>& iPl, QVector<int>& iPg);
85
88 {
90
91 // ------ NO ADDING BELOW THIS LINE
93 };
94
95 // IDs for the physics attributes
102
105 {
107 RHOlOLD_NA_ID,
108 RHOg_NA_ID,
109 RHOgOLD_NA_ID,
110 PlRef_NA_ID,
111 PgRef_NA_ID,
112
113 // ------ NO ADDING BELOW THIS LINE
115 };
116
117 // ! IDs for TwoPhaseHydroMechanical physics element attributes
119 {
121 POROLD_CA_ID,
122 Sl_CA_ID,
123 // ------ NO ADDING BELOW THIS LINE
125 };
126
127};
128
129#endif
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpCoupledHMFemPhysics.h:73
@ NUM_STATEVAR_IDS
The number of state var ids above.
Definition gmpCoupledHMFemPhysics.h:83
Dual flow hydraulic 2D & 3D for Quad, Tri, Hex and Tet.
Definition gmpHydroMechanical.h:38
Dual flow hydraulic 2D & 3D for Quad, Tri, Hex and Tet.
Definition gmpTwoPhaseHydroMechanical.h:42
TwoPhaseHMCellAttributeIds
Definition gmpTwoPhaseHydroMechanical.h:119
@ NUM_CA_IDS
The number of state var ids above.
Definition gmpTwoPhaseHydroMechanical.h:124
@ POR_CA_ID
Id for retrieving the accessor to the porosity attribute.
Definition gmpTwoPhaseHydroMechanical.h:120
virtual bool assembleElementData(const GmElement *e, GmMatrix &J, GmVector &r, GmVector &ru, GmVector &rl, GmVector &rg, GmMatrix &Juu, GmMatrix &Jul, GmMatrix &Jug, GmMatrix &Jlu, GmMatrix &Jgu, tp::jacobianTerms &K, QVector< int > &iUe, QVector< int > &iPl, QVector< int > &iPg)
Assembly the element left hand side matrix and right hand side vector: J * dx = -r.
Definition gmpTwoPhaseHydroMechanical.cpp:710
virtual void FillDofIndexPosition(const GmElement *e, QVector< int > &iUe, QVector< int > &iPe, QVector< int > &iPge)
Fills the position index with the degreee of freedo, both the mechanical and hydraulic physics....
Definition gmpTwoPhaseHydroMechanical.cpp:290
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to set initial gauss attributes.
Definition gmpTwoPhaseHydroMechanical.cpp:275
virtual bool checkLoadedData()
Checks the loaded data.
Definition gmpTwoPhaseHydroMechanical.cpp:152
TwoPhaseHMPhysicsAttributeIds
Definition gmpTwoPhaseHydroMechanical.h:97
@ UPDATEPOROSITY
Id of the physics attributes.
Definition gmpTwoPhaseHydroMechanical.h:98
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpTwoPhaseHydroMechanical.h:100
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic element.
Definition gmpTwoPhaseHydroMechanical.cpp:380
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the Hydraulics dual flow attribute map, built when the function is called for...
Definition gmpTwoPhaseHydroMechanical.cpp:94
TwoPhaseHMNodeAttributeIds
IDs for TwoPhaseHydroMechanical physics node attributes.
Definition gmpTwoPhaseHydroMechanical.h:105
@ RHOl_NA_ID
Id for retrieving the accessor to the Gas porepressure state var.
Definition gmpTwoPhaseHydroMechanical.h:106
@ NUM_NA_IDS
The number of state var ids above.
Definition gmpTwoPhaseHydroMechanical.h:114
TwoPhaseHMVarIds
IDs for TwoPhaseHydroMechanical physics state vars.
Definition gmpTwoPhaseHydroMechanical.h:88
@ NUM_STATEVAR_IDS
The number of state var ids above.
Definition gmpTwoPhaseHydroMechanical.h:92
@ PG_ID
Id for retrieving the accessor to the Gas porepressure state var.
Definition gmpTwoPhaseHydroMechanical.h:89
virtual bool calcDerivedResults(bool nonLinearSolver)
Calculatations after the time step convergence.
Definition gmpTwoPhaseHydroMechanical.cpp:760
virtual ~GmpTwoPhaseHydroMechanical()
Destructor.
Definition gmpTwoPhaseHydroMechanical.cpp:87
GmCellType
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpCoupledHMFemPhysics class.
Declaration of the gmpHydroMechanical classes.