Jump to content
Go to homepage

OpenFOAM Con­nec­tion: Introduction

openfoam_connection_featuredimage

Hi together,

This post gives you a very quick overview of con­nect­ing OpenFOAM® to CAESES® for the purpose of CFD automa­tion. In general, con­nect­ing an external software to CAESES® only takes a few minutes, and with this you can imme­di­ately conduct design explo­rations and shape optimizations.

For more infor­ma­tion, check out the tuto­ri­als and example projects that are included in CAESES® and CAESES® Free. The forum also contains a lot of OpenFOAM® related posts that might help you to get started with it. 

There We Go: An Example

Let’s consider a simple design study of a pro­peller where the para­met­ric blade geometry has been modeled in CAESES®. You can change the diameter and the number of blades, and you can actually modify the shape through radial func­tions for the 2D profile para­me­ters (thick­ness, chord length, camber,…). 

openfoam_connection_blade_objecttree

Software Con­nec­tor

As soon as the geometry model is ready, a new software con­nec­tor is created in CAESES®. First of all, you need to specify the input geometry, i.e. the blade patches given as colored STL data. Just drag & drop the blade into the con­nec­tor. Secondly, provide the script files (allrun.pre, dicts, …) of your OpenFOAM® setup. Since you also want to see some CFD results in CAESES®, finally add the result files to the con­nec­tor that get written by OpenFOAM® or by addi­tional tools such as GnuPlot. Examples are table data, *.foam and *.png files. 

openfoam_connection_swc

Full Control

The script files can also be para­me­ter­ized to change the values in these files. You need to create an entry in your script file as well as a para­me­ter in your CAESES® project. With para­me­ters, you can nicely control OpenFOAM® through the CAESES® GUI. The values of the para­me­ters are auto­mat­i­cally replaced in the script file as soon as the software con­nec­tor i.e. the com­pu­ta­tion gets trig­gered. Note that this allows you to conduct not only geometry studies, but also simple para­me­ter studies of your setup. CAESES® auto­mat­i­cally parses ASCII files and high­lights numbers for quick creation of such entries. 

openfoam_connection_template

Exe­cutable

We still need to tell CAESES® about the exe­cutable file. In our example, the Allrun” script is just another input script that gets auto­mat­i­cally copied into the current design direc­tory. From there, it will be trig­gered later on. Create a local appli­ca­tion and set the Allrun” script as exe­cutable. Ready! 

openfoam_connection_executable

Results and Post-Processing

Now you can run an auto­mated design study using a design engine (LHS, Sobol,…). As soon as CAESES® has finished this run, you can take a look at the result files and browse through the variants. This is the fun part because the entire variant man­age­ment happens in the same GUI! CAESES® comes with post-pro­cess­ing func­tion­al­ity to create grid plane cuts, stream­lines, contour plots and much more. In addition, you can use the design viewer to compare the dif­fer­ent design can­di­dates side-by-side. With version 4.0 of CAESES®, not only geometry variants and screen­shots can be compared, but also external *.png-files are auto­mat­i­cally loaded into the design viewer (see last screenshot). 

openfoam_connection_contourplot
openfoam_connection_postprocessing
openfoam_connection_designviewer

More articles

Latest from the blog

All articles

Stay up to date

Receive latest news to your inbox.

Subscribe to newsletter