ChemicalFemPhysics
The GeMA Standard Chemical FEM Physics Plugin
Loading...
Searching...
No Matches
GmpChemicalPipe Class Reference

Basic class for the chemical interface element plugin object. More...

#include <gmpChemicalPipe.h>

Inheritance diagram for GmpChemicalPipe:
Collaboration diagram for GmpChemicalPipe:

Public Types

enum  PhysicsAttributeIds { MULTI_REACTION_ID = GmpChemicalFemPhysics::NUM_ATTRIBUTE_IDS }
 Additional IDs for physics attributes. More...
 
enum  ElementPropertyIds { Dp_ID = GmpChemicalFemPhysics::ElementPropertyIds::NUM_PROPERTY_IDS , NUM_PROPERTY_IDS }
 IDs for physics element properties. More...
 
enum  PipeGaussAttributeIds { Dp_GA_ID = GmpChemicalFemPhysics::NUM_GA_IDS , DpOLD_GA_ID , NUM_GA_IDS }
 
enum  BoundaryConditionIds { PRESCRIBED_C_BC_PIPE_ID = GmpChemicalFemPhysics::NUM_BC_IDS , PRESCRIBED_FLUX_BC_PIPE_ID , PRESCRIBED_MIXED_BC_PIPE_ID , NUM_BC_IDS }
 IDs for accepted boundary condition types. More...
 
enum  BoundaryConditionValueIds {
  BC_C_VAL_ID = GmpChemicalFemPhysics::NUM_BCV_IDS , BC_Q_VAL_ID , BC_MX_VAL_ID , BC_C_PIPE_ID ,
  BC_Q_PIPE_ID , BC_MX_PIPE_ID , NUM_BCV_IDS
}
 IDs for property values from accepted boundary condition types. More...
 

Public Member Functions

 GmpChemicalPipe (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
virtual ~GmpChemicalPipe ()
 Destructor.
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a reference for the Hydraulic Pipe attribute map, built when the function is called for the first time.
 
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 checkAndLoadAttributeAccessors (LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
 Reimplementation of the common function to set initial gauss attributes.
 
virtual GmpFemPhysics::FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element matrices and vectors for a generic Pipe element.
 
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 setInitialGaussAttributes () const
 sets the initial value of hydraulic gauss attributes.
 
virtual double pipeSize (const GmElement *e, int i, GmVector &ip)
 
- 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 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 Member Functions

virtual const GmElementDofdofMapping (GmCellType type) const
 
- Protected Member Functions inherited from GmpChemicalFemPhysics
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 add specific reaction rate terms to the convection-diffusion equation.
 

Additional Inherited Members

- 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 Attributes inherited from GmpChemicalFemPhysics
GmVector _data
 Save alkalinity data for boundary condition.
 
GmVector _Cglobal
 

Detailed Description

Basic class for the chemical interface element plugin object.

This physics plugin calculates pore pressure in the pipe

Member Enumeration Documentation

◆ BoundaryConditionIds

IDs for accepted boundary condition types.

Enumerator
PRESCRIBED_C_BC_PIPE_ID 

Id for prescribed concentration boundary condition on cell.

PRESCRIBED_FLUX_BC_PIPE_ID 

Id for prescribed flux boundary condition on cell.

PRESCRIBED_MIXED_BC_PIPE_ID 

Id for third kind boundary condition on cell.

NUM_BC_IDS 

The number of BC ids above

◆ BoundaryConditionValueIds

IDs for property values from accepted boundary condition types.

Enumerator
BC_C_VAL_ID 

Nodal concentration for prescribed concentration boundary condition on cell.

BC_Q_VAL_ID 

Flux for prescribed flux boundary condition on cell.

BC_MX_VAL_ID 

Third Kind Boundary Condition. Robin/Cauchy.

BC_C_PIPE_ID 

BC Id for node on cell where is prescribed the concentration.

BC_Q_PIPE_ID 

BC Id for node on cell where is prescribed the flux.

BC_MX_PIPE_ID 

BC Id for node on cell where is prescribed the thrid kind boundary condition.

NUM_BCV_IDS 

The number of BC ids above

◆ ElementPropertyIds

IDs for physics element properties.

Enumerator
Dp_ID 

Id for retrieving the pipe diameter accessor.

NUM_PROPERTY_IDS 

The number of property ids above.

◆ PhysicsAttributeIds

Additional IDs for physics attributes.

Enumerator
MULTI_REACTION_ID 

Id for retrieving the multiReaction physics attribute.

◆ PipeGaussAttributeIds

Enumerator
Dp_GA_ID 

Base Id for Gauss attribute(s) used to store the pipe diameter.

NUM_GA_IDS 

The number of Gauss attribute ids above.

Member Function Documentation

◆ checkLoadedData()

bool GmpChemicalPipe::checkLoadedData ( )
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.

Reimplemented in GmpPipeFixedReaction, and GmpPipeNonLinearReaction.

◆ fillElementData()

GmpFemPhysics::FemResultType GmpChemicalPipe::fillElementData ( const GmElement * e,
GmpFemMatrixSet & elemMatrices,
GmpFemVectorSet & elemVectors )
virtual

Fills the element matrices and vectors for a generic Pipe element.

Reimplemented from GmpChemicalFemPhysics.

◆ fillElementDataForBc()

GmpFemPhysics::FemResultType GmpChemicalPipe::fillElementDataForBc ( const GmElement * e,
const GmBoundaryCondition * bc,
int bcIndex,
int bcListIndex,
int border,
GmpFemMatrixSet & elemMatrices,
GmpFemVectorSet & elemVectors )
virtual

Fills the element force vector elemF for element 'e', taking into account fixed flux boundary conditions.

Reference: "Fundamentals of the Finite Element Method for Heat and Fluid Flow", Lewis et al, section 3.4.1, equations 3.260 and 3.261

Definition of q flux concentration vector

Its different of v fluid vector.

Definition of vectors and matrix used in Third Kind Boundary Condition

Boundary Conditions Treatment for Adv-Diff Problem

  1. Prescribed of concentration variable, c.
  1. Prescribed of flux of concentration variable, q = -D grad(c) = qb
  1. Third kind boundary condition (Robin/Cauchy), alpha * c - beta * q = gamma

Definition of q flux concentration vector

Its different of v fluid vector.

Boundary Conditions Treatment for Adv-Diff Problem

  1. Prescribed of concentration variable, c.
  1. Prescribed of flux of concentration variable, q = -D grad(c) = qb
  1. Third kind boundary condition (Robin/Cauchy), alpha * v * c + beta x q = gamma

Reimplemented from GmpChemicalFemPhysics.

◆ fixedNodalDofsBc()

bool GmpChemicalPipe::fixedNodalDofsBc ( QVector< int > & nodes,
QVector< int > & dof,
QVector< double > & values,
bool * constantValues ) const
virtual

See comments on base class. Fills vectors with prescribed node concentrations

Reimplemented from GmpChemicalFemPhysics.

◆ physicsMetaDataMap()

const QVariantMap * GmpChemicalPipe::physicsMetaDataMap ( )
virtual

Returns a reference for the Hydraulic Pipe attribute map, built when the function is called for the first time.

Reimplemented from GmpChemicalFemPhysics.

Reimplemented in GmpPipeFixedReaction, and GmpPipeNonLinearReaction.

◆ setInitialGaussAttributes()

bool GmpChemicalPipe::setInitialGaussAttributes ( ) const
virtual

sets the initial value of hydraulic gauss attributes.

Sets the initial value of gauss attributes. Dp = pipe diameter Returns true.


The documentation for this class was generated from the following files: