Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

111 lines
4.4KB

  1. # problem parameters for
  2. # 12"-inch schedule 100
  3. b = 323.8/2 # external radius [ mm ]
  4. a = b-21.5 # internal radius [ mm ]
  5. l = 2*(b-a) # axial length [ mm ]
  6. n = 4 # number of elements through thickness
  7. E = 200e3 # Young modulus [ MPa ]
  8. nu = 0.3 # Poisson's ratio [ non-dimensional ]
  9. p = 10 # internal pressure [ MPa ]
  10. # definition of analytical solutions for comparison from
  11. # <http://eprints.whiterose.ac.uk/110536/1/art%253A10.1007%252Fs00707-016-1762-7.pdf>
  12. ur(x,y,z) = (p*a**2*sqrt(y**2+z**2))/(E*(b**2-a**2)) * ((1-2*nu)*(1+nu) + (1+nu)*b**2/(y**2+z**2))
  13. sigmal(x,y,z) = 2*nu*p*a**2/(b**2-a**2)
  14. sigmar(x,y,z) = p*a**2/(b**2-a**2) * (1 - b**2/(y**2+z**2))
  15. sigmatheta(x,y,z) = p*a**2/(b**2-a**2) * (1 + b**2/(y**2+z**2))
  16. # analytical results in [ MPa ]
  17. M_tresca = 69.9467
  18. M_vonmises = 61.7785
  19. M_1 = 65.3023
  20. M_2 = 18.1974
  21. M_3 = -4.64439
  22. MB_tresca = 79.9062
  23. MB_vonmises = 70.2562
  24. MB_1 = 70.2821
  25. MB_2 = 18.1974
  26. MB_3 = -9.62415
  27. ur1(x) = ur(0,x,0)
  28. sigmal1(x) = sigmal(0,x,0)
  29. sigmar1(x) = sigmar(0,x,0)
  30. sigmatheta1(x) = sigmatheta(0,x,0)
  31. delta = 0.05
  32. set preamble "\usepackage{amsmath}"
  33. set width 14*unit(cm)
  34. set axis x arrow nomirrored
  35. set axis y arrow nomirrored
  36. set grid
  37. set terminal pdf
  38. set output "ur.pdf"
  39. set xrange [a:b]
  40. set yrange [*:*]
  41. set key top right
  42. set xlabel "$r$ [mm]"
  43. set ylabel "$u_r(r)$ [mm]"
  44. plot ur1(x) w l lw 3 lt 1 color olivegreen ti "Analytical solution $u_r(r)$",\
  45. "pipe-dist-1-3.dat" u 2:4 w l lw 1 lt 2 color maroon ti "",\
  46. "pipe-dist-1-3.dat" u 2:4 w p pt 18 ps 1.5 color maroon every (100)/(1*3) ti "$n=3$ first order",\
  47. "pipe-dist-1-6.dat" u 2:4 w l lw 1 lt 4 color tan ti "",\
  48. "pipe-dist-1-6.dat" u 2:4 w p pt 16 ps 1.5 color tan every (100)/(1*6) ti "$n=6$ first order",\
  49. "pipe-dist-2-2.dat" u 2:4 w l lw 2 lt 3 color cerulean ti "",\
  50. "pipe-dist-2-2.dat" u 2:4 w p pt 17 ps 1.5 color cerulean every (100)/(2*2) ti "$n=2$ second order"
  51. set output "sigmatheta.pdf"
  52. set xrange [a:b]
  53. set yrange [*:*]
  54. set key top right
  55. set xlabel "$r$ [mm]"
  56. set ylabel "$\sigma_\theta(r)$ [mm]"
  57. plot sigmatheta1(x) w l lw 3 lt 1 color springgreen ti "Analytical solution $\sigma_\theta(r)$",\
  58. "pipe-dist-1-3.dat" u 2:5 w l lw 1 lt 2 color melon ti "",\
  59. "pipe-dist-1-3.dat" u 2:5 w p pt 18 ps 1.5 color melon every (100)/(1*3) ti "$n=3$ first order",\
  60. "pipe-dist-1-6.dat" u 2:5 w l lw 1 lt 2 color redorange ti "",\
  61. "pipe-dist-1-6.dat" u 2:5 w p pt 16 ps 1.5 color redorange every (100)/(1*6) ti "$n=6$ first order",\
  62. "pipe-dist-2-2.dat" u 2:5 w l lw 2 lt 3 color turquoise ti "",\
  63. "pipe-dist-2-2.dat" u 2:5 w p pt 17 ps 1.5 color turquoise every (100)/(2*2) ti "$n=2$ second order"
  64. set output "sigmal.pdf"
  65. set xrange [a:b]
  66. set yrange [*:*]
  67. set key top right
  68. set xlabel "$r$ [mm]"
  69. set ylabel "$\sigma_l(r)$ [mm]"
  70. plot sigmal1(x) w l lw 3 lt 1 color forestgreen ti "Analytical solution $\sigma_l(r)$",\
  71. "pipe-dist-1-3.dat" u 2:6 w l lw 1 lt 2 color peach ti "",\
  72. "pipe-dist-1-3.dat" u 2:6 w p pt 18 ps 1.5 color peach every (100)/(1*3) ti "$n=3$ first order",\
  73. "pipe-dist-1-6.dat" u 2:6 w l lw 1 lt 2 color dandelion ti "",\
  74. "pipe-dist-1-6.dat" u 2:6 w p pt 16 ps 1.5 color dandelion every (100)/(1*6) ti "$n=6$ first order",\
  75. "pipe-dist-2-3.dat" u 2:6 w l lw 2 lt 3 color periwinkle ti "",\
  76. "pipe-dist-2-3.dat" u 2:6 w p pt 17 ps 1.5 color periwinkle every (100)/(2*2) ti "$n=2$ second order"
  77. set output "sigmar.pdf"
  78. set xrange [a:b]
  79. set yrange [*:*]
  80. set key top left
  81. set xlabel "$r$ [mm]"
  82. set ylabel "$\sigma_r(r)$ [mm]"
  83. plot sigmar1(x) w l lw 3 lt 1 color emerald ti "Analytical solution $\sigma_r(r)$",\
  84. "pipe-dist-1-3.dat" u 2:7 w l lw 1 lt 2 color bittersweet ti "",\
  85. "pipe-dist-1-3.dat" u 2:7 w p pt 18 ps 1.5 color bittersweet every (100)/(1*3) ti "$n=3$ first order",\
  86. "pipe-dist-1-6.dat" u 2:7 w l lw 1 lt 2 color orange ti "",\
  87. "pipe-dist-1-6.dat" u 2:7 w p pt 16 ps 1.5 color orange every (100)/(1*6) ti "$n=6$ first order",\
  88. "pipe-dist-2-3.dat" u 2:7 w l lw 2 lt 3 color royalblue ti "",\
  89. "pipe-dist-2-3.dat" u 2:7 w p pt 17 ps 1.5 color royalblue every (100)/(2*2) ti "$n=2$ second order"