CoupledHMFemPhysics
The GeMA Coupled Hydro-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpHydroMechanicalInterface.h
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
25#ifndef _GEMA_PLUGIN_HYDROMECHANICALINTERFACE_H_
26#define _GEMA_PLUGIN_HYDROMECHANICALINTERFACE_H_
27
28
30#include <gmpFemPhysicsCoupled.h>
31#include <gmTrace.h>
32
33class GmGaussAccessor;
34
35
38{
39public:
40 // constructor
41 GmpHydroMechanicalInterface(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 checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
50 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
51 virtual bool calcDerivedResults(bool nonLinearSolver);
52 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
53
54 // See comments on the base class
55 virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
56
57protected:
58 // element state for fluid flow which can be close, tip or open
59 enum elemState
60 {
61 CLOSE_MODE,
62 TIP_MODE,
63 OPEN_MODE,
64 };
65
66 // See comments on the base class
67 virtual const GmElementDof* dofMapping(GmCellType type) const;
68 // See comments on the base class
69 void elemMatrixDofMap(const GmElement* e, QVector<int>& iUe, QVector<int>& iPe, int& numUe, int& in, int& elemRow) const;
70 bool fillCoupledMatrix(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Le, const GmVector& Np, const GmMatrix& B, double c) const;
71 void calcPorePressure(const GmElement* e, const GmVector* coord, int ip, GmVector& Pg, const GmVector& Np, const GmVector& pe) const;
72 void fillMechanicalStiffnessMatrix(const GmElement* e, GmMatrix& Ke, const GmMatrix& B, double c) const;
73 void assemblyDampingMatrix(const GmElement* e, GmMatrix& elemC, const GmMatrix& Le, const GmMatrix& Sc, const QVector<int>& iUe, const QVector<int>& iPe) const;
74 void assemblyStiffnessMatrix(const GmElement* e, GmMatrix& elemK, const GmMatrix& Ke, const GmMatrix& Le, const GmMatrix& Kc, const QVector<int>& iUe, const QVector<int>& iPe) const;
75 void assemblyInternalForceVector(const GmElement* e, GmVector& elemFi, const GmVector& FUe, const GmVector& FPe, const QVector<int>& iUe, const QVector<int>& iPe) const;
76
77 // fill middle nodes with displacement results
79 // set initially open elements
80 virtual void setInitialConditions(GmpMechanicPoint* mp);
81
82
83};
84
85#endif
Basic class for the coupled hydro-mechanical physics plugin object.
Definition gmpCoupledHMFemPhysics.h:37
Dual flow hydraulic 2D & 3D for Quad, Tri, Hex and Tet.
Definition gmpHydroMechanicalInterface.h:38
virtual bool calcDerivedResults(bool nonLinearSolver)
Calc results at nodes and/or Gauss points.
Definition gmpHydroMechanicalInterface.cpp:848
virtual ~GmpHydroMechanicalInterface()
Destructor.
Definition gmpHydroMechanicalInterface.cpp:91
void calcPorePressure(const GmElement *e, const GmVector *coord, int ip, GmVector &Pg, const GmVector &Np, const GmVector &pe) const
Returns the vectors with pore pressure at gauss point 'Pg'.
Definition gmpHydroMechanicalInterface.cpp:633
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic Interface element.
Definition gmpHydroMechanicalInterface.cpp:295
void assemblyInternalForceVector(const GmElement *e, GmVector &elemFi, const GmVector &FUe, const GmVector &FPe, const QVector< int > &iUe, const QVector< int > &iPe) const
Returns the elemental internal force 'elemFi' (internal force which is independent of the time)
Definition gmpHydroMechanicalInterface.cpp:791
void elemMatrixDofMap(const GmElement *e, QVector< int > &iUe, QVector< int > &iPe, int &numUe, int &in, int &elemRow) const
Fills the element matrices and vectors for a generic Interface element.
Definition gmpHydroMechanicalInterface.cpp:174
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the Hydraulics dual flow attribute map, built when the function is called for...
Definition gmpHydroMechanicalInterface.cpp:98
void fillMechanicalStiffnessMatrix(const GmElement *e, GmMatrix &Ke, const GmMatrix &B, double c) const
Returns the mechanical stiffness matrix Ke = Bu' * Dep * Bu * c.
Definition gmpHydroMechanicalInterface.cpp:542
bool fillCoupledMatrix(const GmElement *e, const GmVector *coord, int ip, GmMatrix &Le, const GmVector &Np, const GmMatrix &B, double c) const
Returns the coupled matrix Le = B.t() * m * Np * H * c.
Definition gmpHydroMechanicalInterface.cpp:568
void assemblyDampingMatrix(const GmElement *e, GmMatrix &elemC, const GmMatrix &Le, const GmMatrix &Sc, const QVector< int > &iUe, const QVector< int > &iPe) const
Returns the elemental damping matrix 'elemC'.
Definition gmpHydroMechanicalInterface.cpp:733
bool fillMissingDispVarValues()
fills missing displacement for triple nodded zero-thickness interface element
Definition gmpHydroMechanicalInterface.cpp:863
void assemblyStiffnessMatrix(const GmElement *e, GmMatrix &elemK, const GmMatrix &Ke, const GmMatrix &Le, const GmMatrix &Kc, const QVector< int > &iUe, const QVector< int > &iPe) const
Returns the elemental stiffness matrix 'elemK'.
Definition gmpHydroMechanicalInterface.cpp:760
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to init the _mechanicPoint structure.
Definition gmpHydroMechanicalInterface.cpp:229
virtual void setInitialConditions(GmpMechanicPoint *mp)
Coupled physic controls the initial conditions that depends of two or more auxiliar physics However,...
Definition gmpHydroMechanicalInterface.cpp:810
GmCellType
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpCoupledHMFemPhysics class.