1 Introduction

Numerical modeling of the behavior of deformable porous media interacting with the simultaneous flow of immiscible pore fluids is of great interest in a wide variety of engineering applications. These include: unsaturated soil mechanics, petroleum industry, and environmental studies. Dykes and embankments which are built to protect the environment from the elements of water represent some examples of such multiphase porous systems in geotechnical engineering. In order to correctly predict the stability and the overall behavior of these structures which are composed of a deforming solid skeleton saturated by pore water and pore air, it is necessary to model the coupled hydro-mechanical behavior of partially saturated porous media [1]. Another important application of coupled stress-fluid flow analyses of multiphase materials is in the simulation of compaction–subsidence problems encountered in petroleum reservoir engineering. Production of hydrocarbons (e.g. oil or gas) from underground reservoirs leads to an increase in the effective stresses, and consequently to the deformation of the producing formation. The reservoir compaction may then be transferred to the ground surface and becomes evident as subsidence. This complex deformation behavior can have a considerable influence on the reservoir performance by affecting different aspects of oil and gas production, such as rock permeability, well bore stability, and production rate. On the other hand, land surface subsidence may affect the operation of drilling and production equipments which requires costly remedial measures [26]. The phenomena of surface subsidence can also be induced due to the extraction of water from groundwater resources and may cause pipeline or structural damages [6]. Subsurface water contamination by non-aqueous phase liquids (NAPLs) which mainly arises from the petroleum industries is a major issue in environmental engineering. Unlike the surface water pollution, the contamination of groundwater is difficult to detect and control, and may persist for several decades. In order to assess the migration of NAPL contaminants in the subsurface systems and monitor the associated clean-up operations, it is required to simulate the simultaneous movement of multiphase fluids through porous media coupled with the deformation of the soil matrix [7, 8].

These types of coupled fluid flow-soil deformation problems are mathematically described by a set of partial differential equations including the force equilibrium equation and the mass conservation law. Because of the complexity and high non-linearity of the governing equations, analytical solutions are non-existent and numerical simulation is frequently used as an effective tool for hydro-mechanical analysis of deformable porous materials where several fluid phases fill the pore spaces simultaneously. As a result, a number of numerical models of multiphase immiscible flow in deforming porous media and fractured reservoirs have been developed so far, mostly based on finite element method (e.g. [13, 727]).

Mesh-less methods originated about 40 years ago are relatively new numerical techniques for solving problems in a broad range of application areas including solid mechanics, heat conduction, fluid flow, and geotechnical problems. These methods which do not require any element for shape function construction are used to establish a system of algebraic equations for the entire problem domain only in terms of a set of scattered nodes. To date, a number of mesh-less methods have been proposed and have achieved remarkable progress in recent years, examples of which are given in Table 1.

Table 1 Some mesh-free methods developed so far

Among these methods, some have been successfully employed to study the behavior of saturated porous media (e.g. [4045]), and two-phase fluid flow processes through rigid porous materials (e.g. [4648]). But very few references are available in the literature regarding the numerical investigation of the interaction between multiphase flow and soil deformation by using mesh-less methods: Modaressi and Aubert [49] presented a mixed FE–element-free Galerkin (EFG) technique for two-dimensional numerical simulation of deforming multiphase porous media. In their work, displacements of the porous-solid skeleton were modeled by the standard FEM, whereas the wetting and non-wetting pore fluid pressures were discretized by the element-free nodes. In other words, the resulting formulation was not completely based on mesh-less method. Moreover, they utilized Lagrange multipliers to satisfy the essential boundary conditions. Khoshghalb and Khalili [50, 51] proposed a two-dimensional mesh-less algorithm for fully coupled analysis of flow and deformation in unsaturated poro-elastic media in which the spatial discretization was performed using RPIM.

The very few endeavors for using mesh-less methods for simulating two-phase fluid flow processes in deforming porous media motivated the authors of this paper to develop an entirely EFG-based three-dimensional code in order to evaluate the performance of this famous mesh-free method in the analysis of the strongly coupled hydro-mechanical behavior of deforming porous materials while the penalty method has been used to implement the essential boundary conditions. This new study is part of an ongoing research that employs EFG for simulating the propagation of fluid-induced crack (called hydraulic fracture) in low-permeable oil reservoirs.

In the following sections of the present paper, at first, the partial differential equations governing the simultaneous movement of two immiscible fluids through deforming porous media along with the additional constitutive relations which take into account the interaction between the various constituents of the medium are presented. Then, the numerical discretization of the model by means of EFG mesh-less method is discussed. In Sect. 3, the validity and capability of the developed code are illustrated through solving a number of example problems. Finally, some conclusions are drawn.

2 Formulation

2.1 Governing equations

