1 Introduction

In traditional geotechnical problems water is considered in slow motion or as a stationary load [54, 62]. Many authors during the last decades have proposed numerical models to analyze the effects of seepage flows in deformable or undeformable soils and low permeability porous materials in general. Among others we can mention the work of [1, 23, 42, 50, 51, 58]. Unfortunately these classical approaches are not applicable for the analysis of the water motion within rockfill or rockfill-like materials (such as concrete tetrapods, cubes or similar coastal structure). This is the consequence of the extremely high permeability of the medium and of the peculiar characteristics of the pores. Pores in fact are extremely large and can be considered interconnected leading to a fully drained fast flow problem [56]. Therefore, the possibility to follow the rapid transition of the water level is of paramount importance to correctly reproduce the physics of the problem. The significant time scale of the seepage evolution in rockfill material is of the order of the minutes, not days of months like in soils.

As an example, rockfill is commonly used as exterior layer of embankment dams or of coastal structures. While in the latter the variation of the seepage line is induced by sea waves and its rapid transition is analyzed to quantify the dissipation of wave energy to correctly design protection structures, in the former the interest lies in the study of the effect of an overtopping flooding that may trigger the failure of the entire dam with catastrophic consequences.

According to traditional studies of flow in rockfill [55], at a micro level the flux between the rocks is assimilated to flow in pipes. This analogy is used for the derivation of the resistance law used for the calculation of the hydraulic gradientFootnote 1 at a macro scale due to seepage. The well known Darcy’s law is not applicable to the analyzed problem where a non linear resistance law should be adopted to accurately evaluate the resistance forces made by the porous structure considering the local turbulent flow in the pores [61]. In the following section the traditional mathematical models to evaluate the hydraulic gradient in rockfill are reviewed and discussed.

It should be pointed out that a key point for the complete simulation of the hydrodynamic effect of an overtopping flow in a dam is the capability of simulating at once, not only the seepage, but also the fluid flow upstream, downstream and over the dam. The same need holds for coastal structures subjected to waves. Several authors presented steady-state models to evaluate the hydraulic gradient due to seepage in rockfill [4, 31] without considering the flow of water in the clear fluid region or any transient phase. Others approaches are based on three dimensional (3D) Navier–Stokes equations without solving the porous media flow and considering the porous structure as impervious [33, 36, 59]. Nevertheless, some Reynolds-Averaged Navier–Stokes (RANS) models have been recently conceived to simulate the wave-structure interaction in coastal structures [13, 14, 22]. The need for simulating turbulence in the clear fluid region together with the large dimension of the analysis domain are the main reasons behind the choice of a RANS model.

After the initial review sections, in the paper we present an efficient numerical model to evaluate, using a unified set of balance equations, both the flow through a porous structure and in the clear flow region. The governing equations are derived considering the non-Darcy flow inside a porous material. The formulation is such that the classical Navier–Stokes equations are recovered when the porosity is equal to one, that is, outside of the porous media. The resistance law is taken into account in writing the linear momentum equation. Its contribution goes to zero out of the granular material. A similar approach was first presented in [63] and has later been used by Nithiarasu and coworkers [4345] to study the natural and forced convective flux in a cavity filled by a variable porosity medium.

The ease in the definition of a control domain with the relevant spatial variables (like for instance the porosity, defining the presence of a granular material), leads to the choice of an Eulerian fixed mesh approach. Moreover this kinematical framework is also more efficient allowing an easier openMP parallelization of the resulting finite elements code. A level set technique is developed for tracking the evolution of the free surface.

The paper is organized as follows. In the first section a review of the models available in the literature to describe the seepage in rockfill material is presented and the need for a non-linear resistance law is justified. The governing equations are then derived in their strong form. The weak form of the problem is obtained and the finite elements solution strategy is explained. Since a fixed mesh approach is used, a level set technique is employed to track the evolution of the free surface.

Finally a set of examples is presented to validate the proposed model against experimental results and other numerical techniques developed for the same purpose.

2 Seepage into Rockfill

The flow in porous media is traditionally studied using the empirical relation obtained by Darcy in \(1856\). While studying the flow of water through a sand-filled column he discovered that the pressure drop (\(i\)) and the velocity of water inside a porous material (\(u\)) are linearly related. This observation leads to the formulation of the well known Darcy law

$$\begin{aligned} i = \frac{\mu }{k}u. \end{aligned}$$
(1)

where \(\mu \) is the water dynamic viscosity and \(k\) is the permeability of the porous media [3].

Velocity \(u\) in Eq. (1) is by definition the Darcy velocity, i.e. the fluid velocity averaged over the total control volume \(\varOmega \) (often called macroscopic velocity or unit discharge being the discharge per unit volume), whereas the fluid velocity \(\overline{u}\) is averaged over the empty part of \(\varOmega \) (called \(\varOmega _{E}\)). Their relation is stated by the Dupuit–Forchheimer equation [41]:

$$\begin{aligned} u = n \overline{u} \end{aligned}$$
(2)

where \(n\) is the porosity that, by definitionFootnote 2 is

$$\begin{aligned} n := \frac{\displaystyle \varOmega _{E}}{\displaystyle {\varOmega }}. \end{aligned}$$
(3)

See Fig. 1 for a graphical view of the fluid and the Darcy definition of velocity.

In the most general case \(n\) is a function of space and time:

$$\begin{aligned} n= n ({\mathbf {X}},t); \end{aligned}$$
(4)

where \({\mathbf {X}}\) is the material coordinate vector, In the present work, according to experimental analysis [40, 57] the variation of porosity in time can be neglected, considering only its variation in space, i.e.

$$\begin{aligned} n = n ({\mathbf {X}}); \end{aligned}$$
(5)

This corresponds to assuming that the volumetric characteristics of the porous materials do not vary sensibly as a consequence of its deformation. Moreover, since the experiments reproduced in this paper do not present any relevant deformation of the rockfill material, then \(n\) is taken as a constant value.

Fig. 1
figure 1

Graphical description of fluid velocity \(\overline{u}\) (averaged over the empty volume \(\varOmega _{E}\)) and Darcy velocity \(u\) (averaged over the total control volume \(\varOmega \))

Eq. (1) was derived studying the unidirectional flux in sand at low Reynolds numbersFootnote 3 and it has been proved to be valid under a limited range of low velocity fields [61].

In fact in the case of flux through rockfill, the relation between velocity and pressure drop was observed to be non-linear and it was experimentally demonstrated that over certain average dimension of the particles, Eq. (1) is not anymore valid.

Many authors have deeply studied this aspect with essentially two objectives: to discover the range of validity of Darcy’s law (Eq. (1)) and to define an alternative resistance lawFootnote 4 in case Eq. (1) cannot be used.

2.1 Analogy Between Flow in Rockfill and Pipes Flow

It is generally accepted to consider the flow in the pores of rock particles essentially similar to flow in a pipe network but with a more complicated configuration [55, 56]. Based on this assumption all the empirical formulae to evaluate the pressure drop due to friction in pipes have been used and adapted to get similar empirical relationships in the case of porous material [15, 30].

Usually the regime of the flow in pipes is defined as laminar or turbulent as a function of the Reynolds number \(Re\). If the regime is laminar the pressure drop is linearly related to the average velocity of the flow, whereas for a turbulent flow the relation is non-linear. Similar to what happens in pipes, the definition of \(Re\) in the porous flow is used to define whether a laminar or a turbulent regime occurs. Nevertheless, the limit of validity of Darcy law (i.e. laminar regime) is still an open issue and many authors have been working on this topic since the pioneering work of Chilton and Colburn at the beginning of the XXI century ([1, 2, 5, 17, 19]) The main issue is related to the definition of \(Re\) that in a porous material is not univocally defined. The Reynolds number depends on whether the Darcy or the fluid velocity is chosen for its calculation and on how the characteristic length is defined [30, 56, 61]. Nevertheless it is commonly accepted that the beginning of appearance of turbulence is for values of \(Re\) in the range 60–150 (not 2,000 like in pipes) while the starting point of non-linear behavior appears for \(Re \in \) [1–10]. This means that the transition between the laminar and turbulent regime is gradual (differently from the flux pipes). Another important aspect is that turbulence appears at lower \(Re\) values in particles with larger average diameter. Scheidegger justifies both aspects with the co-presence of a laminar regime in the thinner “porous channels” and a turbulent one in the thicker cases [49].

All the examples presented in the present work have \(Re\) values in the range [40–40,000] and is therefore mandatory to consider a non linear resistance law to correctly capture the dissipation induced by the presence of the porous matrix.

2.2 Resistance Laws

Forchheimer was one of the first authors in proposing in \(1901\) [21] a quadratic resistance law defining the pressure drop (\(i\)) as

$$\begin{aligned} {\mathbf {i}} = \alpha {\mathbf {u}} + \beta {\mathbf {u}}^2; \end{aligned}$$
(6)

where constants \(\alpha \) and \(\beta \) depend only on the characteristics of the rockfill material. Alternatively Prony and Jeager [32] proposed an exponential law of the type

$$\begin{aligned} {\mathbf {i}} = \gamma {\mathbf {u}}^{\eta }; \end{aligned}$$
(7)

where \(\gamma \) and \(\eta \) depend on the flow condition, the characteristics of the porous medium and the fluid.

Both the quadratic and the power relationships are based on experimental results although some theoretical basis have been provided for their justification [30]. In recent years almost all efforts have been addressed in determining the values of the \(\alpha \) and \(\beta \) or \(\gamma \) and \(\eta \) constants. Some authors define these coefficients as dependent on physical parameters of the rockfill material only, such as the size of the particles, porosity and the particle shape (following [56] this is the case of Ergun [18], Wilkins [60], McCorquodale [38], Stephenson [53] and Martins [37]. In other cases, the coefficients depend on the experimental value of the hydraulic conductivity. Since the experimental set up needed for estimating these parameters can be very expensive, it is often easier and cheaper to choose one of the first group of formulae. A comprehensive overview of the different models can be found in [30, 56].

Nowadays both Eqs. (6) and (7) are accepted and widely used. In the present work a quadratic resistance law has been implemented. The user can define the \(\alpha \) and \(\beta \) parameters depending on the type of material studied and on the flow conditions. This aspect will be discussed later in the sections devoted to the validation examples.

3 Mathematical Model: The Modified Form of the Navier–Stokes Equations

Water is treated as a Newtonian incompressible fluid governed by the following constitutive law

$$\begin{aligned} \varvec{\sigma } = -p{\mathbf {I}} + \varvec{\tau } \end{aligned}$$
(8)

where the Cauchy stress tensor \(\varvec{\sigma }\) is split in the sum of the volumetric part (that is the pressure \(p\) multiplied by the identity matrix \({\mathbf {I}}\)) plus the deviatoric, non-isotropic part \(\varvec{\tau }\). The deviatoric part is linearly related to the strain rate tensor \(\nabla ^{s}{\mathbf {u}}\), being \({\mathbf {u}}\) the velocity, through the kinematic viscosity \(\nu \) which is assumed to be constant.

Eq. (8) can therefore be rewritten as

$$\begin{aligned} \varvec{\sigma } = -p {\mathbf {I}} + 2 \nu \nabla ^{s}{\mathbf {u}}. \end{aligned}$$
(9)

In order to take into account the eventual presence of a porous medium, some modifications should be introduced in the traditional form of the Navier–Stokes equations. In the following sections the modified system of governing equations is obtained by imposing conservation of mass and linear momentum in an infinitesimal fixed control volume.

3.1 Mass Conservation Equation

Let us consider a \(2D\) square finite control volume \(d x d y\) as the one plotted in Fig. 2, and let us define \(d \overline{x} d \overline{y} = n \, d x d y\) as the empty part of it, that is the portion of this volume that can be occupied by the fluid (see the definition of porosity in Eq. (3)). Imposing the continuity of the fluid field velocity \(\overline{{\mathbf {u}}} = [\overline{u} , \overline{v} ]\) over the fluid control domain \(d \overline{x} d \overline{y}\), yields

$$\begin{aligned}&\rho \left( \overline{u} + \frac{\partial \overline{u}}{\partial x}d\overline{x} \right) d\overline{y} - \rho \overline{u} d\overline{y} + \rho \left( \overline{v} + \frac{\partial \overline{v}}{\partial y}d\overline{y} \right) d\overline{x} \nonumber \\&\quad - \rho \overline{v} d\overline{x}+\frac{d \rho }{d t} d\overline{x}d\overline{y} = 0; \end{aligned}$$
(10)
Fig. 2
figure 2

Balance of conservation of mass in a discrete volume \(dx \, dy\). \( d\overline{x} d\overline{y} = n \, dx \, dy \) is the empty volume where the fluid can circulate

Considering that the fluid is incompressible, Eq. (10) can be rewritten as

$$\begin{aligned} \begin{aligned} \displaystyle {\frac{\partial \overline{u} }{\partial x} d\overline{x} d\overline{y} + \frac{\partial \overline{v} }{\partial y} d\overline{x} d\overline{y}}&= \\ \displaystyle {\frac{\partial u }{\partial x} dx dy + \frac{\partial v }{\partial y} dx dy}&= 0. \end{aligned} \end{aligned}$$
(11)

where the definition of the Darcy velocity \({\mathbf {u}} = [u , v ]\) (Eq. (2)) has been used. Therefore the mass conservation equation is

$$\begin{aligned} \frac{\partial u }{\partial x} + \frac{\partial v }{\partial y} = 0; \end{aligned}$$
(12)

that can be rewritten as

(13)

3.2 Momentum Conservation Equation

The balance of linear momentum in the \(i-th\) direction (where \(i=1,2\) refers to the cartesian coordinate \(x\) and \(y\), respectively) is

$$\begin{aligned} \frac{d \overline{u}_{i}}{dt}d\overline{x} d\overline{y} - \frac{\partial \sigma _{ij}}{\partial x_{j}}d\overline{x} d\overline{y} - f^{ext}_{i} d\overline{x} d\overline{y} = 0; \end{aligned}$$
(14)

where \(f^{ext}\) are the volumetric forces and the sum over \(j\) spatial index is supposed.

Fig. 3
figure 3

Balance of conservation of linear momentum in an infinitesimal volume \(dx \, dy\). \( d\overline{x} d\overline{y} = n \, dx \, dy \) is the empty volume where the fluid can circulate

Observing Fig. 3 and recalling the constitutive Eq. (9), the balance equation in x-direction can be written as

$$\begin{aligned}&{\displaystyle \frac{\partial \overline{u} }{\partial t} d\overline{x} d\overline{y} + \overline{u} \frac{\partial \overline{u}}{\partial x}d\overline{x} d\overline{y} + + \overline{v} \frac{\partial \overline{u}}{\partial y}d\overline{x} d\overline{y}} - \frac{\partial \sigma _{x}}{\partial x} d\overline{x}d\overline{y}\nonumber \\&\quad {\displaystyle + \,\frac{\partial \tau _{xy}}{\partial y} d\overline{x}d\overline{y} - b_{x} d\overline{x} d\overline{y} + \hat{D}_{x} d \overline{x} d \overline{y}} = 0; \end{aligned}$$
(15)

where \(b_x\) is the component of the body force in the \(x\)-direction and \(\hat{D}_x\) represents the component of the hydraulic gradient due to seepage, e.g. the resistance law, in the \(x\)-direction. Its matrix form will be detailed at the end of this section. In Eq. (15) the definition of material time derivative has been implicitly taken into account \(\left( {\frac{d \overline{u}_{i}}{dt} = \frac{\partial \overline{u} }{\partial t} + \overline{u} \frac{\partial \overline{u}}{\partial x} + \overline{v} \frac{\partial \overline{u}}{\partial y} }\right) \).

Substituting \(d\overline{x} d\overline{y} = n \, dx dy\) into Eq. (15) and inserting the definition of Darcy velocity gives

$$\begin{aligned}&{\displaystyle \frac{\partial u }{\partial t} + \overline{u} \frac{\partial u }{\partial x} + \overline{v} \frac{\partial u }{\partial y} + n\frac{\partial p}{ \partial x} - 2 \nu \frac{\partial ^{2} u }{\partial x^{2}}} \nonumber \\&\quad {\displaystyle {} - \nu \left( \frac{\partial ^{2} u }{\partial x \partial y} +\frac{\partial ^{2} v }{\partial x^{2}} \right) n- b_{x} n + n \hat{D}_{x}} = 0; \end{aligned}$$
(16)

This expression holds for any infinitesimal domain \(dx dy\).

Finally, naming \(D_{y} = n \hat{D}_{y}\), and using the same procedure in the other spatial dimension leads to analogous results. In summary the equation of balance of linear momentum is written as

(17)

where \(\displaystyle {\partial _{t} {\mathbf {u}} = \frac{\partial {\mathbf {u}} }{\partial t}}. \) \({\mathbf {D}}\) is the matrix form of the resistance law and it represents the dissipative effects in the fluid flow due by the presence of the solid matrix. The matrix form of the non-linear Darcy law is

$$\begin{aligned} {\mathbf {D}} = \alpha {\mathbf {u}}+\beta {\mathbf {u}} \cdot {\mathbf {u}}. \end{aligned}$$
(18)

where \(\alpha \) and \(\beta \) are constant coefficients.

Remark 1

A more general form of the constitutive equation of water can be now formulated as

$$\begin{aligned} \varvec{\sigma } := -np {\mathbf {I}} + 2 \nu \nabla ^{s}{\mathbf {u}} . \end{aligned}$$
(19)

This equation automatically reduces to Eq. (9) if the porosity is equal to one (i.e. the free surface flow problem is considered).

4 The Weak Form of the Problem

Eqs. (13) and (17) represent the modified form of the Navier–Stokes equations. These equations take into account the presence of a porous medium and reduce to the classical Navier–Stokes equations when the porosity is equal to one (\(n=1\)) (free fluid flow). The equations to be solved are, therefore

$$\begin{aligned}&\partial _{t} {\mathbf {u}} + \overline{{\mathbf {u}}} \cdot \nabla {\mathbf {u}} + n \nabla p - 2\nabla \cdot \nu \nabla ^{s} {\mathbf {u}} \nonumber \\&\quad {}- {\mathbf {b}} n + \alpha {\mathbf {u}} + \beta {\mathbf {u}} \cdot {\mathbf {u}} ={\mathbf {0}} \; \mathrm{in } \; \varOmega , \; t \in (0,T);\nonumber \\&\nabla \cdot {\mathbf {u}} = 0 \; \mathrm{in } \; \varOmega , \; t \in (0,T). \end{aligned}$$
(20)

where \(\varOmega \subset {\mathbb {R}}^{d}\) (where \(d\) is the space dimension, \(d=2\) in \(2D\) problems) is the fluid domain in a time interval \((0, T)\).

The boundary and initial condition of the problem are:

$$\begin{aligned}&{\mathbf {u}}({\mathbf {x}},0) = {\mathbf {u}}_{0}({\mathbf {x}})\quad \mathrm{in } \quad \varOmega ; \nonumber \\&{\mathbf {u}}({\mathbf {x}},t) = {\mathbf {g}}({\mathbf {x}},t)\quad \mathrm{on } \quad \partial \varOmega _{D}, \quad t \in (0,T); \\&{\mathbf {n}} \cdot \varvec{\sigma }({\mathbf {x}},t) = {\mathbf {t}}({\mathbf {x}},t)\quad \mathrm{on } \quad \partial \varOmega _{N}, \quad t \in (0,T);\nonumber \end{aligned}$$
(21)

where \(\varvec{\sigma }\) is defined by Eq. (19) and \(\varOmega _{D}\) and \(\varOmega _{N}\) are the Dirichlet and Neumann boundary respectively. Note that \({\mathbf {n}}\) indicates the outer unit normal vector whereas \(n\) (defined in Eq. (3)) is the porosity.

The weak form of Eqs. (20) is derived next using a Galerkin formulation. A mixed finite element method is obtained, for which the approximation of both the velocity components and the pressure (and their respective weighting functions) is introduced.

The weak form of Eqs. (20) is

$$\begin{aligned}&\int _{\varOmega } {\mathbf {w}} \partial _{t} {\mathbf {u}} d \varOmega +\int _{\varOmega } {\mathbf {w}} \overline{{\mathbf {u}}} \cdot \nabla {\mathbf {u}} d \varOmega +\int _{\varOmega } {\mathbf {w}} n \nabla p d \varOmega \nonumber \\&\quad {}-\int _{\varOmega } {\mathbf {w}} \nabla \cdot 2 \nu \nabla ^{s} {\mathbf {u}} d \varOmega +\int _{\varOmega } {\mathbf {w}} ( \alpha {\mathbf {u}} + \beta {\mathbf {u}} \cdot {\mathbf {u}}) d \varOmega \nonumber \\&\quad {\displaystyle {} -\int _{\varOmega } {\mathbf {w}} n {\mathbf {b}} d \varOmega } = {\mathbf {0}} \qquad \forall {\mathbf {w}} \in {\mathcal {V}}; \end{aligned}$$
(22a)
$$\begin{aligned}&\displaystyle {\int _{\varOmega } q \nabla \cdot {\mathbf {u}}} = 0 \qquad \forall q \in {\mathcal {Q}}; \end{aligned}$$
(22b)

where, for a fixed \(t \in (0,T)\), \({\mathbf {u}}\) is assumed to belong to the velocity space \({\mathcal {V}} \in [{\mathbf {H}}^{1} (\varOmega )]^{d}\) of vector functions whose components and their first derivatives are square-integrable, and \(p\) belongs to the pressure space \({\mathcal {Q}} \in [{\mathbf {H}}^{1} (\varOmega )]^{d}\). \({\mathbf {w}}\) and \(q\) are velocity and pressure weighting functions belonging to the velocity space and to the space of square-integrable functions (\({\mathbf {L}}_{2} \)), respectively. Integrating by parts the convective term, and identifying the domain boundary \(\Gamma \) as \( \partial \varOmega \) gives

$$\begin{aligned}&{\displaystyle \int _{\varOmega } {\mathbf {w}} \nabla \cdot 2 \nu \nabla ^{s} {\mathbf {u}} d \varOmega } = -2 \int _{\varOmega } \nabla {\mathbf {w}}: \nu \nabla ^{s} {\mathbf {u}} d \varOmega \nonumber \\&\quad {}+ \int _{\partial \varOmega } {\mathbf {w}} \cdot (2 \nu {\mathbf {n}} \cdot \nabla ^{s} {\mathbf {u}}) d \Gamma ; \end{aligned}$$
(23)

Remark 2

The pressure term is not integrated by parts. The reason behind this choice and its consequences are largely explained and justified in [47] where the same formulation was presented for free surface flows only. This is not repeated here for reason of simplicity. Let us just mention that, concerning the boundary conditions, this implies that there is no need of imposing explicitly the pressure boundary condition at the price of giving up the possibility of applying viscous tractions on the free surface. The normal force is applied point-wise on the Neumann boundary, which is acceptable for low viscosity flows like the ones analyzed in this work. Finally, this also implies that the pressure space should be in \([{\mathcal {H}}^{1} (\varOmega )]^{d}\) which is an additional requirement to the smoothness of the function.

Substituting Eq. (23) into Eqs. (22a) , the system to be solved becomes

$$\begin{aligned}&\int _{\varOmega } {\mathbf {w}} \partial _{t} {\mathbf {u}} d \varOmega +\int _{\varOmega } {\mathbf {w}} \overline{{\mathbf {u}}} \cdot \nabla {\mathbf {u}} d \varOmega -\int _{\varOmega } {\mathbf {w}} n \nabla p d \varOmega \nonumber \\&\quad {}+2 \int _{\varOmega } \nabla {\mathbf {w}}: \nu \nabla ^{s} {\mathbf {u}} d \varOmega +\int _{\varOmega } {\mathbf {w}} ( \alpha {\mathbf {u}} + \beta {\mathbf {u}} \cdot {\mathbf {u}}) d \varOmega \nonumber \\&\quad {\displaystyle -\int _{\varOmega } {\mathbf {w}} n {\mathbf {b}} d \varOmega } = {\mathbf {0}} \qquad \forall {\mathbf {w}} \in {\mathcal {V}};\end{aligned}$$
(24a)
$$\begin{aligned}&{\displaystyle \int _{\varOmega } q \nabla \cdot {\mathbf {u}}} d \varOmega = 0 \qquad \forall q \in {\mathcal {Q}}; \end{aligned}$$
(24b)

Let \({\mathcal {V}}_{h}\) be a finite element space to approximate \({\mathcal {V}}\), and \({\mathcal {Q}}_{h}\) a finite element approximation to \({\mathcal {Q}}\). The problem is now finding \({\mathbf {u}}_{h} \in {\mathcal {V}}_{h}\) and \(p_{h} \in {\mathcal {Q}}_{h}\) such that

$$\begin{aligned}&\int _{\varOmega } {\mathbf {w}}_{h} \partial _{t} {\mathbf {u}}_{h} d \varOmega +\int _{\varOmega } {\mathbf {w}}_{h} \overline{{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {u}}_{h} d \varOmega -\int _{\varOmega } {\mathbf {w}}_{h} \,n \nabla p_{h} d \varOmega \nonumber \\&\quad {}+2 \int _{\varOmega } \nabla {\mathbf {w}}_{h}: \nu \nabla ^{s} {\mathbf {u}}_{h} d \varOmega +\int _{\varOmega } {\mathbf {w}}_{h} ( \alpha {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h} \cdot {\mathbf {u}}_{h}) d \varOmega \nonumber \\&\quad {\displaystyle {}-\int _{\varOmega } {\mathbf {w}}_{h} n {\mathbf {b}} d \varOmega } = {\mathbf {0}} \qquad \forall {\mathbf {w}}_{h} \in {\mathcal {V}}_{h};\end{aligned}$$
(25a)
$$\begin{aligned}&{\displaystyle \int _{\varOmega } q_{h} \nabla \cdot {\mathbf {u}}_{h}} d \varOmega = 0 \qquad \forall q_{h} \in {\mathcal {Q}}_{h}; \end{aligned}$$
(25b)

4.1 Stabilized Formulation

In this work low-order simplicial elements will be used with the same linear interpolation for the velocity and pressure values. Hence, as usual for this type of finite element approximation, a stabilization technique is needed for both the convective term and the incompressibility constraint. In the present work the Orthogonal sub-grid scale OSS method introduced by Codina [6, 10] is used. In this case the space for the sub-grid scale is taken orthogonal to the finite element one.

Following strictly the operations outlined in [11, 52], the problem already presented in Eq. (25), with the insertion of the convection and incompressibility stabilization terms, is: find \(({\mathbf {u}}_{h}, p_{h}, \varvec{\pi }_{h}, \varvec{\xi }_{h} )\) in \({\mathcal {V}}_{h} \times {\mathcal {Q}}_{h} \times {\mathcal {V}}_{h} \times {\mathcal {V}}_{h}\) such that

$$\begin{aligned}&{\displaystyle \int _{\varOmega } {\mathbf {w}}_{h} \partial _{t} {\mathbf {u}}_{h} d \varOmega +\int _{\varOmega } {\mathbf {w}}_{h} \overline{{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {u}}_{h} d \varOmega } {\displaystyle -\int _{\varOmega } n p_{h} (\nabla \cdot {\mathbf {w}}_{h} ) d \varOmega }\nonumber \\&\quad {} +2 \int _{\varOmega } \nabla {\mathbf {w}}_{h} : \nu \nabla {\mathbf {u}}_{h} d \varOmega +\int _{\varOmega } {\mathbf {w}}_{h} ( \alpha {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h}\cdot {\mathbf {u}}_{h}) d \varOmega \nonumber \\&\quad -\int _{\varOmega } {\mathbf {w}}_{h} n {\mathbf {b}} d \varOmega -\int _{\varOmega } \tau ({\overline{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {w}}_{h}) {{\mathcal {P}}_{h}}^{\perp }\nonumber \\&\quad {\displaystyle {}\times ({\overline{\mathbf {u}}}_{h}\cdot \nabla {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h}\cdot {\mathbf {u}}_{h}) d \varOmega } \!=\! {\mathbf {0}}\quad \forall {\mathbf {w}}_{h} \in {{\mathcal {V}}_{h}};\nonumber \\&{\displaystyle \int _{\varOmega } q_{h} \nabla \cdot {\mathbf {u}}_{h}d \varOmega +\int _{\varOmega } \tau \nabla q_{h} {{\mathcal {P}}_{h}}^{\perp }( n \nabla p_{h}) d \varOmega } \!=\! 0\quad \forall q_{h} \in {\mathcal {Q}}_{h}; \end{aligned}$$
(26)

where \({{\mathcal {P}}_{h}}^{\perp }\) is the space of orthogonal projections \({{\mathcal {P}}_{h}}^{\perp } = {\mathcal {I}} - {{\mathcal {P}}_{h}}\) and \({{\mathcal {P}}_{h}}\) is the \(L_{2}-projection\) onto \({\mathcal {V}}_{h}\). That is

$$\begin{aligned}&{{\mathcal {P}}_{h}}^{\perp }({\overline{\mathbf {u}}}_{h}\cdot \nabla {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h} \cdot {\mathbf {u}}_{h}) = {\overline{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h}\cdot {\mathbf {u}}_{h}- \varvec{\pi }_{h};\end{aligned}$$
(27a)
$$\begin{aligned}&{{\mathcal {P}}_{h}}^{\perp }( \nabla p_{h}) = n \nabla p_{h} -\varvec{\xi }_{h}; \end{aligned}$$
(27b)

with \(\varvec{\pi }_{h}\) and \(\varvec{\xi }_{h}\) defined as

$$\begin{aligned} \int _{\varOmega } {\mathbf {w}}_{h}\varvec{\pi }_{h} d \varOmega&= \int _{\varOmega } {\mathbf {w}}_{h} ({\overline{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h}\cdot {\mathbf {u}}_{h})d \varOmega ;&\!&\forall {\mathbf {w}}_{h} \in {{\mathcal {V}}_{h}} \end{aligned}$$
(28a)
$$\begin{aligned} \int _{\varOmega } {\mathbf {w}}_{h} \varvec{\xi }_{h} d \varOmega&= \int _{\varOmega } {\mathbf {w}}_{h} n \nabla p_{h} d \varOmega ;&\!&\forall {\mathbf {w}}_{h} \in {{\mathcal {V}}_{h}} \end{aligned}$$
(28b)

\(\varvec{\xi }\) and \(\varvec{\pi }\) are not additional unknowns since these can be easily expressed in terms of the velocity and pressure DOF through Eqs. 28a and 28b.

Remark 3

A split-OSS method has been implemented. Instead of taking the whole residuum of the momentum equation as in the algebraig SubGrid Scale method (ASGS) [25], only its orthogonal projection (the projection onto \({{\mathcal {P}}_{h}}^{\perp }\)) is taken into account. Two considerations should be made:

  • The inertia term, the body force term and the linear part of the Darcy term belong to the finite element space \({\mathcal {V}}_{h}\) (i.e. their projection onto \({{\mathcal {P}}_{h}}^{\perp }\) is zero);

  • The viscous term vanishes using linear elements;

Therefore \({\mathcal {R}}^{m}({\mathbf {u}}_{h}) \) takes the form

$$\begin{aligned} {\mathcal {R}}^{m}({\mathbf {u}}_{h}) = {{\mathcal {P}}_{h}}^{\perp }({\overline{\mathbf {u}}}_{h}\cdot \nabla {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h} \cdot {\mathbf {u}}_{h} + \nabla p_{h}); \end{aligned}$$
(29)

and the stabilization term should be

$$\begin{aligned} \int _{\varOmega } \tau ( {\overline{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {w}}_{h} + \nabla q_{h}){\mathcal {R}}^{m}({\mathbf {u}}_{h}) d \varOmega ; \end{aligned}$$
(30)

which is different from the one used in the current work, which is

$$\begin{aligned}&\int _{\varOmega } \tau ( {\overline{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {w}}_{h}){{\mathcal {P}}_{h}}^{\perp } ({\overline{\mathbf {u}}}_{h} \cdot \nabla {\mathbf {u}}_{h} + \beta {\mathbf {u}}_{h}\cdot {\mathbf {u}}_{h} )d \varOmega \nonumber \\&\quad {}+ \int _{\varOmega } \tau \nabla q_{h} {{\mathcal {P}}_{h}}^{\perp }( \nabla p_{h}) d\varOmega . \end{aligned}$$
(31)

In practice this second form has been seen to be very effective [52] and is the one implemented in this work.

An error analysis leads to the definition of \(\tau _{i}\)in function of the parameters of the differential equation (like advective velocity \({\mathbf {u}}\) or kinematic viscosity \(\nu \)) [16]. Following the analysis of Codina [7, 9], \(\tau \) is defined as

$$\begin{aligned} \tau _{i} ={\displaystyle \left( \frac{\delta }{\Delta t} + \frac{4\nu _{i}}{h_{i}^{2}} + \frac{2|{\overline{\mathbf {u}}}_{i}|}{h_{i}} + (\alpha + \beta |{\mathbf {u}}_{\mathbf {i}}|)\right) ^{-1}} \end{aligned}$$
(32)

where \(h_{i}\) is a characteristic mesh size taken equal to the minimum edge length (\(l_{ij}\)) of the edges \(ij\) surrounding node \( i\). \(\delta \) is a parameter that controls the importance of the dynamic term in the stabilization (\(\delta \in [0,1]\)).

4.2 Discretization Procedure

The system of Eqs. (26) can be rewritten in a semi discrete form as

$$\begin{aligned}&{\mathbf {M}}\partial _{t} {\mathbf {u}} + {\mathbf {K}}^{C}\left( {\mathbf {u}}\right) {\mathbf {u}} + \varvec{\nabla } {\mathbf {p}} +{\mathbf { K}}^{\mu } {\mathbf {u}}\nonumber \\&\quad {}+{\mathbf {K}}^{D}\left( {\mathbf {u}}\right) {\mathbf {u}} +{\mathbf {S}}^{u}{\mathbf {u}} - {\mathbf {S}}^{\pi }\varvec{\pi } - {\mathbf {F}} = {\mathbf {0}};\end{aligned}$$
(33a)
$$\begin{aligned}&{\mathbf {D}} {\mathbf {u}} + {\mathbf {S}}^{p}{\mathbf {p}} - {\mathbf {S}}^{\xi }\varvec{\xi } = {\mathbf {0}}; \end{aligned}$$
(33b)
$$\begin{aligned}&{\mathbf {M}} \varvec{\pi } - {\mathbf {K}}^{C}({\mathbf {u}}){\mathbf {u}} = {\mathbf {0}}; \end{aligned}$$
(33c)
$$\begin{aligned}&{\mathbf {M}}\varvec{\xi } - \varvec{\nabla } {\mathbf {p}} = {\mathbf {0}}; \end{aligned}$$
(33d)

where \({\mathbf {u}}\) is the vector of nodal velocities and \({\mathbf {p}}\) the vector of nodal pressures. The operators take the form presented in Table 1 and the stabilization operators \({\mathbf {S}}^{i}\) are defined as shown in Table 2.

In order to simplify the problem, Eqs. (33c) and (33d) can be substituted in Eqs. (33a) and (33b) respectively, giving

$$\begin{aligned}&{\mathbf {M}}\partial _{t} {\mathbf {u}} + {\mathbf {K}}^{C}\left( {\mathbf {u}}\right) {\mathbf {u}} + \varvec{\nabla } {\mathbf {p}} +{\mathbf {K}}^{\mu } {\mathbf {u}}\nonumber \\&\quad {}+{\mathbf {K}}^{D}\left( {\mathbf {u}}\right) {\mathbf {u}} +{\mathbf {S}}^{u}{\mathbf {u}} - {\mathbf {S}}^{\pi }{\mathbf {M}}^{-1}{\mathbf {K}}^{C}({\mathbf {u}}){\mathbf {u}} -{\mathbf {F}} = {\mathbf {0}};\end{aligned}$$
(34a)
$$\begin{aligned}&{\mathbf {D}} {\mathbf {u}} + {\mathbf {S}}^{p}{\mathbf {p}} - {\mathbf {S}}^{\xi }{\mathbf {M}}^{-1}\varvec{\nabla } {\mathbf {p}} = 0; \end{aligned}$$
(34b)

The residual of the momentum equations without the dynamic term is defined as

$$\begin{aligned} {\mathbf {r}}\left( {\mathbf {u}},{\mathbf {p}} \right)&:= {\displaystyle {\mathbf {K}}^{C}\left( {\mathbf {u}}\right) {\mathbf {u}} + \varvec{\nabla } {\mathbf {p}} +{\mathbf {K}}^{\mu }{\mathbf {u}} } \nonumber \\&\quad {\displaystyle {} +{\mathbf {K}}^{D}\left( {\mathbf {u}}\right) {\mathbf {u}} +{\mathbf {S}}^{u}{\mathbf {u}} - {\mathbf {S}}^{\pi }{\mathbf {M}}^{-1}{\mathbf {K}}^{C}({\mathbf {u}}){\mathbf {u}} - {\mathbf {F}} ;} \end{aligned}$$
(35)
Table 1 Matrices and vectors of the semi discrete form of Eqs. (34)
Table 2 Stabilization matrices and vectors of system of Eqs. (34)

4.3 Solution Strategy and Time Discretization Scheme

The modified form of the Navier–Stokes equations is solved using a fractional step (FS) algorithm. Pressure-splitting approaches of the fractional-step type are very convenient due to their high computational efficiency for flows at high \(Re\). The fundamental idea is to split the momentum equation in two, decoupling the degrees of freedom of the problem. This allows to solve the momentum equation keeping the pressure fixed and later to correct the pressure so as to guarantee the satisfaction of the mass balance constraint [8].

Traditionally FS methods are used in an implicit context and the momentum equation is discretized in time using schemes like for instance the Backward Differentiation Formula (BDF). However it should be noticed that in dealing with free surface flows, the fluid domain and, therefore, its boundaries, are subjected to frequent and radical shape changes. These lead, in the practice, to a restriction of the Courant Friedrichs Lewy (CFL) number to values in the order of the unity. In this context the use of a semi-explicit scheme like the one presented in this paper, can be competitive since the time steps are of the same order of magnitude.

These considerations together with the lower computational cost and the highly parallelizablility of an explicit method, lead us to choose this approach for the time integration of the system.

4.3.1 Runge Kutta Time Integration Scheme

Among the \(m\)-Runge Kutta schemes, it is known that the order of the time integration can be arbitrarily chosen, although they give \(m-th\) order of accuracy up to \(m=4\), whenever for \(m>4\) the order is lower than \(m\). On the other hand, it is demonstrated that the 4th order Runge Kutta scheme (RK4) is the optimal compromise between the number of intermediate steps and the permissible time step size in spite of its conditional stability [16].

RK4 makes use of the solution at time \(t^{n}\) to evaluate the solution at time \(t^{n+1}\) by calculating the residual of the equations at a certain number of intermediate steps.

This means that for a general Cauchy problem

$$\begin{aligned} \frac{\partial y}{\partial t} = f( y(t),t); \end{aligned}$$
(36)

a one step explicit approach leads to a time integration scheme with the following general format

$$\begin{aligned} \frac{y^{n+1}-y^{n}}{\Delta t} = f(y^{n}, t^{n}); \end{aligned}$$
(37)

whereas for the 4th order Runge Kutta method

$$\begin{aligned} \frac{y^{n+1}-y^{n}}{\Delta t} = \frac{1}{6} (r_{1} + 2 \, r_{2} + 2 \,r_{3} + r_{4}); \end{aligned}$$
(38)

where \(r_{i}\) with \(i=1,2,3,4\) are the residuals of the stationary form of Eq. 36 evaluated at

$$\begin{aligned} r_{1}&= f\left( t^{n}, y^{n}\right) ;\nonumber \\ r_{2}&= {\displaystyle f\left( t^{n} + \frac{\Delta t}{2}, y^{n} + \frac{\Delta t}{2}\cdot r_{1}\right) ;}\nonumber \\ r_{3}&= {\displaystyle f\left( t^{n} + \frac{\Delta t}{2}, y^{n}+ + \frac{\Delta t}{2}\cdot r_{2}\right) ;}\nonumber \\ r_{4}&= {\displaystyle f\left( t^{n} +\Delta t, y^{n} + \Delta t\cdot r_{3}\right) .} \end{aligned}$$
(39)

In order to fully explain every stage of the integration scheme applied to the momentum equation let us use the definition of the stabilized residual obtained in Eq. (35).

The semi-discrete form of the momentum equations in terms of the residuals at the intermediate stages is then

$$\begin{aligned} {\displaystyle {\mathbf {M}}\frac{{\mathbf {u}}^{n+1}-{\mathbf {u}}^{n}}{\Delta t}}&= {\displaystyle \frac{1}{6} \left[ {\mathbf {r}}_{1} + 2 \,{\mathbf {r}}_{2} + 2 \,{\mathbf {r}}_{3} + {\mathbf {r}}_{4}\right] };\nonumber \\&= \frac{1}{6} \left[ {\mathbf {r}}({\mathbf {u}}^{n}, {\mathbf {p}}^{n}) +2 \,{\mathbf {r}}({\mathbf {u}}^{\theta 1}, {\mathbf {p}}^{\theta 1}) +2 \, {\mathbf {r}}({\mathbf {u}}^{\theta 2}, {\mathbf {p}}^{\theta 2})\right. \nonumber \\&\quad \left. {}+{\mathbf {r}}({\mathbf {u}}^{\theta 3}, {\mathbf {p}}^{\theta 3})\right] ; \end{aligned}$$
(40)

where \({\mathbf {r}}({\mathbf {u}}^{\theta _{i}}, {\mathbf {p}}^{\theta _{i}})\) are the residuals of the momentum equations defined by Eq. (35) evaluated at \(\theta _{i}\) intermediate stages.

To correctly evaluate the residual at each intermediate time step, the solution of the continuity equation would have been required. This would have considerably reduced the efficiency requiring a huge computational effort. In order to overcome this issue and according to [48], a linear variation of pressure is assumed within the time step. It should be remarked that this assumption leads the velocity field to be divergence-free only at the end of the step.

Redefining Eq. (35) as

$$\begin{aligned} {\mathbf {r}}({\mathbf {u}},{\mathbf {p}}) = {\mathbf {r}}^{u}({\mathbf {u}}) + {\mathbf {r}}^{\mathbf {p}}({\mathbf {p}}); \end{aligned}$$
(41)

being \( {\mathbf {r}}^{u}({\mathbf {u}}) \) the part of the residual related to velocity and \({\mathbf {r}}^{\mathbf {p}}({\mathbf {p}})\) the part related to the pressure gradients. The residuals become

$$\begin{aligned} {\mathbf {r}}_{1}&:= {\mathbf {r}}({\mathbf {u}}^{n}, {\mathbf {p}}^{n}) = {\displaystyle {\mathbf {r}}^{u}({\mathbf {u}}^{n})+ \varvec{\nabla } {\mathbf {p}}^{n};}\nonumber \\ {\mathbf {r}}_{2}&:= {\mathbf {r}}({\mathbf {u}}^{\theta 1}, {\mathbf {p}}^{\theta 1}) = {\displaystyle {\mathbf {r}}^{u}({\mathbf {u}}^{\theta 1})+ \frac{1}{2} \left( \varvec{\nabla } {\mathbf {p}}^{n} + \varvec{\nabla } {\mathbf {p}}^{n+1} \right) ;}\nonumber \\ {\mathbf {r}}_{3}&:= {\mathbf {r}}({\mathbf {u}}^{\theta 2}, {\mathbf {p}}^{\theta 2}) = {\displaystyle {\mathbf {r}}^{u}({\mathbf {u}}^{\theta 2})+ \frac{1}{2} \left( \varvec{\nabla } {\mathbf {p}}^{n} + \varvec{\nabla } {\mathbf {p}}^{n+1} \right) ;}\nonumber \\ {\mathbf {r}}_{4}&:= {\mathbf {r}}({\mathbf {u}}^{\theta 3}, {\mathbf {p}}^{\theta 3}) = {\displaystyle {\mathbf {r}}^{u}({\mathbf {u}}^{\theta 3})+ \varvec{\nabla } {\mathbf {p}}^{n+1};} \end{aligned}$$
(42)

The global momentum eqation (Eq. (40)) can be symbolically rewritten as

$$\begin{aligned} {\mathbf {M}} \frac{{\mathbf {u}}^{n+1} - {\mathbf {u}}^{n} }{\Delta t}&= \frac{1}{6} \left[ {\mathbf {r}}^{u}({\mathbf {u}}^{n}) +2 \,{\mathbf {r}}^{u}({\mathbf {u}}^{\theta 1}) +2 \, {\mathbf {r}}^{u}({\mathbf {u}}^{\theta 2}) + {\mathbf {r}}^{u}({\mathbf {u}}^{\theta 3}) \right] \nonumber \\&\quad {}+ {\displaystyle \frac{1}{2} \left[ \varvec{\nabla } {\mathbf {p}}^{n} + \varvec{\nabla } {\mathbf {p}}^{n+1} \right] } \end{aligned}$$
(43)

4.3.2 Final System Using a Fractional Step Approach and a RK4 Scheme

In order to decouple the solution for the velocity and pressure, the traditional pressure splitting procedure is performed and the fractional step velocity \(\tilde{{\mathbf {u}}}\) is inserted. This gives

$$\begin{aligned} {\mathbf {M}}\frac{ \tilde{{\mathbf {u}}} -{\mathbf {u}}^{n}}{\Delta t}&= \frac{1}{6}\left[ {\mathbf {r}}^{u}({\mathbf {u}}^{n}) +2 \, {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 1}) +2 \, {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 2}) + {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 3}) \right] \nonumber \\&\quad {} +\frac{1}{2} \varvec{\nabla } {\mathbf {p}}^{n}; \end{aligned}$$
(44a)
$$\begin{aligned}&{\mathbf {M}} \frac{{\mathbf {u}}^{n+1} - \tilde{{\mathbf {u}}}}{\Delta t} + \frac{1}{2}\varvec{\nabla }( {\mathbf {p}}^{n+1}-{\mathbf {p}}^{n}) = {\mathbf {0}};\end{aligned}$$
(44b)
$$\begin{aligned}&{\mathbf {D}} {\mathbf {u}}^{n+1} + {\mathbf {S}}^{p} {\mathbf {p}}^{n+1} - {\mathbf {S}}^{\xi } {\mathbf {M}}^{-1}{\mathbf {G}}{\mathbf {p}}^{n+1} = 0; \end{aligned}$$
(44c)

where it has to be remarked that Eq. (44a) only depends on the pressure at the previous time step and on the intermediate fractional step velocities, leading to a slightly different RK4 steps as explained later on.

From Eq. (44b)

$$\begin{aligned} {\mathbf {u}}^{n+1} = \tilde{{\mathbf {u}}} -\frac{\Delta t}{2} {\mathbf {M}}^{-1}\varvec{\nabla } ({\mathbf {p}}^{n+1}-{\mathbf {p}}^{n}); \end{aligned}$$
(45)

that substituted in Eq. (44c) gives

$$\begin{aligned}&{\mathbf {D}}{\tilde{\mathbf {u}}}-\frac{ \Delta t}{2} {\mathbf {D}} {\mathbf {M}}^{-{\mathbf {1}}}\varvec{\nabla }({\mathbf {p}}^{n+1}-{\mathbf {p}}^{n})+{\mathbf {S}}^{p}{\mathbf {p}}^{n+1}\nonumber \\&\quad {}-{\mathbf {S}}^{\xi }{\mathbf {M}}^-{\mathbf {1}}{\mathbf {G}} {\mathbf {p}}^{n+1} = 0. \end{aligned}$$
(46)

Finally, substituting the discrete Laplacian (\({\mathbf {D}} {\mathbf {M}}^{-1}\varvec{\nabla }\)) by the continuous one (\({\mathbf {L}}\)) according to [8], the final system to be solved is:

$$\begin{aligned} {\mathbf {M}}\frac{ \tilde{{\mathbf {u}}} -{\mathbf {u}}^{n}}{\Delta t}&= \frac{1}{6}\left[ {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{n}) +2 \, {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 1}) \right. \nonumber \\&\quad \left. {}+2 \, {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 2}) + {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 3}) \right] +\frac{1}{2} \varvec{\nabla } {\mathbf {p}}^{n} ; \end{aligned}$$
(47a)
$$\begin{aligned}&\frac{\Delta t}{2} {\mathbf {L}} \left( {\mathbf {p}}^{n+1}-{\mathbf {p}}^{n}\right) = {\mathbf {D}}\tilde{{\mathbf {u}}} + {\mathbf {S}}^{p} {\mathbf {p}}^{n+1} - {\mathbf {S}}^{\xi } {\mathbf {M}}^{-1}{\mathbf {G}}{\mathbf {p}}^{n+1};\end{aligned}$$
(47b)
$$\begin{aligned}&{\mathbf {u}}^{n+1} = \tilde{{\mathbf {u}}} - \frac{\Delta t}{2} {\mathbf {M}}^{-1} \varvec{\nabla } \left( {\mathbf {p}}^{n+1}-{\mathbf {p}}^{n}\right) ; \end{aligned}$$
(47c)

where the residuals of Eq. (47a) are evaluated according to the following steps

$$\begin{aligned}&{\displaystyle {\mathbf {r}}^{u}({\mathbf {u}}^{n});} \end{aligned}$$
(48a)
$$\begin{aligned}&\tilde{{\mathbf {u}}}^{\theta 1} = {\displaystyle {\mathbf {u}}^{n} + {\mathbf {M}}^{-1}\frac{\Delta t}{2} \left[ {\mathbf {r}}^{u}({\mathbf {u}}^{n}) + \varvec{\nabla } {\mathbf {p}}^{n} \right] ;}\end{aligned}$$
(48b)
$$\begin{aligned}&{\displaystyle {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 1});} \end{aligned}$$
(48c)
$$\begin{aligned}&\tilde{{\mathbf {u}}}^{\theta 2} = {\displaystyle {\mathbf {u}}^{n} + {\mathbf {M}}^{-1}\frac{\Delta t}{2} \left[ {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 1}) + \frac{1}{2} \varvec{\nabla } {\mathbf {p}}^{n} \right] ;} \end{aligned}$$
(48d)
$$\begin{aligned}&{\displaystyle {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 2})} \end{aligned}$$
(48e)
$$\begin{aligned}&\tilde{{\mathbf {u}}}^{\theta 3} = {\displaystyle {\mathbf {u}}^{n} + {\mathbf {M}}^{-1}\Delta t \left[ {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 2})+ \frac{1}{2} \varvec{\nabla } {\mathbf {p}}^{n} \right] ;}\end{aligned}$$
(48f)
$$\begin{aligned}&{\displaystyle {\mathbf {r}}^{u}(\tilde{{\mathbf {u}}}^{\theta 3});} \end{aligned}$$
(48g)

4.4 The Edge-based Approach

Having made the choice of an explicit scheme for the time integration of the momentum equation, a suitable data structure for the fast calculation of the residuals should be devised. The idea to be exploited is that many of the integrals involved in the computation of the residual can be written in terms of constant operators which can be directly applied to the nodal values. Different techniques were developed over the years to reach such goal. In this work the nodal-based approach described in [6] is blended with the edge-based proposed in [52] and [35].

The starting point is the systematic usage of the partition-of-unity property of the FE shape functions, which provides the relations

$$\begin{aligned} \sum _{i}{ N_i} = 1 \implies N_i = 1 - \sum _{j\ne i}{N_j}; \end{aligned}$$
(49)

and, as a consequence,

$$\begin{aligned} \sum _{i}{ \nabla N_i} = 0 \implies \nabla N_i = - \sum _{j\ne i}{\nabla N_j}. \end{aligned}$$
(50)

The edge-based approach is obtained by applying systematically such relations for the computation of the discrete operators of interest. The detailed procedure to obtain all the needed operators is presented by the authors in [47] by expressing the contributions to the entry corresponding to a given node \(i\). The \(j\) index indicates one of the neighbor nodes of \(i\) which shares an edge with it.

The common features of all of the terms described is that they can be evaluated for each node \(i\) independently of all of the others. This implies that the calculation of the residuals can be performed in parallel for each node of the mesh.

5 Free Surface Tracking: The Level Set Method

The problem is solved in an Eulerian fixed mesh approach. Hence a technique to accurately track the evolution of the free surface should be adopted.

In the present work the level set technique presented by the authors in [47] is used. In what follows a brief overview of the relevant aspects of the level set strategy are pointed out, nevertheless the consultation of [47] and [25] is recommended for a comprehensive analysis of the algorithm.

In the level set technique the free surface is represented by a signed distance function, the level set function (\(\varphi ({\mathbf {x}}, t)\)) that takes the value \(0\) on the free surface, takes negative values in the fluid domain and positive values outside the fluid domain [46].

The fluid domain \(\varOmega (t)\) is evolving during the process and can move in the global domain of analysis \(\varOmega _0\) according to the solution of the Navier–Stokes problem presented in the previous sections.

The level set function, for a given time instant \(t\), is defined as

$$\begin{aligned} \begin{aligned} \varphi ({\mathbf {x}})&= d({\mathbf {x}})&\mathrm{if }&\,\, x \notin \varOmega , t \in (0,T);\\ \varphi ({\mathbf {x}})&= d({\mathbf {x}}) = 0&\mathrm{if }&\,\, x \in \partial \varOmega , t \in (0,T);\\ \varphi ({\mathbf {x}})&= -d({\mathbf {x}})&\mathrm{if }&\,\, x \in \varOmega , t \in (0,T); \end{aligned} \end{aligned}$$
(51)

where \(d({\mathbf {x}}) = min|{\mathbf {x}} - {\mathbf {x}}_{\mathbf {i}}|\) being \({\mathbf {x}}_{\mathbf {i}}\) is any point on the free surface boundary \(\partial \varOmega \).

The problem is thus transferred to the solution of the following transport problem

$$\begin{aligned} \begin{array}{ll} \partial _{t} \varphi + \overline{{\mathbf {u}}} \cdot \nabla \varphi = 0 &{}\quad \mathrm{in } \quad \varOmega ^{0},\quad t \in (0,T),\\ \varphi = \overline{\varphi }&{}\quad \mathrm{on } \quad \partial \varOmega _{in},\quad t \in (0,T),\\ \varphi ({\mathbf {x}},0) = \varphi _{0}({\mathbf {x}}) &{} \quad \mathrm{in } \quad \varOmega ^{0}, \end{array} \end{aligned}$$
(52)

where \(\partial \varOmega _{in} := \{{\mathbf {x}} \in \partial \varOmega ^{0}\,\,|\,\,{\mathbf {u}} \cdot {\mathbf {n}} < 0\}\) is the inflow part of \(\partial \varOmega _{m}\).

Eqs. (52) are solved using a RK4 scheme and an Orthogonal Sub-grid scale stabilization technique [47].

The coupling between the level set and the Navier–Stokes solver is accurately described in [47] and is not repeated here since no difference is introduced by the extension of the model to the treatment of porous zones.

6 The Algorithm

The steps of the global algorithm for modeling a free surface flow in a porous medium are summarized in Box 1.

figure a

The resulting code has been implemented in the Kratos multiphysics open source C++ platform [12, 24].

7 Numerical Examples

A series of numerical test is reported in the following sections with the aim of validating the presented technique designed to solve the fluid flow within a porous material and in the clear fluid region with a unified formulation.

The results are compared to experimental data or to results obtained with other numerical techniques.

First the flux throughout a homogeneous rockfill small scale dam is simulated varying the coefficients of the resistance law to analyze their effect on the fluid flow.

In the second example a small scale dam with different materials is reproduced under different flow condition.

These numerical examples follow and complete the work presented in [28] and [29] where the authors used an Ergun resistance law to simulate the experiments on small scale prototype dams carried out at the Technical University of Madrid by Prof Miguel Angel Toledo and his group and at the at the Center for Hydrographic Studies of CEDEX in Madrid (Spain) [27].

Finally an example of a dambreak in presence of a porous layer is reproduced and compared to the results obtained in the University of Cantabria (Spain) using a VARANS model [14].

7.1 Homogeneous Rockfill Dam: Sensitivity in the Resistance Law Chosen

