title single cylindrical hole at an angle

parameter a 15         c angle of the cylinder
          rho 1        c radius of the cylinder
          s [5*%rho]   c exterior cylinder radius
          t [2*%s]     c dimension of exterior box
          d 2          c mesh density
          i2 [  1+%d]  c first partion
          i3 [%i2+%d]  c second partion
          i4 [%i3+%d]  c third partion
          k2 2       ; c number of nodes in the z-direction

nekton3d               c output option

sd 1 cy 0 0 0 [-sin(%a)] 0 1 %rho  c define the inner cylinder
sd 2 cy 0 0 0 0 0 1 [5*%rho]       c define the outer cylinder
sd 3 plan 0 0 -5 0 0 1
sd 4 plan 0 0  5 0 0 1

c  part 1

block 1 %i2 %i3 %i4 ; 1 %i2 %i3 %i4 ; 1 %k2 ;  c set the number of nodes
 [-%s] -1 1 %s [-%s] -1 1 %s [-%s] %s     c initialize the mesh

dei 2 3;2 3; ;                            c  delete the middle block
dei 1 2 0 3 4;1 2 0 3 4; ;                c  delete the four corners

mb 2 2 2 3 3 2 x [-5*sin(%a)]  c  move the top edges near the inner cylinder
mb 2 2 1 3 3 1 x [5*sin(%a)] c  move the bottom edges near the inner cylinder

pb 2 4 1 2 4 2 x [-%s]      c position outer edges so that they meet
pb 2 1 1 2 1 2 x [-%s]      
pb 3 1 1 3 1 2 x %s      
pb 3 4 1 3 4 2 x %s      
pb 4 3 1 4 3 2 y %s      
pb 1 3 1 1 3 2 y %s      
pb 1 2 1 1 2 2 y [-%s]      
pb 4 2 1 4 2 2 y [-%s]      

sfi -2 -3;-2 -3; ;sd 1  c project the inner cavity to the inner cylinder
sfi -1 -4;-1 -4; ;sd 2  c project the outer walls to the outer cylinder
sfi ;;-1;sd 3
sfi ;;-2;sd 4

endpart

c part 2

block 1 %i2 %i3 %i4 ; 1 %i2 %i3 %i4 ; 1 %k2 ;  c set the the nodes for the outer part
 [-%t] [-%s] %s %t [-%t] [-%s] %s %t [-%s] %s c initialize the mesh

dei 2 3;2 3; ;            c  delete the inner block

sfi -2 -3;-2 -3; ;sd 2    c project the inner cavity to the outer cylinder
sfi ;;-1;sd 3
sfi ;;-2;sd 4

res 1 0 0 1 0 0 j 1   c equal spacing along the outer edges
res 4 0 0 4 0 0 j 1
res 0 1 0 0 1 0 i 1
res 0 4 0 0 4 0 i 1

bv 0 1 0 0 1 0 .1 1 .1  c boundary velocity

ol 0 4 0 0 4 0 c outlet

endpart

merge    c merge the two parts into one model

stp 0.0001  c tolerance for merging nodes

write  c write the output file
rx 20 ry 30 zf 1.5 tvv
