LES
&
DES
3 day
ONLiNE COURSE
SWEDEN
 
28, 30 June, 2 July 2021


Large-Eddy Simulation
&
Detached-Eddy Simulations
using an in-House Python source 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. Currently, it includes two zero-equation SGS models (Smagorinsky and WALE) and two two-equation model (the PANS model and the k-omega DES moddl). It is rather small (1600 lines). The convective terms in the momentum equations are discretized using central differencing. Hybrid central/upwind is used for the k and eps equations. The Crank-Nicolson scheme is used for time discretization of all equations. 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.
The Python CFD code is fully vectorized and it only includes two DO-loops (the time loop and the global iteration loop). It is reasonably fast. Up to now, it has been used to compute the following four flows (see some figures below):
  • Channel flow. x+=17, z+=8. DNS (Reτ=500) using a 96x96x96 mesh. 20 000 timesteps (10 000 to reach fully-developed conditions + 10 000 for time-averaging). The CPU time on a PC is 11 hours
  • Channel flow. DES ((Reτ=5200) with a k-omega-DES model using a 32x96x32 mesh. 20000 timestep (7 500 + 7 500). The CPU time on a PC is 1.6 hours.
  • Periodic hill flow. DES (Re=10500) wtth a k-omega-DES model using a 160x80x32 mesh. 20000 timestep (10000 + 10000). The CPU time on a PC is 8 hours.
  • Channel flow with inlet and oulet. Δx+=40, Δz+=20. LES (Reτ=395) using a 96x96x32 mesh. 20 000 timesteps (10 000 to reach fully-developed conditions + 10 000 for time-averaging). Anisotropic synthetic fluctuations [7,9] are prescribed at the inlet. The WALE model is used. The CPU time on a PC is 8 hours
  • Flat-plate boundary layer. Δx+=104, Δz+=30. Reθ,inlet;=2 400. k-omega DES using a 500x90x64 mesh. RANS-LES interface at a fixed gridline. IDDES lengthscale. 15 000 timesteps (7 500 to reach fully-developed condition + 7 500 for time-averaging). Anisotropic synthetic fluctuations [7,9] are prescribed at the inlet. The k-omega DES model is used. The CPU time on a PC is 70 hours
  • Channel flow with inlet and oulet. x+=400, z+=200. LES (Reτ=5200) using a 96x96x32 mesh. 15 000 timesteps (7500 to reach fully-developed conditions + 7500 for time-averaging). Anisotropic synthetic fluctuations [7,9] are prescribed at the inlet. The k-omega DES model is used. The CPU time on a PC is 13 hours
  • Hump flow using a 400x120x32 mesh. Re=9.36E+5. 15 000 timesteps (7500 to reach fully-developed conditions + 7500 for time-averaging). Anisotropic synthetic fluctuations [7,9] are prescribed at the inlet. The k-omega DES model is used. The CPU time on a PC is 45 hours




THE ON-LINE COURSE

The course includes lectures (12 hours) and workshops (12 hours) learning and using pyCALC-LES. The course is given 28, 30, 2 July 2021.
 
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.
 
arrow Zoom
 
In the lectures we will address:
  • finite volume discretization
  • central differencing scheme
  • hybrid central/upwind scheme
  • Smagorinsky model
  • WALE model
  • the k-eps DES model
  • two-equation PANS model (k and epsilon)
  • wall and periodic boundary conditions
  • TDMA (tri-diagonal-matrix-algorithm) solver
  • how to prescribe turbulent inlet boundary conditions
  • how to generate inlet anisotropic synthetic turbulent fluctuations

 
In the workshops, the participants will use pyCALC-LES.
The participants will get the pyCALC-LES source CFD code and install it on their lap-top or desk-top. The following Python packages are used
  • Python 3.8
  • from scipy import sparse
  • import numpy as np
  • import pyamg
    • On Ubuntu, I installed it with the command 'conda install -c anaconda pyamg'
  • from scipy.sparse import spdiags,linalg

Some results are shown below obtained with pyCALC-LES.

  1. DNS at Reτ = 500 of fully developed channel flow. Periodic boundary conditions in streamwise and spanwise directions.
     





    Instantaneous w' fluctuations at y+=9


  2. k-omega DES of the hill flow. Periodic boundary conditions in streamwise and spanwise directions.
     
     

    Instantaneous spanwise fluctuation


  3. k-omega DES of the channel flow at Reτ = 5200. Periodic boundary conditions in streamwise and spanwise directions.
     
     

    Resolved (blue) and modeled (red) shear stresses compared with DNS (markers)


  4. WALE Channel flow with inlet-outlet Reτ = 395. Periodic boundary conditions in spanwise direction.
     
     

    Predicted friction velocity vs. x. Target value is one



    Shear stresses compared with fully developed DES and inlet synthetic fluctuations (markers)


  5. k-omega DES Channel flow with inlet-outlet Reτ = 5200. Periodic boundary conditions in spanwise direction.
     
     

    Predicted friction velocity vs. x. Target value is one



    Shear stresses compared with DNS and synthetic inlet fluctuations (markers)


  6. Flat-plate boundary layer. Δx+=40, Δz+=104. LES (Reθ,inlet;=2 400)
     
     

    Predicted skin friction vs. Reθ. Markers: expts



    Shear stresses compared with DNS and inlet synthetic fluctuations (markers)


  7. Hump flow, Re=9.36E+5)
     
     

    The grid (every 8th grid line is shown)



    Predicted skin friction. Markers: expts






