STOP Analysis of high-power laser systems - part 5

High power lasers are widely used in a variety of applications, such as laser cutting, wielding, and drilling etc. The effect caused by absorption laser light in the optical system is noticeable. The performance of such optical systems will be degraded by heating from the high power laser, either due to bulk absorption of the lens materials or surface absorption via coatings. Modeling of such effects is necessary to ensure the focal length stability and the laser beam size and quality. In this series of 5 articles we are going to simulate laser heating effects, including the change of refractive index due to the increased temperature in the lens materials, as well as the structural deformation caused by mechanical stress and thermal elastic effect.

Authored by: Julia Zhang, Hui Chen, Steven La Cava & Chris Normanshire


Article attachments

Analyzing STOP effects with the STAR module

Once a structural and thermal has been performed in your FEA package the data can be exported to a series of simple text files for easy import into OpticStudio with the STAR module. From there the full suite of OpticStudio analyses is available to help you quantify and understand the impact on the optical performance of the system. Full details of the required STAR data format can be found in the OpticStudio Help files The STAR Tab > FEA Data Group > Load FEA Data. For Ansys Mechanical there is ACT extension available to automatically output data in the correct format. See OpticStudio STAR Module: Ansys Data Export Extension.

Loading and Fitting FEA data in OpticStudio

Note: these steps require that you have a STAR Module license as well as OpticStudio.

  1. Firstly, open the file 'Lens-3P_D25.4_2022.zar' from the article downloads. This is our original sequential optical system from part 1 of this series. We'll use the STAR module to apply structural and thermal data, from our FEA tool, and assess the impact on the nominal optical performance.
  2. To Load FEA data click STAR…FEA Data…Load FEA Data. Browse to the location of your data, select all relevant files and click Open. Sample data FEA can be found in the article downloads. There are several folders with data from different time points in the analysis. Initially we'll use data from the folder 'FEA_Data_800W_0010s'. image136.png
  3. Use the dropdown menus to assign Structural and Thermal datasets to correct surfaces. Ensure ‘FEA Coordinate System’ is set to ‘Global for each surface. Then, check whether the datasets are aligned well in the layout and click OK to fit the data.



  1. The fit error can be checked through the Fit Assessment tool for each dataset. By default, the Rigid Body Motions (RBMs) within each data set are removed before the fitting the surface deformation. This typically improves fit accuracy, but the user has full control of this setting.
  2. The FEA dataset can be enabled or disabled for individual surfaces in the Structural Data Summary and Thermal Data Summary table.image144.png
  3. With the STAR data enabled, we can check the analysis windows to see the impact of the FEA data on system performance, such as Wavefront Map, Spot Diagram, and Sag Map analysis.



ZOS-API import of FEA data into STAR and analysis of optical performance

We’ve shown how simple it is to manually import FEA data into STAR. An alternative is to use the power of the STAR API to automate the process. This can be particularly useful where, for example, there are multiple FEA data sets to analyze. In this section we will demonstrate how to load the FEA data for multiple time-steps of our FEA simulation using a Matlab script. This script ‘TransientAnalysis.m’ is included in the article attachments.

Functions included in the code

Six functions are created within the code. Brief descriptions are provided below.


ListFiles() takes the data folder as the input string argument. It reads the filenames inside the data folder and recognizes surface number and whether it is a deformation or temperature file based on the naming rule. The output items are a structure Data, and an integer file number, which is the count of files in the folder.   

RemoveAllFEA() is a function to remove all the imported FEA data from the current system. It checks whether temperature or deformation dataset is imported for each surface, and then unload those already imported data.

   Surface = TheLDE.GetSurfaceAt(i);


    if StarData.Temperatures.FEAData.AreTemperaturesImported   


       fprintf("Remove Temperature Data @ surface %d\n",i)


    if StarData.Deformations.FEAData.AreDeformationsImported


       fprintf("Remove Deformation Data @ surface %d\n",i)


