ThermoFemPhysics
The GeMA Thermo FEM Physics Plugin
Loading...
Searching...
No Matches
gmpThermoInterface.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_INTERFACE_H_
25#define _GEMA_PLUGIN_THERMO_INTERFACE_H_
26
27
28#include <gmpFemPhysicsCommon.h>
29#include <gmGaussAccessor.h>
30#include "gmpThermoFemPhysics.h"
31#include <gmTrace.h>
32
33class GmGaussAccessor;
34
35
39{
40public:
41 // constructor
42 GmpThermoInterface(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
43 const GmLogCategory& logger);
44
45 // destructor
46 virtual ~GmpThermoInterface();
47
50 {
53 Htc_ID, // !< Id for retrieving the heat transfer coef. at top accessor
54
55 // --- NO ADDING BELOW THIS LINE
57 };
58
59 virtual const QVariantMap* physicsMetaDataMap();
60 virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
61 virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
62 virtual GmpFemPhysics::FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
63 virtual bool calcDerivedResults(bool nonLinearSolver);
64
65 // See comments on the base class
66 virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
67
70 virtual void fillStorageCompMatrix(const GmElement* e, const GmVector* coord, int ip, GmMatrix& Sc, const GmVector& N, double c);
71
74 virtual void fillFlowMatrix(const GmElement* e, GmMatrix& Kc, const GmMatrix Bp, const GmVector flowParam, const GmVector N, double c);
75
78 //virtual bool setInitialGaussAttributes(const GmElement* e, const GmVector* coord, int ip) const;
79 virtual bool setInitialConditions() const;
80
85 virtual double fillBtMatrix(const GmShape* shape, const GmVector& ncoord, const GmMatrix& X, const GmVector& N, const GmMatrix& J, GmMatrix& Bt) = 0;
86
89 virtual void fillElementTemperature(const GmElement* e, GmVector& pe);
90
92 virtual double initiallyOpenElem(const GmElement* e, const GmVector* coord, int ip) const
93 {
94 S_TRACE();
95 assert(e);
96 if (propertyAc(IOPEN_ID) == NULL)
97 {
98 return 1;
99 }
100 return propertyAc(IOPEN_ID)->scalarValueAt(e, coord, ip);
101 }
102
104 virtual bool fillThermalConductivityParameters(const GmElement* e, GmVector& flowParam, const GmVector* coord, int i);
105
107 virtual double heatTransferCoeficient(const GmElement* e, const GmVector* coord, int ip) const
108 {
109 S_TRACE();
110 assert(e);
111 if (propertyAc(Htc_ID) == NULL)
112 {
113 return 0;
114 }
115 return propertyAc(Htc_ID)->scalarValueAt(e, coord, ip);
116 }
117
119 virtual double fractureHeatConductivity(const GmElement* e, const GmVector* coord, int ip) const
120 {
121 S_TRACE();
122 assert(e);
123 if (propertyAc(Kti_ID) == NULL)
124 {
125 return 0;
126 }
127 return propertyAc(Kti_ID)->scalarValueAt(e, coord, ip);
128 }
129
130protected:
131 virtual const GmElementDof* dofMapping(GmCellType type) const;
132
137 void fillMiddleCoordinates(const GmElement* e, GmMatrix Xnode, GmMatrix& MX);
138};
139
140#endif
GmCellAccessor * propertyAc(int id) const
Basic class for the standard heat physics plugin object.
Definition gmpThermoFemPhysics.h:34
@ NUM_PROPER_IDS
The number of property ids above.
Definition gmpThermoFemPhysics.h:105
Basic class for the hydraulic interface element plugin object.
Definition gmpThermoInterface.h:39
virtual bool setInitialConditions() const
sets the initial value of hydraulic gauss attributes.
Definition gmpThermoInterface.cpp:756
virtual bool fillThermalConductivityParameters(const GmElement *e, GmVector &flowParam, const GmVector *coord, int i)
Returns the thermal conductivity parameters: [kl, Ckt, Ckb].
Definition gmpThermoInterface.cpp:517
virtual double heatTransferCoeficient(const GmElement *e, const GmVector *coord, int ip) const
Returns the heat trasnfer coefficient at the top.
Definition gmpThermoInterface.h:107
virtual double fractureHeatConductivity(const GmElement *e, const GmVector *coord, int ip) const
Returns the longitudinal fracture conductivity.
Definition gmpThermoInterface.h:119
virtual double fillBtMatrix(const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmVector &N, const GmMatrix &J, GmMatrix &Bt)=0
Given a point 'ncoord', the element coordinate matrix 'X', the point shape functions 'N' and the tran...
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the hydraulic interface attribute map, built when the function is called for ...
Definition gmpThermoInterface.cpp:58
void fillMiddleCoordinates(const GmElement *e, GmMatrix Xnode, GmMatrix &MX)
Computes the coordinate at the middle plane of the interface element . Given an element 'e' and the n...
Definition gmpThermoInterface.cpp:326
InterfacePropertyIds
IDs for physics element properties.
Definition gmpThermoInterface.h:50
@ NUM_PROPER_IDS
The number of property ids above.
Definition gmpThermoInterface.h:56
@ Kti_ID
Id for retrieving the longitudinal thermal conductivity tensor accessor.
Definition gmpThermoInterface.h:52
@ IOPEN_ID
Id for retrieving the initially open element accessor.
Definition gmpThermoInterface.h:51
virtual void fillStorageCompMatrix(const GmElement *e, const GmVector *coord, int ip, GmMatrix &Sc, const GmVector &N, double c)
Calculates the compressibility matrix inside the fracture.
Definition gmpThermoInterface.cpp:397
virtual ~GmpThermoInterface()
Destructor.
Definition gmpThermoInterface.cpp:51
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function to set initial gauss attributes.
Definition gmpThermoInterface.cpp:164
virtual GmpFemPhysics::FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic Interface element.
Definition gmpThermoInterface.cpp:184
virtual void fillElementTemperature(const GmElement *e, GmVector &pe)
Given an element, fills the vector pe with nodal Temperature.
Definition gmpThermoInterface.cpp:313
virtual void fillFlowMatrix(const GmElement *e, GmMatrix &Kc, const GmMatrix Bp, const GmVector flowParam, const GmVector N, double c)
Calculates the flow stiffness matrix according to ....
Definition gmpThermoInterface.cpp:555
virtual double initiallyOpenElem(const GmElement *e, const GmVector *coord, int ip) const
Returns the initially open element
Definition gmpThermoInterface.h:92
virtual bool calcDerivedResults(bool nonLinearSolver)
Calc velocity and flow on nodes and/or Gauss points.
Definition gmpThermoInterface.cpp:798
GmCellType
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpThermoFemPhysics classes.