OBJECT

The object is that the participants should learn how a CFD code for LES/DES works. It will give them increased knowledge, confidence and know-how when using commercial CFD codes.



PARTiCiPANTS

The participants are expected to hold a MSC degree or PhD degree related to fluid mechanics. They are expected to have at least a basic knowledge in LES and DES. Programming skills in Pythons is recommended. The course is expected to be valuable also for researchers with extensive knowledge in LES and/or DES. The participants may continue to use pyCALC-LES after the course, in their daily work and/or research. Participant who are reasonable good at programming can rather easy convert the Python CFD code to their favorite language (C, C++, Fortan95).



LECTURER

The lecturer at the course (both during lectures and workshops) will be Prof. Lars Davidson, Chalmers University of Technology.
 
arrow homepage


COURSE MATERiAL





COURSE LANGUAGE

The course material is in English and the lectures will be given in English.



DATE & LOCATiON

The course will be held 28, 30 June, 2 July 2021 online at Zoom
arrow Zoom

 



REGiSTRATiON

Registration form should be submitted no later than May 28, 2021. The price is 14,700 SEK (excl. VAT). No refunding after May 28. The number of participants is limited to 16.
 
registration form


PROGRAM

DAY 1, Monday, 8 hours

  • General structure of pyCALC-LES
  • Discretization in pyCALC-LES
  • Compute geometrical quantities
  • Studying Test Case 1 (channel flow)
  • Studying Test Case 2 (atmospheric boundary layer)
  • WORKSHOP
    • Fully-developed channel flow simulations using PANS
    • Channel flow simulations with inlet-outlet using PANS
    • Investigation of different synthetic fluctuating inlet fluctuations. For example, change the prescribed integral length scale, the integral time scale, the anisotropy ...

Tueday (no teaching). Participants can work on pyCALC-LES

DAY 2, Wednesday, 8 hours

  • Implicit Rhie-Chow interpolation in pyCALC-LES
  • TDMA solver
  • Implementation of Zero equation models
  • Implementation of the PANS model in pyCALC-LES
  • Studying Test Case 3 (hill flow)
  • WORKSHOP
    • Implementing a one-equation hybrid LES-RANS model
    • Implementing a DES model (k-eps and/or k-omega)
    • Implementing a DDES model (k-eps and/or k-omega)

Thursday (no teaching). Participants can work on pyCALC-LES

