DGFemPhysics
The GeMA Discontinuous Galerkin FEM Physics Plugin
Plugin options

Plugin object types

The Discontinuous Galerkin FEM Physics only publishes one object type (named "Concentration") and so references to the plugin name while creating a physics object don't need to include a type name.


State variables

The Discontinuous Galerkin FEM physics requires the model to contain a single concentration state variable named C. It must be a scalar variable. The physics don't have a unit by default.

Example:

StateVar{id = 'C', description = 'Concentration' , format = '1.6e', affectedNodes = 'ghost'}

Material types

The Discontinuous Galerkin FEM physics doesn't uses the concept of a metrial type since it doesn't feature multiple constitutive laws. The material behavior is fully described by the material properties below.


Material properties

The following material properties are supported (required) by the Hydraulic Fem physics:

Property Description Type Required
\(\phi\) Porosity. Scalar Yes
v Velocity. vector Yes
R Reaction. Scalar Yes
f Source/Sink term. Scalar Yes
IC Initial Condition ( \(c_0\)). Scalar Yes
A Analytic Solution ( \(c\)). Scalar No

1) The velocity vector is a 'n' vector, where 'n' is either 2 or 3 depending on the model dimension. It can be replaced by a scalar instead in one dimension problems.

2) The Analytic Solution is only required in convergence tests.

Example

PropertySet{
id = 'MatProp',
typeName = 'GemaPropertySet',
description = 'Material parameters',
--
properties ={
{id = 'Phi',description = 'Scalar Value', functions = true},
{id = 'V' ,description = 'Advective Velocity', functions = true, dim = 1},
{id = 'R' ,description = 'Reactive Term', functions = true},
{id = 'F' ,description = 'Source Term', functions = true},
{id = 'IC' ,description = 'Initial Condition', functions = true},
{id = 'A' ,description = 'Analytic Solution', functions = true},
},
--
values = {
{Phi = 'Porosity',
V = 'Velocity',
R = 'Reactive',
F = 'Source',
IC = 'InitialCondition',
A = 'Analytic',
}
}
}

Mesh attributes

In DGFEMPhysics is necessary a topology mesh and a \(p\geq 1\) local degree approximation for hierarquical elements.

Attribute Description Type Required
id The mesh name . String Yes
Example: id = 'mesh',
typeName Mesh used in GeMA Framework . String Yes
Example: typeName = 'GemaMesh.elem'
description Description of Mesh . String Yes
Example: description = 'Regular 2D Mesh'
coordinateDim Dimesional Space. Integer Yes
Example: coordinateDim = 2
coordinateUnit Unit of Lenght used in the Mesh. Unit No
Example: coordinateUnit = 'm'
stateVars State Variavel associated to Physics. State Variavel Yes
Example: stateVars = {'C'}
nodeData Node List of geometrical mesh . List Yes
Example: nodeData = mesh_nodes
cellProperties Cell properties associad to mesh . PropertySet Yes
Example: cellProperties = {'MatProp'}
cellData Element List of geometrical mesh . List Yes
Example: cellData = mesh_elements
hOrder Local degree approximation \(p\) for hierarchical elements. For DGFEM physics is not necessary the flux degree, default is 1. List Yes
Example: hOrder = {P = POrder,Q = 1}
boundaryEdgeData Boundarie list of geometrical mesh. List Yes
Example: boundaryEdgeData= mesh_bnd
userghostNodes DGFEM physics use ghost nodes . Bool Yes
Example: useGhostNodes = true
elementRules Lobbato Integration rule with \( 2p+1 \) points for each dimension. Integration Rule Yes
Example: elementRules = {{dgquad = 2*POrder + 1}}

Example

Mesh{
id = 'mesh',
typeName = 'GemaMesh.elem',
description = 'Regular 2D Mesh',
coordinateDim = 2,
coordinateUnit = 'm',
stateVars = {'C'},
nodeData = mesh_nodes,
cellProperties = {'MatProp'},
cellData = mesh_elements,
hOrder = {P = POrder,Q = 1},
boundaryEdgeData= mesh_bnd,
useGhostNodes = true,
elementRules = {{dgquad = 2*POrder + 1}},
}

Physics attributes

When defining a Chemical Fem Physics object, the following fields are available for usage during the definition:

