Large-Eddy Simulation & Detached-Eddy Simulations and
Machine Learning using a Python CFD code
The traditional method for CFD in industry and universities is Reynolds-Averaged Navier-Stokes (RANS). It is a fast method and
mostly rather accurate. However, in flows involving large separation regions, wakes and transition it is inaccurate. The reason
is that all turbulence is modeled with a turbulence model. For predicting aeroacoustic, RANS is even more unreliable.
For these flow, Large-Eddy Simulation (LES) and Detached-Eddy Simulations (DES) is a suitable option although it is much more
expensive. Still, in many industries (automotive, aerospace, gas turbines, nuclear reactors, wind power) DES is used as an alternative to RANS.
In universities, extensive research has been carried out during the last decade(s) on LES and DES.
Unfortunately, most engineers and many researchers have limited knowledge of what a LES/DES CFD code is doing. The object of this
on-line course is to close that knowledge gap. During the course, the participants will learn and work with an in-house LES/DES code called
pyCALC-LES, written by the
lecturer. It is a finite volume CFD code written in Python.
The numerical procedure is based on an implicit, fractional step technique with pyamg [17] --
an AMG multigrid pressure Poisson solver -- and a non-staggered grid arrangement. If your computer has a compatible Nvidia
graphics card, you can choose so solve the on the graphics card using pyamgx [17]
The second half of the course will be dedicated to Machine Learning. The Machine Learning models that will be used are
Neural Network (NN), binary search trees (KDTree) and Physical Informed Neural Network (PINN).
They are all available as Python modules. NN will be used for improving wall functions and turbulence models,
KDTree will be used for improving wall functions and PINN will be used for improving turbulence models.
The Python CFD code is fully vectorized.
It is reasonably fast. The user can choose to run fully on the CPU or the GPU or use the GPU only when
solving the equation system (the sparse matrix solver). On an eight million mesh,
pyCALC-LES using IDDES runs 70 times faster on the GPU than on the CPU on a 2.3M grid. It
is mainly a research code with which only simple geometries can be
handled (one-block structured curvi-linear grids in the x-y plane and Cartesian in the z direction)
Below I list some of the flows that have been computed using pyCALC-LES (see some figures below):
- Diffuser flow using a wall-function based on Neural Network. IDDES is used and the predicted skin-friction
is compared with IDDES with y+ 1. Mesh 525x70x48. 10 000 time steps. The computation time is
8 hours (it runs fully on the GPU).
- Windtunnel flow with a noise reducing fairing, Uin=16m/s (air). LES, WALE model. Domain 1X0.25X0.25 m3.
7500 timesteps (3 750 to reach fully-developed conditions
+ 3 750 for time-averaging). Mesh 256x200x200 (10M cells).
The computation time (pressure equation is solved on the GPU) on an Alienware x17 R1 laptop is 40 hours.

THE ON-LINE COURSE
The course includes lectures (12 hours) and workshops (12 hours) learning and using pyCALC-LES. The
course is given 30 June, 2, 4 July 2025.
The lectures will be given on-line (Live) using Zoom. During the workshops, the participants will get
supervision in a joint Zoom room which will enable participants to learn from each others questions. Part of the supervision
may also be given in individual break-out Zoom rooms.
Zoom
In the lectures we will address:
- finite volume discretization
- Smagorinsky model
- WALE model
- the k-eps DES model
- two-equation PANS model (k and epsilon)
- wall and periodic boundary conditions
- how to prescribe turbulent inlet boundary conditions
- how to generate inlet anisotropic synthetic turbulent fluctuations
In the lectures on Machine Learning (ML) we will address:
- How to use Neural Network (NN) for improving wall functions [23,26]
- How to use NN for improving turbulence models [23,26]
- How to use search binary trees (KDTree) for improving wall functions [26]
- How to use Physical Informed Neural Network (PINN) to Improve a Turbulence Model [27]
- Import the developed NN, KDTree and PINN models into pyCALC-LES
- Carry out simulations with pyCALC-LES using the improved models
In the workshops, the participants will use pyCALC-LES
and make ML models using Python.
The participants will get the pyCALC-LES source CFD code and install it on their lap-top or desk-top.
|