CoupledHMFemPhysics
The GeMA Coupled Hydro-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpTwoPhaseHydroMechanicalInterface.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_TWOPHASEHYDROMECHANICALINTERFACE_H_
25#define _GEMA_PLUGIN_TWOPHASEHYDROMECHANICALINTERFACE_H_
26
27#include "gmpHydroMechanicalInterface.h"
29#include <gmpFemPhysicsCoupled.h>
30#include <gmpHydraulicTwoPhaseUtils.h>
31#include <gmTrace.h>
32
33class GmGaussAccessor;
34
35namespace tp = GmpHydraulicTwoPhaseUtils;
38{
39public:
40 // constructor
41 GmpTwoPhaseHydroMechanicalInterface(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
42 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
43
44 // destructor
46
47 // set physic map
48 virtual const QVariantMap* physicsMetaDataMap();
49 virtual bool checkLoadedData();
50 virtual bool getFluidDensities(const GmElement* e, double& rhol, double& rhog, const double PlRef, const double PgRef, const double Pl, const double Pg);
51 virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
52 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
53 virtual bool calcDerivedResults(bool nonLinearSolver);
54 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
55
56 // See comments on the base class
57 virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
58
59protected:
60
61 // See comments on the base class
62 virtual const GmElementDof* dofMapping(GmCellType type) const;
63 // See comments on the base class
65
66 // fill middle nodes with displacement results
68
69 // set initially open elements
70 virtual void setInitialConditions(GmpMechanicPoint* mp);
71
72 virtual bool assembleElementData(const GmElement* e, GmMatrix& J, GmVector& r,
73 GmVector& ru, GmVector& rl, GmVector& rg, GmMatrix& Juu, GmMatrix& Jul, GmMatrix& Jug, GmMatrix& Jlu, GmMatrix& Jgu,
74 tp::jacobianTerms& K, QVector<int>& iUe, QVector<int>& iPl, QVector<int>& iPg);
75
78 {
80
81 // ------ NO ADDING BELOW THIS LINE
83 };
84
85 // IDs for the physics attributes
87 {
89 //COMPUTENODALATTRS_ID, //!< Flag to compute and update
90
91 // ------ NO ADDING BELOW THIS LINE
93 };
94
97 {
99 RHOlOLD_NA_ID,
100 RHOg_NA_ID,
101 RHOgOLD_NA_ID,
102 PlRef_NA_ID,
103 PgRef_NA_ID,
104
105 // ------ NO ADDING BELOW THIS LINE
107 };
108
109 // ! IDs for cell attributes
111 {
113 POROLD_CA_ID,
114 Sl_CA_ID,
115
116 // ------ NO ADDING BELOW THIS LINE
118 };
119
120};
121
122#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 gmpHydroMechanicalInterface.h:38
Hydro-mechanical interface element for two-phase flow.
Definition gmpTwoPhaseHydroMechanicalInterface.h:38
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the Hydraulics dual flow attribute map, built when the function is called for...
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:91
TwoPhaseHMNodeAttributeIds
IDs for TwoPhaseHydroMechanical physics node attributes.
Definition gmpTwoPhaseHydroMechanicalInterface.h:97
@ NUM_NA_IDS
The number of state var ids above.
Definition gmpTwoPhaseHydroMechanicalInterface.h:106
@ RHOl_NA_ID
Id for retrieving the accessor to the Gas pore pressure state var.
Definition gmpTwoPhaseHydroMechanicalInterface.h:98
virtual bool calcDerivedResults(bool nonLinearSolver)
Calc results at nodes and/or Gauss points.
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:853
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 gmpTwoPhaseHydroMechanicalInterface.cpp:909
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to init the _mechanicPoint structure.
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:326
virtual bool checkLoadedData()
Checks the loaded data.
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:138
virtual void setInitialConditions(GmpMechanicPoint *mp)
Coupled physic controls the initial conditions that depends of two or more auxiliar physics However,...
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:815
virtual ~GmpTwoPhaseHydroMechanicalInterface()
Destructor.
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:84
TwoPhaseHMCellAttributeIds
Definition gmpTwoPhaseHydroMechanicalInterface.h:111
@ POR_CA_ID
Id for retrieving the accessor to the porosity attribute.
Definition gmpTwoPhaseHydroMechanicalInterface.h:112
@ NUM_CA_IDS
The number of state var ids above.
Definition gmpTwoPhaseHydroMechanicalInterface.h:117
TwoPhaseHMPhysicsAttributeIds
Definition gmpTwoPhaseHydroMechanicalInterface.h:87
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpTwoPhaseHydroMechanicalInterface.h:92
@ UPDATEPOROSITY
Id of the physics attributes.
Definition gmpTwoPhaseHydroMechanicalInterface.h:88
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic Interface element.
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:422
TwoPhaseHMVarIds
IDs for TwoPhaseHydroMechanicalInterface physics state vars.
Definition gmpTwoPhaseHydroMechanicalInterface.h:78
@ NUM_STATEVAR_IDS
The number of state var ids above.
Definition gmpTwoPhaseHydroMechanicalInterface.h:82
@ PG_ID
Id for retrieving the accessor to the Gas pore pressure state var.
Definition gmpTwoPhaseHydroMechanicalInterface.h:79
void FillDofIndexPosition(const GmElement *e, QVector< int > &iUe, QVector< int > &iPe, QVector< int > &iPg)
Fills the element matrices and vectors for a generic Interface element. LIMITATIONS: The implementati...
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:248
bool fillMissingDispVarValues()
fills missing displacement for triple nodded zero-thickness interface element
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:868
virtual bool getFluidDensities(const GmElement *e, double &rhol, double &rhog, const double PlRef, const double PgRef, const double Pl, const double Pg)
Get the fluid densities.
Definition gmpTwoPhaseHydroMechanicalInterface.cpp:365
GmCellType
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpCoupledHMFemPhysics class.