老司机午夜精品_国产精品高清免费在线_99热点高清无码中文字幕_在线观看国产成人AV天堂_中文字幕国产91

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

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

    上一主題 下一主題
    在線infotek
     
    發(fā)帖
    5288
    光幣
    20680
    光券
    0
    只看樓主 倒序閱讀 樓主  發(fā)表于: 3小時前

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

    成像示意圖

    首先我們建立十字元件命名為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軸旋轉(zhuǎn)90度,

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

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

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

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

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

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

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

    光源創(chuàng)建:

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

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

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

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

    創(chuàng)建分析面:

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

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

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

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

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

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

    綠色字體為說明文字,

    '#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

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

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

      

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

     
    分享到