ChemicalFemPhysics
The GeMA Standard Chemical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpChemicalFemPhysics.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
25#ifndef _GEMA_PLUGIN_CHEMICAL_FEM_PHYSICS_H_
26#define _GEMA_PLUGIN_CHEMICAL_FEM_PHYSICS_H_
27
28#include "gmpChemicalConfig.h"
29#include <gmpFemPhysicsCommon.h>
30
34class GMP_CHEMICAL_FEM_PHYSICS_API_EXPORT GmpChemicalFemPhysics : public GmpFemPhysicsCommon
35{
36public:
37 GmpChemicalFemPhysics(GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger);
38 virtual ~GmpChemicalFemPhysics();
39
40 // Comments on the base class
41 virtual const char* pluginName() const { return "ChemicalFemPhysics"; }
42
43 virtual const QVariantMap* physicsMetaDataMap();
44
45 virtual bool checkLoadedData();
46
47 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
48 virtual FemResultType fillElementDataForBc(const GmElement* e, const GmBoundaryCondition* bc, int bcIndex, int bcListIndex,
49 int border, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
50
51 virtual bool fixedNodalDofsBc(QVector<int>& nodes, QVector<int>&dof, QVector<double>& values, bool* constantValues) const;
52
53 virtual bool fillFixedNodalDofsBCAlkalinity(QVector<int>& nodes, QVector<int>&dof,QVector<double>& values, bool* constantValues) const;
54 virtual bool fillFixedNodalDofsBCbasalt(QVector<int>& nodes, QVector<int>& dof, QVector<double>& values, bool* constantValues) const;
55 virtual bool calcDerivedResults(bool nonLinearSolver);
56
57protected:
58
70 virtual bool reactionRate(const GmElement* e, const GmVector* ip, int ipIndex, const GmVector& N,
71 const GmVector& C, double wtJ, GmVector& elemFe, GmMatrix& elemK,
72 bool needsFe, bool needsK) = 0;
73
76 {
81 BASALTRXN_ID,
82
83 // --- NO ADDING BELOW THIS LINE
85 };
86
89 {
91 };
94 {
95
96 // ------ NO ADDING BELOW THIS LINE
98 };
99
102 {
104
105
106 // --- NO ADDING BELOW THIS LINE
108 };
109
112 {
118
119 // --- NO ADDING BELOW THIS LINE
121 };
122
134
137 {
143
144 // --- NO ADDING BELOW THIS LINE
146 };
147
149 GmVector _Cglobal; // Save concentration Phreeqc output;
150
151private:
152 void fillDispersionCoefficient(const GmElement* e, const GmVector& ipCoord, int ipIndex, int s, GmMatrix& D);
153 void addSpeciesToElementMatrix(int s, const GmMatrix& speciesMat, GmMatrix& elemMat);
154 void addSpeciesToElementVector(int s, const GmVector& speciesVec, GmVector& elemVec);
155};
156
157#endif
Basic class for chemical fem physics. Treats the diffusion and convective terms of the transport equa...
Definition gmpChemicalFemPhysics.h:35
BoundaryConditionValueIds
IDs for property values from accepted boundary condition types.
Definition gmpChemicalFemPhysics.h:137
@ NUM_BCV_IDS
The number of BC ids above.
Definition gmpChemicalFemPhysics.h:145
@ BC_C_ID
Nodal concentration for prescribed concentration boundary condition.
Definition gmpChemicalFemPhysics.h:138
@ BC_QDIR_ID
Flux direction for prescribed flux boundary condition.
Definition gmpChemicalFemPhysics.h:141
@ BC_MX_ID
Third Kind Boundary Condition. Robin/Cauchy.
Definition gmpChemicalFemPhysics.h:142
@ BC_Q_ID
Flux for prescribed flux boundary condition.
Definition gmpChemicalFemPhysics.h:140
@ BC_CN_ID
Nodal concentration for prescribed concentration boundary condition.
Definition gmpChemicalFemPhysics.h:139
virtual bool reactionRate(const GmElement *e, const GmVector *ip, int ipIndex, const GmVector &N, const GmVector &C, double wtJ, GmVector &elemFe, GmMatrix &elemK, bool needsFe, bool needsK)=0
Virtual function called by fillElementData() for each integration point so that derived classes can a...
ElementPropertyIds
IDs for physics element properties.
Definition gmpChemicalFemPhysics.h:112
@ PHI_ID
Id for retrieving the porosity accessor.
Definition gmpChemicalFemPhysics.h:116
@ K_ID
Id for retrieving the retardation coefficient accessor.
Definition gmpChemicalFemPhysics.h:114
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpChemicalFemPhysics.h:120
@ V_ID
Id for retrieving the fluid velocity accessor.
Definition gmpChemicalFemPhysics.h:115
@ D_ID
Id for retrieving the dispersion coefficient accessor.
Definition gmpChemicalFemPhysics.h:113
@ THICKNESS_ID
Id for retrieving the plane width accessor.
Definition gmpChemicalFemPhysics.h:117
GmVector _data
Save alkalinity data for boundary condition.
Definition gmpChemicalFemPhysics.h:148
PhysicsAttributeIds
IDs for physics attributes.
Definition gmpChemicalFemPhysics.h:76
@ ISOPARAMETRIC_ID
Id for retrieving the isoParametric physics attribute.
Definition gmpChemicalFemPhysics.h:77
@ ALKALINITY_ID
Id for retrieving the including alkalanity physics attribute.
Definition gmpChemicalFemPhysics.h:80
@ MULTI_RETARDATION_ID
Id for retrieving the multiRetardation physics attribute.
Definition gmpChemicalFemPhysics.h:79
@ MULTI_DISPERSION_ID
Id for retrieving the multiDispersion physics attribute.
Definition gmpChemicalFemPhysics.h:78
@ NUM_ATTRIBUTE_IDS
The number of attribute ids above.
Definition gmpChemicalFemPhysics.h:84
BoundaryConditionIds
IDs for accepted boundary condition types.
Definition gmpChemicalFemPhysics.h:125
@ NUM_BC_IDS
The number of BC ids above.
Definition gmpChemicalFemPhysics.h:132
@ PRESCRIBED_C_BC_ID
Id for prescribed concentration boundary condition.
Definition gmpChemicalFemPhysics.h:126
@ PRESCRIBED_MIXED_BC_ID
Id for third kind boundary condition.
Definition gmpChemicalFemPhysics.h:128
@ PRESCRIBED_FLUX_BC_ID
Id for prescribed flux boundary condition.
Definition gmpChemicalFemPhysics.h:127
@ PRESCRIBED_CN_BC_ID
Id for prescribed concentration on node boundary condition.
Definition gmpChemicalFemPhysics.h:129
StateVarIds
IDs fo physics state vars.
Definition gmpChemicalFemPhysics.h:89
@ C_ID
Id for retrieving the acessor to the concentration state var.
Definition gmpChemicalFemPhysics.h:90
GaussAttributeIds
IDs for physics Gauss attributes.
Definition gmpChemicalFemPhysics.h:102
@ NUM_GA_IDS
The number of gauss attribute ids above.
Definition gmpChemicalFemPhysics.h:107
@ V_GA_ID
Id for retrieving the Gauss attribute providing the fluid velocity.
Definition gmpChemicalFemPhysics.h:103
NodeAttributeIds
IDs for physics node attributes.
Definition gmpChemicalFemPhysics.h:94
@ NUM_NA_IDS
The number of node attribute ids above.
Definition gmpChemicalFemPhysics.h:97
arma::mat GmMatrix
arma::vec GmVector
Declaration of useful configuration definitions for the plugin library.