In this example the seepage line and pressure distribution inside a dam made of homogeneous material is analyzed in order to check the influence of the linear (\(\alpha \)) and non linear (\(\beta \)) part of the resistance law (Eq. (18)).

Among the different quadratic laws proposed in the literature to describe the seepage evolution inside rockfill slopes (see Section 2.2) the Ergun coefficients is taken as a reference in the current example, i.e.

$$\begin{aligned} \alpha _{E} = 150 \cdot \frac{(1-n)^{2}}{n^{3}} \cdot \frac{\mu }{D_{50}^{2}}; \end{aligned}$$
(53)

and

$$\begin{aligned} \beta _{E} = 1.75 \cdot \frac{(1-n)}{n^{3}} \cdot \frac{\rho }{D_{50}}; \end{aligned}$$
(54)

The authors have already used this specific resistance law in previous works [26, 29] with positive results. Nevertheless, it was observed that the Ergun law under-estimates the pressure loss inside the rockfill when the porosity is increased for a constant diameter of the particle (\(D_{50}\)); that is, when a homogeneous material, instead of a well grained one, is used.

The geometry of the example reproduces an experiment carried out at the laboratories of the Center for Hydrographic Studies of CEDEX and is detailed in Fig. 4. The physical dam model is composed of homogeneous material with porosity \(n=0.4921\) and \(D_{50}=0.35\) and the inlet discharge is \(Q=14.85\) l/s.

In this case, the corresponding Ergun coefficients are \(\alpha _{E} =\) 264.87 Pa s/m\(^{2}\) and \(\beta _{E} = \)212 877 Pa s\(^{2}\)/m\(^{3}\).

Fig. 4
figure 4

Downstream slope 1\(:\)3. Geometry of the dam model used in the experiments. The width of the flume is 1 m

In order to verify the relation between the pressure drop and the linear and non linear terms of the resistance equation a parametric study is performed. The linear coefficient is increased \(5\), \(10\), \(20\) and \(30\) times respectively, and the bottom pressure distribution is registered at the stationary regime as shown in Fig. 5. As expected, no relevant differences are observed in the pressure curves, in fact the linear part of the resistance law (Eq. (6)) (corresponding to the linear Darcy law) is not dominating in turbulent regimes. On the contrary, when the linear coefficient is kept constant and the non linear one is increased as described, the dissipation is varying sensibly, as shown in Fig. 6.

Fig. 5
figure 5

Downstream slope 1\(:\)3. Sensitivity on the linear coefficient of the resistance law \(\alpha \)

Fig. 6
figure 6

Downstream slope 1\(:\)3. Sensitivity on the non linear coefficient of the resistance law \(\beta \)

