切換到寬版
  • 廣告投放
  • 稿件投遞
  • 繁體中文
    • 156閱讀
    • 2回復(fù)

    [技術(shù)]十字元件熱成像分析 [復(fù)制鏈接]

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

    簡(jiǎn)介:本文是以十字元件為背景光源,經(jīng)過(guò)一個(gè)透鏡元件成像探測(cè)器上,并顯示其熱成像圖。

    成像示意圖

    首先我們建立十字元件命名為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

    位置坐標(biāo):繞Z軸旋轉(zhuǎn)90度,

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

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

    Target 元件距離坐標(biāo)原點(diǎn)-161mm;

    單透鏡參數(shù)設(shè)定:F=100, bend=0, 位置位于坐標(biāo)原點(diǎn)

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

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

    元件半徑為20mm*20,mm,距離坐標(biāo)原點(diǎn)200mm。

    光源創(chuàng)建:

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

    我們將光源設(shè)定在探測(cè)器位置上,具體的原理解釋請(qǐng)見本章第二部分。

    我們?cè)谖恢眠x項(xiàng)又設(shè)定一行的目的是通過(guò)腳本自動(dòng)控制光源在探測(cè)器平面不同劃分區(qū)域內(nèi)不同位置處追跡光線。

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

    創(chuàng)建分析面:

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

    到此,所有的光學(xué)結(jié)構(gòu)和屬性設(shè)定完成,通過(guò)光線追跡我們可以查看光線是否可以穿過(guò)元件。

    FRED在探測(cè)器上穿過(guò)多個(gè)像素點(diǎn)迭代來(lái)創(chuàng)建熱圖

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

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

    打開后清空里面的內(nèi)容,此腳本為通用腳本適用于一切可熱成像的應(yīng)用。

    綠色字體為說(shuō)明文字,

    '#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" ) '找到探測(cè)器平面節(jié)點(diǎn)

        Print "found detector array at node " & detnode

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

        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

    在輸出報(bào)告中,我們會(huì)看到腳本對(duì)光源的孔徑和功率做了修改,并最終經(jīng)過(guò)31次迭代,將所有的熱成像數(shù)據(jù)以dat的格式放置于:

    找到Tools工具,點(diǎn)擊Open plot files in 3D chart并找到該文件

      

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

     
    分享到
    離線春頭
    發(fā)帖
    392
    光幣
    6700
    光券
    0
    只看該作者 1樓 發(fā)表于: 11-19
    這是什么光學(xué)軟件模擬的呢?
    在線infotek
    發(fā)帖
    5414
    光幣
    21250
    光券
    0
    只看該作者 2樓 發(fā)表于: 11-20
    回 春頭 的帖子
    春頭:這是什么光學(xué)軟件模擬的呢? (2024-11-19 21:56)  qW S"I+o,S  
    =R)w=ce  
    是Virtuallab Fusion物理仿真軟件,感興趣可以加微18001704725