You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lam-Bremhorst $k$ - $\varepsilon$ turbulence model implemented in the FEniCS computational platform
This repository contains code used in my master's thesis titled: Turbulence modeling in computational fluid dynamics as part of my master's degree in Applied Mathematics at the University of Southern Denmark (SDU). It is also part of a submission for the proceedings of the FEniCS 2024 conference (FEniCS 2024).
Although only one turbulence model was implemented, namely the Lam-Bremhorst$k$ - $\varepsilon$model, the repository is constructed in such a way that it should be easy to add other turbulence models in the TurbulenceModel.py file.
Two test cases have been implemented to validate the model: fully developed channel flow (ChannelSimulation.py) and flow over a backward-facing step (BackStepSimulation.py). However, meshes for flow around a cylinder and flow in a diffuser geometry are also provided.
Installation
To install, simply copy this repository to your machine. Besides FEniCS, make sure you also have the following packages installed: numpy, matplotlib.
Governing equations
The $k$ - $\varepsilon$ turbulence model consists of two transport equations, one for turbulent kinetic energy ($k$) and the other for dissipation of turbulent kinetic energy ($\varepsilon$). Together with the Reynolds-Averaged Navier-Stokes (RANS) equations, which are a "version" of the Navier-Stokes (N-S) equations that govern the mean/average flow, they form a closed set of PDEs capable of predicting the mean quantities of a turbulent flow.
One of the key features of turbulent flow is the high diffusivity of heat/momentum caused by the large swirling bodies forming in the flow, called turbulent eddies. The turbulence is therefore modeled using the so-called turbulent viscosity ($\nu_t$). The entire set of equations is as follows:
where $\mathbf{u}$ and $p$ are the mean velocity and pressure, $k$ and $\varepsilon$ are the turbulent kinetic energy and its dissipation, $\rho$ and $\nu$ are fluid's density and viscosity and $\mathbf{f}$ represents external forces.
Additionally, $\nu_t$ is the turbulent viscosity, $P_k$ and $\gamma$ are the production and reaction term for $k$, and $\sigma$ is the Cauchy stress tensor. The Reynolds stress tensor ($\mathbf{R}$) was modeled using the Boussinesq hypothesis.
On top of that $f_\nu$, $f_1$ and $f_2$ are the damping functions, which solve the models' inability to predict flow near the wall. Terms $Re_k$ and $Re_\ell$ are both referred to as the turbulent Reynolds numbers, and $y$ denotes the distance to the nearest solid wall. Lastly, $C_\nu$, $C_1$, $C_2$, $\sigma_k$, and $\sigma_\varepsilon$ are the experimentally determined model constants, and $\mathbf{I}$ is the identity tensor.
About
This repository contains implementation of the Lam-Bremhorst k-epsilon turbulence mode in FEniCS.