Scripts and User Functions Center

Create a rectangular waveguide centered at the origin

This script creates a rectangular waveguide centered at the origin

Thumb slotwaveguide Thumb slotwaveguide nf
#	 newFASANT script file 
#	Creates a rectangular waveguide centered at the origin
#	with the following specifications:
#		L: Lenght along X axis
#		W: Weith along Y axis
#		H: Heigth along Z axis
#		The upper face contains N rectangular holes equispaced
#		along the longitudinal axis
#		xSlot: Length of the slots alonx X dimension
#		ySlot: With of the slots along Y dimension
#		N: number of slots that are equispaces in X dimension (maximum 50 for this example)
#		T: Period between adjacent slots in X dimension
#	Parameters with fixed values

set L {1.0}
set W {0.1}
set H {0.05}
set xSlot {0.002}
#	Parameters with variable values

set ySlot {0.02,0.08}#List of all possible values

set N {10.0, 30.0}#List of all possible values
#	Parameters that depends on other ones

set T  = L/N
#	Auxiliary parameters defined automatically

set $1  = -L/2
set $2  = -W/2
set $3  = -H/2
set $4  = (T-L-xSlot)/2
set $5  = -ySlot/2
#	Rectangular waveguide

box -n box -p $1 $2 $3 L W H
explode -s box
delete -s box_3 box_5
group -s box_1 box_2 box_4 box_6 -n guide
#	Boxes array to generate the slots

box -n hole -p $4 $5 0.0 xSlot ySlot H
array -s hole -n holes -p 50 1 1 0.0 0.0 0.0 T 0.0 0.0
booleanOutside -s -objectA guide -objectB hole holes_1_0_0 holes_2_0_0 holes_3_0_0 holes_4_0_0 holes_5_0_0 holes_6_0_0 holes_7_0_0 holes_8_0_0 holes_9_0_0 holes_10_0_0 holes_11_0_0 holes_12_0_0 holes_13_0_0 holes_14_0_0 holes_15_0_0 holes_16_0_0 holes_17_0_0 holes_18_0_0 holes_19_0_0 holes_20_0_0 holes_21_0_0 holes_22_0_0 holes_23_0_0 holes_24_0_0 holes_25_0_0 holes_26_0_0 holes_27_0_0 holes_28_0_0 holes_29_0_0 holes_30_0_0 holes_31_0_0 holes_32_0_0 holes_33_0_0 holes_34_0_0 holes_35_0_0 holes_36_0_0 holes_37_0_0 holes_38_0_0 holes_39_0_0 holes_40_0_0 holes_41_0_0 holes_42_0_0 holes_43_0_0 holes_44_0_0 holes_45_0_0 holes_46_0_0 holes_47_0_0 holes_48_0_0 holes_49_0_0 -n waveguide

Did you find this information useful?

We use cookies on this website to improve your navigation experience on this site. By using this site, you agree to our cookie policy.

I agree