OpticStudio STAR Module: Ansys Data Export Extension

This 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.

Authored By Esteban Carbajal and Matthias Schlich

 

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.

mceclip1.png

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.

NOTE: While the extension provided here only works for Ansys, the STAR module will accept FEA data from any FEA package.

NOTE: This extension was developed and tested using English as the language setting in Ansys Workbench. Problems may occur when using other language settings in Ansys Workbench. (Also, the Ansys analysis name and folder name for the exported files must be in alphanumeric characters).

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.

mceclip2.png

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.

mceclip3.png

In the ACT Start Page, click Manage Extensions.

mceclip4.png

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

mceclip5.png

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

 mceclip6.png

If you see this error message:

mceclip7.png

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

mceclip9.png

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

mceclip10.png

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

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:

mceclip13.png

There are two different export buttons:

  1. Export Mirror Data gets the deformation data for a single surface and is inactive in a thermal analysis.
  2. 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.

mceclip14.png

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

mceclip15.png

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.

mceclip16.png

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

mceclip17.png

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.

mceclip18.png

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

mceclip19.png

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.

mceclip20.png

Enter the timestep you want to export the data from.

mceclip21.png

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

mceclip22.png

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!

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.

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

Comments

0 comments

Article is closed for comments.