Roughness drag parameterization framework for use in the One-Dimensional Turbulence model
Creators: name: Medina Méndez, Juan A.
Publisher: name: Zenodo
Year: 2025

description: # README: Roughness drag parameterization framework for use in the One-Dimensional Turbulence model The files listed here are part of the work in progress concerning a parameterization framework for roughness drag in the One-Dimensional Turbulence model. 

Preliminary work on this topic has already been published in the PAMM proceedings journal, and it is available on the following linked DOI [https://doi.org/10.1002/pamm.202400136](https://doi.org/10.1002/pamm.202400136)

These files support both said before publication and ongoing further publications. 

## 1. Generation of roughness-related profiles: porosity and pore diameter

### Surfaces with regular homogeneous roughness

A Python script to generate wall-normal porosity and equivalent pore-diameter profiles for surfaces with regular roughness is available in the file *profiles_Porosity_Diameter_RegularRoughness.py*. The type of roughness which is generated this way corresponds to one generated with the help of discrete roughness elements. See the linked publication in [https://doi.org/10.1002/pamm.202400136](https://doi.org/10.1002/pamm.202400136)

Inputs for this file are contained in the module *parameters.py*. Additionally, the user should specify a value of dynamic viscosity (Pa\*s), density (kg/m^3) and friction velocity (m/s). Case IDs to choose from are either 'Ia-Forooghi' or 'III-Forooghi' which correspond to cases already included in the module *parameters.py*. These parameters correspond to the surfaces listed as 'Ia' and 'III' in the reference literature publication of [Forooghi et al. (2018)](https://doi.org/10.1016/j.ijheatfluidflow.2018.03.019)

### Surfaces with irregular homogeneous roughness

Examples of surfaces with irregular roughness k(x,z) are located in the folder *irregular_rough_surfaces*. The files in this folder are 2-D arrays with the values of k, as well as the coordinates x and z of irregular rough surfaces. The included surfaces correspond to the cases of turbulent channel flow at friction Reynolds number 360 with k+ = 15 and k+ = 60 listed in the reference literature publication of [Peeters and Sandham (2019)](https://doi.org/10.1016/j.ijheatmasstransfer.2019.04.013)

A Python script to generate wall-normal porosity and equivalent pore-diameter profiles for surfaces with irregular roughness is available in the file *profiles_Porosity_Diameter_IrregularRoughness.py*. The file requires a working Python installation with the opencv library. Case IDs to choose from are either 'k+15-Retau360-Peeters' or 'k+60-Retau360-Peeters'. The user should only specify Retau, k+ and k/delta as inputs to the file, as well as the resolution nx\*nz of the surface (comments referencing which resolution should be chosen for each case are available in the script)

## 2. Generation of roughness-drag forcing coefficients

Once the user has generated the porosity and equivalent pore-diameter profiles, it is possible to run the script *forcing_coefficients_RoughnessDrag.py* in order to obtain the wall-normal profiles of the drag forcing coefficients. To that extent, the user should specify as input to the script the case ID, as well as values of the dynamic viscosity, density and friction velocity. The user must choose whether the roughness coefficients to generate consider a sparse or dense roughness regime. An additional boolean flag *direct_profile* must be set to *True* for the example cases of [Peeters and Sandham (2019)](https://doi.org/10.1016/j.ijheatmasstransfer.2019.04.013), and *False* for the example cases of [Forooghi et al. (2018)](https://doi.org/10.1016/j.ijheatfluidflow.2018.03.019). 

A Python script to visualize the coefficient profiles, as well as the porosity and diameter wall-normal profiles is included in the files, *plot_all_comparison_forcings.py*

The files *PFA_Forooghietal2018_Coefficients_Ia.dat* and *PFA_Forooghietal2018_Coefficients_III.dat* correspond to the drag forcing coefficients in the publication of [Forooghi et al. (2018)](https://doi.org/10.1016/j.ijheatfluidflow.2018.03.019). Note that such drag forcing parameterization is entirely ad-hoc, and not strictly derivable unlike the volume-averaging theory formulation in [https://doi.org/10.1002/pamm.202400136](https://doi.org/10.1002/pamm.202400136). The files *Porosity_FIa_Forooghietal2018.txt* and *Porosity_FIII_Forooghietal2018.txt* correspond to the porosity profiles supplied for the surfaces from [Forooghi et al. (2018)](https://doi.org/10.1016/j.ijheatfluidflow.2018.03.019) (available in the publication).

## 3. Visualization of velocity fields from ODT simulations

Included in the list of files are also the simulation results and ODT input files. These are included in the directories *Re360_\** and *Re500_\**. The files *\*.dat* located in such directories contain several averaged flow profiles, while the *\*.yaml* files are ODT input files. 

Files contained within the folder *files_for_2D_visualization* are instantaneous flow profiles (snapshots). The *dmp_\*.dat* files in this folder, e.g., *files_for_2D_visualization/channelFlowSmoothRe360/data/data_00000/dmp_*.dat* can be combined as a 2-D array of a velocity field. To that extent, the Python script *convert_dmpseq_to_2DArray.py* is included as well. 

Finally, once the files has been combined on a 2-D array, it is possible to visualize the velocity fields using the Python script *velocityEddiesPlot.py*. The user should specify the half-height of the channel H, the bulk velocity, the meltdown height kmd, k+, and flags to determine whether the flow is over a rough wall, and whether the roughness is dense or sparse. Relevant comments concerning these inputs are found within the script.