Advertisement
Guest User

pyfr cylinder problematic case .geo

a guest
Jul 19th, 2021
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.98 KB | None | 0 0
  1. //Convert to .msh via: gmsh -3 cylinder.geo -o cylinder.msh -format msh2
  2.  
  3. // Gmsh project created on Mon Feb 22 15:28:21 2021
  4.  
  5. // ******************** control ********************
  6. // Dimensions
  7. inner_cir_rad = 0.5;
  8. outer_cir_rad = 1.5;
  9. xmax = 25;
  10. xmin = -10;
  11. ymax = 10;
  12. ymin = -10;
  13. zmax = 1;
  14.  
  15. // Circle Mesh Controls
  16. Nc = 126;
  17. Rc = 1;
  18.  
  19. // Y-direction Mesh Controls
  20. Ny_outer = 91;
  21. Ry_outer = 1;
  22.  
  23. Ny_inner = 31;
  24.  
  25. // X-direction Mesh Controls
  26. Nx_outer_right = 256;
  27. Nx_outer_left = 91;
  28.  
  29. Nx_inner = 31;
  30.  
  31. // Z-direction Mesh Controls
  32. Nz = 1;
  33. // ********************************************************
  34.  
  35. // ******************** points ********************
  36. // Outer bounds
  37. Point(1) = {xmin, ymax, 0, 1.0};
  38. Point(2) = {xmax, ymax, 0, 1.0};
  39. Point(3) = {xmax, ymin, 0, 1.0};
  40. Point(4) = {xmin, ymin, 0, 1.0};
  41.  
  42. // Outer cicular points
  43. Point(5) = {outer_cir_rad, outer_cir_rad, 0, 1.0};
  44. Point(6) = {-outer_cir_rad, outer_cir_rad, 0, 1.0};
  45. Point(7) = {outer_cir_rad, -outer_cir_rad, 0, 1.0};
  46. Point(8) = {-outer_cir_rad, -outer_cir_rad, 0, 1.0};
  47.  
  48. // Intermediate outer bounds
  49. Point(9) = {xmin, outer_cir_rad, 0, 1.0};
  50. Point(10) = {xmin, -outer_cir_rad, 0, 1.0};
  51. Point(11) = {-outer_cir_rad, ymin, 0, 1.0};
  52. Point(12) = {-outer_cir_rad, ymax, 0, 1.0};
  53. Point(13) = {outer_cir_rad, ymax, 0, 1.0};
  54. Point(14) = {outer_cir_rad, ymin, 0, 1.0};
  55. Point(15) = {xmax, outer_cir_rad, 0, 1.0};
  56. Point(16) = {xmax, -outer_cir_rad, 0, 1.0};
  57.  
  58. // Midpoint
  59. Point(17) = {0, 0, 0, 1.0};
  60.  
  61. // Inner points
  62. Point(18) = {inner_cir_rad, 0, 0, 1.0};
  63. Point(19) = {-inner_cir_rad, 0, 0, 1.0};
  64. Point(20) = {0, inner_cir_rad, 0, 1.0};
  65. Point(21) = {0, -inner_cir_rad, 0, 1.0};
  66. // ********************************************************
  67.  
  68. // ******************** lines ********************
  69. // // Bounding box
  70. Line(1) = {1, 9};
  71. Line(2) = {9, 10};
  72. Line(3) = {10, 4};
  73. Line(4) = {4, 11};
  74. Line(5) = {11, 14};
  75. Line(6) = {14, 3};
  76. Line(7) = {3, 16};
  77. Line(8) = {16, 15};
  78. Line(9) = {15, 2};
  79. Line(10) = {2, 13};
  80. Line(11) = {13, 12};
  81. Line(12) = {12, 1};
  82.  
  83. // Cross lines
  84. Line(13) = {9, 6};
  85. Line(14) = {10, 8};
  86. Line(15) = {11, 8};
  87. Line(16) = {14, 7};
  88. Line(17) = {16, 7};
  89. Line(18) = {15, 5};
  90. Line(19) = {13, 5};
  91. Line(20) = {12, 6};
  92.  
  93. // Outer circle
  94. Circle(21) = {6, 17, 8};
  95. Circle(22) = {8, 17, 7};
  96. Circle(23) = {7, 17, 5};
  97. Circle(24) = {5, 17, 6};
  98.  
  99. // Inner lines
  100. Circle(25) = {20, 17, 19};
  101. Circle(26) = {19, 17, 21};
  102. Circle(27) = {21, 17, 18};
  103. Circle(28) = {18, 17, 20};
  104. // ********************************************************
  105.  
  106. // ******************** Surfaces ********************
  107. // Outer domain
  108. Curve Loop(1) = {1, 13, -20, 12};
  109. Plane Surface(1) = {1};
  110. Curve Loop(2) = {11, 20, -24, -19};
  111. Plane Surface(2) = {2};
  112. Curve Loop(3) = {10, 19, -18, 9};
  113. Plane Surface(3) = {3};
  114. Curve Loop(4) = {8, 18, -23, -17};
  115. Plane Surface(4) = {4};
  116. Curve Loop(5) = {7, 17, -16, 6};
  117. Plane Surface(5) = {5};
  118. Curve Loop(6) = {5, 16, -22, -15};
  119. Plane Surface(6) = {6};
  120. Curve Loop(7) = {4, 15, -14, 3};
  121. Plane Surface(7) = {7};
  122. Curve Loop(8) = {2, 14, -21, -13};
  123. Plane Surface(8) = {8};
  124.  
  125. // Inner domain
  126. Curve Loop(9) = {24, 21, 22, 23};
  127. Curve Loop(10) = {25, 26, 27, 28};
  128. Plane Surface(9) = {9, 10};
  129. // ********************************************************
  130.  
  131. // ******************** Recombine ********************
  132. Recombine Surface {1, 2, 3, 4, 5, 6, 7, 8};
  133. // ********************************************************
  134.  
  135. // // ******************** Setting mesh points ********************
  136. // Outer domain
  137. Transfinite Curve {1, 20, 19, 9} = Ny_outer Using Progression 1;
  138. Transfinite Curve {3, 15, 16, 7} = Ny_outer Using Progression 1;
  139.  
  140. Transfinite Curve {12, 13, 14, 4} = Nx_outer_left Using Progression 1;
  141. Transfinite Curve {10, 18, 17, 6} = Nx_outer_right Using Progression 1;
  142.  
  143. // Cross domain
  144. Transfinite Curve {2, 21} = Ny_inner Using Progression 1;
  145. Transfinite Curve {8, 23} = Ny_inner Using Progression 1;
  146.  
  147. Transfinite Curve {11, 24} = Nx_inner Using Progression 1;
  148. Transfinite Curve {5, 22} = Nx_inner Using Progression 1;
  149.  
  150. // Inner domain
  151. Transfinite Curve {25} = Nc Using Progression 1;
  152. Transfinite Curve {28} = Nc Using Progression 1;
  153. Transfinite Curve {27} = Nc Using Progression 1;
  154. Transfinite Curve {26} = Nc Using Progression 1;
  155. // ********************************************************
  156.  
  157. // ******************** Mesh surfaces ********************
  158. Transfinite Surface {1};
  159. Transfinite Surface {2};
  160. Transfinite Surface {3};
  161. Transfinite Surface {4};
  162. Transfinite Surface {5};
  163. Transfinite Surface {6};
  164. Transfinite Surface {7};
  165. Transfinite Surface {8};
  166. // ********************************************************
  167.  
  168. // ******************** Make 3D ********************
  169.  
  170. // ********************************************************
  171.  
  172.  
  173. //+
  174. Physical Curve("in") = {1, 2, 3};
  175. //+
  176. Physical Curve("out") = {9, 8, 7};
  177. //+
  178. Physical Curve("topbottom") = {4, 5, 6, 12, 11, 10};
  179. //+
  180. Physical Curve("obstacle") = {28, 27, 26, 25};
  181. //+
  182. Physical Surface("fluid") = {1, 2, 3, 4, 9, 5, 6, 7, 8};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement