Pipedata3d - Welding Neck Flange
eryar@163.com
Abstract. Pipedata3d show piping component data in tables and 3D modeling. It can help the piping designers to looking up piping information quickly and so improve the efficiency of piping design.
Key Words. Pipedata3d, ASME, GB, HG, CB, Piping Design
1. Introduction
在管道設(shè)計(jì)過(guò)程中,會(huì)使用到大量的標(biāo)準(zhǔn),如ASME,DIN,GB,CB,HG,SH等等。管道設(shè)計(jì)人員在設(shè)計(jì)過(guò)程中,需要翻閱相關(guān)標(biāo)準(zhǔn)手冊(cè),查找所需要的數(shù)據(jù),較為繁瑣。如果能將相關(guān)管件的數(shù)據(jù)以直觀的方式展示出來(lái),可以極大地提高管道設(shè)計(jì)人員的設(shè)計(jì)效率。
Pipedata3d通過(guò)把標(biāo)準(zhǔn)數(shù)據(jù)以表格及三維的方式展示出來(lái),更加形象直觀,在方便設(shè)計(jì)人員查詢數(shù)據(jù)的同時(shí),增加了些許趣味性。
本文將Pipedata3d的結(jié)合ASME B16.5中的對(duì)焊法蘭將實(shí)現(xiàn)過(guò)程簡(jiǎn)要介紹一下,并給出相關(guān)的實(shí)現(xiàn)腳本代碼,感興趣的可以自己玩玩。
2.ASME B16.5 Weld Neck Flange
標(biāo)準(zhǔn)ASME B16.5中對(duì)焊法蘭的相關(guān)尺寸如下圖所示:
Figure 2.1 Welding Neck Flange Dimension
Figure 2.2 Dimensions of Class 150 Flanges
以上數(shù)據(jù)來(lái)源為ASME B16.5-2009, Pipe Flanges and Flanged Fittings。ASME is the registered trademark of The America Society of Mechanical Engineers.
3.Flange Modeling
基于OpenCASCADE中Draw Test Harness中的腳本,可以實(shí)現(xiàn)上述參數(shù)化式的造型,部分Tcl腳本如下所示:
set dn 15
set o 90
set tf 9.6
set x 30
set ah 21.3
set y 46
set b 15.8
set r 3
set rf 1.6
# modeling
pcylinder aRaisedFace [expr $x/2.0] $rf
pcylinder aFlange [expr $o/2.0] $tf
pcone aNeck [expr $x/2.0] [expr $ah/2.0] [expr $y-$tf*2.0]
pcylinder aWeld [expr $ah/2.0] $tf
pcylinder aSocket [expr $b/2.0] [expr $y+$rf]
nexplode aFlange E
blend aFlange aFlange $r aFlange_2
renamevar aWeld F
explode F F
renamevar F E
explode E E
chamf aWeld E E_1 F_1 S $rf
# transform to the right position
ttranslate aFlange 0 0 $rf
ttranslate aNeck 0 0 [expr $tf+$rf]
ttranslate aWeld 0 0 [expr $y+$rf-$tf]
# boolean operations
bop aRaisedFace aFlange
bopfuse aResultShape
bop aResultShape aNeck
bopfuse aResultShape
bop aResultShape aWeld
bopfuse aResultShape
bop aResultShape aSocket
bopcut aResultShape
# visualize
vinit
vsetgradientbg 180 200 255 180 180 180 2
vsetdispmode 1
vdisplay aResultShape
得到效果如下圖所示:
Figure 3.1 A Welding Neck Flange DN150
Figure 3.2 A Welding Neck Flange DN150
4.Conclusion
綜上可知,管件的三維顯示效果很逼真,且程序的可擴(kuò)展性高,方便為后面其他的標(biāo)準(zhǔn)數(shù)據(jù)的輸入。即通過(guò)簡(jiǎn)單的腳本,即可為各種標(biāo)準(zhǔn)的管件建模及可視化。
通過(guò)三維模型及尺寸標(biāo)注,管道設(shè)計(jì)人員可以輕松查看各種標(biāo)準(zhǔn)的數(shù)據(jù)。三維逼真的模型顯示,給設(shè)計(jì)人員帶來(lái)直觀感受,增加了趣味性。
年后即將發(fā)布程序Pipedata3d,敬請(qǐng)期待。
5. References
1. ASME B16.5-2009. Pipe Flanges and Flanged Fittings.
2. OpenCASCADE6.8.0. Draw Test Harness User Guide. 2014
3. http://www.wermac.org/