Jan 6, 2022
OpticStudio STAR Module: Ansys Data Export Extension

This blog article describes how to export FEA results from Ansys Mechanical using a custom extension from Zemax. The extension (available for download at request) helps streamline the export process with each FEA data properly named and formatted for immediate import into OpticStudio via the STAR Module. The extension makes it easy to keep track of the FEA datasets and which surface they should be assigned to in your optical design. The extension will work with both structural and thermal datasets.
The OpticStudio STAR Module streamlines the STOP analysis workflow by enabling users to load FEA data into OpticStudio and assess the impact on the optical performance of their designs. Keeping track of which FEA datasets are assigned to which optical surfaces is essential to correctly model the optical performance. With multiple optical elements and surfaces, naming the individual FEA datasets appropriately can quickly become a tedious and time consuming task.
Ansys ACT API makes it easy for users to create extensions and automate their workflow. Saving FEA datasets with a consistent naming scheme is an ideal example of where scripting can help improve the processing speed and reduce human error.
During the development of the STAR Module, our team quickly realized this opportunity and began working on an extension for the Ansys FEA platform that we were using. We built an Ansys user-extension which helped us to keep track of the surface name, the FEA data type, and the reference coordinate system. Using the extension culminated in a workflow that reduced the number of mistakes made during the testing process. To help our users streamline their STOP analysis workflow further, we now provide this extension as a courtesy to our customers so they can use it in Ansys to export FEA data to the OpticStudio STAR Module.
Overview
This extension reads surface deformations as well as volume temperature profiles. It creates output datasets as .txt files in a separate folder inside the user files folder of the Ansys workbench project directory. The columns are tab-delimited and describe the node position followed by the deformation or temperature. The results are exported along with any solve/result evaluation.

The extension is intended to be used in a structural analysis where a temperature profile has been imported. With this type of analysis, the extension can export both deformations and temperatures from the same analysis. If no temperature profile has been assigned, a uniform body temperature will be exported. They now contain a uniform temperature based on the environment setting. It is possible to use the extension within a thermal analysis, but this will only provide temperature files.
Analysis Type |
Mirror Export |
Lens Export |
Static Structural |
Fully Supported |
Fully Supported |
Transient Structural |
Fully Supported |
Fully Supported |
Eigenvalue Buckling |
Fully Supported |
Fully Supported |
Explicit Dynamics |
Not Supported |
Not Supported |
Harmonic Response |
Fully Supported |
Fully Supported |
Modal |
Fully supported |
Only for defined Timestep |
Random Vibration |
Fully supported |
Only for defined Timestep |
Response Spectrum |
Fully Supported |
Fully Supported |
Rigid Dynamics |
Not Supported |
Not Supported |
Topology Optimization |
Not Supported |
Not Supported |
Steady-State Thermal |
Not Supported |
Only Temperature Export |
Transient Thermal |
Not Supported |
Only Temperature Export |
Installing the Export to STAR Extension in Ansys
In the Ansys Workbench environment, click ACT Start Page in workbench menu.

In the ACT Start Page, click Manage Extensions.

In the Extension Manager, click the ‘+’ in the upper-right corner to install a new extension.

In the Explorer window, locate the Export to STAR.wbex file and click Open.

If you see this error message:

try switching your windows regional format to “English (United States)”, restart Workbench, click ACT Start Page, and start again.

After the extension has been installed, click the extension in the Extension Manager to load the extension. The extension should become highlighted in green.

Close the ACT Start Page to return to your Workbench Project.

The Export to STAR extension has now been installed into Ansys.
Using the Export to STAR Extension for Ansys
If the installation of the extension was successful, you should now see an Export to STAR tab in the ribbon at the top of your Ansys Mechanical window:

There are two different export buttons:
- Export Mirror Data gets the deformation data for a single surface and is inactive in a thermal analysis.
- Export Lens Data has two different functionalities depending on the analysis type:
- In structural analyses it inserts an Export Lens to STAR object into the result, which gets the deformation data of two surfaces as well as the thermal data of the selected volume.
- In thermal analyses it inserts an Export Temperature to STAR object into the result, which only gets the thermal data of the selected volume.
In the following section only the Export Lens to STAR functionality is described, as it covers all the options for Export Mirror to STAR and Export Temperature to STAR as well.
In the Graphics Toolbar, enable Body mode.
In the graphics area, select the body of the optical component you want to export the data from. This step is important. Skipping it will otherwise lead to exporting the temperature data for the entire assembly.

On the Export to STAR tab of the ribbon, click Export Lens Data.

Once the Export Lens to STAR entry is inserted in the solution tab, select the front surface of the component, and apply to Front-Surface../Geometry.
To do so, first click the yellow box next to Geometry.

Next, click the front surface of the lens in the graphics area, and then click Apply.

Repeat the previous steps for the back surface of the lens.
Define the Front Surface Zemax ID using the row number of the surface in the Lens Data Editor in OpticStudio.

Define the Front Coordinate System (select the same one for all if you want to use global coordinates).

Repeat the process and define back surface information.
Define the timesteps that are desired:
- All Timesteps – several folders will be created
- Define Timestep – select timestep range
If Defined Timestep is selected, choose the appropriate timestep definition.

Enter the timestep you want to export the data from.

When all entries have been added to the solution tab, click Evaluate All Results to start the export.

This will create .txt files in the user files folder of your workbench project directory for each surface and volume selected . Your FEA data is now ready to be loaded into the STAR Module in OpticStudio!
Version History
Extension Version | Notes (each version added functionality on top of the previous one) |
v1.0 |
(no binary extension available) exports temperature and deformation only from structural analyses for lenses only.
|
v1.1 |
exports temperature and deformation only from structural analyses for mirrors and lenses (this was never attached to the KBA).
|
v1.2 |
exports temperature from both thermal and structural analyses (except for Ansys 2021R2, where temperature can only be exported from thermal analyses).
|
v1.3 |
exports data in batch mode as well (updating your Workbench project works additionally to evaluating results in mechanical).
|
In conclusion, by streamlining the process to export FEA data, the optical and mechanical design teams can collaborate to accomplish STOP analysis inside of OpticStudio via the STAR Module. This extension makes it easy to keep track of the different datasets and which optical surfaces they are assigned to. It not only helps reduce the effort on Ansys FEA data exporting and STAR FEA data loading, but also helps eliminate human error in the process and improves the overall efficiency of the STAR workflow.
To try OpticStudio, the industry standard for optical design software, request a free trial.
Authors:
Esteban Carbajal
Senior Product Manager
Zemax an Ansys Company
Matthias Schlich
FEA Engineer
Zemax an Ansys Company