Cones and CylindersΒΆ

Learning targets

  • Construct Cones and Cylinders as 3D Primitives

This example constructs a cone, a truncated cone and a cylinder. All three are shown in the following figure. On the left the truncated cone is determined by its BottomRadius, TopRadius and Height. The cone in the middle has an apex, i.e. zero TopRadius which is simply omitted. The Cylinder on the right is defined by its Radius and Height.

_images/cones_mesh.png

.jcm Input File

The layout.jcm file contains a Layout3D section indicating the use of 3D primitives. The substrate and background is defined first, then the object section with the three objects follows. The Cone is determined by its BottomRadius, TopRadius and Height. Omitting TopRadius or setting it to zero defines a cone instead of a truncated one. The primitives GlobalPosition and Rotation are shared with all 3D primitives.

Note

The GlobalPosition refers to the center of the base.

  • 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 {
      UnitOfLength = 1.0
      BoundaryConditions {
        Boundary {
          Direction = All 
          Class = Transparent 
        }    
      }
      Extrusion {
        Objects {
          Parallelogram {
            Priority = -1
            DomainId = 101
            
            Height = 5.0
            Width = 10.0
            
            MeshOptions {
              MaximumSideLength = 2.0
            }
          }
        }
        MultiLayer {
          Layer {
            Name = "Substrate"
            Thickness = .5 
            DomainIdMapping = [101 1]
          }
          Layer {
            Thickness = 4.5 
            DomainIdMapping = [101 101]
          }
        }
      }
      Objects {
        Cone  {
          Name = "Cone1"
          DomainId = 4
          Priority = 1
          BottomRadius = 1.0
          Height = 3.0   
          GlobalPosition = [0, 0, .5]
          MeshOptions {
            MaximumSideLength = .2
          }
        }
        Cone  {
          Name = "Cone2"
          DomainId = 3
          Priority = 1
          BottomRadius = 1.0
          TopRadius = 0.5
          Height = 3.0	
          GlobalPosition = [-3.3, 0, .5]
          MeshOptions {
            MaximumSideLength = .2
          }
        }
        Cylinder  {
          Name = "Cylinder"
          DomainId = 5
          Priority = 1
          Radius = 1.0
          Height = 3.0	
          GlobalPosition = [3.3, 0, .5]
          MeshOptions {
            MaximumSideLength = .2
          }
        }
      }
    }