ThermoFemPhysics
The GeMA Thermo FEM Physics Plugin
Loading...
Searching...
No Matches
gmpThermoFemPhysics.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_THERMO_FEM_PHYSICS_H_
25#define _GEMA_PLUGIN_THERMO_FEM_PHYSICS_H_
26
27#include <gmpFemPhysicsCommon.h>
28
29#include "gmpThermoConfig.h"
30
33class GMP_THERMO_PHYSICS_API_EXPORT GmpThermoFemPhysics: public GmpFemPhysicsCommon
34{
35public:
36 GmpThermoFemPhysics(const char* pluginType, GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger);
37 virtual ~GmpThermoFemPhysics();
38
39 // Comments on the base class
40 virtual const char* pluginName() const { return "ThermoFemPhysics"; }
41
42 // Comments on the base class
43 //virtual const char* pluginType() const { return "heat"; }
44 // Comments on the base class
45 virtual const char* pluginType() const { return _pluginType; }
46
47 virtual const QVariantMap* physicsMetaDataMap();
48
49 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
50 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
51
52 virtual FemResultType fillElementDataForBc(const GmElement* e, const GmBoundaryCondition* bc, int bcIndex, int bcListIndex,
53 int border, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
54
55 virtual bool fixedNodalDofsBc(QVector<int>& nodes, QVector<int>&dof, QVector<double>& values, bool* constantValues) const;
56
57 virtual bool calcDerivedResults(bool nonLinearSolver);
58
64 virtual bool supportsStateDumping() { return true; }
65
66 void fillConductivityMatrix(GmMatrix& K, const GmElement* e, const GmVector* ip, int ipIndex);
67
76
79 {
81 };
82
85 {
87 };
88
91 {
93 };
94
97 {
103
104 // --- NO ADDING BELOW THIS LINE
106 };
107
116
128
129
130protected:
131 virtual void calcElementDerivedResultAtPoints(const GmElement* e, int resultId, const GmMatrix& evalPoints, bool evalAtIp, GmMatrix& result);
133 virtual bool isAxisymmetric() { return false; }
134
136 virtual double axisymmetricFactor(const GmElement* e, const GmMatrix& X, const GmVector& N) const = 0;
137
138private:
139 const char* _pluginType;
141};
142
143#endif
144
Basic class for the standard heat physics plugin object.
Definition gmpThermoFemPhysics.h:34
ElementPropertyIds
IDs for physics element properties.
Definition gmpThermoFemPhysics.h:97
@ CP_ID
Id for retrieving the specific heat at constant pressure accessor (transient analysis)
Definition gmpThermoFemPhysics.h:102
@ THICKNESS_ID
Id for retrieving the plane width accessor.
Definition gmpThermoFemPhysics.h:99
@ G_ID
Id for retrieving the generation rate accessor.
Definition gmpThermoFemPhysics.h:100
@ RHO_ID
Id for retrieving the density accessor (transient analysis)
Definition gmpThermoFemPhysics.h:101
@ K_ID
Id for retrieving the conductivity tensor accessor.
Definition gmpThermoFemPhysics.h:98
@ NUM_PROPER_IDS
The number of property ids above.
Definition gmpThermoFemPhysics.h:105
bool _hasElementGeneration
Should we enable heat sources on elements (does not affect point generation sources)?
Definition gmpThermoFemPhysics.h:140
virtual bool isAxisymmetric()
Returns TRUE only for axisymmetric models.
Definition gmpThermoFemPhysics.h:133
BoundaryConditionIds
IDs for accepted boundary condition types.
Definition gmpThermoFemPhysics.h:110
@ FIXED_T_BC_ID
Id for fixed temperature boundary condition.
Definition gmpThermoFemPhysics.h:111
@ CONVECTIVE_BC_ID
Id for convective boundary condition.
Definition gmpThermoFemPhysics.h:113
@ FIXED_HF_BC_ID
Id for fixed heat flux boundary condition.
Definition gmpThermoFemPhysics.h:112
@ POINT_GENERATION_BC_ID
Id for point generation boundary condition.
Definition gmpThermoFemPhysics.h:114
GaussAttributeIds
IDs for physics Gauss attributes.
Definition gmpThermoFemPhysics.h:91
@ Q_GA_ID
Base Id for Gauss attribute used to store the calculated Heat Flux.
Definition gmpThermoFemPhysics.h:92
virtual double axisymmetricFactor(const GmElement *e, const GmMatrix &X, const GmVector &N) const =0
Returns the factor that should be applied when using axis symetric elements. 1.0 for other etypes.
const char * _pluginType
The plugin type name.
Definition gmpThermoFemPhysics.h:139
PhysicsAttributeIds
IDs for physics attributes.
Definition gmpThermoFemPhysics.h:70
@ HF_MODE_ID
Id for retrieving the heatFluxMode physics attribute.
Definition gmpThermoFemPhysics.h:73
@ HF_DIRECT_ID
Id for retrieving the directNodeEvaluation physics attribute.
Definition gmpThermoFemPhysics.h:74
@ HAS_ELEMENT_GENERATION_ID
Id for retrieving the enableGeneration physics attribute.
Definition gmpThermoFemPhysics.h:72
@ ISOPARAMETRIC_ID
Id for retrieving the isoParametric physics attribute.
Definition gmpThermoFemPhysics.h:71
StateVarIds
IDs fo physics state vars.
Definition gmpThermoFemPhysics.h:79
@ T_ID
Id for retrieving the acessor to the temperature state var.
Definition gmpThermoFemPhysics.h:80
virtual bool supportsStateDumping()
Tell the world that the temperature physics supports state dumping.
Definition gmpThermoFemPhysics.h:64
NodeAttributeIds
IDs for physics node attributes.
Definition gmpThermoFemPhysics.h:85
@ Q_NA_ID
Base Id for node attribute used to store the calculated Heat Flux.
Definition gmpThermoFemPhysics.h:86
BoundaryConditionValueIds
IDs for property values from accepted boundary condition types.
Definition gmpThermoFemPhysics.h:119
@ BC_QDIR_ID
Heat flux direction for fixed heat flux boundary condition.
Definition gmpThermoFemPhysics.h:122
@ BC_POS_ID
Point position for point generation boundary condition.
Definition gmpThermoFemPhysics.h:126
@ BC_T_ID
Nodal temperature for fixed temperature boundary condition.
Definition gmpThermoFemPhysics.h:120
@ BC_H_ID
Heat transfer coefficient for convective boundary condition.
Definition gmpThermoFemPhysics.h:123
@ BC_TA_ID
Ambient temperature for convective boundary condition.
Definition gmpThermoFemPhysics.h:124
@ BC_G_ID
Point generation rate for point generation boundary condition.
Definition gmpThermoFemPhysics.h:125
@ BC_Q_ID
Heat flux for fixed heat flux boundary condition.
Definition gmpThermoFemPhysics.h:121
arma::mat GmMatrix
arma::vec GmVector
Declaration of useful configuration definitions for the plugin library.