ZEMAX Users' Knowledge Base - http://www.zemax.com/kb
How to Convert from RSoft Simulations to ZEMAX and Back
http://www.zemax.com/kb/articles/222/1/How-to-Convert-from-RSoft-Simulations-to-ZEMAX-and-Back/Page1.html
By Matthew Frank
Published on 11 April 2008
 
This tutorial illustrates how to convert information from ZEMAX into RSoft’s propagation software and back. This can be useful for multi-stage cases in which one part of the system is a bulk optical system, and a waveguide in others. In this example, we will look at the coupling from a focusing lens into a small silica fiber.

We will first create output information from ZEMAX and then convert these files into field files that can be used for a BPM propagation. The result will be that ZEMAX is used to propagate a Gaussian complex amplitude through a bulk optical system, and focus it at the input face of a single mode fiber. The resulting complex amplitude is then imported into RSoft software and propagated through the fiber. The resulting data can then be read back into ZEMAX if needed.

Introduction
This tutorial illustrates how to convert information from ZEMAX into RSoft’s family of beam propagation software.  This can be useful for multi-stage cases in which one part of the system (typically bulk optical systems in which wave-guiding is not important) is more efficiently simulated in ZEMAX, and other parts require electro-magnetic propagating tools (typically, inside waveguides, photonics crystals etc). 

In this example, we will look at the coupling from a focusing lens into a small silica fiber. We will first create output information from ZEMAX, and then convert these files into field files that can be used for a BPM propagation. 

In addition, this example will use the BeamPROP software. However, FullWAVE as well as some of the other RSoft propagation tools can also take advantage of the same principal and conversation processes to utilize these launch fields.  It is assumed that the user is somewhat familiar with the RSoft software when going through this tutorial.

Finally, while this tutorial uses the GUI in order to convert the fields, there are command line utilities in the RSoft products to do this conversion as well.  Please see the appropriate appendix in the RSoft CAD manual for more information.

Getting the Data from ZEMAX

In this section, we begin by opening up ZEMAX.  Choose File...Open and then go to the Samples/Physical Optics folder to open Fiber Coupling.zmx.  You can select any of the analysis features, including the 2D layout to see how the rays focus to a point. 

Figure 1: ZEMAX setup for fiber coupling lens
Figure 1: ZEMAX setup for fiber coupling lens

Select Analysis/Physical Optics/Physical Optics Propagation to see a 2 mm input waist Gaussian being focussed at the image plane of the lens:


Figure 2:ZEMAX screen with field pattern
Figure 2:ZEMAX screen with field pattern

From here we can tell ZEMAX to output the beam files we will need to convert into the RSoft format.  Press the Settings option on the top of the physical optics propagation window and then select the Display tab and click on the Save Output Beam To: option.  Next, set the name of the file to be Fiber_output.zbf.  Press OK.

Figure 3: Display settings for physical optics propagation 
Figure 3: Display settings for physical optics propagation

These files are typically saved in the ZEMAX/POP/Beamfiles directory so you can find the file there.


Creating the Index File to be Used for the BPM Simulation
In this section, we will create the index file for the fiber we will be using. Open up an RSoft CAD window, and press the New Circuit icon. Set the parameters as shown in Fig. 4 and then press OK.

Figure 4: Global Settings Window
Figure 4: Global Settings Window

Draw in a straight segment and then right click on it. Set the segment properties to look like that of Fig. 5 and then press OK.

Figure 5: Segment Properties Dialog
Figure 5: Segment Properties Dialog

Press the Edit Pathways icon, press the New button, and then select the segment. Press the Monitors button and then the New button in the newly opened monitors window. Set the Type to Total Power and then press OK in this window and the next toolbar to go back to the CAD.

Figure 6: Monitors Property Window
Figure 6: Monitors Property Window

Press the Compute Materials Properties icon, and set parameters to look like Fig. 7.

Figure 7: Compute Material Properties Window
Figure 7: Compute Material Properties Window

We can now view the index profile as shown in Fig. 8.


Figure 8: Index Profile of Fiber
Figure 8: Index Profile of Fiber

Proceed to save the file to a working directory.

Converting from ZEMAX to RSoft Format
Now that we have created the structure as well as the monitors, we can proceed with setting up the launch field. Select Utility/Ray-Tracing Converters to open up the converter to change the previously created files into a format that the RSoft Software can use. (Note that we refer to this as a 'ray-tracing conversion', although the ZEMAX result is a Physical Optics Propagation and therefore not a ray-tracing result per se.) From here we will convert the files that were created in the earlier ray-tracing packages. Be sure to save the relevant files from the ray-tracing tools to the appropriate working directory where the index file is located.

Set the selection to be from ZEMAX to RSoft and then use the appropriate menus to set up the zpf file to be used as shown in Fig. 9.

Figure 9: Ray-tracing utility converter setup for ZEMAX
Figure 9: Ray-tracing utility converter setup for ZEMAX

Press OK to convert the file and view the plot of the conversion.

Figure 10: Converted Field
Figure 10: Converted Field

Please note that the corresponding data file is complex, and contains phase information as well. The phase information for this specific case is displayed in Fig. 10. To display this plot, select Edit/View and then change the output to read the @odd information instead of the @even data.

Figure 11: Phase information for converted field
Figure 11: Phase information for converted field

Setting up the Launch Field
Finally, we have to use these converted fields as the input source. Go back to the RSoft CAD, and press the Edit Launch Field icon. Set the launch parameters to look like that of Fig. 12 and then press OK.

Figure 12: Launch Parameter Settings for ZEMAX Imported File
Figure 12: Launch Parameter Settings for ZEMAX Imported File

Running the Simulation
Press the Perform Simulation icon and set the Display Mode to Contour Map XZ. Press the Output button and set the window to look like Fig. 13.

Figure 13: Output settings
Figure 13: Output settings

Press OK to go back to the simulation window. Enter bpoutput in the Output Prefix box and then press OK run the simulation.

Figure 14: Simulation results using a launch field generated and translated from ZEMAX
Figure 14: Simulation results using a launch field generated and translated from ZEMAX

As we can see, the coupling from this lens from ZEMAX has about a 77% coupling into this particular fiber.

Note also that data can be easily converted from RSoft format to ZEMAX:



so that an easy bi-directional interface exists betwen the two codes.