亚洲AV日韩AV无码污污网站_亚洲欧美国产精品久久久久久久_欧美日韩一区二区视频不卡_丰满无码人妻束缚无码区_久爱WWW成人网免费视频

切換到寬版
  • 廣告投放
  • 稿件投遞
  • 繁體中文
    • 215閱讀
    • 2回復

    [技術]十字元件熱成像分析 [復制鏈接]

    上一主題 下一主題
    離線infotek
     
    發(fā)帖
    5549
    光幣
    21905
    光券
    0
    只看樓主 倒序閱讀 樓主  發(fā)表于: 2024-11-19

    簡介:本文是以十字元件為背景光源,經過一個透鏡元件成像探測器上,并顯示其熱成像圖。

    成像示意圖

    首先我們建立十字元件命名為Target

    創(chuàng)建方法:

    面1 :

    面型:plane

    材料:Air

    孔徑:X=1.5, Y=6,Z=0.075,形狀選擇Box

    輔助數(shù)據(jù):

    首先在第一行輸入temperature :300K,

    emissivity:0.1;

    面2 :

    面型:plane

    材料:Air

    孔徑:X=1.5, Y=6,Z=0.075,形狀選擇Box

    位置坐標:繞Z軸旋轉90度,

    輔助數(shù)據(jù):

    首先在第一行輸入temperature :300K,emissivity: 0.1;

    Target 元件距離坐標原點-161mm;

    單透鏡參數(shù)設定:F=100, bend=0, 位置位于坐標原點

    探測器參數(shù)設定:

    在菜單欄中選擇Create/Element Primitive /plane

    元件半徑為20mm*20,mm,距離坐標原點200mm。

    光源創(chuàng)建:

    光源類型選擇為任意平面,光源半角設定為15度。

    我們將光源設定在探測器位置上,具體的原理解釋請見本章第二部分。

    我們在位置選項又設定一行的目的是通過腳本自動控制光源在探測器平面不同劃分區(qū)域內不同位置處追跡光線

    功率數(shù)值設定為:P=sin2(theta) theta為光源半角15度。我們?yōu)槭裁匆@么設定,在第二部分會給出詳細的公式推導。

    創(chuàng)建分析面:

    到這里元件參數(shù)設定完成,現(xiàn)在我們設定元件的光學屬性,在前面我們分別對第一和第二面設定的溫度和發(fā)射系數(shù),散射屬性我們設定為黑朗伯,4%的散射。并分別賦予到面一和面二。

    到此,所有的光學結構和屬性設定完成,通過光線追跡我們可以查看光線是否可以穿過元件。

    FRED在探測器上穿過多個像素點迭代來創(chuàng)建熱圖

    FRED具有一個內置的可編譯的Basic腳本語言。從Visual Basic腳本語言里,幾乎所有用戶圖形界面(GUI)命令是可用這里的。FRED同樣具有自動的客戶端和服務器能力,它可以被調用和并調用其他可啟動程序,如Excel。因此可以在探測器像素點上定義多個離軸光源,及在FRED Basic腳本語言里的For Next loops語句沿著探測器像素點向上和向下掃描來反向追跡光線,這樣可以使用三維圖表查看器(Tools/Open plot files in 3D chart)調用和查看數(shù)據(jù)。

    將如下的代碼放置在樹形文件夾 Embedded Scripts,

    打開后清空里面的內容,此腳本為通用腳本適用于一切可熱成像的應用。

    綠色字體為說明文字,

    '#Language "WWB-COM"

    'script for calculating thermal image map

    'edited rnp 4 november 2005

    'declarations

    Dim op As T_OPERATION

    Dim trm As T_TRIMVOLUME

    Dim irrad(32,32) As Double 'make consistent with sampling

    Dim temp As Double

    Dim emiss As Double

    Dim fname As String, fullfilepath As String

    'Option Explicit

    Sub Main

        'USER INPUTS

        nx = 31

        ny = 31

        numRays = 1000

        minWave = 7    'microns

        maxWave = 11   'microns

        sigma = 5.67e-14 'watts/mm^2/deg k^4

        fname = "teapotimage.dat"

        Print ""

        Print "THERMAL IMAGE CALCULATION"

        detnode = FindFullName( "Geometry.Detector.Surface" ) '找到探測器平面節(jié)點

        Print "found detector array at node " & detnode

        srcnode = FindFullName( "Optical Sources.Source 1" ) '找到光源節(jié)點

        Print "found differential detector area at node " & srcnode

        GetTrimVolume detnode, trm

        detx = trm.xSemiApe

        dety = trm.ySemiApe

        area = 4 * detx * dety

        Print "detector array semiaperture dimensions are " & detx & " by " & dety

        Print "sampling is " & nx & " by " & ny

        'reset differential detector area dimensions to be consistent with sampling

        pixelx = 2 * detx / nx

        pixely = 2 * dety / ny

        SetSourcePosGridRandom srcnode, pixelx / 2, pixely / 2, numRays, False

        Print "resetting source dimensions to " & pixelx / 2 & " by " & pixely / 2

        'reset the source power

        SetSourcePower( srcnode, Sin(DegToRad(15))^2 )

        Print "resetting the source power to " & GetSourcePower( srcnode ) & " units"

        'zero out irradiance array

        For i = 0 To ny - 1

            For j = 0 To nx - 1

                irrad(i,j) = 0.0

            Next j

        Next i

        'main loop

        EnableTextPrinting( False )

        ypos =  dety + pixely / 2

        For i = 0 To ny - 1

            xpos = -detx - pixelx / 2

            ypos = ypos - pixely

            EnableTextPrinting( True )

            Print i

            EnableTextPrinting( False )

            For j = 0 To nx - 1

                xpos = xpos + pixelx

                'shift source

                LockOperationUpdates srcnode, True

                GetOperation srcnode, 1, op

                op.val1 = xpos

                op.val2 = ypos

                SetOperation srcnode, 1, op

                LockOperationUpdates srcnode, False

                '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次迭代,將所有的熱成像數(shù)據(jù)以dat的格式放置于:

    找到Tools工具,點擊Open plot files in 3D chart并找到該文件

      

    打開后,選擇二維平面圖:

     
    分享到
    離線春頭
    發(fā)帖
    392
    光幣
    6710
    光券
    0
    只看該作者 1樓 發(fā)表于: 2024-11-19
    這是什么光學軟件模擬的呢?
    離線infotek
    發(fā)帖
    5549
    光幣
    21905
    光券
    0
    只看該作者 2樓 發(fā)表于: 2024-11-20
    回 春頭 的帖子
    春頭:這是什么光學軟件模擬的呢? (2024-11-19 21:56)  .l*]W!L]  
    1H @GwQ|<=  
    是Virtuallab Fusion物理仿真軟件,感興趣可以加微18001704725