CoupledTHFemPhysics
The GeMA Coupled Thermo-Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
gmpCoupledThermoHydraulic.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_THERMOHYDRAULIC_H_
25#define _GEMA_PLUGIN_THERMOHYDRAULIC_H_
26
27
29#include <gmpFemPhysicsCoupled.h>
30#include <gmTrace.h>
31
32class GmGaussAccessor;
33
35class GMP_COUPLED_TH_PHYSICS_API_EXPORT GmpCoupledThermoHydraulic: public GmpCoupledTHFemPhysics
36{
37public:
38 // constructor
39 GmpCoupledThermoHydraulic(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
40 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
41
42 // destructor
44
47 {
48 T_GA_ID , //= GmpCoupledTHFemPhysics::NUM_GA_IDS, //!< Base Id for Gauss attribute(s) used to store the calculated temperature at the current state
50
51 // ------ NO ADDING BELOW THIS LINE
53 };
54 // set physic map
55 virtual const QVariantMap* physicsMetaDataMap();
56
57 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
58
59 virtual bool calcDerivedResults(bool nonLinearSolver);
60
61 virtual void gravityForce(const GmElement* e, const GmVector* coord, int ip, GmVector& GFc, GmVector& N, double c);
62
63 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
64
65protected:
66 // See comments on the base class
67 virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
68
70
71 // See comments on the base class
72 virtual const GmElementDof* dofMapping(GmCellType type) const;
73 virtual void fillDofIndexPosition(const GmElement* e, QVector<int>& iPe, QVector<int>& iTe);
74
76 virtual void fillFluidCompressibilityMatrix(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Sc, GmVector& Np, double c);
78 virtual void fillThermalHydraulicCouplingMatrix(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Ze, const GmVector& Np, double a, double af, double c) const;
80 virtual bool assemblyElemDampingMatrix(const GmElement* e, GmMatrix& elemC, const GmMatrix& Se, const GmMatrix& Ze,
81 const GmMatrix& Xe, const QVector<int>& iPe, const QVector<int>& iTe) const;
83 virtual bool assemblyElemStiffnessMatrix(const GmElement* e, GmMatrix& elemK, const GmMatrix& He, const GmMatrix& Ie,
84 const GmMatrix& Ge, const QVector<int>& iPe, const QVector<int>& iTe) const;
86 virtual bool getPorePressureGaussPoint(const GmElement* e, const GmVector* coord, int ip, GmVector& Pg, const GmVector& Np, const GmVector& Pe) const;
88 virtual void assemblyInternalForceVector(const GmElement* e, GmMatrix& elemFi, const GmMatrix& He, const GmMatrix& Ge, const GmMatrix& Ie, const GmVector& Pe, const GmVector& Te, const QVector<int>& iPe, const QVector<int>& iTe) const;
89
90 // Sets initial conditions
91 virtual bool setInitialConditions();
92
93private:
95};
96
97#endif
Basic class for the coupled thermo-hydraulic physics plugin object.
Definition gmpCoupledTHFemPhysics.h:37
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the single thermo-hydraulic physics attribute map, built when the function is...
Definition gmpCoupledTHFemPhysics.cpp:78
Thermo mechanical 2D & 3D : Quad, Tri, Hex and Tet.
Definition gmpCoupledThermoHydraulic.h:36
bool _setInitialCond
Sets the initial conditions required by the physics.
Definition gmpCoupledThermoHydraulic.h:69
GaussAttributeIds
IDs for physics Gauss attributes.
Definition gmpCoupledThermoHydraulic.h:47
@ TOLD_GA_ID
Id for retrieving the stress accessor at the previous temperature (old temperature)
Definition gmpCoupledThermoHydraulic.h:49
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpCoupledThermoHydraulic.h:52
bool _hasElementGeneration
Should we enable heat sources on elements (does not affect point generation sources)?
Definition gmpCoupledThermoHydraulic.h:94
GmCellType
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpCoupledTHFemPhysics class.