Setting Domain IdentifiersΒΆ

Learning targets

  • Extrusion of a 2D object to the third dimension
  • DomainIdMapping: Attributing different domain identifiers to different layers of the extruded geometry
  • Define top/bottom transparent boundary conditions

This tutorial examples constructs a cylinder embedded in a layered media.

_images/domain_id_mapping.png

The 2D cross-section layout consists of a square computational domain (DomainId=1) with a circle domain (DomainId=2). The extrusion has several layers. The .jcm input reads as

.jcm Input File

  • layout.jcm [ASCII]

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    Layout3D {
      Name = "TutorialExample3D"
      UnitOfLength = 1e-06
      MeshOptions {
        MaximumSideLength = 1.3
      }
      
      Extrusion {
        Objects {
          Polygon { 
            Name = "ComputationalDomain/Background" 
            DomainId = 1
            Priority = -1 
            Points = [-2 -2, 2 -2, 2 2, -2 2] 
            Boundary {
              Class = Periodic
            }
          } 
          
          Circle {
            Name = "Circle" 
            DomainId = 2
            Radius = 1
            RefineAll = 2
          }
        }
        MultiLayer {    
          LayerInterface {
            BoundaryClass = Transparent
          }
          Layer {
            Thickness = 1.0
            DomainId = 1
          }
          Layer {
            Thickness = 0.1
            DomainId = 2
          }
          LayerInterface {
            GlobalZ = 0.0
          }
          Layer {
            Thickness = 1.5
            DomainIdMapping = [1 3 
            2 2]
          }
          Layer {
            Thickness = 2.0
            DomainIdMapping = [1 3]
          }
          LayerInterface {
            BoundaryClass = Transparent
          }
        }  
      }
    } 
    

Note

  • Thicknesses of layers in the Extrusion are defined in units of length of the layout (UnitOfLength = ...).
  • The MultiLayer stacks subsequent layers in positive z-direction.
  • The variable GlobalZ can be used to shift the absolute z-position.
  • The LayerInterface declarations are used to define transparent boundary conditions at bottom and top.
  • The global z position of a layer interface can be set within a LayerInterface section by a GlobalZ declaration. In this example, the starting point of the cylinder is set equal to z=0.
  • The vertical boundary conditions are defined by the 2D cross-section layout (here periodic).

DomainIdMapping

The first two layers (line 30-37) are homogeneous. In the corresponding Layer sections we globally reset the domain identifier for the entire layers, so that the domain identifiers of the 2D layout are ignored. The third layer contains a DomainIdMapping declaration. It has the form

DomainIdMapping = [
  ID_2D  --> ID_3D
  ...
]

, where ID_2D is the domain identifier as defined in the 2D cross-section layout. For our example these are 1 for the computational domain and 2 for the circle. ID_3D is the actual domain identifier as finally used in the generated mesh file. In other words we map the 2D identifier to 3D identifier (therefore DomainIdMapping).

The next layer is again homogeneous and allows therefore to globally reset the domain identifier as in the first two layers. However, for demonstration purposes we used a DomainIdMapping again:

DomainIdMapping = [1 3]

Here, the mapping for the circle (DomainId=2) is missing. This short form of a DomainIdMapping follows the following rule:

Note

The 2D cross section layout can be considered as an overlay, where higher priority objects hides objects of lower priority. Omitting the domain mapping for a prioritized object, will result in the usage of the domain identifier mapping for the covered object of lower priority.