FEALoad() is used to import and load the deformation and temperature datasets from a data folder. It is necessary to first unload the imported data then import and apply the new FEA data, or the result will not be updated as expected.. The coordinates of the FEA dataset can be transformed as global or local for each surface. Optionally the fit settings can be configured before the fitting, such as Remove RBMs before fit for structural data, and set GRIN Step for thermal data. Note that the method ImportDeformations()/ImportTemperatures() not only import the data, but also perform data fit, therefore all the fit settings should be configured before this method.

  if StarData.Deformations.FEAData.AreDeformationsImported

       StarData.Deformations.FEAData.UnloadData() ;






if StarData.Temperatures.FEAData.AreTemperaturesImported

       StarData.Temperatures.FEAData.UnloadData() ;



StarData.Temperatures.Fits.GRINStep=0.2;   StarData.Temperatures.FEAData.ImportTemperatures(TemperatureFilename);


SpotDiagram() uses a code snippet from ZOS-API syntax example 22_seq_spot_diagram to plot spot diagram at image surface. The code includes the following steps.

Open the batch ray trace tool:

raytrace = TheSystem.Tools.OpenBatchRayTrace();

Perform a batch unpolarized ray trace, using normalized pupil coordinates:

normUnPolData = raytrace.CreateNormUnpol((max_rays + 1) * (max_rays + 1),ZOSAPI.Tools.RayTrace.RaysType.Real,nsur);


Use for loop to add rays to be traced:

normUnPolData.AddRay(waveNumber, hx, hy_ary(field), px, py, ZOSAPI.Tools.RayTrace.OPDMode.None);

Run the ray tracing tool and start reading the results:



Use a conditional while loop to read results from rays:

[success, rayNumber, errCode, vigCode, x, y, ~, L, M, N, ~, ~, ~, ~, ~] = normUnPolData.ReadNextResult();

WavefrontMap() is used to get wavefront map data from the system and plot the results. The code includes the following steps.

Create new wavefront map and get settings from this analysis:



Configure settings for the analysis:




WavefrontSettings.STAREffects= ZOSAPI.Analysis.Settings.STAREffectsOptions.On;

Apply settings and get results from the analysis:


WavefrontMap_Results = WavefrontMapAnlysis.GetResults();

For 2-D results, use DataGrids to retrieve the results:  

analysis_data =WavefrontMap_Results.DataGrids(1);




for x=1:1:Nx

    for y=1:1:Ny




SagMap() is used to get sag map data for the current system and plot the results. The code includes the following steps.

Create new sag map analysis and get settings from this analysis :



Configure settings for the analysis:




Apply settings and get results from the analysis:


SagMap_Results = SagMapAnlysis.GetResults();

For 2-D results, use DataGrids to retrieve the results: 

analysis_data =SagMap_Results.DataGrids(1);




for x=1:1:Nx

    for y=1:1:Ny




Get analysis of optical performance by using the created functions 

To perform the transient analysis for the system, temperature and deformation files are acquired from FEA software for different surfaces at different time steps. In this case 10, 60, 600, 1800 and 3600 seconds.



In the main function, the existing FEA dataset will be removed from the system first, then the temperature and deformation files from a time step folder are imported into the system. The Spot Diagram and Wavefront Map analyses are performed and results plotted in Matlab.  







Save as GIFs

There is another function used to save the frame analysis figures from each timestep folder into a graphic file, in gif format.   

function SaveGif(figure,outputname,i)




 if i==0






With for loop and the function SaveGif, the transient analysis results can be acquired.

Using the ZOS-API code

This is an interactive code. It is necessary to enable the STAR license from Zemax License Manager.

  1. Open the sequential lens file.
  2. Click on Interactive Extension under Matlab to generate the interactive connection boilerplate code.image158.pngimage160.png
  3. Click Programming…ZOS-API.NET Applications…Interactive Extensionimage162.png
  4. Open the interactive code TransientAnalysis.m in MATLAB and adjust the following sections accordingly to customize your code:


  1. Run the code and the following gif files will be generated.


