Navigation: Scripting Reference Manual > Functions & Subroutines > ARN3DGridWallGetInFluxData

 

ARN3DGridWallGetInFluxData

 

Contact Us: fredsupport@photonengr.com

 

Description

Gets the InFlux cell values from a 3D Grid Wall analysis results node as a three dimensional array of doubles.  The array is indexed as: data(0 to NA-1, 0 to NB-1,0 to NC-1), where NA, NB and NC are the number of cells along the A, B and C axes.  Data retrieved does not include pre/post trace offsets.

 

 

Syntax

ARN3DGridWallGetInFluxData arnNode, data()

 

 

Parameters

arnNode As Long

Node number of the 3D Grid Wall analysis result node whose cell data is being retrieved.

 

data() As Double

Data array in which to store the InFlux values from the 3D Grid Wall ARN.  This array does not need to be explicitly sized before being passed to the subroutine call.

 

 

Example

The following example traces a set of rays, retrieves the ARN produced by a 3D Box detector entity, retrieves the InFlux, OutFlux power and ray counts, and then for each Z cell slice the cell absorption value is computed and printed to the output window.  Note that in this example is used to illustrate how cell by cell data can be derived from the InFlux and OutFlux quantities.  Normally, the ARN3DGridWallGetAbsorbedFluxData subroutine would be used to retrieve the 3D array of absorbed flux values directly.

 

Sub Main()

 

    ClearOutputWindow

 

    'Delete existing rays and ARNs, trace new rayset

    EnableTextPrinting False

    DeleteRays()

    ARNDeleteAllNodes()

    TraceCreate

    EnableTextPrinting True

 

    'Retrieve the ARN created by 3D Box detector entity

    Dim Box3dDe As Long, arnNode As Long

    Box3dDe = FindFullName( "Analysis Surface(s).Detector Entity - 3x3" )

    arnNode = DEGetMostRecentARNNum( Box3dDe )

 

    'Get the InFlux and OutFlux cell data as 3D arrays of doubles

    'Get InFlux and OutFlux cell counts as 3D arrays of longs

    Dim inFluxData() As Double, outFluxData() As Double

    Dim inFluxCounts() As Long, outFluxCounts() As Long

    ARN3DGridWallGetInFluxData arnNode, inFluxData

    ARN3DGridWallGetOutFluxData arnNode, outFluxData

    ARN3DGridWallGetInCountData arnNode, inFluxCounts

    ARN3DGridWallGetOutCountData arnNode, outFluxCounts

 

    'Create a 3D array to hold the AbsorbedFlux data and perform calculation

    Dim curAx1 As Long, curAx2 As Long, curAx3 As Long

    Dim ax1 As Long, ax2 As Long, ax3 As Long

    ax1 = UBound(inFluxData,1)

    ax2 = UBound(inFluxData,2)

    ax3 = UBound(inFluxData,3)

 

    Dim absorbedFluxData() As Double, absorbedFluxCounts() As Long

    ReDim absorbedFluxData(ax1,ax2,ax3)

    ReDim absorbedFluxCounts(ax1,ax2,ax3)

 

    For curAx1 = 0 To ax1

        For curAx2 = 0 To ax2

            For curAx3 = 0 To ax3

                absorbedFluxData(curAx1,curAx2,curAx3) = inFluxData(curAx1,curAx2,curAx3) - outFluxData(curAx1,curAx2,curAx3)

                absorbedFluxCounts(curAx1,curAx2,curAx3) = outFluxCounts(curAx1,curAx2,curAx3) + inFluxCounts(curAx1,curAx2,curAx3)

            Next curAx3

        Next curAx2

    Next curAx1

 

    'Print out results

    For curAx3 = 0 To ax3

        Print "Printing X,Y data for Z cell slice " & curAx3

        Print "Format: Pabs (cnt)"

        For curAx1 = 0 To ax1

            For curAx2 = 0 To ax2

                Print absorbedFluxData(curAx1,curAx2,curAx3) & " (" & absorbedFluxCounts(curAx1,curAx2,curAx3) & ")";

            Next curAx2

            Print ""

        Next curAx1

    Next curAx3

 

End Sub

 

 

See Also

All ARN Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC