Element7k
Advanced Member level 1
- Joined
- May 7, 2003
- Messages
- 434
- Helped
- 26
- Reputation
- 52
- Reaction score
- 19
- Trophy points
- 1,298
- Location
- TherealLapland
- Activity points
- 4,278
Dear all,
I will like to optimise the farfield pattern of an antenna for max gain e.g. in the theta component. I use the user defined function in the optimiser but I do not know how to select the field component. E.g. I wish to look at Farfield\farfield (f=x) [1] but I do not know how select e.g. theta/axial ratio in VBA to optimise. Can anyone help to modify the code given in CST example to select e.g. the Phi component.
Thanks in advance.
Function GoalFunction() As Double
Dim cst_value As Double
With FarfieldPlot
.Reset
SelectTreeItem "Farfields\farfield (f=1.25) [1]"
.SetPlotMode "gain"
.SetScaleLinear False
.Plottype "polar"
.Vary "theta"
.Thetastep 1
.Phi 0
.Plot
Wait 0.02
' Maximize gain
GoalFunction=10/Abs(.Getmax)
End With
End Function
I will like to optimise the farfield pattern of an antenna for max gain e.g. in the theta component. I use the user defined function in the optimiser but I do not know how to select the field component. E.g. I wish to look at Farfield\farfield (f=x) [1] but I do not know how select e.g. theta/axial ratio in VBA to optimise. Can anyone help to modify the code given in CST example to select e.g. the Phi component.
Thanks in advance.
Function GoalFunction() As Double
Dim cst_value As Double
With FarfieldPlot
.Reset
SelectTreeItem "Farfields\farfield (f=1.25) [1]"
.SetPlotMode "gain"
.SetScaleLinear False
.Plottype "polar"
.Vary "theta"
.Thetastep 1
.Phi 0
.Plot
Wait 0.02
' Maximize gain
GoalFunction=10/Abs(.Getmax)
End With
End Function