Mixed Mode in Zemax: Beginner’s Guide to Non-Sequential Components
Skip to main content

Zemax has two main modes for ray-tracing an optical system: Sequential Mode (Beginner Sequential Mode Blog) and Non-Sequential Mode (Beginner Non-Sequential Mode Blog).

  • Sequential Mode is ideal for analyzing imaging systems. There are dozens are useful features and operands to design, analyze, and tolerance an imaging system where light travels through surfaces in a fixed, consecutive order.
  • Non-Sequential Mode is a 3D CAD environment ideal for illumination, stray light, and optical systems needing multiple independent sources (like an array). Light can scatter, split, reflect, transmit to any surface. 

The two Modes described above fit a large category of optical systems, but what if the optical system does not neatly fit into one category. That's where Mixed Mode becomes useful. It allows you to combine the precision of Sequential Mode with the flexibility of Non-Sequential Mode.

In this Blog, an example of using Mixed Mode will demonstrate the basic settings needed to copy this workflow for your own needs, and a few tricks to help.

Downloadable Files

Mixed_Mode_Example_File.zip

1. Mixed Mode Example: Start

Open a fresh OpticStudio in Sequential Mode. Add your Aperture Settings and initialize your project.

 

2. Add a Non-Sequential Component Surface Type

The Non-Sequential Component Surface is how these two modes interact. The Non-Sequential Component Surface Type must be defined in Both Sequential Mode and Non-Sequential Mode.

The rays begin in Sequential Mode then approach the Entrance Port of the Non-Sequential Component. After the Entrance Port the rays propagate Non-Sequentially and then approach the Exit Port. Once the rays leave the Exit Port we are back in the Sequential Mode.

The rays will propagate from surface 0 to surface 1 to surface 2. Surface 2 global location is where the Entrance Port is defined. Parameter 1 through 6 define the global location of where the Exit Port.

  • Sequential Mode:
    • Parameter 0: Draw ports? 1 draws only the Entrance Port. 2 draws only the Exit Port. 3 draws both.
    • Parameter 1: Exit Location on the X-axis with respect to Entrance Port (Surface 2).
    • Parameter 2: Exit Location on the Y-axis with respect to Entrance Port (Surface 2).
    • Parameter 3: Exit Location on the Z-axis with respect to Entrance Port (Surface 2).
    • Parameter 4: Exit Tilt X-axis.
    • Parameter 5: Exit Tilt Y-axis.
    • Parameter 6: Exit Tilt Z-axis.
    • Parameter 7: Order of locations and tilts. (Idea is that a Tilt then Decenter is NOT the same as a Decenter then a Tilt).
    • Parameter 8: 0 is refractive and 1 is reflective.
    • Parameter 9: Back Propagate before entering the NSQ Component Surface.

 



  • Non-Sequential Mode:
    • Define geometry, material, coatings, etc...

In order to define the geometry of the Non-Sequential Component click the Non-Sequential Editor by going to Setup -> Editors -> Non-Sequential.

Once we are in the Non-Sequential Component Editor: Component Group on Surface 2, find an object type and define.

Add your material, coatings, scale, and position the NSQ Object appropriately. Here we are using a pre-defined Polygon Object 30_60_90.POB. 

Don't worry if it looks weird, we have not defined the Exit Port yet (which is defined back in the Sequential Editor).

 

Now place the Exit Port in the correct location. Here we can try and eye-ball it and later we will show how to center the Exit Port on the chief ray.

Click the Lens Data Editor.

Use Parameters 1-6 on Surface 2 to place your Exit Port. I used 0 for X-Loc, -40 for Y-Loc, and 76 for Z-Loc (relative to Surface 2).

We now have a Mixed Mode Simulation.

 

 

3. Center the Exit Port to the Chief Ray (or any ray).

Last we need to place our Exit Port at the center of the beam. I will show a trick that does this with a Merit Function Operand.

Use REAY and REAX.

REAX Real ray x-coordinate in lens units at the surface defined by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".
REAY Real ray y-coordinate in lens units at the surface defined by Surf at the wavelength defined by Wave. See "Hx, Hy, Px, and Py".

 

All 0's in the Field and Pupil Coords. will give us the Chief Ray. Not that the Exit Pupil must already be close the optimal position otherwise the optimize will diverge to a non-sensical solution.

Your Variable will be the in the Non-Sequential Component Editor: Component Group Surface 2. We are going to adjust the position of the NSQ object relative to the Entrance and Exit Ports to find the optimal position.

Before Optimization:

After Optimization: (Click Optimize tab -> Optimize!) - Remember to add weights to your operands.

Now we can change the size of the Exit Port using surface 3 Semi-Diameter to make sure we are not vignetting.

 

Downloadable Files

Mixed_Mode_Example_File.zip

 

Ozen Engineering Expertise

Ozen Engineering Inc. leverages its extensive consulting expertise in CFD, FEA, optics, photonics, and electromagnetic simulations to achieve exceptional results across various engineering projects, addressing complex challenges such as antenna design, signal integrity, electromagnetic interference (EMI), and electric motor analysis using Ansys software.

We offer support, mentoring, and consulting services to enhance the performance and reliability of your electronics systems. Trust our proven track record to accelerate projects, optimize performance, and deliver high-quality, cost-effective results. For more information, please visit https://ozeninc.com.

If you want to learn more about our consulting services, please visit: https://www.ozeninc.com/consulting/

CFD: https://www.ozeninc.com/consulting/cfd-consulting/ 

FEA: https://www.ozeninc.com/consulting/fea-consulting/ 

Optics: https://www.ozeninc.com/consulting/optics-photonics/ 

Photonics: https://www.ozeninc.com/consulting/optics-photonics/ 

Electromagnetic Simulations: https://www.ozeninc.com/consulting/electromagnetic-consulting/ 

Thermal Analysis & Electronics Cooling: https://www.ozeninc.com/consulting/thermal-engineering-electronics-cooling/

Post by Charles Taylor
Sep 22, 2025 1:43:09 PM