LES tutorials

In this chapter LES tutorials are presented to illustrate the full SedFoam capabilities to deal with complex geometries as well as to provide configuration files to allow for the development of new configurations.

3DChannel560: Turbulent channel flow laden with particles

In this tutorial, the particle-laden closed channel flow experimental configuration from Kiger and Pan (2002) is reproduced using Large-Eddy Simulation (LES).

Pre-processing

This tutorial is distributed with SedFoam under the folder sedFoamDirectory/tutorials/3DChannel560.

Mesh and boundary conditions

The numerical domain dimensions presented in figure 1. The numerical domain is a bi-periodic rectangular box with cyclic boundary conditions in $x$ and $z$ directions and no slip boundary condition at the top and bottom boundaries for the velocities. The gradient of any other quantities is set to zero at the walls. The mesh is composed of $100\times80\times80$ elements. The mesh is stretched along the $y$ -axis to increase the resolution close to the walls.

Image
Figure 1: Sketch of the numerical domain for tutorial 3DChannel560.

Initial conditions

The case is set up to start at time t = 0 s with a uniform concentration field and a parabolic velocity profile in the $x$ -direction with small perturbations to trigger turbulence.

The flow is driven by a pressure gradient along the $x$ -axis dynamically adjusted at each time step in order to match the experimental bulk velocity $U_b=0.5096 \ m.s^{-1}$ using the OpenFoam fvOption utility.

Physical properties

The transportProperties file for the 3DChannel560 case is shown below:

phasea
{
    rho             rho [ 1 -3 0 0 0 ] 2600;
    nu              nu [ 0 2 -1 0 0 ] 1e-6;
    d               d [ 0 1 0 0 0 0 0 ] 1.95e-4;
    sF              sF   [ 0 0  0 0 0 0 0 ] 1;    // shape Factor to adjust settling velocity for non-spherical particles
    hExp            hExp [ 0 0  0 0 0 0 0 ] 2.65;  // hindrance exponent for drag: beta^(-hExp) (2.65 by default)
}
// * * * * * * * * * * * * fluid properties * * * * * * * * * * * * //
phaseb
{
    rho             rho [ 1 -3 0 0 0 ] 1000;
    nu              nu [ 0 2 -1 0 0 ] 1.e-6;
    d               d [ 0 1 0 0 0 0 0 ] 2e-4;
    sF              sF   [ 0 0  0 0 0 0 0 ] 1;
    hExp            hExp [ 0 0  0 0 0 0 0 ] 2.65;
}
//*********************************************************************** //
transportModel  Newtonian;

nu              nu [ 0 2 -1 0 0 0 0 ] 1.e-6;

nuMax           nuMax [0 2 -1 0 0 0 0] 1e2;      // viscosity limiter for the Frictional model (required for stability)

alphaSmall      alphaSmall [ 0 0 0 0 0 0 0 ] 1e-3;  // minimum volume fraction (phase a) for division by alpha 

The physical property of the particles (diameter and density) and of the fluid (density and kinematic viscosity) have been set to the values given in Kiger and Pan (2002).

Control

The system/controlDict file indicates that for this case, the time step is set to a constant value of $2\times 10^{-4}$ s that ensure to have a maximum Courant number on the order of 0.3 for stability reasons.

The end time of the simulation is set to 8 for initial development of turbulence. After 8 seconds, the simulation should be continued by changing the end time to 16 seconds and setting the favreAveraging keyword to true to perform temporal averaging of flow variables.

application     sedFoam_rbgh;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         8;
//endTime         16;

deltaT          2e-4;

writeControl    runTime;

writeInterval   0.5;

purgeWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

maxAlphaCo  1;

favreAveraging false;

Computation launching

As for the previous case, you can launch the computation by executing Allrun for turbulence initialization. The simulations is run in parallel on 16 cores. Once the end time has been modified and favreAveraging keyword set to true, you can launch the computation of time average variables by executing AllrunAverage.

Post-processing using python

The post-processing python scripts writedata_tuto3DChannel560.py and plot_tuto3DChannel560.py are located in the folder tutorials/Py. To run this script, the latest output (16s) should be reconstructed.

The script writedata_tuto3DChannel560.py reads time averaged OpenFoam data, perform a spatial averaging operation and stores the 1D vertical profiles in a netCDF file located in the postProcessing directory of the case.

