VectorPlot2D Object

This object allows to plot three dimensional vector fields in a cutting plane. Therefore the 3D Fields on 2D Plane option has to be active. To choose what field to plot the SelectTreeItem command can be used.

General Methods

Color ( bool switch )

Plots the arrows relating to their values in different colors.

 

PhaseValue ( double phase )

Specifies the phase of to be plotted complex field values.

 

PhaseStep ( double phasestep )

Specifies the step width used by phase incrementing actions.

 

Arrows ( int arrows )

Defines the number of arrows used for the field plot.

 

ArrowSize ( int size )

Defines the size of the arrows by scaling the field. The scaling size factor must be between 0 and 100

 

dBScale ( bool switch )

Decides whether the fields should be plotted in a dB scale  or not.

 

dBUnit ( int  unit )

Sets the a unit for logarithmic farfield plots. The unit must be integer  and between "0" and "4". ("0" = "3D Max  = 0 dB", "1" =   "2D Max  = 0 dB",

"2" = "dBV/m", "3" = "dBmV/m", "4" = "dBuV/m").

 

dBRange ( double range )

Sets the logarithmic field plot range in dB.

Please note: range must be a double value here. Any expression is not allowed.

 

LogScale ( bool switch )

Decides whether the fields should be plotted in a logarithmical scale or not.

 

LogStrength ( double strength )

The characteristic curve used for logarithmic scaling can be varied. Values from 1.0e-6 to 100000 are allowed.

 

PlaneNormal ( enum normal )

Sets the direction of the cutting plane where the fields are to be plotted. The position of the plane can be set by PlaneCoordinate.

normal can have one of  the following values:

"x"

x  is the coordinate direction of the cutting plane.

"y"

y  is the coordinate direction of the cutting plane.

"z"

z  is the coordinate direction of the cutting plane.

 

PlaneCoordinate ( double position )

Sets the position of the cutting plane where the fields are to be plotted. The direction of the plane can be set by PlaneNormal.

 

SetTime ( double time )

The current time value of a time monitor plot is set.

 

SetSample ( long sample )

The current time sample number of a time monitor plot is set.

 

Plot

Plots the field with the previously made settings.

Query

GetDomain enum

Returns the domain of the monitor used, return code can have the following values:

"frequency"

The plot is based on recordings of a frequency domain monitor.

"time"

The plot is based on recordings of a time domain monitor.

 

GetNumberOfSamples long

Returns the total number of samples if the plot is based on recordings of a time monitor else 0.

 

GetTStart double

Returns the start time of recording if the plot is based on recordings of a time monitor else 0.0.

 

GetTEnd double

Returns the end time of recording if the plot is based on recordings of a time monitor else 0.0.

 

GetTStep double

Returns the time step width of recording if the plot is based on recordings of a time monitor else 0.0.

 

GetTime double

Returns the current  time set of a time monitor plot.

 

GetSample long

Returns the current time sample number of a time monitor plot.

Default Settings

Color (True)

PhaseValue (0.0)

PhaseStep (22.5)

ArrowSize (50)

LogScale (False)

LogStrength (10.0)

PlaneNormal ("x")

PlaneCoordinate (0)

SetTime (0.0)

SetSample (0)

Example

The following script plots the electric field  "e1" (if available) in a linear scale by using 400 colored arrows. The y-z-plane is defined as cutting plane.

 

' Plot only a wire frame of the structure to be able to look inside

Plot.wireframe (True)

 

' Select the desired monitor in the tree.

SelectTreeItem ("2D/3D Results\E-Field\e1")

 

' Enables plotting of 3D fields on 2D planes

Plot3DPlotsOn2DPlane (True)

 

' Plot the field of the selected monitor

With VectorPlot2D

    .Color (True)

    .Arrows (400)

    .ArrowSize (50)

    .PlaneNormal ("x")

    .PlaneCoordinate (0.0)

    .LogScale (False)

    .Plot

End With