Computational Engineering International, Inc. (CEI) originally developed a suite of products that included EnSight and was acquired by Ansys in 2017. EnSight is a market leading post-processor for Computational Fluid Dynamics (CFD) with multiphysics visualization capabilities. It is easy to use with a modern interface that has transient capabilities and can efficiently handle very large data sets, which are common in CFD simulations, especially transient ones.

EnSight has continued to improve their Python integration over the years and continues to lead in automation capabilities for the world of CFD post processing. Any action that takes place in EnSight is recorded in what is referred to as the command language. Whether the action is a zoom, translate, or rotate of the camera, or the creation of post processing objects like a clip plane, vector arrow plot, or contour – the action is saved in the command language. See below Command Panel:

The command language is a comprehensive journaling language in EnSight that contains all the detailed information associated with the operations or actions taken place in the current session. This command language can be converted into a Python script which can be executed using the built-in interpreter. The user will copy the commands to be converted into Python and paste them into a new file.

The actions are more human-readable in Python and allow for logic operations and loops. The user can make changes to the Python script as appropriate and save for use in other EnSight sessions to automate processes, which can be a huge time saver in certain situations. For example, if you need to create several post processing objects in EnSight for a variety of result files for use in a report, you will only need to do it once because you can reuse the commands for all results files.

Check out this YouTube video on automating the creation images of post-processing objects in EnSight using Python.

Utilizing the built-in Python interpreter in EnSight is a great way to automate repetitious post-processing procedures.

Author

  • Richard is a Senior Application Engineer in the fluids group at DRD Technology. Since joining the team in 2020, he has played a crucial role in delivering innovative solutions to complex fluid dynamics challenges. Richard holds both a B.S. and an M.S. in Mechanical Engineering from the University of Oklahoma, equipping him with a strong academic foundation to complement his practical experience.

    View all posts