The concept of a port was introduced into FDTD Solutions in the 2017a release. New objects called ports can be added to a simulation and used to extract the equivalent circuit representation of a device. A port is usually defined as a cross section on a waveguide structure or a connector, and it serves as a reference point to extract an equivalent circuit representation. The port objects in FDTD Solutions can be used to excite all the ports of a device in order to extract a complete S-parameter representation. At the bottom of this post you will find a simulation file and a script with a simple example. The simulation file consists of a straight glass waveguide with two ports. To extract the full S-parameter matrix, all the ports must be excited individually using separate simulations. In this example, two simulations are needed: one to excite port 1 and extract S11 and S21, and another one to excite port 2 and extract S12 and S22. This process can be carried out by hand or in an automated way using the new S-parameter sweep tool. The two approaches are briefly illustrated here.
Extracting S-parameters by Hand
The attached script extracts S11 and S21 and compares them against the expected results. First, the script sets the first mode of port 1 as the exciting port. This is done with the following two commands:
setnamed("FDTD::ports","source port","port 1"); setnamed("FDTD::ports","source mode","mode 1");
Afterwards, the script runs the simulation and collects S11 from port 1 and S21 from port 2 and plots the results:
Extracting S-parameters Using a Sweep
The S-parameter sweep tool can be used to extract all the S-parameters of the device in an automated way. The attached simulation file already contains a sweep that will run one simulation for each of the two ports:
The sweep tool will automatically run the simulations and aggregate the S-parameter results. The complete results can be visualized from the result view after running the sweep: