24#ifndef _GEMA_PLUGIN_HYDRAULIC_INTERFACE_TWOPHASEFLOW_H_
25#define _GEMA_PLUGIN_HYDRAULIC_INTERFACE_TWOPHASEFLOW_H_
30#include <gmpFemPhysicsCommon.h>
35namespace tp = GmpHydraulicTwoPhaseUtils;
44 const GmpFemPhysicsCommonMaterialFactory* matFactory,
const GmLogCategory& logger);
53 virtual bool beforeElementStiffnessLoop(
const GmpFemMatrixSet& elemMatrices,
const GmpFemVectorSet& elemVectors);
57 virtual GmpFemPhysics::FemResultType
fillElementData(
const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
60 virtual bool addStateItemsToGroup(
GmStateDump* state,
bool fixedHint,
int groupId);
@ NUM_NA_IDS
The number of node attribute ids above.
Definition gmpHydraulic.h:158
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpHydraulic.h:138
@ NUM_BC_IDS
The number of boundary conditions ids above.
Definition gmpHydraulic.h:200
@ NUM_STATEVAR_IDS
The number of property ids above.
Definition gmpHydraulic.h:147
@ NUM_CA_IDS
The number of cell attribute ids above.
Definition gmpHydraulic.h:166
@ NUM_BCV_IDS
The number of boundary conditions value ids above.
Definition gmpHydraulic.h:211
Basic class for the hydraulic interface element plugin object.
Definition gmpHydraulicInterface.h:38
Basic class for the hydraulic interface two phase flow element plugin object.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:40
virtual bool addMassStorage(GmVector &fil, GmVector &fig, tp::jacobianTerms &J, GmMatrix &midSurfMap, GmVector &iNp, tp::massTerms &mass, double dt)
Add the contribution of the mass storage terms to the linear system.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:721
virtual void FillDofIndexPosition(const GmElement *e, QVector< int > &iPe, QVector< int > &iPfe) const
Fills the position index of the two hydraulic degrees of freedom.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:1030
virtual void fillElementGasPorePressure(const GmElement *e, GmVector &pg) const
Given an element, fills the vector pg with nodal gas pore pressure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:1012
TwoPhaseNodeAttributeIds
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:126
@ Pg_NA_ID
Base Id for node attributes used to store gas phase density.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:129
@ PgOLD_NA_ID
Id for retrieving the previous gas pore pressure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:130
@ PlOLD_NA_ID
Id for retrieving the previous liquid pore pressure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:128
@ RHOgOLD_NA_ID
Base Id for node attributes used to store old gas phase density.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:134
@ RHOl_NA_ID
Base Id for node attributes used to store liquid phase density.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:131
@ PgRef_NA_ID
Base Id for node attributes used to store reference gas pressure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:136
@ NUM_NA_IDS
The number of state var ids above.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:139
@ PlRef_NA_ID
Base Id for node attributes used to store reference liquid pressure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:135
@ RHOlOLD_NA_ID
Base Id for node attributes used to store old liquid phase density.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:132
@ Pl_NA_ID
Base Id for node attributes used to store liquid pore pressure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:127
@ RHOg_NA_ID
Base Id for node attributes used to store gas phase density.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:133
TwoPhaseBoundaryConditionValueIds
IDs for property values from accepted boundary condition types.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:165
@ BC_PG_ID
Nodal pore pressure for fixed gas node pore pressure boundary condition.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:166
@ NUM_BCV_IDS
The number of boundary conditions value ids above.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:170
@ BC_QG_ID
Nodal pore flow for fixed node gas pore flow boundary condition.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:167
virtual bool transversalAdvectiveFluxMatrix(const GmElement *e, GmMatrix &Ht, GmVector &Np, GmMatrix &botSurfMap, GmMatrix &topSurfMap, GmMatrix &midSurfMap, const int nDof, double c) const
Compute the transversal flux permeability matrix.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:946
virtual bool computeInitialNodalAttributes()
Initialize the initial values of nodal attributes. Since the fluid densities do not depend on the par...
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:248
virtual GmpFemPhysics::FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic H2 Interface element.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:464
TwoPhaseStateVarIds
IDs fo physics state vars.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:107
@ PG_ID
Id for retrieving the accessor to the gas pore pressure state var.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:108
@ NUM_STATEVAR_IDS
The number of property ids above.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:111
virtual bool addAdvectiveFlux(GmVector &fil, GmVector &fig, tp::jacobianTerms &J, GmMatrix &H, GmVector &fgravp, tp::densityTerms &den, tp::viscosityTerms &mu, tp::permeabilityTerms &kr, tp::pressureTerms &pres, bool needsGrav)
Add the contribution of the advective flux terms to the linear system.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:739
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the hydraulic interface attribute map, built when the function is called for ...
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:56
virtual const GmElementDof * dofMapping(GmCellType type) const
Returns the hydraulic conductivity parameters: [kl, Lkt, Lkb].
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:378
virtual bool evaluateNodalVariables(const GmElement *e, GmMatrix &midSurfMap, tp::saturationTerms &Sat, tp::densityTerms &Den, tp::viscosityTerms &Mu, tp::massTerms &Ms, tp::pressureTerms &Pres)
Evaluates nodal variables.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:781
virtual void fillElementOldLiqPorePressure(const GmElement *e, GmVector &plOld) const
Given an element, fills the vector plOld with old nodal liquid pore pressure. The vector should have ...
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:1003
TwoPhaseBoundaryConditionIds
IDs for accepted boundary condition types.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:155
@ FIXED_QG_BC_ID
Id for fixed node gas flow boundary condition.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:157
@ FIXED_PG_BC_ID
Id for fixed node gas pore pressure boundary condition.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:156
@ NUM_BC_IDS
The number of boundary conditions ids above.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:160
virtual bool setInitialConditions() const
sets the initial value of hydraulic gauss attributes.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:203
TwoPhaseCellAttributeIds
IDs for physics cell attributes.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:144
@ Sl_CA_ID
Base Id for node attribute(s) used to store the calculated water saturation.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:145
@ NUM_CA_IDS
The number of node attribute ids above.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:150
@ POROLD_CA_ID
Base Id for cell attributes used to store old porosity.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:147
@ POR_CA_ID
Base Id for cell attributes used to store porosity.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:146
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to init the _hmaterialPointAccessor structure.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:119
virtual bool fixedNodalForcesBc(QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const
See comments on base class. Fills vectors with prescribed nodal forces - flow.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:443
virtual bool fixedNodalDofsBc(QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
See comments on base class. Fills vectors with prescribed node pore pressures.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:431
virtual bool assembleElementData(const GmElement *e, GmMatrix &J, GmVector &r, GmVector &Fil, GmVector &Fig, tp::jacobianTerms &K, QVector< int > &iPl, QVector< int > &iPg)
Assembly the element left hand side matrix and right hand side vector: J * dx = -r.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:974
TwoPhasePhysicsAttributeIds
IDs for physics attributes.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:116
@ COMPUTENODALATTRS_ID
Id for retrieving the isoParametric physics attribute.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:117
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpHydraulicInterfaceTwoPhaseFlow.h:121
virtual void fillDofMappingMatrices(const GmElement *e, GmMatrix &Hb, GmMatrix &Ht, GmMatrix &Hm) const
Fills the matrices that maps the dofs associated with each plane of the element.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:1072
virtual ~GmpHydraulicInterfaceTwoPhaseFlow()
Destructor.
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:50
virtual void fillElementOldGasPorePressure(const GmElement *e, GmVector &pgOld) const
Given an element, fills the vector pgOld with the old nodal gas pore pressure. The vector should have...
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:1021
virtual bool computeNodalAttributes()
Compute the nodal attributes: fluid densities. Since the fluid densities do not depend on the paramet...
Definition gmpHydraulicInterfaceTwoPhaseFlow.cpp:315
Declaration of the GmpHydraulicInterface classes.
Declaration of the GmpHydraulicTwoPhaseUtils class.
Definition gmpHydraulicTwoPhaseUtils.h:55
Definition gmpHydraulicTwoPhaseUtils.h:149
Definition gmpHydraulicTwoPhaseUtils.h:83
Definition gmpHydraulicTwoPhaseUtils.h:119
Definition gmpHydraulicTwoPhaseUtils.h:100
Definition gmpHydraulicTwoPhaseUtils.h:37
Definition gmpHydraulicTwoPhaseUtils.h:71