Simulating Conjugate Heat Transfer Multiphysics With HELYX

Machine Learning for Accelerated Aero-Thermal Design in the Age...

March 2, 2020 Comments (2) Views: 6081 HELYX, Video, Webinar

Automating CFD Analysis Tasks with PYTHON and HELYX

Increase simulation agility, improve team efficiency, and reduce costs by automating computer aided engineering (CAE) tasks.  This is especially true for computational fluid dynamics (CFD) analysis tasks, where routine workflows can be systematically analyzed, built into best practices, and refined. These routine tasks are present across industry and can range from:

  • Wind loading analysis on buildings to evaluate forces on building given various wind conditions    
  • External vehicle aerodynamics analysis and report generation of results.
  • Yaw angle analysis or aero-mapping of a vehicle over different conditions and ride heights
  • Parametric studies to evaluate several different designs within the same test conditions
  • Mesh sensitivity studies to evaluate the influence of meshing parameters on simulation results
  • Optimization efforts to maximize heat transfer multi-physics and thermal performance of a design    

With the development of best-practices comes:

  • Reduction in costs and an increase in efficiency
  • A tool to consistently apply expert knowledge and decrease human error
  • A well-designed and well thought out approach to extract design critical data, enhancing the engineering design process
  • A standardized approach that can be shared among teams to accomplish larger and more complex simulation campaigns

Though automation is an attractive solution, the cost of creating and executing the automation need to be less than executing tasks by hand.  Leveraging common programming tools like PYTHON and providing methods to reduce implementation and maintenance costs ensure automation barriers are lowered enough to justify adoption.  

Lowering the Barriers to Automation

Production use of automation can only be achieved when it’s resource efficient.  Three ways to lower the barriers to process automation are:

  • Using an expressive and feature-rich macro language to drive tasks.  HELYX enables automation via a PYTHON based Macro language to drive pre-processing, meshing, case setup, solving, and post-processing.  Utilizing a diverse and continually evolving language like PYTHON, provides a rich set of third-party libraries for scientific data management and analysis. 
  • Enabling users to build macro scripts easily. This is achieved with documentation; macro language coupling with integrated development environments (IDE); and allowing automatic script creation via “journaling” within the simulation software interface.  HELYX provides documentation outlining the usage of the macro language, within the HELYX GUI User Guide to facilitate the basic understanding of the PYTHON Application Programming Interface (API).  To speed up the macro creation process, HELYX leverages a journal feature to automatically write PYTHON scripts while users perform actions within HELYX GUI.
  • Facilitating customization and execution of scripts.  After a script is built within the journaling process, users can easily edit scripts in any text editor.  This customization enables streamlining; using third-party PYTHON based libraries; and/or other CAE tools to drive advanced simulation workflows.  In addition to customization, advanced features within HELYX enable large scale simulation, driven by PYTHON on HPC resources with relative ease.  

Beyond HELYX, there are complementary tools that can be leveraged with your HELYX Macro building (Table 1).

Table 1: Short list of complimentary tools with PYTHON API

FreeCAD Open-Source CAD software with 3D parametric modelling capability and PYTHON Journaling.
OpenCascade Open-Source CAD kernel with PYTHON API to perform CAD related tasks
Rhino 3D NURBS modelling software with PYTHON API and automation tools
Pointwise Structured and unstructured mesh generation software with a PYTHON API
GridPro Structured mesh generation software with a PYTHON API
Paraview Open-Source post-processing tool with PYTHON API and journaling capability
Blender Open-Source rendering engine with PYTHON API and journaling capability

HELYX can be used in conjunction with other preprocessing and post-processing tools to automate the CFD analysis process.  What other tools do you use that could enhance your CFD automation? 

Take Home Messages

Increase your simulation agility in HELYX by using the built-in macro language based on PYTHON to drive your CFD work. Users can record a journal of macro commands while they use HELYX and leverage this script to perform parametric studies, automate test cases, and carry out routine CFD analysis. The journaling feature within HELYX is key to lowering the barriers to automating individual steps of a CFD analysis (pre-processing, meshing, setup, solving, and post-processing).

Learn More by Watching the Webinar

In this webinar, we cover the basics of the macro language within HELYX and setup a motorbike external aerodynamics analysis using the macro language. You will see how the macro journal features can be used in the meshing, setup, solving, and post-processing steps of a CFD analysis within HELYX.

2 Responses to Automating CFD Analysis Tasks with PYTHON and HELYX

  1. […] wiebull, etc.) or latin hypercube sampling. These cases can be driven with python scripts and the macro language within HELYX. The pitfall is that you have numerous cases, redundant data (meshes, setup files, etc), and some […]