24#ifndef _GEMA_PLUGIN_CHEMICAL_REACTION_H_
25#define _GEMA_PLUGIN_CHEMICAL_REACTION_H_
30#pragma warning( push )
31#include <IPhreeqc.hpp>
43 virtual const char* pluginType()
const {
return "chemicalReaction"; }
52 virtual bool beforeElementStiffnessLoop(
const GmpFemMatrixSet& elemMatrices,
const GmpFemVectorSet& elemVectors);
57 virtual void createIPhreeqcIC(IPhreeqc& R,
int node);
60 virtual bool runIPhreeqcIC(IPhreeqc& R);
63 virtual bool saveIPhreeqcValuestoMeshIC(IPhreeqc& R,
int node);
68 virtual bool createIPhreeqcBC(IPhreeqc& R);
71 virtual bool runIPhreeqcBC(IPhreeqc& R);
74 virtual bool saveIPhreeqcValuestoBCNode(IPhreeqc& R);
78 virtual bool createIPhreeqcInput(IPhreeqc& R,
int node);
81 virtual bool runIPhreeqc(IPhreeqc& R);
84 virtual bool saveIPhreeqcValuestoNode(IPhreeqc& R,
int node);
87 char *concatenateChar(std::string name,
long double val);
88 char *concatenateChar(std::string name,
GmVector val);
89 char *concatenateChar(std::string name,
long double val1, std::string name2,
long double val2);
90 char *concatenateChar(std::string name,
long double val1, std::string name2);
91 char *concatenateChar(std::string name, std::string name2,
int val1, std::string name3);
100 virtual bool runIphreeqcNodes();
103 virtual bool runInitIphreeqcNodes();
106 virtual bool runBCIPhreeqc();
119 bool needsFe,
bool needsK);
201 IPhreeqc _IPhreeqcReaction;
Basic class for chemical fem physics. Treats the diffusion and convective terms of the transport equa...
Definition gmpChemicalFemPhysics.h:35
virtual const QVariantMap * physicsMetaDataMap()
Returns a pointer to the basic chemical physics attribute map, built when the function is called for ...
Definition gmpChemicalFemPhysics.cpp:95
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...
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpChemicalFemPhysics.h:120
@ NUM_ATTRIBUTE_IDS
The number of attribute ids above.
Definition gmpChemicalFemPhysics.h:84
virtual bool calcDerivedResults(bool nonLinearSolver)
Calc velocity and flow on nodes and/or Gauss points.
Definition gmpChemicalFemPhysics.cpp:1030
virtual bool checkLoadedData()
Checks the existance of the velocity accessor, and also sizes for the dispersion and retardation coef...
Definition gmpChemicalFemPhysics.cpp:176
@ NUM_NA_IDS
The number of node attribute ids above.
Definition gmpChemicalFemPhysics.h:97
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphree...
Definition gmpChemicalReaction.h:37
iPhreeqcReactionPhysicsAttributeIds
Additional IDs for physics attributes.
Definition gmpChemicalReaction.h:123
@ REACTION_TYPE_ID
Id for retrieving the reaction type physics attribute.
Definition gmpChemicalReaction.h:125
@ NUM_ATTRIBUTE_IDS
The number of attribute ids above.
Definition gmpChemicalReaction.h:163
iPHreeqcReactionElemPropertyIds
Additional IDs for physics element properties.
Definition gmpChemicalReaction.h:190
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpChemicalReaction.h:197
NodeAttributeIds
IDs for physics node attributes.
Definition gmpChemicalReaction.h:168
@ IonSolOld_NA_ID
Base Id for history of Ion transport node attribute(s)
Definition gmpChemicalReaction.h:170
@ SIndex_NA_ID
Base Id for Saturation index.
Definition gmpChemicalReaction.h:171
@ Mineral_NA_ID
Base Id for mineral for reaction.
Definition gmpChemicalReaction.h:177
@ poroM_NA_ID
Base Id for porosity variation.
Definition gmpChemicalReaction.h:179
@ NUM_NA_IDS
The number of node attribute ids above.
Definition gmpChemicalReaction.h:185
@ PH_NA_ID
Base Id for pH solution.
Definition gmpChemicalReaction.h:173
@ EqRxn_NA_ID
Base Id for Reaction in equillibrium.
Definition gmpChemicalReaction.h:175
@ KinCtr_NA_ID
Base Id for Kinetics reaction Control.
Definition gmpChemicalReaction.h:181
Declaration of the GmpChemicalFemPhysics classes.