Navigation: Scripting Reference Manual > Data Structures > T_CPC_DATA

 

T_CPC_DATA

 

Contact Us: fredsupport@photonengr.com

 

Description

This data structure is used to retrieve construction parameter values from an element primitive CPC.

 

Definition

Type T_CPC_DATA

ConcRatio As Double

FocalLength As Double

InputSw As Double

OutputSw As Double

Round As Boolean

Solid As Boolean

Theta_deg As Double

thickness As Double

Thin As Boolean

TroughSw As Double

TrucLength_pc As Double

 

 

Members

ConcRatio

Concentration ratio of the CPC (given by the ratio of Ainput/Aoutput).

 

FocalLength

Focal length of the parabolic surface.

 

InputSw

Semi-width of the input aperture.

 

OutputSw

Semi-width of the output aperture.

 

Round

NOT CURRENTLY IMPLEMENTED

Boolean indicating the CPC aperture type.  True = Round, False = Trough.

 

Solid

Boolean indicating whether the CPC is a solid body or hollow body type.  True = Solid, False = Hollow.

 

Theta_deg

Acceptance angle (in degrees) of the CPC.

 

thickness

NOT CURRENTLY IMPLEMENTED

Wall thickness of the CPC. This value is only applicable if the Thick member is True.

 

Thin

NOT CURRENTLY IMPLEMENTED

Boolean indicating whether the CPC is thick or thin walled.  True = Thin, False = Thick.

 

TroughSw

NOT CURRENTLY IMPLEMENTED

Semi-width of the CPC.  This value is only applicable if the Round member is False.

 

TruncLength_pc

Truncation length as a percentage of the nominal CPC length.

 

 

Example

The following example creates a CPC with the default settings, retrieves the values for each of the parameters and prints them to the output window, then applies new construction parameters to the CPC.

 

Sub Main()

 

    Dim tCpc As T_CPC_STRUCT

    Dim tCpcData As T_CPC_DATA

    Dim tEnt As T_ENTITY

    Dim cpcNode As Long

 

    ' initialize and add new CPC node

    InitEntity( tEnt )

    tEnt.name = "New CPC"

    cpcNode = ElemAddCPC( tEnt )

    If cpcNode > 0 Then

        Print "CPC created at node " & cpcNode

    Else

        End

    End If

 

    ' update the document

    Update

 

    ' retrieve default CPC construction data

    ElemGetCPC( cpcNode, tCpcData )

    Print "Input Semi-ap: " & Chr(9) & tCpcData.InputSw

    Print "Output Semi-ap: " & Chr(9) & tCpcData.OutputSw

    Print "Concentration Ratio: " & Chr(9) & tCpcData.ConcRatio

    Print "Length: " & Chr(9) & tCpcData.Length

    Print "Acceptance Angle: " & Chr(9) & tCpcData.Theta_deg

    Print "Focal Length: " & Chr(9) & tCpcData.FocalLength

    Print "Round Aperture?: " & Chr(9) & tCpcData.Round

    Print "Trough Semi-width: " & Chr(9) & tCpcData.TroughSw

    Print "Sold Body?: " & Chr(9) & tCpcData.Solid

    Print "Thin Wall?: " & Chr(9) & tCpcData.Thin

    Print "Wall Thickness: " & Chr(9) & tCpcData.thickness

 

 

    ' modify CPC construction parameters

    tCpc.ParamA        = "Input Semi-ape"

    tCpc.ValA          = 10

    tCpc.ParamB        = "Output Semi-ape"

    tCpc.ValB          = 5

    tCpc.Solid         = False 'Solid or hollow body

    tCpc.Thin          = False 'Thin or thick wall

    tCpc.thickness     = 1.0   'If thick walled, gives thickness

    tCpc.Round         = True  'Shape of the element (round or trough)

    tCpc.TroughSw      = 1     'If trough, gives semi-width

    tCpc.TrucLength_pc = 100   'Truncated length (%)

    ElemSetCPC cpcNode, tCpc

 

    Update

 

End Sub

 

See Also

Element Primitive Scripting Commands

T_CPC_DATA

T_CPC_STRUCT

 

 

 

 

 

Copyright © Photon Engineering, LLC