AdvDiffusionFemPhysics
An advection-diffusion equation FEM Physics Plugin
Plugin options

Plugin object types

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


State variables

The Advective Diffusion FEM physics requires the model to contain a single pressure state variable named P. It must be a scalar variable. The physics don't have a unit by default.

Example:

StateVar{id = 'Pressure', description = 'Pressure Distribution' , format = '1.6e', affectedNodes = 'both'}

Material types

The Advective Diffusion 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 Advective Diffusion Fem physics:

Property Description Type Required
\(\phi\) Porosity. Scalar Yes
K Permeability Tensor. Scalar/Vector/Matrix Yes
F Source/Sink term. Scalar Yes
P_IC Initial Condition ( \(p_0\)). Scalar Yes
Q_IC Initial Condition ( \(\mathbf{u}_0\)). Vector Yes
PT Analytic Solution ( \(p_t\)). Scalar No
QT Analytic Solution ( \(\mathbf{u}_t\)). Vector No
DQT Analytic Solution ( \(\text{grad}(p_t)\)). Vector No
GPT Analytic Solution ( \(\text{div}(\mathbf{u}_t)\)). Scalar No

1) The Permeability Tensor K have a 'nxn' matrix representation, where 'n' is either 2 or 3 depending on the model dimension. It can be replaced by a scalar instead in one dimension problems or vector in two dimensional problems.

2) The Analytic Solution Set (PT, QT, DQT and GPT) is only required in error/convergence tests.

Example

PropertySet{
id = 'MatProp',
typeName = 'GemaPropertySet',
description = 'Material parameters',
--
properties ={
{id = 'Phi' ,description = 'Porosity', functions = true},
{id = 'K' ,description = 'Permeability Tensor', functions = true, dim = '2x2'},
{id = 'F' ,description = 'Source Term', functions = true},
{id = 'P_IC',description = 'Initial Pressure Distribution',functions = true},
{id = 'Q_IC',description = 'Initial Flux Distribution', functions = true , dim = 2},
{id = 'PT' ,description = 'Pressure Distribution',functions = true},
{id = 'QT' ,description = 'Flux Distribution', functions = true , dim = 2},
{id = 'DQT' ,description = 'Divergence Flux ', functions = true},
{id = 'GPT' ,description = 'Gradient of Pressure ',functions = true , dim = 2},
},
--
values = {
{
Phi = 'Porosity',
K = 'Permeability',
F = 'Source',
P_IC= 'PressureIC',
Q_IC= 'FluxIC',
PT = 'Pressure',
QT = 'Flux',
DQT = 'DivFlux',
GPT = 'GradPressure',
}
}
}

Mesh attributes

In AdvDiffusionFEMPhysics is necessary a topology mesh and a pair ( \(p\geq 1\), \(q\geq 1\)) local degree approximations 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 = {'Pressure'}
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 for hierarchical elements for pressure and velocity subspaces. List Yes
Example: hOrder = {p = POrder,q = Qrder }
boundaryEdgeData Boundarie list of geometrical mesh. List Yes
Example: boundaryEdgeData= mesh_bnd
userghostNodes AdvDiffusionFEMPhysics physics use ghost nodes . Bool Yes
Example: useGhostNodes = true
elementRules Lobbato Integration rule with \( 2\text{max}(p,q)+1 \) points for each dimension. Integration Rule Yes
Example: elementRules = {{hquadp = 2* max(p,q) + 1}}

Example

Mesh{
id = 'mesh',
typeName = 'GemaMesh.elem',
description = 'Regular 2D Mesh',
coordinateDim = 2,
coordinateUnit = 'm',
stateVars = {'Pressure'},
nodeData = mesh_node ,
cellProperties = {'MatProp'},
cellData = mesh_elements,
hOrder = {P = POrder,Q = QOrder},
boundaryEdgeData= mesh_bnd,
useGhostNodes = true,
elementRules = {{hquadp = 2.*math.max(POrder,QOrder) + 1}},
}

Physics attributes

When defining a AdvDiffusionFEMPhysics 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
NodsY Is or not a Transient Analysis?. Bool Yes false
Example: Transient = true
NodsY Is or not a Error Analysis Test? Bool No false
Example: ErrorAnalysis = 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 = 'Darcy_Problem',
description = 'Single Phase Flux in a Porous Media',
typeName = 'AdvDiffusionFemPhysics',
type = 'fem',
mesh = 'mesh',
NodsX = nx,
NodsY = ny,
Transient = true,
ErrorAnalysis= true,
boundaryConditions = {'Pressure_Border'},
unitSystem = { coord = 'm'},
}

Boundary conditions

The AdvDiffusionFEM physics supports Dirichlet boundary conditions for both pressure and velocity variavels. Available boundary condition types are:

1) Pressure BC : Boundary condition type for fixed pressure. Always applied on element node/edge/face. Supported attributes are:

Attribute Description Type Required Def. Unit
P Prescribe Edge/Face Pressure. Scalar Yes -

Example:

BoundaryCondition{
id = 'Pressure_Border',
type = 'Dirichlet Boundary Condition',
description= 'Face/Edge Pressure Boundary Condition',
mesh = 'mesh',
properties = {{id = 'P',functions = true}},
edgeValues = {{'LeftBnd' , 'Pressure_Boundary_Function'},{'RigthBnd', 'Pressure_Boundary_Function'}}
}

2) Velocity BC : Boundary condition type for natural boundary condition for velocity. Always applied on element edge/face. Supported attributes are:

Attribute Description Type Required Default
Q Surface Velocity Vector Yes -

Example:

BoundaryCondition{
id = 'Flux_Border',
type = 'Neumann Boundary Condition',
description= 'Face/Edge Flux Boundary Condition',
mesh = 'mesh',
properties = {{id = 'Q', functions = true, dim = 2}},
edgeValues = {{'BottomBnd','Flux_Boundary_Function'} , {'TopBnd','Flux_Boundary_Function'}}
}

Temporal Integration Scheme

The AdvDiffusionFEMPhysics use a implicit Backward Euler Method scheme by default for temporal integration .

Attribute Description Type Required Default
linearTransientMethod Implicit Temporal Integration Scheme. Euler. String Yes nil

Example

local solverOptions = {
type = 'transient linear',
timeMax = Tf + 1.e-15, -- Total time of analysis
timeInitIncrement = dt, -- Initial time increment
assemblerDofMode = 'add fixed dofs',
}

Constants

The AdvDiffusionFEM physics doesn't includes any constants in the constants.AdvDiffusionFemPhysics table.


External loads

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


Derived results

The AdvDiffusionFEMPhysics doesn't supports derived results.


Supported elements

The AdvDiffusionFEMPhysics supports 1D, 2D and 3D elements. Supported elements are: hlinep, hquadp and hhexp.