DAY 3, Friday, 8 hours

  • How to implement a new turbulence model in pyCALC-LES
  • How to generate anisotropic turbulent fluctuations in pyCALC-LES
  • how to implement a k-eps DES model
  • Pre-cursor RANS (using a 1D solver written in Python) as input to synthetic turbulence generator
  • WORKSHOP, see Section workshop in the report on pyCALC-LES
    • Implementing an IDDES model (k-eps and/or k-omega)
    • Implementing the SAS model (k-omega)
    • Making heat transfer simulations in a channel with inlet-outlet boundary conditions

Above, we give above examples on what turbulence models to implement in the workshops. Students may of course propose to implement other turbulence models.


QUESTiONS & FURTHER iNFORMATiON

Please contact
 
  • Lars Davidson
  • tel. +46 (0) 730-791 161
  • E-mail: lada@flowsim.se, lada@chalmers.se

 



REFERENCES

  1. P. Emvin, The Full Multigrid Method Applied to Turbulent Flow in Ventilated Enclosures Using Structured and Unstructured Grids. PhD thesis, Dept. of Thermo and Fluid Dynamics, Chalmers University of Technology, Göteborg, 1997.
  2. L. Davidson, Large eddy simulations: how to evaluate resolution. International Journal of Heat and Fluid Flow, 30(5):1016-1025, 2009.
  3. L. Davidson, The PANS k-ε model in a zonal hybrid RANS-LES formulation. International Journal of Heat and Fluid Flow, 46:112-126, 2014.
  4. L. Davidson, Zonal PANS: evaluation of different treatments of the RANS-LES interface. Journal of Turbulence, 17(3):274-307, 2016.
  5. A. Altintas and L. Davidson, Direct numerical simulation analysis of spanwise oscillating lorentz force in turbulent channel flow at low Reynolds number. Acta Mechanica, pages 1-18, 2016.
  6. J. Ma, S.-H. Peng, L. Davidson, and F. Wang, A low Reynolds number variant of Partially-Averaged Navier-Stokes model for turbulence. International Journal of Heat and Fluid Flow, 32(3):652-669, 2011.10.1016/j.ijheatfluidflow.2011.02.001.
  7. L. Davidson, Using isotropic synthetic fluctuations as inlet boundary conditions for unsteady simulations. Advances and Applications in Fluid Mechanics, 1(1):1-35, 2007.
  8. L. Davidson and S.-H. Peng, Embedded large-eddy simulation using the partially averaged Navier-Stokes model. AIAA Journal, 51(5):1066-1079, 2013.
  9. L. Davidson, Two-equation hybrid RANS-LES models: A novel way to treat k and ω at inlets and at embedded interfaces. Journal of Turbulence, 18(4):291-315, 2017.
  10. B. Nebenfuhr, L. Davidson, Large-Eddy Simulation Study of Thermally Stratified Canopy Flow, Boundary-Layer Meteorology, Vol. 156, number 2 , pp. 253-276, 2015
  11. B. Nebenfuhr, L. Davidson, Prediction of wind-turbine fatigue loads in forest regions based on turbulent LES inflow fields, Volume 20, Issue 6 pp. 1003-1015, Wind Energy, 2017.
  12. L. Davidson and C. Friess, The PANS and PITM model: a new formulation of f_k, Proceedings of 12th International ERCOFTAC Symposium on Engineering Turbulence Modelling and Measurements (ETMM12), Montpelier, France 26-28 September, 2018
  13. L. Davidson, Zonal Detached Eddy Simulation coupled with steady RANS in the wall region, ECCOMAS MSF 2019 Thematic Conference, 18-20 September 2019, Sarajevo, Bosnia-Herzegovina
  14. L. Davidson, inlet boundary conditions.
  15. L. Davidson, "Non-Zonal Detached Eddy Simulation coupled with a steady RANS solver in the wall region", ERCOFTAC Bullentin 120, Special Issue on Current trends in RANS-based scale-resolving simulation methods, pp 43-48, 2019.
  16. L.M. Olson abd J.B. Schroder, PyAMG: Algebraic Multigrid Solvers in Python v4.0, Release 4.0, 2018