Fields on elements, integration points and beyond

Discussion about coding and new developments
Post Reply
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Fields on elements, integration points and beyond

Post by raback »

Hi All,

There has recently been some developments of new type of exported variables. The motivation for these development comes from a need to sometimes save and treat data that is defined on elements or integration points. Even though we are seldom solving any such field with finite elements we may want to have dependency of data defined therein.

This should mainly concernt those doing some non-standard developments in Elmer. For example, you might be interpolating OpenFOAM results to integration points of Elmer, or storing fields on integration points needed for nonlinear hysteresis models ;-)

As often seen in the sif files of Elmer any Solver in Elmer can inherit its fields to similar fields using the "Exported Variable" declaration. For example,

Code: Select all

Exported Variable 1 = myvar
Now it is possible that this variable if of different type. The allowed types are:
  • -global : old one: Variable_global
    -ip : variable existing on integration points: Variable_on_gauss_points
    -elem : variable existing on elements: Variable_on_elements
    -dg : discontinuous galerkin: Variable_on_nodes_on_elements
    -nodal : nodal fields (standard FE fields) if primary field is not: Variable_on_nodes
The "-dg" flag should not be used in vain if the primary variable if of type dg. For the other there can be no primary variable of such type simply because they cannot be solved on finite elements.

The permutation for the different variable types is quite different than for standard ones.
  • -ip : for element t and integration point p the global dof is Perm(t)+p
    -elem : for element t the global dof is Perm(t)
    -dg : for element t and node p the global dof is Perm(Element % DGIndexes(p))
This has been changed here and there but you may face solvers that need modifications.

The exported variable may now be masked such that it will be defined in a domain smaller than the primary variable. Note that the domain may not be larger! This is achieved with, for example,

Code: Select all

Exported Variable 1 Mask = String "secname: maskname"
Here "secname" refers to any of material, body force, boundary condition, initial condition etc. and "maskname" refers to any string. The mask may be either logical keyword and then its value will be used. If the keyword is non-logical its presense will be used. So one can use some suitable keyword for masking purposes. For example,

Code: Select all

Exported Variable 1 = -ip absb
Exported Variable 1 Mask = String "material: b-h curve"
Would create a field called "absb" on integration points where "b-h curve" is defined at the material section.

The new variable types may in most parts be used also in the ListGet operations. The main limitation is that the "-ip" variable can only have dependencies when the ListGetElementReal() function is used and the GaussPoint is given as the optional parameter. The ListGetReal() does not know how to use the Gaussian points to return nodal values. So to fully use the features one needs to change the calling routines.

Roughly this same text is available also on the ElmerSolver documentation when it is updated.

-Peter
Post Reply