![]() |
ChemicalFemPhysics
The GeMA Standard Chemical FEM Physics Plugin
|
Extends the basic chemical physics transport equation by providing multi-species, coupled linear reaction rate terms. More...
#include <gmpLinearReaction.h>


Public Member Functions | |
| GmpLinearReaction (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Basic constructor. Will be called by the physics factory. | |
| virtual | ~GmpLinearReaction () |
| Destructor. | |
| virtual const char * | pluginType () const |
| virtual const QVariantMap * | physicsMetaDataMap () |
| Returns a pointer to the physics attribute map, built when the function is called for the first time. | |
| virtual bool | checkLoadedData () |
| Checks that the dimension of the reactionMatrix is correct. | |
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 |
| virtual bool | calcDerivedResults (bool nonLinearSolver) |
| Calc velocity and flow on nodes and/or Gauss points. | |
Protected Types | |
| enum | LinearReactionPhysicsAttributeIds { REACTION_MATRIX_ID = GmpChemicalFemPhysics::NUM_ATTRIBUTE_IDS } |
| Additional IDs for physics attributes. 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) |
| Reaction rate term based on a matrix defining linear relations between species concentrations. | |
Protected Member Functions inherited from GmpChemicalFemPhysics | |
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 multi-species, coupled linear reaction rate terms.
Reaction rate is based on generation terms that are linear on the available species concentrations. In that way, the basic transport equation
k * phi * dC/dt = div (phi * D * grad C) - div (v * C) + R, where:
C is the concentration [mol/m3] phi is the material porosity [0 to 1] k is the retardation coefficient [adimensional] D is the dispersion coefficient [m2/s] v is the fluid velocity [m/s] R is the reaction rate [mol/(m3.s)]
becomes, for a 3 species example:
k1 * phi * dC1/dt = div (phi * D1 * grad C1) - div (v * C1) + (r11*C1 + r12*C2 + r13*C3)
k2 * phi * dC2/dt = div (phi * D2 * grad C2) - div (v * C2) + (r21*C1 + r22*C2 + r23*C3)
k3 * phi * dC3/dt = div (phi * D3 * grad C3) - div (v * C3) + (r31*C1 + r32*C2 + r33*C3)
The basic discretization for reaction rate term is:
wtJ = w * t * detJ (integration point weight * elem width if 2D * Jacobian determinat)
elemK += -rij * wtJ * (N * Nt);
|
protected |
|
virtual |
Checks that the dimension of the reactionMatrix is correct.
Reimplemented from GmpChemicalFemPhysics.
|
virtual |
Returns a pointer to the physics attribute map, built when the function is called for the first time.
Reimplemented from GmpChemicalFemPhysics.
|
protectedvirtual |
Reaction rate term based on a matrix defining linear relations between species concentrations.
See the parameters description on the base class.
Implements GmpChemicalFemPhysics.