The script plot_tuto3DChannel560.py reads the netCDF file and plots vertical profile of concentration, velocities and Reynolds stresses

Image
Figure 2: Concentration, velocity and Reynolds stress profiles for the 3DChannel560 tutorial.

3DOscillSheetFlow: Oscillatory sheet flow

In this tutorial, the oscillatory sheet flow experimental configuration with fine sand from O'Donoghue and Wright (2004) is reproduced using Large-Eddy Simulation (LES).

Pre-processing

This tutorial is distributed with SedFoam under the folder sedFoamDirectory/tutorials/3DOscillSheetFlow.

Mesh and boundary conditions

The numerical domain is a periodic box presented in figure 3 with $\delta=\sqrt{2\nu^f/\omega}$ and $\omega$ the wave angular frequency. The mesh is composed of $100\times130\times46$ elements with celles refined at the location of the deposited sediment bed. A symmetry boundary condition is applied at the top boundary, a smooth wall boundary condition is applied at the bottom boundary and cyclic boundary conditions are applied for the lateral boundaries.

Image
Figure 3: Sketch of the numerical domain for tutorial 3DOscillSheetFlow.

Initial conditions

The case is set up to start at time t = 0 s.

The flow is driven by a sinusoidal pressure gradient defined in constant/forceProperties along the $x$ -axis to match the experimental freestream velocity

Physical properties

The transportProperties file for the 3DOscillSheetFlow case is shown below:

phasea
{
    rho             rho [ 1 -3 0 0 0 ] 2650;
    nu              nu [ 0 2 -1 0 0 ] 1e-6;
    d               d [ 0 1 0 0 0 0 0 ] 1.5e-4;
    sF              sF   [ 0 0  0 0 0 0 0 ] 1;    // shape Factor to adjust settling velocity for non-spherical particles
    hExp            hExp [ 0 0  0 0 0 0 0 ] 2.65;  // hindrance exponent for drag: beta^(-hExp) (2.65 by default)
}
// * * * * * * * * * * * * fluid properties * * * * * * * * * * * * //
phaseb
{
    rho             rho [ 1 -3 0 0 0 ] 1000;
    nu              nu [ 0 2 -1 0 0 ] 1.e-6;
    d               d [ 0 1 0 0 0 0 0 ] 1.5e-4;
    sF              sF   [ 0 0  0 0 0 0 0 ] 1;
    hExp            hExp [ 0 0  0 0 0 0 0 ] 2.65;
}
//*********************************************************************** //
transportModel  Newtonian;

nu              nu [ 0 2 -1 0 0 0 0 ] 1.e-6;

nuMax           nuMax [0 2 -1 0 0 0 0] 1e2;      // viscosity limiter for the Frictional model (required for stability)

alphaSmall      alphaSmall [ 0 0 0 0 0 0 0 ] 1e-5;  // minimum volume fraction (phase a) for division by alpha

The physical property of the particles (diameter and density) and of the fluid (density and kinematic viscosity) have been set to the values given in O'Donoghue and Wright (2004).

Control

The system/controlDict file indicates that for this case the time step is adaptative to have a maximum Courant number (maxCo) below 0.3 and that the computation ends at 40s of dynamics.

application     sedFoam_rbgh;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         40;

deltaT          2e-4;

writeControl    adjustableRunTime;

writeInterval   0.25;

purgeWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep yes;

maxCo          0.3;

maxAlphaCo     0.3;

maxDeltaT      1e-3;

Computation launching

As for the previous case, you can launch the computation by executing Allrun. The simulations is run in parallel on 16 cores.

Post-processing using python

The post-processing python scripts writedata_tuto3DOscillSheetFlow.py and plot_tuto3DOscillSheetFlow.py are located in the folder tutorials/Py. To run this script, all the simulation outputs after 20s (and only them) should be reconstructed using the following command:

reconstructPar -time '20:'

The script writedata_tuto3DOscillSheetFlow.py reads OpenFoam data, performs a spatial averaging operation, then performs a phase averaging operation taking into account four wave periods and stores the 1D vertical profiles in netCDF files located in the postProcessing directory of the case.

The script plot_tuto3DOscillSheetFlow.py reads the netCDF files and plots vertical profile of concentration, velocities and Reynolds stresses at different moments of the wave period.

Image
Figure 4: Concentration and velocity profiles for the 3DOscillSheetFlow tutorial.