Navigation: Scripting Reference Manual > Functions & Subroutines > GetSurfIncidentPower

 

GetSurfIncidentPower

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves the amount of power incident upon a specified surface during the most recent raytrace.  Note that the returned power value will only be correct when the rays are generated by an incoherent source.  Determination of power when using coherent sources requires a field summation calculation that is not performed during the raytrace.

 

Syntax

power = GetSurfIncidentPower ( n )

 

Parameters

power (Double)

Return value indicating the amount of incident power on the surface.

 

n As Long

Node number of the surface being queried.

 

 

Example

This example uses GetSurfIncidentPower to print the amount of power incident on each surface in the model. GetFullName is used to associate the surface names with their absorbed power.

 

Sub Main()

          Dim i As Long

          Dim sname As String, pwer As Double
          For i=0 To GetEntityCount()-1

                    If IsSurface( i ) Then
                              pwer    = GetSurfIncidentPower(i)
                              sname = GetFullName(i)
                              Print "Power incident on " & sname & " is " & pwer

                    End If
          Next i

End Sub
 

 

See Also

GetSurfAbsorbedPower

 

 

 

 

 

 

Copyright © Photon Engineering, LLC