jet_pump.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. !!omap
  2. - name: jet_pump
  3. - parts:
  4. - name: head
  5. shapes:
  6. libraries: ['from math import tan, radians, degrees, sin, cos, atan2, pi', 'from pysketcher import *']
  7. - name: constants
  8. shapes: # All dimenssions in cm angles in degrees
  9. Ljp: 16.0 # Total length
  10. Lcy: 1.5 # Lenght of input cylindre
  11. Lcon: 3.0 # length of input cone
  12. Lmix: 2.0 # Length of mixing chamber cylinder
  13. Lct: 1.0 # Length of penetration of jet cone inside cone mixing chamber
  14. Lt: 5.0 # Length of transit cylinder
  15. Ld: 4.0 # length of diffussion cone
  16. D: 4 # external diameter
  17. Din: 2.5 # Input cylinder internal diameter
  18. Dout: 2.5 # Output internal Diameter
  19. Dn: 0.5 # Nozzle internal diametre
  20. Dmix: 3.5 # Diameter mixing chamber
  21. einc: 0.25 # Thickness of the jet cone
  22. eain: 0.2 # air input pipe thickness
  23. x0: 1 # x drawing padding
  24. y0: 1 # y drawing padding
  25. H: 2.0 # Air pipe heigth
  26. N: 0.75 # position of the nozzle exit with respect to mixing chamber output cone start
  27. - name: frame
  28. shapes:
  29. Dt: D/3
  30. setframe: # sketch setup
  31. action: drawing_tool.set_coordinate_system(xmin=0, xmax=Ljp+2*x0,
  32. ymin=0, ymax=H+2*y0+D*1.5,
  33. axis=False)
  34. setblackline: # default frame values and actions
  35. action: drawing_tool.set_linecolor('blue')
  36. - name: part0
  37. shapes:
  38. P01: Point(x0,y0+H)
  39. P02: P01 + Point(0,(D-Din)/2)
  40. P03: P02 + Point(Lcy,0)
  41. P04: P03 + Point(Lcon,(Din-Dn)/2)
  42. alpha: atan2((P04.y-P03.y),(P04.x-P03.x))
  43. P05: P04 - Point(0,einc/cos(alpha))
  44. P06: P05 - Point((Lmix+N)*cos(alpha),(Lmix+N)*sin(alpha))
  45. P07: Point(P06.x,y0)
  46. P08: P07-Point(eain,0)
  47. P09: P08+Point(0,H)
  48. p0: |
  49. [P01,P02,P03,P04,P05,P06,P07,P08,P09,P01]
  50. part0:
  51. formula: Trajectory(p0)
  52. style:
  53. filled_curves:
  54. pattern: '/'
  55. Lmixcone: Ljp-Ld-Lt-2*eain-Lmix-(P09.x-P01.x) # length of the mixing chamber cone
  56. P11: Point(P07.x+Lmix,y0)
  57. P12: P11 + Point(0,H+(D-Dmix)/2)
  58. P13: P12 + Point(Lmixcone,(Dmix-Dt)/2)
  59. P14: P13 + Point(Lt,0)
  60. P15: P14 + Point(Ld,-(Dout-Dt)/2)
  61. P16: P15 - Point(0,(D-Dout)/2)
  62. P17: P16 - Point(Ld+Lt+Lmixcone-eain,0)
  63. P18: P17 - Point(0,H)
  64. p1: |
  65. [P11,P12,P13,P14,P15,P16,P17,P18,P11]
  66. part1:
  67. formula: Trajectory(p1)
  68. style:
  69. filled_curves:
  70. pattern: '/'
  71. P21: Point(x0,y0+H+D)
  72. P22: P21 + Point(Ljp-eain,0)
  73. P23: P22 + Point(0,-(D-Dout)/2)
  74. P24: P23 + Point(-Ld,-(Dout-Dt)/2)
  75. P25: P24 + Point(-Lt,0)
  76. P26: P25 + Point(-Lmixcone, (Dmix-Dt)/2)
  77. P27: P26 + Point(-(Lmix),0)
  78. P2C: P21 + Point(0,-(D-Din)/2)
  79. P2B: P2C + Point(Lcy,0)
  80. P2A: P2B + Point((Lcon+eain)*cos(alpha),-(Lcon+eain)*sin(alpha))
  81. P29: P2A + Point(0,einc/cos(alpha))
  82. P28: P29 + Point(-(Lmix+N)*cos(alpha), (Lmix+N)*sin(alpha))
  83. p2: |
  84. [P21,P22,P23,P24,P25,P26,P27,P28,P29,P2A,P2B,P2C]
  85. part2:
  86. formula: Trajectory(p2)
  87. style:
  88. filled_curves:
  89. pattern: '/'
  90. venturi: |
  91. Composition({'part0':part0,'part1':part1, 'part2':part2})
  92. dljp:
  93. formula: Distance_wText(P21+Point(0,0.5),P22+Point(0,0.5),r'$L<bslash>textsubscript{jp}$')
  94. style:
  95. linecolor: 'black'
  96. linewidth: 1
  97. dld:
  98. formula: Distance_wText(Point(P14.x,P16.y)+Point(0,-1.5),P16+Point(0,-1.5),r'$L<bslash>textsubscript{d}$')
  99. style:
  100. linecolor: 'black'
  101. linewidth: 1
  102. dlt:
  103. formula: Distance_wText(Point(P13.x,P16.y)+Point(0,-1.5),Point(P14.x,P16.y)+Point(0,-1.5),r'$L<bslash>textsubscript{t}$')
  104. style:
  105. linecolor: 'black'
  106. linewidth: 1
  107. dlcm:
  108. formula: Distance_wText(Point(P12.x,P16.y)+Point(0,-1.5),Point(P13.x,P16.y)+Point(0,-1.5),r'$L<bslash>textsubscript{cm}$')
  109. style:
  110. linecolor: 'black'
  111. linewidth: 1
  112. dlmix:
  113. formula: Distance_wText(Point(P06.x,P16.y)+Point(0,-1.5),Point(P11.x,P16.y)+Point(0,-1.5),r'$L<bslash>textsubscript{mix}$')
  114. style:
  115. linecolor: 'black'
  116. linewidth: 1
  117. dlin:
  118. formula: Distance_wText(P02+Point(0,0.5),P03+Point(0,0.5),r'$L<bslash>textsubscript{in}$')
  119. style:
  120. linecolor: 'black'
  121. linewidth: 1
  122. dd:
  123. formula: Distance_wText(P01-Point(0.5,0),P21-Point(0.5,0),r'$D$',alignment='right')
  124. style:
  125. linecolor: 'black'
  126. linewidth: 1
  127. dn:
  128. formula: Distance_wText(P04+Point(0.5,0),P2A+Point(0.5,0),r'$D<bslash>textsubscript{n}$')
  129. style:
  130. linecolor: 'black'
  131. linewidth: 1
  132. ddmix:
  133. formula: Distance_wText(P12,P26,r'$D<bslash>textsubscript{mix}$',alignment='right')
  134. style:
  135. linecolor: 'black'
  136. linewidth: 1
  137. ddin:
  138. formula: Distance_wText(P02+Point(1.5,0),P2C+Point(1.5,0),r'$D<bslash>textsubscript{in}$',alignment='right')
  139. style:
  140. linecolor: 'black'
  141. linewidth: 1
  142. ddout:
  143. formula: Distance_wText(P15+Point(0.5,0),P23+Point(0.5,0),r'$D<bslash>textsubscript{out}$')
  144. style:
  145. linecolor: 'black'
  146. linewidth: 1
  147. ddt:
  148. formula: Distance_wText(P13,P25,r'$D<bslash>textsubscript{t}$')
  149. style:
  150. linecolor: 'black'
  151. linewidth: 1
  152. dim: |
  153. Composition({'dljp': dljp,'dld': dld,'dlt': dlt,'dlcm': dlcm,'dlmix': dlmix,'dlin': dlin,
  154. 'ddin': ddin,'ddout': ddout,'ddt': ddt,'dd': dd,'dn':dn,'ddmix': ddmix})
  155. jet_pump: |
  156. Composition({'venturi':venturi, 'dim':dim})