免费色网站在线不卡|亚洲色大成网站 婷婷|亚洲四虎|亚洲视频在线不卡一二区|黄色α片

點數據的測量

問題概要


點數據的測量


軟件


TCFD 18.10


具體問題


TCFD一般設置里的probe測量數據為各截面上的平均數據。詳細結果可參閱計算結果生成的路徑下“postProcessing”文件夾里各個子文件里的csv文件。

而如何使用TCFD測量某個特定點的數據呢?就需要使用Python腳本了。

首先創建一個文本文檔,在文檔中鍵入下圖中的字符(有實際意義的部分為帶顏色的文字,后面附詳細文字版):


a.png


前兩行為聲明語句:

SetEntry('system/controlDict', 'functions/customProbes/functionObjectLibs', '( "libsampling.so" )')

SetEntry('system/controlDict', 'functions/customProbes/type', 'probes')

往下為需要監控的參數聲明:

SetEntry('system/controlDict', 'functions/customProbes/fields:0', 'p') 監控量為靜壓P;

SetEntry('system/controlDict', 'functions/customProbes/fields:1', 'pTot') 監控量為總壓PTot;

SetEntry('system/controlDict', 'functions/customProbes/fields:2', 'U') 監控量為速度場 U;

再往下為監測的具體坐標點,需要注意的是,這里的點給定的是三維坐標,單位只能給成米meter:

SetEntry('system/controlDict', 'functions/customProbes/probeLocations:0', '( -0.0137 -0.1631 0.0974 )')

SetEntry('system/controlDict', 'functions/customProbes/probeLocations:1', '( -0.0147 -0.1631 0.0974 )') 這里插入了(-0.0137,-0.1631,0.0974)、(-0.0147,-0.1631,0.0974)兩個坐標點。

最后為結束語句:WriteFile('system/controlDict')

 

將文檔保存后,修改后綴名為.py。

 

將腳本導入TCFD:

點開TCFD設置條框里“Scripting”右邊的“+”加號,在彈出的對話框中添加剛才生成的py文件即可,


b.png


點擊圖中的“execution point”下方小空白框,按需求添加腳本在程序運行時腳本運行的時間,如:after write、before meshing、after calculation等。然后按正常流程進行manager>write case>run all。在計算結果生成的路徑下“postProcessing”文件夾里會生成“custom probe”文件夾,在這里可查看插入的數據點的參數。

 

附整個文本語句(#后語句為說明語句,不執行):

# print '@@@ This script defines probes (points) for which given quantities are tracked.'

 

# Compulsory lines

SetEntry('system/controlDict', 'functions/customProbes/functionObjectLibs', '( "libsampling.so" )')

SetEntry('system/controlDict', 'functions/customProbes/type', 'probes')

 

# Fields to be tracked

SetEntry('system/controlDict', 'functions/customProbes/fields:0', 'p')

SetEntry('system/controlDict', 'functions/customProbes/fields:1', 'pTot')

SetEntry('system/controlDict', 'functions/customProbes/fields:2', 'U')

 

# Position of tracked points, always in meters

SetEntry('system/controlDict', 'functions/customProbes/probeLocations:0', '( -0.0137 -0.1631 0.0974 )')

SetEntry('system/controlDict', 'functions/customProbes/probeLocations:1', '( -0.0147 -0.1631 0.0974 )')

 

# Compulsory line

WriteFile('system/controlDict')