The local turbulent effects are therefore much more evident for large porosities and the non linear term should be \(30\) times larger to correctly simulate the energy dissipation. The suitable coefficients of the resistance law should be \(\alpha _{E}\) and \(30 \beta _{E}\). The same material properties have been used changing the geometrical configuration of the dam (see Fig. 7) and increasing the inlet discharge to \(19.14\) l/s. Also in this case the coefficients of the resistance law should be \(\alpha _{E}\) and \(30 \beta _{E}\) (see Fig. 8) to correctly reproduce the dissipation. This confirms that the resistance law is not influenced by the geometry of the downstream shoulder, but only by the material properties.

7.2 Dam with Layers of Different Materials

The second example simulates the flow of water through porous material with different characteristics and variable porosities. With this purpose, the experiments carried out at the Technical University of Madrid (UPM) by Prof Miguel Angel Toledo and Dr. Rafael Moran are reproduced (Figs. 9, 10). The objective of their research was the study of protection at the downstream toe of a rockfill dam to avoid the collapse in overtopping scenarios [39] and [40].

Fig. 7
figure 7

Downstream slope 1\(:\)2.2. Geometry of the dam model used in the experiments. The width of the flume is 1 m

Fig. 8
figure 8

Downstream slope \(1:2.2\). Sensitivity on the non linear coefficient of the resistance law \(\beta \)

Fig. 9
figure 9

Geometry of the experimental setting of UPM

Fig. 10
figure 10

Mesh and boundary conditions of the model of the multi-layers dam

In the chosen experiment, a small scale dam made of two different rockfill materials is considered. The body of the dam is made of incoherent rockfill (material \(1\)) with porosity \(n=0.41\) and \(D_50= 12.6\) mm. The protection layer at the toe of the dam is made of coarser rockfill with \(n=0.41\) and \(D_50= 35\) mm (material \(2\)).

The experiment was carried out in a flume of height \(h= 1.4\) m, width \(w=1.32\) m and length \(l=13, 7\) m.

The resistance laws used in the simulation for the material \(1\) and \(2\) were experimentally derived in [39] and are respectively:

$$\begin{aligned}&{\mathbf {i}}_{1} = 26\,585.1\, {\mathbf {u}} + 641\,083.5\, {\mathbf {u}}^2;\end{aligned}$$
(55)
$$\begin{aligned}&{\mathbf {i}}_{2} = 8\,044.2\, {\mathbf {u}} + 518\,164.2\, {\mathbf {u}}^2; \end{aligned}$$
(56)

where \({\mathbf {i}}_{1}\) and \({\mathbf {i}}_{2}\) are the pressure drop due to seepage in material \(1\) and \(2\) respectively. For an incoming discharge up to \(16\) l/sm no failure was observed during the experiments and, therefore, the dam can be considered undeformable during the evaluation of the seepage.

The simulation was run with three different incoming discharges: \(Q_{1} = 9.2\) l/s, \(Q_{2} = 11.2\) l/s, \(Q_{3} = 15.9\) l/s. The pressure head is plotted in Fig. 11 and compared to the data registered during the experiment. The experimental data have an error of approximately \(10\,\%\) which is represented by the error bar in the graphs. The numerical results correctly match the experimental values.

Fig. 11
figure 11

Numerical and experimental comparison of pressure heads distribution at the bottom of the multi layer dam. Three different incoming discharges have been considered: \(9.2\) l/s (continuous line), \(11.2\) l/s (dotted line), \(15.9\) l/s (pointed line)

7.3 Porous Dambreak

The third example reproduces a dambreak of a water column in presence of a porous material covering part of the domain. This example analyzes the capability of the model to simulate transient phenomena both in \(2D\) and \(3D\). The results are compared to the work of del Jesus [14]. In that case a VARANS model was developed to simulate the effects of waves on permeable coastal structures and a Forchheimer resistance law was used to take into account the presence of the porous media.

The geometry of the \(2D\) model mimics the experiments carried out by Lin [34] and is schematically shown in Fig. 12. A water column of variable height is left falling in a tank where a porous layer is set in the middle.

Fig. 12
figure 12

Geometrical configuration of the porous dam-breaking

The material used in the experiment to simulate the porous layer are glass beads with porosity \(n= 0.39\) and averaged diameter \(D_{50} = 3\) mm. The resistance law is the one obtained in [14].

$$\begin{aligned} {\mathbf {i}} = 1\,628\,460\, {\mathbf {u}} + 8\,407\,170\, {\mathbf {u}}^2; \end{aligned}$$
(57)

The \(2D\) analysis is carried out with a mesh of 49,000 linear triangular elements and \(24\ 800\) nodes.

Two different water heights are simulated: \(h_1 = 14\) cm and \(h_2 = 25\) cm. In both cases, the configuration of the free surface at different instants is compared to the experimental data and with the results obtained by del Jesus in Figs. 13 and 14.

Fig. 13
figure 13

Porous dam breaking with \(h= 0.14\) cm. Current results (red solid line) compared to the experimental laboratory data (circle) and the numerical results presented in [14]. a \(t=0.4\) s, b \(t=0.8\) s, c \(t=1,2\) s, d \(t=1.6\) s, e \(t=4.0\) s. (Color figure online)

Fig. 14
figure 14

Porous dam breaking with \(h= 0.25\) cm. Current results (blue solid line) compared to the experimental laboratory data (circle) and the numerical results presented in [14]. a \(t=0.4\) s, b \(t=0.8\) s, c \(t=1,2\) s, d \(t=1.6\) s, e \(t=4.0\) s. (Color figure online)

The matching between the results obtained in the present numerical technique and the VARANS model is evident. Both techniques present a smoother behavior with respect to experimental data in the region upstream the porous medium. Moreover, at the initial steps the numerical results present a delay in the lower part of the fluid front (see Figs. 13a, b, 14a, b). This might be the consequence of the initial condition of free falling of the water column during the experiment. The resistance given by the porous matrix is correctly reproduced.

Del Jesus proposed some preliminary results of a \(3D\) porous dambreak [14]. In this case, the porous column covers only part of the width of the tank so to see the effect of the percolation and of the flow in the clear fluid region at the same time. The geometry proposed in [14] is presented in Fig. 15. The \(3D\) analysis is carried out with a mesh of 543,000 four-noded linear tetrahedral elements and \(97\, 400\) nodes.

Fig. 15
figure 15

Geometrical configuration of the 3D porous dam-breaking

Figures 16 and 17 present a qualitative comparison between the results obtained by del Jesus with the VARANS models (left column) and those obtained by the authors using the current model (right column). The simulation lasts two seconds and the comparison of the results is done at time \(0\) s, \(0,2\) s, \(0,25\) s, \(0,35\) s, \(0,4\) s in Fig. 16 and at \(0,6\) s, \(1,0\) s, \(1,13\) s, \(1,33\) s, \(1,75\) s in Fig. 17. The two models reproduce the dambreak with a high level of similarity.

Fig. 16
figure 16

3D dambreak of a water column in a tank partially covered by porous material. Comparison between the results of the proposed method (right column) and the results taken from [14] (left column). From above, time instances \(0\), \(0.2\), \(0.25\), \(0.35\) and \(0.4\) seconds. a Results taken from [14]. b Current results

Fig. 17
figure 17

3D dambreak of a water column in a tank partially covered by porous material. Comparison between the results of the proposed method (right column) and the results taken from [14] (left column). From above, time instances \(0.6\), \(1.0\), \(1.13\), \(1.33\) and \(1.75\) seconds. a Results taken from [14]. b Current results

8 Conclusions

In the present work a model for the simulation of the seepage evolution in porous materials and free surface flow is presented. A unified formulation of the Navier–Stokes equations has been derived to take into account the presence of a porous material. The model is conceived to represent seepage problems that fall outside the range of validity of Darcy law, like rockfill or other materials with extremely high permeability (this is the case, for instance, of concrete tetrapods or cubes used for coastal protections). For this purpose a Forchheimer resistance law has been added as dissipation term in the linear momentum equations. The key aspect of the model is that the governing equations reduce to the classical Navier–Stokes equations in the clear fluid region.

The governing equations are solved with a mixed finite element method with equal oder interpolation of the velocity and pressure values. A fractional step procedure and a semi explicit RK4 time integration scheme have been used to improve efficiency. For the same reason the traditional element based approach has been substituted by an edge based one.

The problem is solved in an Eulerian framework, using a fixed mesh approach. A level set technique is employed to accurately track the evolution of the free surface both inside and outside the porous material.

The model proposed has been validated by means of a series of experiments on small scale prototype dams and other laboratory tests confirming its validity and the accuracy of the current approach both in transient and in steady regimes in \(2D\) and \(3D\).