# Stepped Spillways and Energy Dissipation: A Non-Uniform Step Length Approach
## 2 Materials and Methods  
One of the main features of a stepped spillway is the air entrainment that causes a two-phase flow. To analyze two-phase flows in OpenFOAM, VOF can be used where, for a fixed Eulerian mesh, based on each fluid fraction, all the variables in every volume are weighted. One of the advantages of the VOF method is that a simple fluid model can be developed using a single equation [26; 28; 37]. To this end, the continuity equation for the volume fraction of water can be presented as:  
\[\frac{\partial\alpha_{w}}{\partial t}+\
abla(u\alpha_{w})=0 \tag{2}\]  
where \(\alpha_{w}\) is the fraction of water and \(t\) is time. In the VOF model, as the water and air phases share the same velocity and pressure field, the two-phase flow can be considered as a single-phase flow, where the realizable k-\(\epsilon\) turbulence is homogeneous. By solving Equation (2), the free surface of water can be determined. In all the computational cells, the \(\alpha_{w}\) and the fraction of air (\(\alpha_{a}\)) is considered as: \(\alpha_{a}=1-\alpha_{w}\), therefore, the density (\(\rho\)) and the molecular (\(\mu\)) viscosity can be described as:  
\[\rho=\alpha_{w}\rho_{w}+(1-\alpha_{w})\rho_{a} \tag{3}\]  
\[\mu=\alpha_{w}\mu_{w}+(1-\alpha_{w})\mu_{a} \tag{4}\]  
where \(\rho_{w}\) and \(\rho_{a}\) are the density and \(\mu_{w}\) and \(\mu_{a}\) are the molecular viscosity of water and air, respectively. The maximum and minimum values of \(\alpha_{w}\), one and zero, indicate that the given cell is filled entirely with water or air, respectively. With the help of the Reynolds-averaged Navier-Stokes (RANS) equations [38], a two-phase flow is described in terms of a single velocity and pressure field that can be solved by the InterFoam solver based on the VOF phase fraction. \[\
abla.u=0 \tag{5}\]  
\[\frac{\partial}{\partial t}(\rho u)+\
abla.(\rho uu)-\
abla.\left(\mu_{eff} \
abla u\right)=-\
abla p^{*}-gh^{*}\
abla\rho+F \tag{6}\]  
where \(u\) is the mean component of the velocities, \(\rho\) is the density, \(p^{*}\) is the modified pressure, \(g\) and \(h^{*}\) are the gravitational acceleration and position vectors, \(F\) is the volumetric surface tension force, \(\mu_{eff}=(\mu+\mu_{t}),\mu\) is the molecular viscosity, and \(\mu_{t}\) is the turbulence viscosity term, which can be calculated by the turbulent model. In order to model the flow over a stepped spillway by Equations (5) and (6), a turbulence closure is required. There are several turbulence closures available in the OpenFOAM toolbox (standard k-\(\epsilon\), realizable k-\(\epsilon\), RNG k-\(\epsilon\), standard-k-\(\omega\), SST-k-\(\omega\) model, etc.). Herein, the performance of two common turbulence models, including the realizable k-\(\epsilon\) and RNG k-\(\epsilon\), were numerically evaluated to determine which turbulence model is more applicable. The realizable k-\(\epsilon\) model is based on the two equations for \(k\) (turbulent kinetic energy) and \(\epsilon\) (rate of viscous dissipation), respectively. \[\frac{\partial}{\partial t}(\rho k)+\
abla.(\rho ku)=\
abla.\left[\left(\mu+ \frac{\mu_{t}}{\sigma_{k}}\right)\
abla k\right]+G_{k}+G_{b}-\rho\epsilon+S_{K} \tag{7}\]\[\frac{\partial}{\partial t}(\rho\varepsilon)+\
abla(\rho\varepsilon u)= \
abla\Big{[}\Big{(}\mu+\frac{\mu_{t}}{\sigma_{z}}\Big{)}\
abla\varepsilon\Big{]} +\rho C_{1}S\varepsilon-\rho C_{2}\frac{\varepsilon^{2}}{k+\sqrt{\
u\varepsilon }}+C_{1\varepsilon}\frac{\varepsilon}{k}C_{3\varepsilon}G_{b}+S_{\varepsilon} \tag{8}\] \[C_{1}=max\Big{[}0.43\frac{\eta}{\eta+5}\Big{]},\ \eta=S_{\varepsilon}^{k},S=\Big{(}2S_{ij}S_{ij}\Big{)}^{0.5}\]  
where \(G_{k}\) and \(G_{b}\) are the generation of turbulent kinetic energy by the mean velocity gradients and buoyancy, respectively, \(S\) is the strain rate tensor, \(S_{k}\) and \(S_{\varepsilon}\) are the source terms for the kinetic energy and dissipation rate, respectively, and \(\sigma_{k}\), \(\sigma_{\varepsilon}\), \(C_{1}\), \(C_{2}\), \(C_{1\varepsilon}\), and \(C_{3\varepsilon}\) are the adjustable constants.