AdvDiffusionFemPhysics
An advection-diffusion equation FEM Physics Plugin
Loading...
Searching...
No Matches
gmpAdvDiffusionFemPhysics.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_ADV_DIFFUSION_FEM_PHYSICS_H_
25#define _GEMA_PLUGIN_ADV_DIFFUSION_FEM_PHYSICS_H_
26
28#include <gmpFemPhysicsCommon.h>
29
30#include <gmCellAccessor.h>
32#include <gmGaussAccessor.h>
33#include <gmIntegrationRule.h>
34#include <gmElement.h>
35#include <gmCellGroupSet.h>
36#include <gmElementDof.h>
37#include <gmShapeH.h>
38
39#include <luaTable.h>
40#include <luaStackBalancer.h>
41#include <gmModelData.h>
42
43#include <gmTrace.h>
44
47class GMP_ADV_DIFFUSION_PHYSICS_API_EXPORT GmpAdvDiffusionFemPhysics : public GmpFemPhysicsCommon
48{
49public:
50 GmpAdvDiffusionFemPhysics(GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger);
52
53 // Comments on the base class
54 virtual const char* pluginName() const { return "AdvDiffusionFemPhysics"; }
55
56 // Comments on the base class
57 virtual const char* pluginType() const { return "advDiffusion"; }
58
59 virtual bool loadPrivateData(LuaTable & table);
60 virtual const QVariantMap* physicsMetaDataMap();
61
62 virtual FemResultType fillElementData (const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
63 virtual FemResultType fillElementDataForBc(const GmElement* e, const GmBoundaryCondition* bc, int bcIndex, int bcListIndex,
64 int border, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
65
66 virtual bool fixedNodalDofsBc(QList<int>& nodes, QList<int>&dof, QList<double>& values, bool* constantValues) const;
67
68 virtual bool calcDerivedResults(bool nonLinearSolver);
69
70protected:
71 int BndIndex = -1;
72private:
84
87 {
89 };
90
93 {
94 P_A_ID,
95 };
96
110
113 {
116 BC_P_NODE_ID,
117 };
118
126
127 /********************************************************************/
128 QList<int> BCNodesGhostP;
129 QList<int> BCNodesGhostQ;
130 QList<int> BCEdge;
131 QList<GmVector> BCElements;
132 QList<GmVector> FNeighborhood;
133
134 int PressureDoF;
135 int FluxDoF;
136 int LSDoF;
137 /********************************************************************/
138 virtual bool loadPrivateData2D(LuaTable & table);
139 virtual bool loadPrivateData3D(LuaTable & table);
140
141 virtual bool ICProjection2D(const GmElement *e, QList<int>& nodes, QList<double> & values)
142 {
143 ICPProjection2D(e, nodes, values);
144// ICQProjection2D(e, nodes, values);
145 return true;
146 };
147
148 virtual bool ICPProjection2D(const GmElement *e, QList<int>& nodes, QList<double> & values);
149 virtual bool ICQProjection2D(const GmElement *e, QList<int>& nodes, QList<double> & values);
150
151 virtual bool ICProjection3D(const GmElement *e, QList<int>& nodes, QList<double> & values)
152 {
153 ICPProjection3D(e, nodes, values);
154 ICQProjection3D(e, nodes, values);
155 return true;
156 };
157
158 virtual bool ICPProjection3D(const GmElement *e, QList<int>& nodes, QList<double> & values);
159 virtual bool ICQProjection3D(const GmElement *e, QList<int>& nodes, QList<double> & values);
160
161 virtual const GmElementDof* dofMapping(GmCellType type) const;
162 virtual const GmElementDof* dofMapping2D(GmCellType type) const;
163 virtual const GmElementDof* dofMapping3D(GmCellType type) const;
164
165 virtual bool PrintResult(void);
166 virtual bool ErrorAnalysis(void);
167
168 bool Projection(void);
169
170 int ElemPosition(int i, int j, int k); //<! Auxiliar Function to 3D Topology Mesh. (i,j,k) Index.
171 int TClassicElementToHigher(const GmElement * e, int)const; //<! Geometric Transformation between Classical Geometric Elemento to Hierarchical.
172 //<! Auxiliar function for identify to edge/face functions defined on boundary element.
173 GmVector DofEdge_Face(const GmElement * e, int border, const GmBoundaryCondition* bc)const;
174
175};
176
177#endif
178
Basic class for the advection - diffusion physics plugin object.
Definition gmpAdvDiffusionFemPhysics.h:48
BoundaryConditionValueIds
IDs for property values from accepted boundary condition types.
Definition gmpAdvDiffusionFemPhysics.h:121
@ BC_P_NODE_V_ID
Id for retrieving the acessor to the Inflow Boundary Condition Type.
Definition gmpAdvDiffusionFemPhysics.h:124
@ BC_Q_V_ID
Id for retrieving the acessor to the Concentration Free Boundary Condition.
Definition gmpAdvDiffusionFemPhysics.h:123
@ BC_P_V_ID
Id for retrieving the acessor to the Inflow Boundary Condition Type.
Definition gmpAdvDiffusionFemPhysics.h:122
ElementPropertyIds
IDs for physics element properties.
Definition gmpAdvDiffusionFemPhysics.h:99
@ QT_ID
Id for retrieving the accesor to Flux Analytic. Used in Error Analysis Tests.
Definition gmpAdvDiffusionFemPhysics.h:106
@ QIC_ID
Id for retrieving the accesor to Flux Initial condition.
Definition gmpAdvDiffusionFemPhysics.h:104
@ PT_ID
Id for retrieving the accesor to Pressure Analytic. Used in Error Analysis Tests.
Definition gmpAdvDiffusionFemPhysics.h:105
@ GPT_ID
Id for retrieving the accesor to Gradient of Pressure Analytic. Used in Error Analysis Tests.
Definition gmpAdvDiffusionFemPhysics.h:107
@ PHI_ID
Id for retrieving the acessor to the Porosity Scalar Value Function
Definition gmpAdvDiffusionFemPhysics.h:100
@ K_ID
Id for retrieving the acessor to the Velocity Vector Value Function.
Definition gmpAdvDiffusionFemPhysics.h:101
@ PIC_ID
Id for retrieving the accesor to Pressure Initial condition.
Definition gmpAdvDiffusionFemPhysics.h:103
@ F_ID
Id for retrieving the acessor to Source/Sink term
Definition gmpAdvDiffusionFemPhysics.h:102
BoundaryConditionIds
IDs for accepted boundary condition types.
Definition gmpAdvDiffusionFemPhysics.h:113
@ BC_P_ID
Id for retrieving the acessor to the Inflow Boundary Condition Type.
Definition gmpAdvDiffusionFemPhysics.h:114
@ BC_Q_ID
Id for retrieving the acessor to the Concentration Free Boundary Condition.
Definition gmpAdvDiffusionFemPhysics.h:115
StateVarIds
IDs fo physics state vars.
Definition gmpAdvDiffusionFemPhysics.h:87
@ P_ID
Id for retrieving the acessor to the concentration state var.
Definition gmpAdvDiffusionFemPhysics.h:88
PhysicsAttributeIds
IDs for physics attributes.
Definition gmpAdvDiffusionFemPhysics.h:75
@ NodsZ_ID
Id for retrieving the number of nods in the z direction.
Definition gmpAdvDiffusionFemPhysics.h:78
@ Couple_ID
Id for retrieving if there a couple with advective physics.
Definition gmpAdvDiffusionFemPhysics.h:82
@ Error_ID
Id for retrieving for error analysis.
Definition gmpAdvDiffusionFemPhysics.h:80
@ NodsX_ID
Id for retrieving the number of nods in the x direction.
Definition gmpAdvDiffusionFemPhysics.h:76
@ staticCondensation_ID
Id for retrieving for Static Condensation procedure(Guyan Reduction).
Definition gmpAdvDiffusionFemPhysics.h:81
@ Transient_ID
Id for retrieving if is or not transient analysis.
Definition gmpAdvDiffusionFemPhysics.h:79
@ NodsY_ID
Id for retrieving the number of nods in the y direction.
Definition gmpAdvDiffusionFemPhysics.h:77
GaussAttributeIds
IDs for physics Gauss attributes.
Definition gmpAdvDiffusionFemPhysics.h:93
GmCellType
arma::vec GmVector
Declaration of useful configuration definitions for the plugin library.