AdvDiffusionFemPhysics
An advection-diffusion equation FEM Physics Plugin
Loading...
Searching...
No Matches
GmpAdvDiffusionFemPhysics Class Reference

Basic class for the advection - diffusion physics plugin object. More...

#include <gmpAdvDiffusionFemPhysics.h>

Inheritance diagram for GmpAdvDiffusionFemPhysics:
Collaboration diagram for GmpAdvDiffusionFemPhysics:

Public Member Functions

 GmpAdvDiffusionFemPhysics (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Constructor. Will be called by the plugin loading code.
 
virtual ~GmpAdvDiffusionFemPhysics ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual bool loadPrivateData (LuaTable &table)
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a pointer to the single Diffusion Physics attribute map, built when the function is called for the first time.
 
virtual FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 
virtual FemResultType fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 
virtual bool fixedNodalDofsBc (QList< int > &nodes, QList< int > &dof, QList< double > &values, bool *constantValues) const
 See comments on base class. Fills vectors with prescribed node concentrations.
 
virtual bool calcDerivedResults (bool nonLinearSolver)
 Calc diffusion flux on nodes and/or Gauss points.
 

Protected Attributes

int BndIndex = -1
 Index for Boundary Node/Edge/Face in topology elements.
 

Private Types

enum  PhysicsAttributeIds {
  NodsX_ID , NodsY_ID , NodsZ_ID , Transient_ID ,
  Error_ID , staticCondensation_ID , Couple_ID
}
 IDs for physics attributes. More...
 
enum  StateVarIds { P_ID }
 IDs fo physics state vars. More...
 
enum  GaussAttributeIds { P_A_ID }
 IDs for physics Gauss attributes.
 
enum  ElementPropertyIds {
  PHI_ID , K_ID , F_ID , PIC_ID ,
  QIC_ID , PT_ID , QT_ID , GPT_ID ,
  DQT_ID
}
 IDs for physics element properties. More...
 
enum  BoundaryConditionIds { BC_P_ID , BC_Q_ID , BC_P_NODE_ID }
 IDs for accepted boundary condition types. More...
 
enum  BoundaryConditionValueIds { BC_P_V_ID , BC_Q_V_ID , BC_P_NODE_V_ID }
 IDs for property values from accepted boundary condition types. More...
 

Private Member Functions

virtual bool loadPrivateData2D (LuaTable &table)
 
virtual bool loadPrivateData3D (LuaTable &table)
 
virtual bool ICProjection2D (const GmElement *e, QList< int > &nodes, QList< double > &values)
 
virtual bool ICPProjection2D (const GmElement *e, QList< int > &nodes, QList< double > &values)
 Projection-based interpolation on reference quadrilateral element The interpolation p_h is constructed as a sum p_v + p_e + p_f + p_b of a vertex, edge, faces and bubble interpolants. First one constructs the standart bilinear interpolant p_v that matches the function p at vertices v_1,v_2,...,v_8 exploting the eight vertex functions. The edge interpolant p_e, the difference p_h-p_v is constructed one edge a time, and then extending it into the element interior. In this case one has to solve twelve systems of linear algebraic equations.... Reference : Solin. P., Segeth K., Higher-Order Finite Element Methods. Chapman-Hall (2004).
 
virtual bool ICQProjection2D (const GmElement *e, QList< int > &nodes, QList< double > &values)
 
virtual bool ICProjection3D (const GmElement *e, QList< int > &nodes, QList< double > &values)
 
virtual bool ICPProjection3D (const GmElement *e, QList< int > &nodes, QList< double > &values)
 Projection-based interpolation on reference quadrilateral element The interpolation p_h is constructed as a sum p_v + p_e + p_f + p_b of a vertex, edge, faces and bubble interpolants. First one constructs the standart bilinear interpolant p_v that matches the function p at vertices v_1,v_2,...,v_8 exploting the eight vertex functions. The edge interpolant p_e, the difference p_h-p_v is constructed one edge a time, and then extending it into the element interior. In this case one has to solve twelve systems of linear algebraic equations.... Reference : Solin. P., Segeth K., Higher-Order Finite Element Methods. Chapman-Hall (2004).
 
virtual bool ICQProjection3D (const GmElement *e, QList< int > &nodes, QList< double > &values)
 
virtual const GmElementDofdofMapping (GmCellType type) const
 Handle our particular needs for dofs, which are given by the ghost nodes and not by regular nodes.
 
virtual const GmElementDofdofMapping2D (GmCellType type) const
 Handle our particular needs for dofs, which are given by the ghost nodes and not by regular nodes.
 
virtual const GmElementDofdofMapping3D (GmCellType type) const
 Handle our particular needs for dofs, which are given by the ghost nodes and not by regular nodes.
 
virtual bool PrintResult (void)
 
virtual bool ErrorAnalysis (void)
 
bool Projection (void)
 
int ElemPosition (int i, int j, int k)
 
int TClassicElementToHigher (const GmElement *e, int) const
 
GmVector DofEdge_Face (const GmElement *e, int border, const GmBoundaryCondition *bc) const
 

Private Attributes

QList< int > BCNodesGhostP
 
QList< int > BCNodesGhostQ
 
QList< int > BCEdge
 
QList< GmVectorBCElements
 
QList< GmVectorFNeighborhood
 
int PressureDoF
 
int FluxDoF
 
int LSDoF
 

Detailed Description

Basic class for the advection - diffusion physics plugin object.

Implements Flicks diffusion laws. Implementation is based on the temperature equation discretization described in "Fundamentals of the Finite Element Method for Heat and Fluid Flow", Lewis et al, section 3.4.1, equations 3.260 and 3.261.

Basic equations are:

Q = -k * grad C, where Q is the diffusion flux, k is the diffusivity and C is the concentration.

dC/dt = div (k * grad C) + G, where G is a internal "concentration generation" term

Member Enumeration Documentation

◆ BoundaryConditionIds

IDs for accepted boundary condition types.

Enumerator
BC_P_ID 

Id for retrieving the acessor to the Inflow Boundary Condition Type.

BC_Q_ID 

Id for retrieving the acessor to the Concentration Free Boundary Condition.

◆ BoundaryConditionValueIds

IDs for property values from accepted boundary condition types.

Enumerator
BC_P_V_ID 

Id for retrieving the acessor to the Inflow Boundary Condition Type.

BC_Q_V_ID 

Id for retrieving the acessor to the Concentration Free Boundary Condition.

BC_P_NODE_V_ID 

Id for retrieving the acessor to the Inflow Boundary Condition Type.

◆ ElementPropertyIds

IDs for physics element properties.

Enumerator
PHI_ID 

Id for retrieving the acessor to the Porosity Scalar Value Function

K_ID 

Id for retrieving the acessor to the Velocity Vector Value Function.

F_ID 

Id for retrieving the acessor to Source/Sink term

PIC_ID 

Id for retrieving the accesor to Pressure Initial condition.

QIC_ID 

Id for retrieving the accesor to Flux Initial condition.

PT_ID 

Id for retrieving the accesor to Pressure Analytic. Used in Error Analysis Tests.

QT_ID 

Id for retrieving the accesor to Flux Analytic. Used in Error Analysis Tests.

GPT_ID 

Id for retrieving the accesor to Gradient of Pressure Analytic. Used in Error Analysis Tests.

DQT_ID 

Id for retrieving the accesor to Divergence of Flux Analytic. Used in Error Analysis Tests.

◆ PhysicsAttributeIds

IDs for physics attributes.

Enumerator
NodsX_ID 

Id for retrieving the number of nods in the x direction.

NodsY_ID 

Id for retrieving the number of nods in the y direction.

NodsZ_ID 

Id for retrieving the number of nods in the z direction.

Transient_ID 

Id for retrieving if is or not transient analysis.

Error_ID 

Id for retrieving for error analysis.

staticCondensation_ID 

Id for retrieving for Static Condensation procedure(Guyan Reduction).

Couple_ID 

Id for retrieving if there a couple with advective physics.

◆ StateVarIds

IDs fo physics state vars.

Enumerator
P_ID 

Id for retrieving the acessor to the concentration state var.

Member Function Documentation

◆ ErrorAnalysis()

bool GmpAdvDiffusionFemPhysics::ErrorAnalysis ( void )
privatevirtual

Higher Order Hierarchical Element Call

Geometrical element call

Higher Order Discontinuous Galerkin Element Call

Higher Order Hierarchical Element Call

Geometrical element call

◆ fillElementData()

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

Higher Order Hierarchical Element Call

Geometrical element call

Degrees of Freedom associated to Primal Variavel, Pore - Pressure

Degrees of Freedom associated to Dual Variavel, Flux

Data storage vectors with the trial functions values. (Pore Pressure Values cand be represent using this functions)

Data storage vector with divergence of vector functions values.

Data storage vectors with the test functions values.

Data storage matrix with gradient of trial functios values.

Stabilized parameter for unconditionally mixed formulation

Unified Unconditionally Stable Mixed Finite Element Formulations with higher-Order Hdiv Hierarquical Bases

◆ fillElementDataForBc()

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

Higher Order Hierarchical Element Call

Geometrical element call

Natural coordinates for the integration point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

The Gauss point weight

The determinant of the Jacobian matrix already scaled due to element type

Degrees of Freedom associated to Primal Variavel, Pore - Pressure

Degrees of Freedom associated to Dual Variavel, Flux

Data storage vectors with the trial functions values. (Pore Pressure Values cand be represent using this functions)

Data storage vectors with the test functions values.

◆ fixedNodalDofsBc()

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

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

Higher Order Hierarchical Element Call

Geometrical element call

Natural coordinates for the integration point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

The Gauss point weight

The determinant of the Jacobian matrix already scaled due to element type

Number Test Functions

◆ loadPrivateData2D()

bool GmpAdvDiffusionFemPhysics::loadPrivateData2D ( LuaTable & table)
privatevirtual

< Topology Neighboors.

◆ loadPrivateData3D()

bool GmpAdvDiffusionFemPhysics::loadPrivateData3D ( LuaTable & table)
privatevirtual

Higher Order Hierarchical Element Call

Topology Array

◆ physicsMetaDataMap()

const QVariantMap * GmpAdvDiffusionFemPhysics::physicsMetaDataMap ( )
virtual

Returns a pointer to the single Diffusion Physics attribute map, built when the function is called for the first time.

< Nods in X direction

< Nods in Y direction

< Nods in Z direction

< ID State Variable

< ID associated to Scalar-Value Function (Ex. Porosity)

< ID associated to Matrix-Value Function (Ex. Permeability)

< ID associated to Scalar-Value Function (Ex. Source/Sink)

< ID associated to Scalar-Value Initial Condition for Pressure.

< ID associated to Vector-Value Initial Condition Function for Flux.

< ID associated to Scalar-Value Function for Pressure .

< ID associated to Vector-Value Function for Flux.

< ID associated to Scalar-Value Divergence of Flux.

< ID associated to Vector-Value Gradient of Pressure.

< ID associated to Pressure Boundary Condition

< ID associated to Flux Boundary Condition


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