'raytrace
DeleteRays
CreateSource srcnode
TraceExisting 'draw
'radiometry
For k = 0 To GetEntityCount()-1
If IsSurface( k ) Then
temp = AuxDataGetData( k, "temperature" )
emiss = AuxDataGetData( k, "emissivity" )
If ( temp <> 0 And emiss <> 0 ) Then
ProjSolidAngleByPi = GetSurfIncidentPower( k )
frac = BlackBodyFractionalEnergy ( minWave, maxWave, temp )
irrad(i,j) = irrad(i,j) + frac * emiss * sigma * temp^4 * ProjSolidAngleByPi
End If
End If
Next k
Next j
Next i
EnableTextPrinting( True )
'write out file
fullfilepath = CurDir() & "\" & fname
Open fullfilepath For Output As #1
Print #1, "GRID " & nx & " " & ny
Print #1, "1e+308"
Print #1, pixelx & " " & pixely
Print #1, -detx+pixelx/2 & " " & -dety+pixely/2
maxRow = nx - 1
maxCol = ny - 1
For rowNum = 0 To maxRow ' begin loop over rows (constant X)
row = ""
For colNum = maxCol To 0 Step -1 ' begin loop over columns (constant Y)
row = row & irrad(colNum,rowNum) & " " ' append column data to row string
Next colNum ' end loop over columns
Print #1, row
Next rowNum ' end loop over rows
Close #1
Print "File written: " & fullfilepath
Print "All done!!"
End Sub
在輸出報(bào)告中,我們會(huì)看到腳本對(duì)光源的孔徑和功率做了修改,并最終經(jīng)過(guò)31次迭代,將所有的熱成像數(shù)據(jù)以dat的格式放置于:
找到Tools工具,點(diǎn)擊Open plot files in 3D chart并找到該文件
打開(kāi)后,選擇二維平面圖:
|