In general, the set of equations governing the behavior of a deformable multiphase porous medium includes: (1) the linear momentum balance equation for the whole mixture, (2) the linear momentum balance equation (or the generalized Darcy’s law) for each fluid phase, and (3) the mass balance equation for each phase of the medium. By combining the solid phase mass conservation with that of each fluid phase the final form of the continuity equations for the flow of pore fluids is obtained. Assuming that the temperature remains constant, the voids of the solid skeleton are completely filled by the fluid components, and the inter-phase mass transfer is negligible, the above mentioned equations for a porous medium, where two viscous fluids exist simultaneously, are expressed as [52]:

  • The equilibrium equation:

    $$ \sigma_{ij,j} + \rho \,g_{i} = 0 $$
    (1)
  • The Darcy’s law:

    $$ n\,s_{\pi } \,\dot{u}_{i}^{\pi s} = \frac{{k_{ij} \,k_{r\pi } }}{{\mu_{\pi } }}\left[ { - p_{\pi ,j} + \rho_{\pi } \,g_{j} } \right]\quad \pi = w,nw $$
    (2)
  • The continuity equation for the wetting fluid:

    $$ \begin{aligned} & \left[ {s_{w} \frac{\alpha - n}{{K_{s} }}\left( {s_{w} + \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) + \frac{{n\,s_{w} }}{{K_{w} }} - n\frac{{\partial s_{w} }}{{\partial p_{c} }}} \right]\frac{{\partial p_{w} }}{\partial t} \\ & \quad + \left[ {s_{w} \frac{\alpha - n}{{K_{s} }}\left( {1 - s_{w} - \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) + n\frac{{\partial s_{w} }}{{\partial p_{c} }}} \right]\frac{{\partial p_{nw} }}{\partial t} \\ & \quad + \alpha \,s_{w} \,\dot{u}_{i,\,i} + \frac{1}{{\rho_{w} }}\left[ {\rho_{w} \,n\,s_{w} \,\dot{u}_{i}^{ws} } \right]_{,\,i} \,= 0 \\ \end{aligned} $$
    (3)
  • The continuity equation for the non-wetting fluid:

    $$ \begin{aligned} & \left[ {\left( {1 - s_{w} } \right)\frac{\alpha - n}{{K_{s} }}\left( {s_{w} + \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) + n\frac{{\partial s_{w} }}{{\partial p_{c} }}} \right]\frac{{\partial p_{w} }}{\partial t} \\ & \quad + \left[ {\left( {1 - s_{w} } \right)\frac{\alpha - n}{{K_{s} }}\left( {1 - s_{w} - \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) - \, n\frac{{\partial s_{w} }}{{\partial p_{c} }} + \frac{{n\,\left( {1 - s_{w} } \right)}}{{K_{nw} }}} \right]\frac{{\partial p_{nw} }}{\partial t} \\ & \quad + \alpha \,\left( {1 - s_{w} } \right)\,\dot{u}_{i,\,i} + \frac{1}{{\rho_{nw} }}\left[ {\rho_{nw} \,n\,s_{nw} \,\dot{u}_{i}^{nws} } \right]_{,\,i} \,= 0 \\ \end{aligned} $$
    (4)

In these equations, σ ij is the total stress tensor, ρ is the density of multiphase system defined as ρ = (1 − n)ρ s  + n(s w ρ w  + s nw ρ nw ), n is the porosity of soil mass, ρ s is the solid phase density, subscripts w and nw represent wetting and non-wetting fluids, respectively, s π is the saturation degree of fluid phase π, ρ π denotes the density of fluid phases, g i is the gravity acceleration vector, \( \dot{u}_{i}^{\pi s} \) is the relative velocity vector between fluid phase π and solid phase, k ij is the intrinsic permeability tensor, k is the relative permeability coefficient of fluid phase π, μ π and p π are the dynamic viscosity and pressure of pore fluids, respectively, α is Biot’s parameter, p c is the capillary pressure, t is time, \( \dot{u}_{i} \) is the solid phase velocity vector, and K s , K w , and K nw are the bulk modulus of solid grains, wetting and non-wetting fluids, respectively.

For hydro-mechanical analysis of multiphase systems, these highly non-linear equations should be complemented by some auxiliary functions known as the constitutive relationships.

2.2 Constitutive equations

In a three-phase porous medium whose pores are filled up partly with wetting fluid and partly with non-wetting fluid, the sum of degrees of saturation is equal to one and the pore fluid pressures are related to each other through the capillary pressure:

$$ s_{w} + s_{nw} = 1 $$
(5)
$$ p_{c} = p_{nw} - p_{w} $$
(6)

When the capillary pressure is computed, the wetting phase saturation degree can be evaluated readily via a function obtained from the laboratory tests:

$$ s_{w} = 1 - s_{nw} = s_{w} (p_{c} ) $$
(7)

The relative permeabilities of wetting and non-wetting pore fluids are dimensionless parameters with a value between 0 and 1. These permeability coefficients are relevant to the corresponding saturation degrees by means of the empirical relationships:

$$ k_{r\pi } = k_{r\pi } (s_{\pi } )\quad \pi = w,nw $$
(8)

The deformation of the soil skeleton is mainly controlled by the effective stress defined as:

$$ \sigma_{ij}^{\prime \prime } \, = \sigma_{ij} + \alpha \,p\,\delta_{ij} $$
(9)

where \( \sigma_{ij}^{\prime \prime } \, \) is the effective stress tensor, δ ij is the Kronecker delta, and p is the average pore pressure exerted by the surrounding fluid phases on the solid grains:

$$ p = s_{w} \,p_{w} + s_{nw} \,p_{nw} $$
(10)

It should be noted that the effective stress relationship (9) is based on the tension-positive convention in the solid phase while the compression-positive in the fluid phases.

The constitutive law of the solid phase which is relating the effective stress tensor to the total strain tensor can be written in the following general incremental form:

$$ d\sigma_{ij}^{\prime \prime } \, = D_{Tijkl} \,d\varepsilon_{kl} $$
(11)

where D Tijkl is the fourth-order tangential stiffness tensor of material, and kl is the total strain increment tensor.

2.3 Initial and boundary conditions

Considering the displacement of the soil skeleton (u i ) and the pressure of the wetting and non-wetting fluids (p w , p nw ) as the primary variables (unknowns) of the problem, the required initial and boundary conditions for solving the governing equation system can be stated as follows:

  • Initial conditions:

    $$ u_{i} = u_{i}^{0} ,\;p_{\pi } = p_{\pi }^{0} \quad at\;t = 0\;and\;on\;\Omega $$
    (12)
  • Dirichlet boundary conditions:

    $$ \begin{aligned} u_{i} &= \bar{u}_{i} \;on\;\Gamma _{u} \\ p_{\pi } &= \bar{p}_{\pi } \;on\;\Gamma _{{p_{\pi } }} \quad \pi = w,\,nw \\ \end{aligned} $$
    (13)
  • Neumann boundary conditions:

    $$ \begin{aligned} & \sigma_{ij} \,n_{j} = \bar{t}_{i} \,\quad \,on\;\Gamma _{\sigma } \\ & \frac{{k_{ij} \,k_{r\pi } }}{{\mu_{\pi } }}\left( { - p_{\pi ,\,j} + \rho_{\pi } \,g_{j} } \right)\,n_{i} = \bar{q}_{\pi } \quad on\;\Gamma _{{q_{\pi } }} \;\pi = w,\,nw \\ \end{aligned} $$
    (14)

where Ω represents the problem domain with the boundary Γ, n i is the unit outward vector normal to the boundary, and \( \bar{u}_{i} \), \( \bar{t}_{i} \), \( \bar{p}_{\pi } \) and \( \bar{q}_{\pi } \) are the prescribed values of displacement, traction, pore pressure, and flux respectively on the different parts of the boundary with the following conditions:

$$ \begin{aligned} &\Gamma _{u} \cup\Gamma _{\sigma } =\Gamma \;and\;\Gamma _{u} \cap\Gamma _{\sigma } = \varnothing \\ &\Gamma _{{p_{\pi } }} \cup\Gamma _{{q_{\pi } }} =\Gamma \;and\;\Gamma _{{p_{\pi } }} \cap\Gamma _{{q_{\pi } }} = \varnothing \\ \end{aligned} $$
(15)

2.4 Numerical discretization

2.4.1 Discretization in space

As mentioned previously, in this study EFG mesh-less method is employed for discretization of the spatial domain. In EFG method, shape functions are constructed using MLSFootnote 1 approximation and comprised of two components: (1) a weight function which is nonzero over a small area around a node called the influence domain of that node, and (2) a basis function which is usually a polynomial. The shape functions obtained by MLS procedure do not possess the Kronecker delta function property. This causes the imposition of essential boundary conditions in EFG method to be more complicated than that in FEM. To overcome this difficulty, several techniques have been developed among which Lagrange multipliers and penalty methods are often used to introduce the essential boundary conditions in the weak form. Unlike the Lagrange multipliers method, the equation system produced by the penalty technique (which is adopted here) has the same dimension as that created in FE, and the modified stiffness matrix is still positive definite, banded, and symmetric. Therefore, the Lagrange multipliers method needs much more computational effort and resources in solving the equation system. The problem with the penalty method is choosing a proper penalty factor that can be used universally for all types of problems [53]. This issue for fully coupled hydro-mechanical problems in multiphase porous media is investigated later, in Sect. 3.

For spatial discretization of the governing partial differential equations, first it is essential that their integral forms be established. This is accomplished by applying the weighted residual method and Galerkin technique and employing the penalty method to enforce the essential boundary conditions (13). So, after introducing Eqs. (9) and (14) into the equilibrium Eq. (1), and substituting Eqs. (2) and (14) into the pore fluid continuity Eqs. (3) and (4), the constrained Galerkin weak formulation of the above problem is derived as follows:

$$ \begin{aligned} & \int\limits_{\Omega } {\delta (Lu)^{T} \sigma_{ij}^{\prime \prime } \,d\Omega } - \int\limits_{\Omega } {\delta u^{T} \,\rho g_{i} \,d\Omega } - \int\limits_{{\Gamma_{\sigma } }} {\delta u^{T} \,\bar{t}_{i} \,d\Gamma } \\ & \quad - \int\limits_{\Omega } {\delta (Lu)^{T} \alpha \delta_{i\,j} \left( {s_{w} p_{w} + \left( {1 - s_{w} } \right)p_{nw} } \right)\,d\Omega } \\ & \quad + \delta \int\limits_{{\Gamma_{u} }} {{1 \mathord{\left/ {\vphantom {1 {2\,\left( {u - \bar{u}} \right)^{T} \alpha_{pu} \left( {u - \bar{u}} \right)\,d\Gamma }}} \right. \kern-0pt} {2\,\left( {u - \bar{u}} \right)^{T} \alpha_{pu} \left( {u - \bar{u}} \right)\,d\Gamma }}} = 0 \\ \end{aligned} $$
(16)
$$ \begin{aligned} & \int\limits_{\Omega } {\delta p_{w}^{T} \left[ {s_{w} \frac{\alpha - n}{{K_{s} }}\left( {s_{w} + \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) + \frac{{n\,s_{w} }}{{K_{w} }} - n\frac{{\partial s_{w} }}{{\partial p_{c} }}} \right]\frac{{\partial p_{w} }}{\partial t}\,d\Omega } \\ & \quad + \int\limits_{\Omega } {\delta p_{w}^{T} \,} \left[ {s_{w} \frac{\alpha - n}{{K_{s} }}\left( {1 - s_{w} - \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) + n\,\frac{{\partial s_{w} }}{{\partial p_{c} }}} \right]\frac{{\partial p_{nw} }}{\partial t}\,d\Omega \\ & \quad + \int\limits_{\Omega } {\delta p_{w}^{T} } \,\alpha \,s_{w} \frac{{\partial \varepsilon_{ii} }}{\partial t}\,d\Omega - \int\limits_{\Omega } {\delta (L_{p} p_{w} )^{T} \left[ {\frac{{k_{ij} \,k_{rw} }}{{\mu_{w} }}\left( { - p_{w,j} + \rho_{w} g_{j} } \right)} \right]\,d\Omega } \\ & \quad + \int\limits_{{\Gamma_{{q_{w} }} }} {\delta p_{w}^{T} } \,\bar{q}_{w} \,d\Gamma + \, \delta \int\limits_{{\Gamma_{{p_{w} }} }} {{1 \mathord{\left/ {\vphantom {1 {2\,\left( {p_{w} - \bar{p}_{w} } \right)^{T} \alpha_{{pp_{w} }} \left( {p_{w} - \bar{p}_{w} } \right)\,d\Gamma }}} \right. \kern-0pt} {2\,\left( {p_{w} - \bar{p}_{w} } \right)^{T} \alpha_{{pp_{w} }} \left( {p_{w} - \bar{p}_{w} } \right)\,d\Gamma }}} = 0 \\ \end{aligned} $$
(17)
$$ \begin{aligned} & \int\limits_{\Omega } {\delta p_{nw}^{T} \left[ {\left( {1 - s_{w} } \right)\frac{\alpha - n}{{K_{s} }}\left( {s_{w} + \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) + n\frac{{\partial s_{w} }}{{\partial p_{c} }}} \right]\frac{{\partial p_{w} }}{\partial t}\,d\Omega } \\ & \quad + \int\limits_{\Omega } {\delta p_{nw}^{T} \,} \left[ {\left( {1 - s_{w} } \right)\frac{\alpha - n}{{K_{s} }}\left( {1 - s_{w} - \frac{{\partial s_{w} }}{{\partial p_{c} }}p_{c} } \right) - \, n \frac{{\partial s_{w} }}{{\partial p_{c} }} + \frac{{n\,\left( {1 - s_{w} } \right)}}{{K_{nw} }}} \right]\frac{{\partial p_{nw} }}{\partial t}\,d\Omega \\ & \quad + \int\limits_{\Omega } {\delta p_{nw}^{T} \,\alpha \,\left( {1 - s_{w} } \right)\frac{{\partial \varepsilon_{ii} }}{\partial t}} d\Omega \\ & \quad - \int\limits_{\Omega } {\delta (L_{p} p_{nw} )^{T} \left[ {\frac{{k_{ij} \,k_{rnw} }}{{\mu_{nw} }}\left( { - p_{nw,j} + \rho_{nw} g_{j} } \right)} \right]\,d\Omega } \\ & \quad + \int\limits_{{\Gamma_{{q_{nw} }} }} {\delta p_{nw}^{T} } \,\bar{q}_{nw} \,d\Gamma + \delta \int\limits_{{\Gamma_{{p_{nw} }} }} {{1 \mathord{\left/ {\vphantom {1 {2\,\left( {p_{nw} - \bar{p}_{nw} } \right)^{T} \alpha_{{pp_{nw} }} \left( {p_{nw} - \bar{p}_{nw} } \right)\,d\Gamma }}} \right. \kern-0pt} {2\,\left( {p_{nw} - \bar{p}_{nw} } \right)^{T} \alpha_{{pp_{nw} }} \left( {p_{nw} - \bar{p}_{nw} } \right)\,d\Gamma }}} = 0 \\ \end{aligned} $$
(18)

where δu, δp w , and δp nw are test functions, α pu , \( \alpha_{{pp_{w} }} \), and \( \alpha_{{pp_{nw} }} \) are penalty factors for the weak forms of equilibrium and continuity equations, respectively, ɛ ii is the volumetric strain of the solid skeleton, and L and L P stand for the spatial differential operator for the displacement and pore pressure variables, respectively.

As stated by Lewis and Schrefler [52], time differentiation is a possible way to incorporate the non-linear behavior [the general incremental constitutive model (11)] computationally into the equilibrium equation. As a result, Eq. (16) can be rewritten as:

$$ \begin{aligned} & \int\limits_{\Omega } {\delta (Lu)^{T} \,D_{T\,\,i\,j\,k\,l} \frac{{\partial \varepsilon_{k\,l} }}{\partial t}d\Omega } - \int\limits_{\Omega } {\delta u^{T} \,\frac{{\partial \left( {\rho g_{i} } \right)}}{\partial t}\,d\Omega } \\ \quad & - \int\limits_{{\Gamma_{\sigma } }} {\delta u^{T} \,\frac{{\partial \left( {\bar{t}_{i} } \right)}}{\partial t}\,d\Gamma } - \int\limits_{\Omega } {\delta (Lu)^{T} \alpha \,\delta_{i\,j} \frac{\partial }{\partial t}\left( {s_{w} \,p_{w} + \left( {1 - s_{w} } \right)p_{nw} } \right)\,d\Omega } \\ \quad & + \int\limits_{{\Gamma_{u} }} {\delta u^{T} \,\alpha_{pu} \,\frac{\partial }{\partial t}} \left( {u - \bar{u}} \right)\,d\Gamma = 0 \\ \end{aligned} $$
(19)

To transform the resulting variational formulation into the matrix form, EFG shape functions are utilized to approximate the basic variables including the displacement and pore fluid pressures at any time and point:

$$ u^{h} = \left\{ {\begin{array}{*{20}c} {u_{x}^{h} } \\ {u_{y}^{h} } \\ {u_{z}^{h} } \\ \end{array} } \right\} = \sum\limits_{I}^{{n^{\prime}}} {\left[ {\begin{array}{*{20}c} {\varphi_{I} } & 0 & 0 \\ 0 & {\varphi_{I} } & 0 \\ 0 & 0 & {\varphi_{I} } \\ \end{array} } \right]} \left\{ {\begin{array}{*{20}c} {u_{x\,I} } \\ {u_{y\,I} } \\ {u_{z\,I} } \\ \end{array} } \right\} = \sum\limits_{I}^{{n^{\prime}}} {\Phi_{I} \,u_{I} } $$
(20)
$$ p_{\pi }^{h} = \sum\limits_{I}^{{n^{\prime}}} {\varphi_{I} \,p_{\pi \,I} } {\kern 1pt} \quad \,\,\pi = w,\,nw $$
(21)

where u h is the approximated displacement, p h π is the approximated pore pressure of fluid phase π, u I is the displacement of the Ith node, p πI is the π-fluid pore pressure at the Ith node, n is the number of nodes in the neighborhood of the point of interest (Gauss point), and ϕ I is the EFG shape function of the Ith node constructed by the MLS approximation procedure. In this article, a linear basis and the cubic spline weight function [53] are employed for the creation of MLS shape functions.

In the matrix form, differential operators L and L P are expressed as follows:

$$ L = \left[ {\begin{array}{*{20}c} {{\partial \mathord{\left/ {\vphantom {\partial {\partial x}}} \right. \kern-0pt} {\partial x}}} & 0 & 0 & {{\partial \mathord{\left/ {\vphantom {\partial {\partial y}}} \right. \kern-0pt} {\partial y}}} & 0 & {{\partial \mathord{\left/ {\vphantom {\partial {\partial z}}} \right. \kern-0pt} {\partial z}}} \\ 0 & {{\partial \mathord{\left/ {\vphantom {\partial {\partial y}}} \right. \kern-0pt} {\partial y}}} & 0 & {{\partial \mathord{\left/ {\vphantom {\partial {\partial x}}} \right. \kern-0pt} {\partial x}}} & {{\partial \mathord{\left/ {\vphantom {\partial {\partial z}}} \right. \kern-0pt} {\partial z}}} & 0 \\ 0 & 0 & {{\partial \mathord{\left/ {\vphantom {\partial {\partial z}}} \right. \kern-0pt} {\partial z}}} & 0 & {{\partial \mathord{\left/ {\vphantom {\partial {\partial y}}} \right. \kern-0pt} {\partial y}}} & {{\partial \mathord{\left/ {\vphantom {\partial {\partial x}}} \right. \kern-0pt} {\partial x}}} \\ \end{array} } \right]^{T} $$
(22)
$$ L_{P} = \left[ {\begin{array}{*{20}c} {{\partial \mathord{\left/ {\vphantom {\partial {\partial x}}} \right. \kern-0pt} {\partial x}}} & {{\partial \mathord{\left/ {\vphantom {\partial {\partial y}}} \right. \kern-0pt} {\partial y}}} & {{\partial \mathord{\left/ {\vphantom {\partial {\partial z}}} \right. \kern-0pt} {\partial z}}} \\ \end{array} } \right]^{T} $$
(23)

Therefore, using Eqs. (20) and (23), the spatial derivative of approximated fields (i.e. Lu h and L p p h π ) can be written as:

$$ Lu^{h} = \sum\limits_{I}^{{n^{\prime}}} {\left[ {\begin{array}{*{20}c} {\varphi_{I,\,x} } & 0 & 0 \\ 0 & {\varphi_{I,\,y} } & 0 \\ 0 & 0 & {\varphi_{I,\,z} } \\ {\varphi_{I,\,y} } & {\varphi_{I,\,x} } & 0 \\ 0 & {\varphi_{I,\,z} } & {\varphi_{I,\,y} } \\ {\varphi_{I,\,z} } & 0 & {\varphi_{I,\,x} } \\ \end{array} } \right]} \left\{ {\begin{array}{*{20}c} {u_{x\,I} } \\ {u_{y\,I} } \\ {u_{z\,I} } \\ \end{array} } \right\} = \sum\limits_{I}^{{n^{\prime}}} {B_{I} \,u_{I} } $$
(24)
$$ L_{p} p_{\pi }^{h} = \sum\limits_{I}^{{n^{\prime}}} {\left[ {\begin{array}{*{20}c} {\varphi_{I,\,x} } \\ {\varphi_{I,\,y} } \\ {\varphi_{I,\,z} } \\ \end{array} } \right]} \,p_{\pi \,I} = \sum\limits_{I}^{{n^{\prime}}} {B_{p\,I} \,p_{\pi \,I} } $$
(25)
$$ \varepsilon_{ii} = \sum\limits_{I}^{{n^{\prime}}} {\left[ {\begin{array}{*{20}c} {\varphi_{I,\,x} } & {\varphi_{I,\,y} } & {\varphi_{I,\,z} } \\ \end{array} } \right]} \left\{ {\begin{array}{*{20}c} {u_{x\,I} } \\ {u_{y\,I} } \\ {u_{z\,I} } \\ \end{array} } \right\} = \sum\limits_{I}^{{n^{\prime}}} {B_{p\,I}^{T} \,u_{I} } $$
(26)

It should be mentioned that during numerical discretization of Eq. (19), α pu is a diagonal matrix of penalty factors, whereas \( \alpha_{{pp_{w} }} \) and \( \alpha_{{pp_{nw} }} \) in Eqs. (17) and (18) are scalar quantities.

By inserting Eqs. (20)–(26) into the weak forms (17), (18) and (19), and after performing some algebraic calculations, eventually the matrix formulation of the governing non-linear partial differential equations is obtained:

$$ \begin{aligned} & \left( {C_{II} + C_{u}^{\alpha } } \right)\,\dot{U} - C_{12} \,\dot{P}_{w} - C_{13} \,\dot{P}_{nw} = {\partial \mathord{\left/ {\vphantom {\partial {\partial t}}} \right. \kern-0pt} {\partial t}}\left( {F_{u} + F_{u}^{\alpha } } \right) \\ & C_{21} \,\dot{U} + C_{22} \,\dot{P}_{w} + C_{23} \,\dot{P}_{nw} + \left( {K_{22} + K_{{p_{w} }}^{\alpha } } \right)\,P_{w} = F_{{p_{w} }} + F_{{p_{w} }}^{\alpha } \\ & C_{31} \,\dot{U} + C_{32} \,\dot{P}_{w} + C_{33} \,\dot{P}_{nw} + \left( {K_{33} + K_{{p_{nw} }}^{\alpha } } \right)\,P_{nw} = F_{{p_{nw} }} + F_{{p_{nw} }}^{\alpha } \\ \end{aligned} $$
(27)

where superscript (·) denotes the temporal derivative. Each term in Eq. (27) is a matrix or vector which has been assembled using the nodal matrices or vectors. These nodal matrices and vectors are presented in “Appendix”. To compute these matrices and vectors, a numerical integration technique should be employed. Here, the Gauss quadrature scheme with a background mesh coincident with the nodal arrangement is adopted, as in each domain cell, 3 × 3 × 3 integration points, and in each boundary cell, 4 × 4 quadrature points are used.

The above discretized equations in space form a coupled system of ordinary differential equations which has to be integrated in time.

2.4.2 Discretization in time

The time discretization of Eq. (27) is carried out by employing the finite difference technique. Based on the generalized trapezoidal method, also known as the generalized midpoint rule, the field variables and their temporal derivative in the time interval of [t n , t n+1] can be approximated as [52]:

$$ x_{n + \theta } = \left( {1 - \theta } \right)\,x_{n} + \theta \,x_{n + 1} ,\,\;\,\left( {{{dx} \mathord{\left/ {\vphantom {{dx} {dt}}} \right. \kern-0pt} {dt}}} \right)_{n + \theta } = {{\left( {x_{n + 1} - x_{n} } \right)} \mathord{\left/ {\vphantom {{\left( {x_{n + 1} - x_{n} } \right)} {\Delta t}}} \right. \kern-0pt} {\Delta t}} $$
(28)

where Δt is the time step length, and θ is a parameter that can vary from zero (fully explicit scheme) to 1.0 (fully implicit scheme). The approximation is unconditionally stable when θ ≥ 0.5, but for any value of θ ≠ 1 the numerical solution can exhibit a spurious rippling effect [41].

Applying this standard time-integration technique to (27) and adopting fully implicit scheme give the final system of discrete equations for the fully coupled hydro-mechanical analysis of three-phase porous media consisting of solid grains and two pore fluids:

$$ \begin{aligned} & \left[ {\begin{array}{*{20}c} {C_{11} + C_{u}^{\alpha } } & { - C_{12} } & { - C_{13} } \\ {C_{21} } & {C_{22} + \Delta t\,\left( {K_{22} + K_{{p_{w} }}^{\alpha } } \right)} & {C_{23} } \\ {C_{31} } & {C_{32} } & {C_{33} + \Delta t\,\left( {K_{33} + K_{{p_{nw} }}^{\alpha } } \right)} \\ \end{array} } \right]^{n + 1} \left\{ {\begin{array}{*{20}c} U \\ {P_{w} } \\ {P_{nw} } \\ \end{array} } \right\}^{n + 1} \\ & \quad = \left[ {\begin{array}{*{20}c} {C_{11} + C_{u}^{\alpha } } & { - C_{12} } & { - C_{13} } \\ {C_{21} } & {C_{22} } & {C_{23} } \\ {C_{31} } & {C_{32} } & {C_{33} } \\ \end{array} } \right]^{n + 1} \left\{ {\begin{array}{*{20}c} U \\ {P_{w} } \\ {P_{nw} } \\ \end{array} } \right\}^{n} + \Delta t\,\left\{ {\begin{array}{*{20}c} {{\partial \mathord{\left/ {\vphantom {\partial {\partial t}}} \right. \kern-0pt} {\partial t}}\,\left( {F_{u} + F_{u}^{\alpha } } \right)} \\ {F_{{p_{w} }} + F_{{p_{w} }}^{\alpha } } \\ {F_{{p_{nw} }} + F_{{p_{nw} }}^{\alpha } } \\ \end{array} } \right\}^{n + 1} \\ \end{aligned} $$
(29)

Since the elements of the coefficient matrices in this algebraic equation system are dependent on the main unknowns, an iterative process should be utilized to linearize the problem and obtain the final solution within each time step. To do so, a solution scheme of the fixed-point type [52] is used in this study to solve the system of Eq. (29).

Based on the aforementioned formulation and using Fortran platform, a three-dimensional numerical code is developed and used to simulate a number of examples representative of the wide range of problems that can be solved by this program.

3 Numerical examples

In this section, the capability of the developed 3D EFG program in modeling different scenarios of two-phase flow through deforming porous media is investigated via solving a number of examples and comparing the results with the experimental or numerical solutions. The first example is considered to demonstrate the efficiency of the code for simulating the special case of two-phase fluid flow in rigid porous media. Then, the validity of the formulation and the corresponding computer program in modeling the simultaneous flow of two immiscible fluids through deforming soil matrixes is examined by simulating Liakopoulos experiment [54] and a few numerical problems.

In these numerical simulations, the main numerical parameters affecting the accuracy of the calculations are penalty factors and nodal influence domain size. Oliaei et al. [43] after conducting a sensitivity analysis have suggested some guidelines for selection of these parameters to guarantee the accuracy of EFG solution in hydro-mechanical analysis of saturated porous media. According to the obtained results in this reference, the values of 109 × K/γ w and 1.5 have been introduced as the optimal values for the penalty factor of continuity equation and the scale factor of influence domain, respectively, where K is the permeability tensor and γ w is the unit weight of water. Using these findings, and considering the more general form of flow equations employed in this study that leads to discrete Eqs. (27), (41) and (48), the parameters of \( \alpha_{{pp_{w} }} = 10^{9} \times {k \mathord{\left/ {\vphantom {k {\mu_{w} }}} \right. \kern-0pt} {\mu_{w} }} \) and \( \alpha_{{pp_{nw} }} = 10^{9} \times {k \mathord{\left/ {\vphantom {k {\mu_{nw} }}} \right. \kern-0pt} {\mu_{nw} }} \) are adopted here for the penalty factors of wetting and non-wetting fluid phases, respectively. In addition in two-phase flow problems, in order to minimize the numerical oscillations induced near the moving shock front due to the infiltration of one fluid phase into a porous medium which is initially at high saturation degree by another fluid phase, a smaller value for the scale factor equal to 1.1 is utilized to calculate the influence domain radius. The selection of other numerical factors is performed based on the values listed in Table 2. In this table, h is the characteristic size of the nodal distance, and C v is the consolidation coefficient.

Table 2 Values of EFG numerical parameters for analyzing multi-phase deformable porous media

Therefore, Table 2 can be used as a basis to improve the computational accuracy and assure the stability of numerical results in solution of soil deformation-multiphase flow coupled problems with EFG method and penalty technique.

Finally, it should be mentioned that in the developed EFG code, modeling of the transition from one-phase flow conditions to two-phase flow conditions is carried out in a similar way to [16] by assigning a very small but finite value as the lower limit to the relative permeability of fluid phases.

3.1 Saturation and drainage of a caisson

This example concerns the simulation of infiltration into a large caisson filled up with a cohesive soil, and its drainage by gravity, following the complete saturation. The computational domain for this one-dimensional example includes a caisson with the height of 6 m and initial water saturation of 0.303 throughout. During infiltration, a zero air pressure boundary condition is assigned to the bottom surface while the water is injected from the top boundary at the rate of 20 cm/day until the full saturation is reached. After complete saturation, the infiltration rate is set to zero and drainage by gravity is allowed to take place at the bottom of the caisson for a period of 100 days. Assuming the capillary pressure and relative permeabilities are of the van Genuchten [56] form:

$$ \begin{aligned} s_{w} & = s_{wr} + \left( {1 - s_{wr} } \right)\,\left[ {1 + \left( {\frac{{\alpha \,p_{c} }}{{\rho_{w} \,g}}} \right)^{\beta } } \right]^{ - \gamma } \\ k_{rw} & = \sqrt {s_{e} } \,\left[ {1 - \left( {1 - s_{e}^{{{1 \mathord{\left/ {\vphantom {1 \gamma }} \right. \kern-0pt} \gamma }}} } \right)^{\gamma } } \right]^{2} \\ k_{rnw} & = \sqrt {1 - s_{e} } \,\left( {1 - s_{e}^{{{1 \mathord{\left/ {\vphantom {1 \gamma }} \right. \kern-0pt} \gamma }}} } \right)^{2\gamma } ,\quad s_{e} = {{\left( {s_{w} - s_{wr} } \right)} \mathord{\left/ {\vphantom {{\left( {s_{w} - s_{wr} } \right)} {\left( {1 - s_{wr} } \right)}}} \right. \kern-0pt} {\left( {1 - s_{wr} } \right)}}, \\ \end{aligned} $$
(30)

, Table 3 summarizes the values of soil and fluid properties considered for simulation of this problem. It is noted that these properties are those of Bandelier Tuff and have been determined using the experimental tests conducted at Los Alamos National Laboratory [57, 58]

Table 3 Soil and fluid properties for example 1

For numerical modeling of this problem, a regular nodal pattern including 2 nodes along the length, 2 nodes along the width, and 101 nodes along the height of the caisson is used. Figure 1 displays the time evolution of water saturation profiles during infiltration. In this figure, the EFG results are compared with the solutions obtained by the HYDRUS code [59], and Forsyth et al. [60] using FEFootnote 2 and FVFootnote 3 discretization methods. As can be seen, the predictions of the developed code in this study agree very well with those of the other numerical algorithms.

Fig. 1
figure 1

Saturation profiles during infiltration

The simulated water content profile at 1, 4, 20, and 100 days after starting the drainage, together with the experimentally observed values [59] are given in Fig. 2. In spite of some discrepancies between theoretical and empirical data, the agreement between them is acceptable; especially that the EFG program predicts the location of the drying front correctly.

Fig. 2
figure 2

Water content profiles during drainage

3.2 Dewatering test of a sand column due to gravity

The water drainage test from a vertical sand column conducted by Liakopoulos [54] is known as a benchmark problem for simulating the hydro-mechanical behavior of non-saturated porous media, and has been widely considered by various researchers to validate their numerical models [1, 11, 16, 22, 27, 49, 52, 6163]. This test has been performed on a 1 m column of Perspex packed with Del Monte sand. In the laboratory before the start of the experiment, the water was continuously added from the top of the soil column and left to drain freely at the bottom. This process continued until the steady-state water flow corresponding to the zero capillary pressure (p c  = 0) throughout the column was established. At this stage the main test started as the water injection ceased and the sand column is allowed to desaturate from the bottom under the gravitational force. During this dewatering phase, the water pressure at several elevations along with the water outflow at the column base was measured.

Based on the above experimental procedure, a boundary condition of atmospheric pressure is assumed for the water at the bottom and for the air at both ends of the domain, whereas the upper boundary is impermeable to water. In addition, the lateral impervious walls of the column and the bottom surface are constrained against the horizontal and all displacements, respectively, to reproduce the laboratory conditions.

Table 4 gives the material parameters used for numerical modeling of this test. In order to describe the saturation–capillary pressure and water relative permeability-saturation equations the experimentally determined functions by Liakopoulos [54], which are valid for s w  ≥ 0.91, are employed while the air relative permeability-saturation relation is assumed to be that proposed by Brooks and Corey [64]:

$$ \begin{aligned} s_{w} & = 1 - 0.10152\,\,\left( {\frac{{p_{c} }}{{\rho_{w} \,g}}} \right)^{2.4279} \\ k_{rw} & = 1 - 2.207\,\,\left( {1 - s_{w} } \right)^{1.0121} \\ k_{rnw} & = \left( {1 - s_{e} } \right)^{2} \left( {1 - s_{e}^{{{{\left( {2 + \lambda } \right)} \mathord{\left/ {\vphantom {{\left( {2 + \lambda } \right)} \lambda }} \right. \kern-0pt} \lambda }}} } \right), \\ \quad s_{e} &= {{\left( {s_{w} - s_{wr} } \right)} \mathord{\left/ {\vphantom {{\left( {s_{w} - s_{wr} } \right)} {\left( {1 - s_{wr} } \right)}}} \right. \kern-0pt} {\left( {1 - s_{wr} } \right)}} \\ \end{aligned} $$
(31)
Table 4 Material properties for example 2

In the above equations, s e is the effective wetting phase saturation, s wr  = 0.2 is the residual wetting phase saturation, and λ = 3 is the pore size distribution index.

To discretize the column, an EFG mesh consisting of 2 nodes in length, 2 nodes in width, and 51 nodes in height is utilized. The obtained numerical results by the developed code for the water pressure, air pressure, capillary pressure, water saturation, and vertical displacement distribution along the column height at different times, as well as, the time evolution of water outflow rate at the column base and air inflow rate at the column top are displayed in Figs. 3 and 4, and compared with the available experimental and numerical solutions. As can be seen in Fig. 3a, at the early time periods the numerical model predicts that the water pressure decreases more rapidly than the measured values, but after the first 120 min they closely correspond to each other. Similar behavior is observed in Fig. 3b for the water flow at the bottom surface.

Fig. 3
figure 3

EFG results in comparison to measured data: a water pressure variations along the column, and b time variation of water outflow rate

Fig. 4
figure 4figure 4

Comparison of EFG results (left, this study) with FE solutions (right, Khoei and Mohammadnejad [27]) for: the profiles of a water pressure, b air pressure, c capillary pressure, d water saturation, e vertical displacement, and time histories of f water outflow rate and air inflow rate

The comparison between the EFG results and the FE ones reported by Klubertanz et al. [63], Lewis and Schrefler [52], and Khoei and Mohammadnejad [27] indicates very good agreement. Here for brevity only the last study is presented. However as mentioned by Schrefler and Scotta [16] and Khoei and Mohammadnejad [27], choosing different main unknowns, solution strategies, initial conditions, or neglecting the air flow, causes some differences between the model predictions and those of the other references (e.g. [16]).

3.3 Consolidation of a partially saturated soil column due to evaporation

This problem describes the behavior of unsaturated soil systems under environmental changes. A vertical soil column of linear elastic material, 1 m in height, is subjected to a surface load of 1000 Pa at the upper boundary. The soil column is initially unsaturated with the initial water saturation of 0.52 and the initial pore water pressure of −280 kPa. Then, the pore water pressure suddenly changes to −420 kPa at the top surface and as a result the soil layer undergoes the volume decrease or consolidation. The other boundary conditions are as follows: no water and air flow are permitted through the lateral surfaces and a condition of atmospheric pressure is imposed for the air pressure at the soil surface. The side boundaries can move only in the vertical direction whereas the bottom boundary is restrained against all displacements. Considering the Brooks and Corey [64] equations for the relative permeability of water and air and the water saturation–capillary pressure curve, the material properties presented in Table 5 are employed for the numerical simulation of this problem.

Table 5 Medium and fluid properties used in example 3

In order to model the present example, the domain is discretized using a uniformly spaced nodal pattern including 2 nodes in length, 2 nodes in width, and 21 nodes in height (Fig. 5). Figures 6a, b depict the time evolution of vertical displacement and water saturation at four different heights within the soil column during the consolidation process, respectively. Furthermore, the spatial distribution of pore water pressure in the soil layer at time intervals of 0.01, 0.1, 0.5, 2, and 100 days are shown in Fig. 7. This consolidation problem has been previously solved by Rahman and Lewis [7] and Khoei and Mohammadnejad [27] using FE method. To assess the accuracy of the computer code, the obtained numerical solutions by these FE based programs are also presented in Figs. 6 and 7. It is observed that despite some differences between the developed EFG code and FE ones in the employed spatial and temporal discretization methods, iterative scheme, and formulation, the model predictions agree very well with those of the other two numerical algorithms.

Fig. 5
figure 5

Boundary conditions and nodal arrangement for example 3

Fig. 6
figure 6

Time variation of: a vertical displacement, and b water saturation, during consolidation

Fig. 7
figure 7

Pore water pressure profiles during consolidation

3.4 Water infiltration into a semi-saturated caisson

In the fourth example, the presented three-phase computational algorithm is used to study the process of water infiltration into a caisson 6 m long and 6 m high. The caisson has been filled up with an elastic partially saturated porous material having the properties listed in Table 6. Initially, the bottom part of the caisson is fully saturated with water to a height of 2 m and steady-state conditions with zero air pressure in the unsaturated zone prevail. Then, the top surface of the caisson is exposed to a constant water flux with the flow rate of 2.3 × 10−6 m/s over the central 1 m area.

Table 6 Values of physical parameters for example 4

Using symmetry, only one half of the caisson is modeled and for this purpose a regular arrangement of nodes, namely 11 × 2 × 21 along the length, width, and height of the domain, respectively is employed (Fig. 8). For the mechanical boundary conditions, zero normal displacement is assigned to the lateral sides and no movement is allowed along the bottom surface.

Fig. 8
figure 8

Geometry and nodal pattern for example 4

Figure 9 shows the obtained numerical result for the saturation contour at t = 2 × 105 s and compares it to that presented in the commercial FD-based software FLAC V. 4.0 Manual [55] for this problem. Although the predicted contour by the EFG code is not that smooth, its agreement with the FLAC solution, especially on the size of the zone of infiltrated water is acceptable. Certainly, the increase in the number of nodes leads to the more rounded isolines with more computational cost.

Fig. 9
figure 9

Saturation contour after 2 × 105 s (left FLAC solution, right this study)

3.5 Infiltration of a LNAPL into a porous medium

A two-dimensional multiphase flow example solved previously by Rahman and Lewis [7] using a FE computer model is simulated in this section to show the application of the developed EFG model for environmental studies. The problem is designed to study the migration of a LNAPLFootnote 4 which leaks from a continuous surface source into a porous medium. The adopted geometry together with the applied loadings for the numerical simulation of this example are shown schematically in Fig. 10a. As observed, the system is subjected to both water and NAPL infiltration with the release rates of 100 kg/year/m2 and 900 kg/year at the soil surface, respectively, but the LNAPL source is limited to a area at the top left-hand edge. Rahman and Lewis [7] assumed that the gas phase pressure is negligible in this problem. As a result, the simulation reduces to the flow of two pore fluid phases of water and NAPL through the soil matrix. Employing this assumption, the other boundary conditions can be stated as follows: the side boundaries of the domain are treated as impermeable to both wetting and non-wetting fluids, and a constant atmospheric pressure condition with p w  = p nw  = 101,325 Pa is assigned to the bottom surface. Figure 10b presents the initial conditions for water saturation utilized by Rahman and Lewis in their model. Considering Brooks and Corey [64] equations for the hydraulic constitutive relationships, Table 7 gives the values of solid and fluid parameters used in this analysis.

Fig. 10
figure 10

a Geometry and boundary conditions for example 5, b initial water saturation

Table 7 Material properties and physical parameters applied in example 5

Numerical modeling of the above problem is performed using a regular EFG mesh with 20 nodes along the length, 6 nodes along the height, and 2 nodes along the width (Fig. 11). The simulated saturation contours for the NAPL and water phases after the time period of 3.17 years (t = 108 s) are illustrated and compared to the FE ones [7] in Figs. 12 and 13, respectively. Since the injected contaminant is less dense than the water, it is expected to float over the rising water table. In other words, the lighter contaminant instead of moving downwards, mostly migrates laterally and makes a plume over the water front. This behavior along with the higher saturation level of the LNAPL near the infiltration location is predicted well by the developed model in Fig. 12. In comparison to the FE solutions, it is observed that both methods simulate the process of LNAPL propagation in the subsurface rather correctly.

Fig. 11
figure 11

Nodal configuration for example 5

Fig. 12
figure 12

LNAPL saturation after 3.17 years (left this study; right Rahman and Lewis [7])

Fig. 13
figure 13

Water saturation after 3.17 years (left this study; right Rahman and Lewis [7])

4 Conclusions

This paper presents a new EFG formulation for mesh-less analysis of the rather complex phenomena which describe the hydro-mechanical behavior of triphasic porous media consisting of a deformable soil skeleton and two pore fluid phases. After introduction of the set of highly nonlinear partial differential equations governing the behavior of such coupled flow-deformation systems, the numerical implementation of the model is explained. This is done by employing the EFG technique for discretization of the problem domain with respect to space, using finite differences to dicretize the time domain, and solving the equation system for the solid displacements and pore pressure of wetting and non-wetting fluids as the primary unknowns. On this basis, a three-dimensional EFG computer program is developed in which: (1) the imposition of the essential boundary conditions is based on the penalty method, (2) a fully implicit scheme is used to avoid any spatial oscillation, and (3) the main variables of the problem are approximated using the same order of EFG shape functions. This program is successfully tested against various example problems. Comparing the obtained results with the experimental observations and results of other computational algorithms indicates that: (1) the proposed EFG model has been formulated properly, (2) the accurate and stable EFG solutions for soil deformation-fluid flow coupled problems in deforming three-phase porous materials can be obtained if the numerical parameters are selected according to Oliaei et al. [43] recommendations adjusted for multiphase flow phenomena, and (3) the newly developed EFG code with the above mentioned features has the capability to become a powerful numerical tool to simulate a wide range of engineering applications such as ground deformation/subsidence due to fluid extraction, contaminant migration in deforming porous media, and flooding operations in oil reservoirs.