May 3, 2017


Turbine Design in ANSYS

Turbine Design in ANSYS – Part 1: MATLAB Coupling

Most engineering companies use a software for design and calculation. I fact, Excel is probably the most used engineering software in the world. ANSYS allows for connection between a wide range of external tools and ANSYS workbench. The easiest program to connect is Excel, where there exists a special external connection module. To connect other programs involve slightly more work, however this is also readily performed using a couple of scripts. Detailed information can be found in the documentation“ Workbench External Connection Add-In” from the ANSYS web page.

The goal of this blogpost is to illustrate how an external design tool for the Hydropower industry can be implemented in ANSYS Workbench, and use all the optimization procedures available.

The External Solver
Turbine design is mainly governed by the Euler equations. Data from the individual power plant as well as empirical rules are also heavily influencing the design process. Interested readers can find a design procedure in [1]. In this example, we will use a MATLAB based code implemented by the Hydropower Laboratory at NTNU. The software uses a graphical user interface (GUI), that allows for individualization of the blade design. What we want to do is extend this to include simulation and testing on the designs.



ANSYS – MATLAB coupling
Three components are needed for integration of a MATLAB program in ANSYS.

1. A MATLAB code, preferably parameter based. What this means is that the code should have the following form:
output parameter = program name (input parameter)
This way, a python (or similar) script can run the program without human interaction.

2. An .xml file defining the component in ANSYS Workbench. In this file you can name your workbench component, define supported file formats, list input/output parameters and most importantly, run a python script.

3. A python script able to run MATLAB.

Little to no experience in Python is needed, example .xml and python scripts can be found online. The above procedure will create a component in ANSYS workbench that can be coupled with other installed components. In this example, the turbine geometry is designed in MATLAB, then sent to TurboGrid where the design is meshed. Information about number of turbine blades, inlet/outlet domains is also easily transferred. The mesh is then sent to CFX together with information about boundary conditions and more from the MATLAB code. A workbench project can therefore look like below, where we have called our new component “BladeDesign”:

Results from the simulations can be sent back into the external design tool. In the next blogposts, we will build on this external coupling by creating Hill-Diagrams on the new turbine designs, and finally use the built-in optimization routines available.


[1] H. Brekke, “Pumper & turbiner,” Vannkraftlaboratoriet NTNU, 2003.

Watch video here!


More info/ Call me