' spiral Sub Main () Dim i As Integer '@ define units With Units .Geometry "mm" .Frequency "GHz" .Time "ns" .TemperatureUnit "Kelvin" .Voltage "V" .Current "A" .Resistance "Ohm" .Conductance "S" .Capacitance "PikoF" .Inductance "NanoH" End With '@ define material: Rogers TMM 10i (lossy) With Material .Reset .Name "Rogers TMM 10i (lossy)" .FrqType "all" .Type "Normal" .SetMaterialUnit "GHz", "mm" .Epsilon "9.8" .Mue "1.0" .Kappa "0.0" .TanD "0.002" .TanDFreq "10.0" .TanDGiven "True" .TanDModel "ConstTanD" .KappaM "0.0" .TanDM "0.0" .TanDMFreq "0.0" .TanDMGiven "False" .TanDMModel "ConstKappa" .DispModelEps "None" .DispModelMue "None" .DispersiveFittingSchemeEps "General 1st" .DispersiveFittingSchemeMue "General 1st" .UseGeneralDispersionEps "False" .UseGeneralDispersionMue "False" .Rho "0.0" .ThermalType "Normal" .ThermalConductivity "0.76" .SetActiveMaterial "all" .Colour "0.94", "0.82", "0.76" .Wireframe "False" .Transparency "0" .Create End With '@ define frequency range Solver.FrequencyRange "0.0", "5" '@ define boundaries With Boundary .Xmin "magnetic" .Xmax "magnetic" .Ymin "electric" .Ymax "electric" .Zmin "open" .Zmax "open" .Xsymmetry "none" .Ysymmetry "none" .Zsymmetry "none" .XminThermal "isothermal" .XmaxThermal "isothermal" .YminThermal "isothermal" .YmaxThermal "isothermal" .ZminThermal "isothermal" .ZmaxThermal "isothermal" .XsymmetryThermal "none" .YsymmetryThermal "none" .ZsymmetryThermal "none" .ApplyInAllDirections "False" .XminTemperature "" .XminTemperatureType "None" .XmaxTemperature "" .XmaxTemperatureType "None" .YminTemperature "" .YminTemperatureType "None" .YmaxTemperature "" .YmaxTemperatureType "None" .ZminTemperature "" .ZminTemperatureType "None" .ZmaxTemperature "" .ZmaxTemperatureType "None" End With '@ new component: component1 Component.New "component1" '@ define material colour: Vacuum With Material .Name "Vacuum" .Colour "0.5", "0.8", "1" .Wireframe "False" .Reflection "False" .Allowoutline "True" .Transparentoutline "False" .Transparency "52" .ChangeColour End With '@ define brick: component1:substrate With Brick .Reset .Name "substrate" .Component "component1" .Material "Rogers TMM 10i (lossy)" .Xrange "-a/2", "a/2" .Yrange "-a/2", "a/2" .Zrange "-a/2", "a/2" .Create End With '@ define brick: component1:solid1 With Brick .Reset .Name "solid1" .Component "component1" .Material "Vacuum" .Xrange "-a/2+ts/2", "a/2-ts/2" .Yrange "-a/2", "a/2" .Zrange "-a/2+ts/2", "a/2-ts/2" .Create End With '@ boolean subtract shapes: component1:substrate, component1:solid1 With Solid .Version 9 .Subtract "component1:substrate", "component1:solid1" .Version 1 End With '@ define brick: component1:space With Brick .Reset .Name "space" .Component "component1" .Material "Vacuum" .Xrange "-a/2", "a/2" .Yrange "-a/2", "a/2" .Zrange "-a", "a" .Create End With '@ boolean insert shapes: component1:space, component1:substrate With Solid .Version 9 .Insert "component1:space", "component1:substrate" .Version 1 End With '@ define material: Copper (annealed) With Material .Reset .Name "Copper (annealed)" .FrqType "static" .Type "Normal" .SetMaterialUnit "Hz", "mm" .Epsilon "1" .Mue "1.0" .Kappa "5.8e+007" .TanD "0.0" .TanDFreq "0.0" .TanDGiven "False" .TanDModel "ConstTanD" .KappaM "0" .TanDM "0.0" .TanDMFreq "0.0" .TanDMGiven "False" .TanDMModel "ConstTanD" .DispModelEps "None" .DispModelMue "None" .DispersiveFittingSchemeEps "1st Order" .DispersiveFittingSchemeMue "1st Order" .UseGeneralDispersionEps "False" .UseGeneralDispersionMue "False" .FrqType "all" .Type "Lossy metal" .SetMaterialUnit "GHz", "mm" .Mue "1.0" .Kappa "5.8e+007" .Rho "8930.0" .ThermalType "Normal" .ThermalConductivity "401.0" .HeatCapacity "0.39" .MetabolicRate "0" .BloodFlow "0" .VoxelConvection "0" .MechanicsType "Isotropic" .YoungsModulus "120" .PoissonsRatio "0.33" .ThermalExpansionRate "17" .Colour "1", "1", "0" .Wireframe "False" .Reflection "False" .Allowoutline "True" .Transparentoutline "False" .Transparency "0" .Create End With For i = 0 To n-1 '@ define brick: component1:spiral With Brick .Reset .Name "spiral"+Str(i) .Component "component1" .Material "Copper (annealed)" If i>0 Then .Xrange -l/2+(2*i-1)*w, l/2-(2*i)*w Else .Xrange -l/2+(2*i)*w, l/2-(2*i)*w End If .Yrange l/2-(2*i+1)*w, l/2-(2*i)*w .Zrange -a/2+ts/2, -a/2+ts/2+t .Create End With '@ define brick: component1:spiralA With Brick .Reset .Name "spiralA" .Component "component1" .Material "Copper (annealed)" .Xrange l/2-(2*i+1)*w, l/2-(2*i)*w .Yrange -l/2+(2*i)*w, l/2-(2*i+1)*w .Zrange "-a/2+ts/2", "-a/2+ts/2+t" .Create End With '@ define brick: component1:spiralB With Brick .Reset .Name "spiralB" .Component "component1" .Material "Copper (annealed)" .Xrange -l/2+(2*i)*w, l/2-(2*i+1)*w .Yrange -l/2+(2*i)*w, -l/2+(2*i+1)*w .Zrange -a/2+ts/2, -a/2+ts/2+t .Create End With '@ define brick: component1:spiralC With Brick .Reset .Name "spiralC" .Component "component1" .Material "Copper (annealed)" .Xrange -l/2+(2*i)*w, -l/2+(2*i+1)*w .Yrange -l/2+(2*i+1)*w, l/2-(2*i+2)*w .Zrange "-a/2+ts/2", "-a/2+ts/2+t" .Create End With '@ boolean add shapes: component1:spiral, component1:spiral1 Solid.Add "component1:spiral"+Str(i), "component1:spiralA" '@ boolean add shapes: component1:spiral, component1:spiral2 Solid.Add "component1:spiral"+Str(i), "component1:spiralB" '@ boolean add shapes: component1:spiral, component1:spiral3 Solid.Add "component1:spiral"+Str(i), "component1:spiralC" '@ transform: rotate component1:spiral With Transform .Reset .Name "component1:spiral"+Str(i) .Origin "Free" .Center "0", "0", "0" .Angle "0", "90", "0" .MultipleObjects "True" .GroupObjects "True" .Repetitions "3" .MultipleSelection "False" .Destination "" .Material "" .Transform "Shape", "Rotate" End With If i>0 Then Solid.Add "component1:spiral 0", "component1:spiral"+Str(i) Next i '@ define port: 1 With Port .Reset .PortNumber "1" .Label "" .NumberOfModes "1" .AdjustPolarization "False" .PolarizationAngle "0.0" .ReferencePlaneDistance "-a/2" .TextSize "50" .Coordinates "Full" .Orientation "zmin" .PortOnBound "True" .ClipPickedPortToBound "False" .Xrange "-2.5", "2.5" .Yrange "-2.5", "2.5" .Zrange "-5", "-5" .XrangeAdd "0.0", "0.0" .YrangeAdd "0.0", "0.0" .ZrangeAdd "0.0", "0.0" .SingleEnded "False" .Create End With '@ define port: 2 With Port .Reset .PortNumber "2" .Label "" .NumberOfModes "1" .AdjustPolarization "False" .PolarizationAngle "0.0" .ReferencePlaneDistance "-a/2" .TextSize "50" .Coordinates "Full" .Orientation "zmax" .PortOnBound "True" .ClipPickedPortToBound "False" .Xrange "-2.5", "2.5" .Yrange "-2.5", "2.5" .Zrange "5", "5" .XrangeAdd "0.0", "0.0" .YrangeAdd "0.0", "0.0" .ZrangeAdd "0.0", "0.0" .SingleEnded "False" .Create End With End Sub