WaveguideModeOptionsCollection

A collection of waveguide mode properties.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Create a waveguide port

cuboid = project.Geometry:AddCuboid(cf.Point(-1,1,0), 1, 1, 1)
cuboid.Regions[1].Medium = project.Media:GetFreeSpace()

waveguidePort = project.Ports:AddWaveguidePort(cuboid.Faces[1])

    -- Add a waveguide source to the waveguide port

configuration = project.SolutionConfigurations[1]
source = configuration.Sources:AddWaveguideSource(waveguidePort)

    -- Specify the mode manually
    -- A properties table is used as the changes need to be
    -- made in one step
    
properties = source:GetProperties()
properties.SourceDefinitionType = cf.Enums.WaveguideSourceDefinitionTypeEnum.SpecifyModesManually
properties.ManuallySpecifiedModesProperties[1].WaveguideModeType = 
    cf.Enums.SParameterWaveguideModeTypeEnum.TE
properties.ManuallySpecifiedModesProperties[1].IndexM = 1
properties.ManuallySpecifiedModesProperties[1].IndexN = 1
properties.ManuallySpecifiedModesProperties[1].Magnitude = 1
properties.ManuallySpecifiedModesProperties[1].Phase = 0
source:SetProperties(properties)

    -- Add a second mode to the collection

source.ManuallySpecifiedModesProperties:AddTMMode(1, 2, 1, 90, 0)

Usage locations (collections)

The following objects contain the WaveguideModeOptionsCollection collection:

Property List

Count
The number of WaveguideModeOptions items in the collection. (Read only number)

Method List

AddTEMMode (magnitude Expression, phase Expression, rotation Expression)
Adds a TEM type waveguide mode. Only valid for coaxial waveguide ports.
AddTEMode (indexm Expression, indexn Expression, magnitude Expression, phase Expression, rotation Expression)
Adds a TE type waveguide mode.
AddTMMode (indexm Expression, indexn Expression, magnitude Expression, phase Expression, rotation Expression)
Adds a TM type waveguide mode.
Item (index number)
Returns the WaveguideModeOptions at the given index. (Returns a WaveguideModeOptions object.)
Remove (index number)
Remove the waveguide mode at the given index.

Index List

[number]
Returns the WaveguideModeOptions at the given index in the collection. (Read WaveguideModeOptions)

Property Details

Count
The number of WaveguideModeOptions items in the collection.
Type
number
Access
Read only

Method Details

AddTEMMode (magnitude Expression, phase Expression, rotation Expression)
Adds a TEM type waveguide mode. Only valid for coaxial waveguide ports.
Input Parameters
magnitude(Expression)
The magnitude.
phase(Expression)
The phase.
rotation(Expression)
The rotation. Only valid for non-rectangular waveguide ports.
AddTEMode (indexm Expression, indexn Expression, magnitude Expression, phase Expression, rotation Expression)
Adds a TE type waveguide mode.
Input Parameters
indexm(Expression)
The M index.
indexn(Expression)
The N index.
magnitude(Expression)
The magnitude.
phase(Expression)
The phase.
rotation(Expression)
The rotation. Only valid for non-rectangular waveguide ports.
AddTMMode (indexm Expression, indexn Expression, magnitude Expression, phase Expression, rotation Expression)
Adds a TM type waveguide mode.
Input Parameters
indexm(Expression)
The M index.
indexn(Expression)
The N index.
magnitude(Expression)
The magnitude.
phase(Expression)
The phase.
rotation(Expression)
The rotation. Only valid for non-rectangular waveguide ports.
Item (index number)
Returns the WaveguideModeOptions at the given index.
Input Parameters
index(number)
The index of the WaveguideModeOptions.
Return
WaveguideModeOptions
The WaveguideModeOptions at the given index.
Remove (index number)
Remove the waveguide mode at the given index.
Input Parameters
index(number)
The index of the waveguide mode to remove.