Attribute Description Type Required Def. Unit
id The physics name. String Yes -
Example: id = 'DG_FEM'
typeName Physics plugin name. Should be equal to 'DGFemPhysics.Galerkin'. String Yes -
Required value: typeName = 'DGFemPhysics.Galerkin'
type Type of physics object. Should be equal to 'fem'. String Yes -
Required value: type= 'fem'
description An optional description for this physics role in the simulation. String No Empty
Example: description = 'Discontinuous Galerkin Method'
mesh The mesh name. String Yes -
Example: mesh = 'myMeshName'
NodsX Number of nodes arranged in the regular mesh in the x direction. Integer Yes -
Example: NodsX = NodsX
NodsY Number of nodes arranged in the regular mesh in the y direction. Integer Yes -
Example: NodsY = NodsY
Upwind Numerical flow defined in the variational form. Can be choose Upwind or Lax-Friederich. Boolean Yes Upwind = true
Example: Upwind = false,
Implicit Use of an implicit or explicit temporal integration scheme. If the RK2 / RK4 scheme is used, the boolean must be set to false. Boolean Yes False
Example: Implicit = false,
Limiter Use of a linear degree limiter that prevents spurious oscillations in non-regular solutions. Boolean Yes -
Example: Limiter = true,
RegularMesh As an improvement in the performance of the physics, a regular mesh can be used. Boolean Yes -
Example: RegularMesh = true,
boundaryConditions Table filled with the names of the boundary conditions associated with this physics. String table Yes -
Example: boundaryConditions = {'Border_Concentration','Free_Concentration'}
unitSystem Unit of length. Unit Yes -
Example: unitSystem = { coord = 'm'}

Like other Fem physics, stateVar, property and attribute renaming fields are supported. Likewise, restricting the physics application domain to a set of cell groups, setting the desired integration rule and unit system remapping are also available. Those common optional fields are detailed at the Common Fem physics plugin options page.

Example:

PhysicalMethod{
id = 'DG_FEM',
typeName = 'DGFemPhysics.Galerkin',
type = 'fem',
description = 'Discontinuous Galerkin Method',
mesh = 'mesh',
NodsX = NodsX,
NodsY = NodsY,
Upwind = false,
Implicit = false,
Limiter = true,
RegularMesh = true,
boundaryConditions = {'Border_Concentration','Free_Concentration'},
unitSystem = { coord = 'm'},
}
}

Boundary conditions

The DGFEM physics supports Inflow, Outflow and Periodic conditions. The prescribe node concentration and prescribe concentration flow are available for 2D and 3D elements. Available boundary condition types are:

1) Inflow BC : Boundary condition type for inflow concentration. Always applied on element node/edge/face. Supported attributes are:

Attribute Description Type Required Def. Unit
C Prescribe Edge/Face concentration. Scalar Yes -

Example:

BoundaryCondition{
id = 'Border_Concentration',
type = 'Inflow Boundary Condition',
description= 'Face/Edge Inflow Concentration',
mesh = 'mesh',
properties = {{id = 'C',functions = true}},
edgeValues = {{'LeftBnd' , 'Inflow_Boundary_Function'}}
}

2) Outflow BC : Boundary condition type for natural boundary condition in advective problems. Always applied on element edge/face. Supported attributes are:

Attribute Description Type Required Default
C Surface Outflow Concentration Scalar Yes nil

Example:

BoundaryCondition{
id = 'Free_Concentration',
type = 'Free Boundary Condition',
description= 'Face/Edge Free Boundary Condition',
mesh = 'mesh',
properties = {{id = 'C' , functions = false}},
edgeValues = {{'RigthBnd',nil},{'BottomBnd',nil},{'TopBnd',nil}}
}

3) Periodic BC : Boundary condition type used in periodic boundary for advective problems defined on large periodic domains. Always applied on element edge/face. Supported attributes are:

Attribute Description Type Required Default
C Periodic Boundary Condition . Scalar Yes nil

Example:

BoundaryCondition{
id = 'Periodic_BND',
type = 'Periodic Boundary Condition',
description= 'Face/Edge Periodic Boundary Condition',
mesh = 'mesh',
properties = {{id = 'C' , functions = false}},
edgeValues = {{'LeftBnd',nil},{'RigthBnd',nil},{'BottomBnd',nil},{'TopBnd',nil}}
}

Temporal Integration Scheme

The DGFEM physics use a explicit Runge-Kutta2/Runge-Kutta4 Method scheme for temporal integration.

Attribute Description Type Required Default
linearTransientMethod Explicit Temporal Integration Scheme. RK2/RK4. String Yes nil
Example: linearTransientMethod = 'Runge-Kutta-4'

Example

local solverOptions = {
type = 'transient linear',
timeMax = 500 * 0.002 + 1.e-8 , -- Total time of analysis
timeInitIncrement = 0.002, -- Initial time increment
assemblerDofMode = 'automatic',
linearTransientMethod = 'Runge-Kutta-4',
}

Constants

The DGFEM physics doesn't includes any constants in the constants.DGFEMPhysics table.


External loads

The DGFEM physics doesn't supports the concept of integration with other physics through external loads.


Derived results

The DGFEM physics doesn't supports derived results.


Supported elements

The DGFEM physics supports 1D, 2D and 3D elements. Supported elements are: dgline, dgquad and dghex.