Mesh OptionsΒΆ

Learning targets

  • Setting mesh options in horizontal and vertical directions

Mesh options such as MaximumSideLength are set individually for the horizontal x,y-directions and the vertical z-direction. This helps to define anisotropic meshes with finer meshes in the direction of a material jump. The following figure shows again the cylinder example of the previous sections. Here, we used a finer horizontal mesh inside the cylinder. Furthermore, we refined the mesh in z-direction:

_images/mesh_options.png

Mesh options for the z-direction are set in the Extrusion section. For example, to globally set the maximum side length in z-direction we declare the following:

Extrusion {
  ...
  MeshOptions {
     MaximumSideLengthZ = 1
  }

In each Layer block this global declaration can be overwritten. Setting the maximum side length for the z-direction can be regarded as introducing further sub-layers in the extrusion of the cross-section layout.

As can be seen from the figure the mesh gets successively finer towards the top and bottom of the cylinder. This is achieved by the following declarations in the Layer block defining the cylinder:

Layer {
    Thickness = 1.5
    DomainIdMapping = [1 3
                       2 2]
    MeshOptions {
      MaximumSideLengthZLower = 0.05
      MaximumSideLengthZUpper = 0.05
    }
  }

Here, MaximumSideLengthZLower restricts the mesh size in the z-direction at the bottom of the layer, and accordingly MaximumSideLengthZUpper is the maximum side length at top of the layer. Within the layer the mesh size in z-direction is restricted by the global constraint and by the requirement that the thicknesses of consecutive sub-layers are not allowed to change too drastically. As default, the thickness of a sub-layer is less than 2.0 times the thickness of a neighbouring sub-layer. This progression factor can be adjusted as follows:

Layer {
    Thickness = 1.5
    DomainIdMapping = [1 3
                       2 2]
    MeshOptions {
      MaximumSideLengthZLower = 0.05
      ProgressionZLower = 1.2
      MaximumSideLengthZUpper = 0.05
      ProgressionZUpper = 1.2
    }
  }

.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
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    Layout3D {
      Name = "TutorialExample3D"
      UnitOfLength = 1e-06
      
      MeshOptions {
        MaximumSideLength = 1
      }
      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
            MeshOptions {
              MaximumSideLength = 0.25
            }
          }
        }
        MultiLayer {
          
          MeshOptions {
            MaximumSideLengthZ = 1
          }
          
          LayerInterface {
            BoundaryClass = Transparent
          }
          Layer {
            Thickness = 1.0
            DomainId = 1
            MeshOptions {
              MaximumSideLengthZ = 0.5
            }
          }
          Layer {
            Thickness = 0.1
            DomainId = 2
          }
          LayerInterface {
            GlobalZ = 0.0
          }
          Layer {
            Thickness = 1.5
            DomainIdMapping = [1 3 
                               2 2]
            MeshOptions {
              MaximumSideLengthZLower = 0.05
              MaximumSideLengthZUpper = 0.05
            }
          }
          Layer {
            Thickness = 2.0
            DomainIdMapping = [1 4]
          }
          LayerInterface {
            BoundaryClass = Transparent
          }
        }  
      }
    }