CoupledTMFemPhysics
The GeMA Coupled Thermo-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpThermoMechanical.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_THERMOMECHANICAL_H_
25#define _GEMA_PLUGIN_THERMOMECHANICAL_H_
26
27
29#include <gmpFemPhysicsCoupled.h>
30#include <gmTrace.h>
31
32class GmGaussAccessor;
33
36{
37public:
38 // constructor
39 GmpThermoMechanical(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
40 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
41
42 // destructor
43 virtual ~GmpThermoMechanical();
44
47 {
50
51
52 // ------ NO ADDING BELOW THIS LINE
54 };
55 // set physic map
56 virtual const QVariantMap* physicsMetaDataMap();
57
58 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
59
60 virtual bool calcDerivedResults(bool nonLinearSolver);
61
62 virtual void gravityForce(const GmElement* e, const GmVector* coord, int ip, GmVector& GFc, const GmVector& N, double c) const;
63
64 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
65
66 // See comments on the base class
67 virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
68
69protected:
70 // See comments on the base class
71 virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
72
74
75 // See comments on the base class
76 virtual const GmElementDof* dofMapping(GmCellType type) const;
77
78 virtual bool assemblyElemDampingMatrix(const GmElement* e, GmMatrix& elemC, const GmMatrix& Sc, const QVector<int>& iUe, const QVector<int>& iTe) const;
79
80 virtual void FillDofIndexPosition(const GmElement* e, QVector<int>& iUe, QVector<int>& iTe);
81
82 virtual bool assemblyElemStiffnessMatrix(const GmElement* e, GmMatrix& elemK, const GmMatrix& Kep, const GmMatrix& LuT, const GmMatrix& He, const QVector<int>& iUe, const QVector<int>& iTe) const;
83
84 virtual void assemblyInternalForceVector(const GmElement* e, GmMatrix& elemFi, const GmVector& Fiu, const GmMatrix& He, const GmVector& Te, const QVector<int>& iUe, const QVector<int>& iTe) const;
85
86 // Sets initial conditions
87 virtual bool setInitialConditions();
88
89private:
91};
92
93#endif
Basic class for the coupled hydro-mechanical physics plugin object.
Definition gmpFullyCoupledTMFemPhysics.h:37
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpFullyCoupledTMFemPhysics.h:103
Thermo mechanical 2D & 3D : Quad, Tri, Hex and Tet.
Definition gmpThermoMechanical.h:36
GaussAttributeIds
IDs for physics Gauss attributes.
Definition gmpThermoMechanical.h:47
@ TOLD_GA_ID
Id for retrieving the stress accessor at the previous temperature (old temperature)
Definition gmpThermoMechanical.h:49
@ T_GA_ID
Base Id for Gauss attribute(s) used to store the calculated temperature at the current state.
Definition gmpThermoMechanical.h:48
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpThermoMechanical.h:53
virtual bool calcDerivedResults(bool nonLinearSolver)
Calc velocity and flow on nodes and/or Gauss points.
Definition gmpThermoMechanical.cpp:775
virtual bool setInitialConditions()
Sets the initial conditionrequired by interface elements.
Definition gmpThermoMechanical.cpp:795
bool _setInitialCond
Sets the initial conditions required by the physics.
Definition gmpThermoMechanical.h:73
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic element. Applying the Galerking method (Zienkiew...
Definition gmpThermoMechanical.cpp:324
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the Hydraulics dual flow attribute map, built when the function is called for...
Definition gmpThermoMechanical.cpp:104
bool _hasElementGeneration
Should we enable heat sources on elements (does not affect point generation sources)?
Definition gmpThermoMechanical.h:90
virtual void FillDofIndexPosition(const GmElement *e, QVector< int > &iUe, QVector< int > &iTe)
Fills the position index with the degreee of freedom, both the mechanical and thermal physics....
Definition gmpThermoMechanical.cpp:212
virtual ~GmpThermoMechanical()
Destructor.
Definition gmpThermoMechanical.cpp:97
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to init the _mechanicPoint structure.
Definition gmpThermoMechanical.cpp:290
GmCellType
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpFullyCoupledTMFemPhysics class.