'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
在输出报告中,我们会看到脚本对光源的孔径和功率做了修改,并最终经过31次迭代,将所有的热成像数据以dat的格式放置于:
找到Tools工具,点击Open plot files in 3D chart并找到该文件
打开后,选择二维平面图:
|