tubeinair.geo 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Tube thickness [m]:
  2. thtube = 1e-3;
  3. // Tube height [m]:
  4. htube = 210e-3;
  5. // Tube inner radius [m]:
  6. rintube = 10e-3;
  7. // Radius of the air domain around the tube [m]:
  8. rinf = 200e-3;
  9. // Number of mesh nodes on the tube:
  10. nx = 20;
  11. ny = 100;
  12. // Characteristic mesh at infinity:
  13. tc = 2.5e-2;
  14. tcintube = 3e-3;
  15. // Define the tube rectangle with a transfinite (i.e. structured) mesh:
  16. Point(1) = {rintube, -htube/2, 0, 1};
  17. Point(2) = {rintube+thtube, -htube/2, 0, 1};
  18. Point(3) = {rintube+thtube, htube/2, 0, 1};
  19. Point(4) = {rintube, htube/2, 0, 1};
  20. Line(1) = {1,2};
  21. Line(2) = {2,3};
  22. Line(3) = {3,4};
  23. Line(4) = {4,1};
  24. Line Loop(1) = {1,2,3,4};
  25. Plane Surface(1) = {1};
  26. Transfinite Line(1) = nx;
  27. Transfinite Line(2) = ny;
  28. Transfinite Line(3) = nx;
  29. Transfinite Line(4) = ny;
  30. Transfinite Surface(1);
  31. Recombine Surface(1);
  32. // Define the air around:
  33. Point(5) = {0,-rinf,0, tc};
  34. Point(6) = {0,rinf,0, tc};
  35. Point(7) = {rinf,-rinf,0, tc};
  36. Point(8) = {rinf,rinf,0, tc};
  37. Point(9) = {0,-htube/2,0, tcintube};
  38. Point(10) = {0,htube/2,0, tcintube};
  39. Line(5) = {5,7};
  40. Line(6) = {7,8};
  41. Line(7) = {8,6};
  42. Line(8) = {6,10};
  43. Line(9) = {10,9};
  44. Line(10) = {9,5};
  45. Line Loop(2) = {6,7,8,9,10,5};
  46. Plane Surface(2) = {1,2};
  47. // Recombine triangles into quadrangles:
  48. Recombine Surface {2};
  49. // Define the physical regions:
  50. tube = 1;
  51. air = 2;
  52. domainskin = 3;
  53. Physical Surface(tube) = {1};
  54. Physical Surface(air) = {2};
  55. Physical Line(domainskin) = {5,6,7,8,9,10};