Below is an example of the outSpot.gif to show the Spot diagram evolvement for the nominal, 10s, 60s, 600s, 1800s, and 3600s time intervals.


Here is an example of the outWavefront. This Gif to shows the evolution of the wavefront map from the nominal system through the five time steps.


Results & Analysis

After loading both the Structural and Thermal FEA dataset into the system, we can then examine the effect of FEA data on system performance. For example, let’s look at the system with 10 sec laser exposure.  Our nominal system is diffraction-limited as indicated by the Through focus RMS spot radius curve below.


We can add to the same plot the RMS spot radius through focus for the 10s laser exposure with only the thermal gradient effect in place, and also the 10s laser exposure with both structural deformation and the thermal gradient in place. As you can see, exposure to a high-power laser beam for 10 sec has completely destroyed the system performance. The RMS spot size grows from a few microns to almost 300 um.


Additionally, when analyzing the on-axis chief ray position on the image surface in the 10s exposed system, we notice that the chief ray has shifted significantly. REAR operand returns the radial position of the on-axis chief ray and it moved 109 um away from its nominal position. This results in the boresight error (BSER operand) which describes the angular deviation of the formed image.


If we re-focus the system using the Quick Focus tool, the image plane shifts by nearly 4mm and performance improves. We now see a smaller spot size and lower wavefront error but the performance is still far from being diffraction-limited. However, with the large amount of defocus removed, we can now observe some of the finer details in the wavefront map due to the thermal and structural effects.


Next, we’ll compare the wavefront error in the nominal system vs wavefront error in the system at 5 time steps, 10, 60, 600, 1800, and 3600 sec, respectively.


Based on the results, going from nominal to 10 sec laser exposure, we observed a significant increase in RMS spot radius and RMS wavefront error. This performance degradation is caused by the thermal elastic and thermal optic effect of laser heating. As time increases, it’s possible that the heat becomes more evenly distributed through the system resulting in more uniform/smoother changes in the optics’ shape and index gradient. This might have contributed to the smaller spot size and lower RMS wavefront error for longer exposure time.

STAR module also provides a tool, System Viewer for you to view the index gradient distribution in the lens volume. Below we show the Index gradient distribution at 5 time intervals, 10, 60, 600, 1800, 3600 seconds, respectively.


In this system the thermally induced effects result in a significantly larger focused spot and reduced system efficiency. These effects could be mitigated by changing to higher transmission optical coating, or modifying the system housing to improve the cooling. The workflow enabled by OpticStudio, OpticsBuilder and STAR makes it straightforward to evaluate such design enhancements and iterate quickly to the optimum solution.


In this article we demonstrate an end-to-end workflow of Structural, Thermal, and Optical Performance analyses using OpticStudio STAR module. We start with an optimized Sequential system, export to OpticsBuilder for opto-mechanical design, import back to OpticStudio Non-Sequential Mode, perform ray trace and use Detector Volume to capture the absorbed flux on each element due to laser heating. The results are then exported from OpticStudio Non-Sequential mode and shared with the FEA engineer for FEA analysis. After the FEA analysis is done, we use the STAR module to bring the structural and thermal FEA results back into OpticStudio Sequential mode to analyze performance degradation caused by laser heating.

The STAR module for OpticStudio provides a new capability to directly integrate FEA results into OpticStudio. This allows a more comprehensive study of the impact due to both the thermal and the structural deformation caused by laser heating.

In combination the Zemax suite of tools, OpticStudio, OpticsBuilder, and STAR Module, enables design teams, to seamlessly integrate FEA data into their optical and optomechanical design workflow. In addition, the STAR API helps engineers streamline and automate the whole process.


Was this article helpful?
1 out of 1 found this helpful



Article is closed for comments.