![]() |
ChemicalFemPhysics
The GeMA Standard Chemical FEM Physics Plugin
|
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphreeqc package. More...
#include <gmpChemicalReaction.h>


Public Member Functions | |
| GmpChemicalReaction (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| virtual | ~GmpChemicalReaction () |
| Destructor. | |
| virtual const char * | pluginType () const |
| virtual const QVariantMap * | physicsMetaDataMap () |
| Returns a pointer to the basic chemical physics attribute map, built when the function is called for the first time. Will be extended by sub-classes providing the reactive term. | |
| virtual bool | checkLoadedData () |
| Checks the existance of the velocity accessor, and also sizes for the dispersion and retardation coefficients, as well as sizes for the prescribed concentration and prescribed flux boundary conditions. | |
| virtual bool | beforeElementStiffnessLoop (const GmpFemMatrixSet &elemMatrices, const GmpFemVectorSet &elemVectors) |
| virtual void | createIPhreeqcIC (IPhreeqc &R, int node) |
| virtual bool | runIPhreeqcIC (IPhreeqc &R) |
| virtual bool | saveIPhreeqcValuestoMeshIC (IPhreeqc &R, int node) |
| virtual bool | createIPhreeqcBC (IPhreeqc &R) |
| virtual bool | runIPhreeqcBC (IPhreeqc &R) |
| virtual bool | saveIPhreeqcValuestoBCNode (IPhreeqc &R) |
| virtual bool | createIPhreeqcInput (IPhreeqc &R, int node) |
| virtual bool | runIPhreeqc (IPhreeqc &R) |
| virtual bool | saveIPhreeqcValuestoNode (IPhreeqc &R, int node) |
| char * | concatenateChar (std::string name, long double val) |
| char * | concatenateChar (std::string name, GmVector val) |
| char * | concatenateChar (std::string name, long double val1, std::string name2, long double val2) |
| char * | concatenateChar (std::string name, long double val1, std::string name2) |
| char * | concatenateChar (std::string name, std::string name2, int val1, std::string name3) |
| virtual GmVector | fillSolutionParameters (GmCellAccessor *ac, const GmElement *e, const GmVector *coord, int ip) const |
| virtual GmMatrix | fillEquilibriumParameters (GmCellAccessor *ac, const GmElement *e, const GmVector *coord, int ip) const |
| virtual bool | calcDerivedResults (bool nonLinearSolver) |
| Calc velocity and flow on nodes and/or Gauss points. | |
| virtual bool | runIphreeqcNodes () |
| virtual bool | runInitIphreeqcNodes () |
| virtual bool | runBCIPhreeqc () |
| virtual void | getReactionValues (const GmElement *e, const GmVector &Rg, GmVector &Re, int pos) const |
| virtual void | FillElementalReaction (const GmElement *e, GmVector &elemFe, const GmVector &Fr, int pos) const |
Public Member Functions inherited from GmpChemicalFemPhysics | |
| GmpChemicalFemPhysics (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Constructor. Will be called by the plugin loading code. | |
| virtual | ~GmpChemicalFemPhysics () |
| Destructor. | |
| virtual const char * | pluginName () const |
| virtual FemResultType | fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors) |
| Fills the element stiffness matrix for element 'e' with diffusive and convective terms. Calls the virtual function reactionRate() for filling the external forces(). | |
| virtual FemResultType | fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors) |
| Fills the element force vector elemF for element 'e', taking into account fixed flux boundary conditions. | |
| virtual bool | fixedNodalDofsBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const |
| See comments on base class. Fills vectors with prescribed node concentrations | |
| virtual bool | fillFixedNodalDofsBCAlkalinity (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const |
| See comments on base class. Fills vectors with prescribed node concentrations. | |
| virtual bool | fillFixedNodalDofsBCbasalt (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const |
Public Attributes | |
| char | buffer [200] |
Protected Types | |
| enum | iPhreeqcReactionPhysicsAttributeIds { IPHREEQC_DATABASE_ID = GmpChemicalFemPhysics::NUM_ATTRIBUTE_IDS , REACTION_TYPE_ID , TEMP_A_ID , PE_A_ID , DW_A_ID , MW_A_ID , ALK_A_ID , PH_A_ID , Ca_A_ID , Cl_A_ID , Mg_A_ID , C_A_ID , Fe_A_ID , Na_A_ID , NEc_A_ID , NEd_A_ID , SIc_A_ID , SId_A_ID , nKc_A_ID , nKd_A_ID , SRc_A_ID , SRd_A_ID , POROS_A_ID , TEMP_Abc_ID , PE_Abc_ID , DW_Abc_ID , MW_Abc_ID , ALK_Abc_ID , PH_Abc_ID , Ca_Abc_ID , Cl_Abc_ID , Mg_Abc_ID , C_Abc_ID , Fe_Abc_ID , Na_Abc_ID , NUM_ATTRIBUTE_IDS } |
| Additional IDs for physics attributes. More... | |
| enum | NodeAttributeIds { IonSol_NA_ID = GmpChemicalFemPhysics::NUM_NA_IDS , IonSolOld_NA_ID , SIndex_NA_ID , SIndexOld_NA_ID , PH_NA_ID , PHOld_NA_ID , EqRxn_NA_ID , EqRxnOld_NA_ID , Mineral_NA_ID , MineralOld_NA_ID , poroM_NA_ID , poroMOld_NA_ID , KinCtr_NA_ID , KinCtrOld_NA_ID , NUM_NA_IDS } |
| IDs for physics node attributes. More... | |
| enum | iPHreeqcReactionElemPropertyIds { TemSol_ID = GmpChemicalFemPhysics::NUM_PROPERTY_IDS , BonCon_D , Fip_D , NUM_PROPERTY_IDS } |
| Additional IDs for physics element properties. More... | |
Protected Types inherited from GmpChemicalFemPhysics | |
| enum | PhysicsAttributeIds { ISOPARAMETRIC_ID , MULTI_DISPERSION_ID , MULTI_RETARDATION_ID , ALKALINITY_ID , BASALTRXN_ID , NUM_ATTRIBUTE_IDS } |
| IDs for physics attributes. More... | |
| enum | StateVarIds { C_ID } |
| IDs fo physics state vars. More... | |
| enum | NodeAttributeIds { NUM_NA_IDS } |
| IDs for physics node attributes. More... | |
| enum | GaussAttributeIds { V_GA_ID , NUM_GA_IDS } |
| IDs for physics Gauss attributes. More... | |
| enum | ElementPropertyIds { D_ID , K_ID , V_ID , PHI_ID , THICKNESS_ID , NUM_PROPERTY_IDS } |
| IDs for physics element properties. More... | |
| enum | BoundaryConditionIds { PRESCRIBED_C_BC_ID , PRESCRIBED_FLUX_BC_ID , PRESCRIBED_MIXED_BC_ID , PRESCRIBED_CN_BC_ID , NUM_BC_IDS } |
| IDs for accepted boundary condition types. More... | |
| enum | BoundaryConditionValueIds { BC_C_ID , BC_CN_ID , BC_Q_ID , BC_QDIR_ID , BC_MX_ID , NUM_BCV_IDS } |
| IDs for property values from accepted boundary condition types. More... | |
Protected Member Functions | |
| 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) |
| Virtual function called by fillElementData() for each integration point so that derived classes can add specific reaction rate terms to the convection-diffusion equation. | |
Protected Member Functions inherited from GmpChemicalFemPhysics | |
Private Attributes | |
| IPhreeqc | _IPhreeqcReaction |
Additional Inherited Members | |
Protected Attributes inherited from GmpChemicalFemPhysics | |
| GmVector | _data |
| Save alkalinity data for boundary condition. | |
| GmVector | _Cglobal |
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphreeqc package.
|
protected |
|
protected |
|
protected |
IDs for physics node attributes.
|
virtual |
Calc velocity and flow on nodes and/or Gauss points.
Reimplemented from GmpChemicalFemPhysics.
|
virtual |
Checks the existance of the velocity accessor, and also sizes for the dispersion and retardation coefficients, as well as sizes for the prescribed concentration and prescribed flux boundary conditions.
Reimplemented from GmpChemicalFemPhysics.
|
virtual |
Returns a pointer to the basic chemical physics attribute map, built when the function is called for the first time. Will be extended by sub-classes providing the reactive term.
Reimplemented from GmpChemicalFemPhysics.
|
protectedvirtual |
Virtual function called by fillElementData() for each integration point so that derived classes can add specific reaction rate terms to the convection-diffusion equation.
It receives as parameters the current element, integration point coordinate and index being processed, along with the shape function vector calculated over this point, a concentration vector for the element nodes and a constant 'wtJ' storing the product of the current integration point weight, the element thickness for 2D scenarions and the element Jacobian determinant.
The function should add its contributions to the elemFe and elemK vector / matrix according to the request given by needsFe and needsK.
Implements GmpChemicalFemPhysics.