Algorithm
The numerical implementation of the present Eulerian two-phase flow sediment transport model is based on an open-source finite volume CFD library called OpenFOAM. Taking advantage of the numerical discretization schemes and framework of finite volume solvers in OpenFOAM, the two-phase flow governing equations are implemented by modifying the solver twoPhaseEulerFoam (Rusche, 2002; Weller, 2002; Peltola, 2009). OpenFOAM uses the Finite Volume Method (FVM) over a collocated grid arrangement. The collocated arrangement stores all dependent variables at the cell center and the same Control Volume (CV) is used for all variables to minimize the computational effort. The advantage of the FVM is that the system of partial differential equations can be discretized on arbitrary three-dimensional structured or unstructured meshes. Thus, complex geometries can be easily handled. The Gauss theorem is applied to the convection and diffusion terms leading to conservative schemes.
To illustrate the numerical discretization, the fluid phase momentum equation are taken as an example. Rearranging the fluid phase momentum equation by dividing , the resulting equation can be written as
The last term in the above equation, the gradient of fluid phase shear stress, can be written and expanded as follows:
In the above equation, the first two terms on the RHS are treated implicitly while the last two terms are treated explicitly. By substituting the expanded shear stress formulation in the momentum equation, the following equation is obtained:
It is more convenient to rewrite the above equation into a matrix form:
The matrix is composed of the diagonal terms of the algebraic system associated with Eq5 , whereas includes the off-diagonal terms and the source terms. is composed of the explicit drag term, the turbulent suspension term, the gravity term and the explicit diffusion terms:
The same process can be carried out for the solid phase momentum equation that leads to:
where at the denominator is substituted by to avoid dividing by zero when the solid phase volume concentration vanishes. This partial differential system of equations can also be written as a matrix equation as follows:
where the source term contains the following terms:
Following Rusche (2002) the terms involving the ratio of particle phase volume gradient to the volume concentration are treated at the cell face level in the predictor-corrector algorithm. However, we noted the exception of the particle phase normal stress gradient for which a reconstruction of the surface normal gradient at the cell centre allows to get more stable solutions.
In sedFoam, two options are proposed to treat the explicit shear stress terms (i) they can be solved at the cell faces and added in pEqn using the keyword 'faceMomentum' = true (the solver is using the code given in the pUf folder) or (ii) they can be solved at the cell centers and added in UEqn using the keyword 'faceMomentum' = false (the solver is using the code given in the pU folder). By default, the explicit shear stress terms are solved at the cell centers and the keyword 'faceMomentum' = false.
The advantage of separating the right hand side of the momentum equations as the sum of two terms: and , is for writing the pressure-velocity algorithm. A similar method as Rhie and Chow (1983) one can be applied for the gradient terms. The details of the velocity-pressure algorithm are presented in the next subsection.
Velocity-pressure algorithm
The pressure-velocity coupling and the consequent oscillations in the pressure fields are resolved using the Rhie and Chow method. The PISO algorithm is used to solve fluid and particle velocities (Rusche2002,Weller2002,Peltola2009).
Step 1: Velocity predictor at the cell centres
First, the intermediate velocities , (denoted as HabyA and HbbyA) are computed using the corresponding momentum equations (equations without the pressure gradient term and the explicit part of the drag term):
where and represent the inverse matrices of and , respectively. These intermediate velocities do not satisfy the mass conservation equations.
Step 2: Velocity fluxes at the cell faces
The right hand side of equations (Eq5 - Eq8 ) are computed at the cell faces:
and the velocity flux associated with the predictor step is interpolated at the cell faces:
Introducing the notation:
one can write the volume averaged velocity flux at the cell faces as:
where and denote the fluid and particle phases velocity fluxes at the previous iteration or time step and at the cell faces, respectively, and is the cell face area associated with face . At this stage, the drag force is partially treated explicitly for the mixture flux
Step 3: Velocity corrector at the cell faces
Writing the semi-discrete velocity equation including the pressure gradient term leads to the following equations:
Taking the divergence of the volume averaged mixture velocity given by the velocity correction equation and imposing the incompressibility constraint, , one can built the pressure equation as a function of the predicted velocity or predicted face fluxes:
where the subscript denotes variables interpolated at the cell faces. The two expressions shown above are equivalent by using the Gauss theorem. At the discrete level, this equation is written as:
substituting the velocity corrector equations ( Eq16 - Eq17 ) into the previous equation, the Poisson equation for the pressure reads:
This equation leads to a matrix system written at the cell faces. The resulting algebraic system is usually solved using an multigrid solver (GAMG). The resulting pressure field is used for the correction step in which the mixture velocity face flux is corrected using equations ( Eq16 - Eq17 ):
And the fluid and particle phase face fluxes are corrected accordingly
in which the explicit drag contributions coming from the other phase are still missing. We can rewrite the corrected fluxes for each phase as:
and the face flux associated with the relative velocity as:
This new expression for the relative flux allows to treat the drag force almost implicitly. This is supposed to stabilize the coupling between the two momentum equations and allows for higher time steps with regard to the particle response time.
The predicted fluxes for each phase is then obtained from the mixture flux plus a correction coming from the relative flux. Let's write the mixture velocity and relative velocity expression:
from which we can deduce the following relationships:
The same type of procedure is applied for the reconstruction of the velocities at the cell centres: .
In order to ensure the mass conservation an iterative procedure of N cycles is sometimes required. From our experience, three iterations (N=3) is usually enough for a convergence. The finite volume discretisation of the equations have not been shown here but all the details can be found in Jasak (1996) and Rusche (2002).
Summary of the solution procedure
The numerical solution procedure for the proposed two-phase flow model is outlined as follow:
- Solve for sediment concentration ;
- Update the volume concentration of fluid: ;
- Update the drag parameter in the drag term;
- Solve for the fluid turbulence closure, update , or (depends on the turbulence closure or ), and then calculate the eddy viscosity and effective fluid total viscosity;
- Solve for the particle phase stress (kinetic theory model or the dense granular rheology);
PISO-loop, solving velocity-pressure coupling for loops:
a. Construct the coefficient matrix and and explicit array and using Eq5 and Eq8 .
b. update the other explicit source terms and , Eq6 and Eq9 ;
c. Calculate , using Eq. ustara and ustarb without fluid pressure gradient term;
d. Construct and solve the pressure Eq. Eq21 ;
e. Correct fluid and particle velocities after solving pressure and update fluxes ( Eq23 - Eq24 );
f. go to (a-e) if the number of loops is smaller than (no tolerance criteria).
- Advance to the next time step
In the above solution procedure, the velocity-pressure coupling steps are looped for times. The advantage of this loop is to avoid velocity-pressure decoupling caused by the direct solving method. From our numerical practices, the loop number to 3 is usually enough to give reasonably accurate results, and shows good convergence, especially for steady flows.
The time step, , can be set to a constant value or adjusted automatically based on two Courant numbers, one related to the local flow velocity and the local grid size (the same as for single phase problems) and one related to the relative velocity which is specific to the coupling of the fluid and sediment phase momentum equations in the two-phase flow model. The most limiting time step is used as the criterion for setting the adjustable time step. Our practice is to set these two Courant numbers to 0.3 and 0.1, respectively.