1 Introduction

Multi-phase flow in porous media is a common process in production of oil, natural gas, and geothermal fluids from natural reservoirs and in environmental applications such as waste disposal, groundwater contamination monitoring, and geological sequestration of greenhouse gases. Conventional computational fluid dynamics (CFD) methods are not adequate for simulating these problems as they have difficulty in dealing with multi-component multi-phase flow systems, especially phase transitions. In addition, the complex pore structure of rocks is a big challenge for conventional grid generation and computational efficiency (Guo and Zheng 2009).

In hydrology and the petroleum industry, it is common practice to model multi-phase flow using Darcy’s law and relative permeability theory. The relative permeability curve, usually obtained from laboratory experiments, is the key to calculate flow rates of different phases. Although measuring approaches have been widely used and results have been largely accepted for many years in most cases, laboratory experiments are usually expensive, not robust especially for low and ultra-low permeability core measurements, can damage the cores, and cannot always be repeated for different fluids or under different flow scenarios.

It is desirable to obtain the core properties through numerical modeling based on actual pore structure characterizations. Recently, the lattice Boltzmann (LB) method, which is based on a molecular velocity distribution function, has been proposed as a feasible tool for simulation of multi-component multi-phase flow in porous media (Huang et al. 2009, 2011; Huang and Lu 2009). In 1991, Chen et al. proposed the first immiscible LB model that uses red and blue-colored particles to represent two types of fluids (Chen et al. 1991). The phase separation is produced by the repulsive interaction based on the color gradient. In 1993, Shan and Chen proposed to impose nonlocal interactions between fluid particles at neighboring lattice sites by adding an additional force term to the velocity field (Shan and Chen 1993, 1994; Shan and Doolen 1995). The potentials of the interaction control the form of the equation of state (EOS) of the fluid, and phase separation occurs naturally once the interaction potentials are properly chosen. In 1995, Swift et al. (1995, 1996) proposed a free-energy model, in which the description of non-equilibrium dynamics, such as the Cahn–Hilliard approach, is incorporated into the LB model using the concept of the free-energy function. However, the free-energy model does not satisfy Galilean invariance, and the temperature dependence of the surface tension is incorrect (Nourgaliev et al. 2003). In 2003, Zhang and Chen proposed a new model, in which the body force term was directly incorporated in the evolution equation (Zhang and Chen 2003). Compared with the Shan and Chen (SC) model, the Zhang and Chen (ZC) model avoids negative values of effective mass. However, simulation results from the Zhang and Chen model show that the spurious current gets worse and the temperature range that this model can deal with is much smaller than the SC model (Zeng et al. 2009). In 2004, by introducing the explicit finite difference (EFD) method to calculate the volume force, Kupershtokh developed a single-component Lattice Boltzmann model (LBM) (Kupershtokh and Medvedev 2006; Kupershtokh et al. 2009; Kupershtokh 2010). Compared to previous models, this model has a significant improvement in parameter ranges of temperature and density ratio. Our work in this paper is partially based on this model.

In conventional LB models, the force between fluid and rock is supposed to be proportional to the fluid density. This assumption lacks theoretical support and cannot describe the true physical phenomena under certain circumstances. As an improvement, we propose to simulate the force between the fluid component and rock for different fluid density using the molecular dynamics (MD) method.

Molecular dynamics simulation is an effective method for investigating microscopic interactions and detailed governing forces that dominates the flow. Among the MD studies, various issues in multi-phase processes were paid close attention. Ten Wolde and Frenkel studied the homogeneous nucleation of liquid phase from vapor (Ten Wolde and Frenkel 1998). Wang et al. studied thermodynamic properties in coexistent liquid–vapor systems with liquid–vapor interfaces (Wang et al. 2001). A sharp peak and a small valley at the thin region outside the liquid–vapor interface were found to be evidence of a non-equilibrium state at the interface. In our work, we established a similar system to simulate forces between the fluid and solid components for different fluid densities.

Previous work in combining LB and MD methods together can be classified into two types: one is conducted by Succi, Horbach, and Sbragalia (Chibbaro et al. 2008; Horbach and Succi 2006; Sbragaglia et al. 2006; Succi et al. 2007). They applied MD and LB methods for the same problem and then compared the results. The second type is conducted by Duenweg, Ahlrichs, Horbach, and Succi (Ahlrichs and Dünweg 1998, 1999; Fyta et al. 2006). They applied the two methods to the motion simulation of polymer, DNA, or other macromolecules in water. The coupling of the MD calculation for the macromolecule part and the LB modeling for the solvent is achieved via a friction ansatz, in which they assumed the force exerted by the fluid on one monomer was proportional to the difference between the monomer velocity and the fluid velocity at the monomer’s position.

To be exact, the first type summarized above is not the coupling of LB and MD. The second approach is considered as multi-scale coupling of LB and MD, where MD is used for the focus part such as the polymer or the fluid–gas interface, while LB is used for other parts of the system, such as the solvent or the fluid flow. LB and MD simulations are conducted at the same time step, and the variables are exchanged between these two simulation domains under certain boundary constraints. Such a synchronous calculation method is extremely time-consuming in porous media flow simulation because of the large amount of calculation of MD simulation on both gas–liquid and rock–fluid interfaces.

Our proposed method integrates, rather than couples simultaneously, the LB and MD models efficiently. In this approach, the interaction forces between rock and fluid of different density are firstly calculated by MD simulation. Combined with the fluid–fluid force determined from the EOS, the two types of interaction forces are then accurately described for LBM modeling. We validated our integrated model by simulating a two-phase separation process and gas–liquid–solid three-phase contact angle. The success of MD–LBM results in agreement with published EOS solution, and experimental results demonstrated a breakthrough in pore-scale, multi-phase flow modeling. Based on an actual X-ray CT image of a reservoir core, we applied our workflow to calculate the absolute permeability of the core, the vapor–liquid H2O relative permeability, and capillary pressure curves.

2 Methodology

2.1 The lattice Boltzmann model

The Boltzmann equation describes the evolution with regard to a space–velocity distribution function from motions of microscopic fluid particles (Atkins et al. 2006).

$$\frac{\partial f}{\partial t} + {\varvec{\xi}} \cdot \nabla_{x} f + \user2{a} \cdot \nabla_{{\varvec{\upxi}}} f = \Omega (f),$$
(1)

where t is time, vector x is location, vector ξ is the fluid molecular velocity at time t and location x, and f is the velocity distribution function of the fluid molecules, which is equivalent to the density of the fluid molecules whose velocity is ξ at time t on location x, a is the acceleration of the fluid molecules, and Ω(f) is the velocity distribution function change caused by collision between fluid molecules.

It is not realistic to solve the integral–differential Boltzmann equation directly. An alternative approach is to solve the discrete form of the Boltzmann equation. The most widely used approach is the LBM. The key idea of LBM is both the location and velocity of the particles which are discretely characterized (Fig. 1). A typical LB equation can be written as (Shan and Chen 1993; Qian et al. 1992)

$$\begin{aligned} &f_{i} \left( {{\user2{x}} + {\user2{e}}_{i} \delta t,t + \delta t} \right) - f_{i} \left( {{\user2{x}},t} \right) \\ &\quad= \frac{1}{\tau }\left( {f_{i}^{\text{eq}} \left( {{\user2{x}},t} \right) - f_{i} \left( {{\user2{x}},t} \right)} \right) + \psi_{i} \left( {{\user2{x}},t} \right), \\ \end{aligned}$$
(2)

where x denotes the position vector, e i (i = 0, 1,…, q − 1) is the particle velocity vector to the neighbor sites, q is the number of neighbors, which depends on the lattice geometry, f i is the particle velocity distribution function along the ith direction, f eq i is the corresponding local equilibrium distribution function satisfying the Maxwell distribution, τ is the collision relaxation time, and ψ i is the change in the distribution function due to the body force. The LB equation implies two kinds of particle operations: streaming and collision. The term on the left side of Eq. (2) describes particles moving from the local site x to one of the neighbor sites x + e i δt within each time step. The first term on the right side of Eq. (2) describes the collisions contributing to loss or gain of the particles with a velocity of e i . After collision, the velocity distribution will relax to an equilibrium distribution, f eq i .

Fig. 1
figure 1

Illustration of the lattice Boltzmann model

The fluid density ρ and its velocity u at one node are calculated in Eqs. (3) and (4) (Qian et al. 1992). The relationship between τ and fluid kinematic viscosity ν can be described as \(v\, = \,{\raise0.7ex\hbox{${\left( { 2\tau - 1} \right)\delta x^{2} }$} \!\mathord{\left/ {\vphantom {{\left( { 2\tau - 1} \right)\delta x^{2} } {\left( { 6\delta t} \right)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\left( { 6\delta t} \right)}$}}\), where δx is the lattice constant and δt is the lattice time (Qian et al. 1992; Swift et al. 1996).

$$\rho = \sum\limits_{i = 0}^{{q{ - }1}} {f_{i} }$$
(3)
$$\rho {\varvec{u}} = \sum\limits_{i = 0}^{{q{ - }1}} {f_{i} {\varvec{e}}_{i} }$$
(4)

We use the equilibrium distribution function f eq i in the standard form (Yuan and Schaefer 2006)

$$\begin{aligned} f_{i}^{\text{eq}} (\user2{x},\;t) &= f_{i}^{\text{eq}} (\rho ,\;{\varvec{u}}) \\ &= \rho \omega_{i} \left( {1 + \frac{{\user2{e}_{i} \cdot {\varvec{u}}}}{\theta } + \frac{{\left( {\user2{e}_{i} \cdot {\varvec{u}}} \right)^{2} }}{{2\theta^{2} }} - \frac{{{\varvec{u}}^{2} }}{2\theta }} \right) \\ \end{aligned},$$
(5)

where ρ and u are for ρ(x, t) and u(x, t), respectively, corresponding to local fluid density and macro velocity. With this equilibrium distribution function, the “kinetic temperature” in standard LB models, such as “D2Q9” and “D3Q19,” is equal to \(\theta \, = \,{\raise0.7ex\hbox{${\delta x^{ 2} }$} \!\mathord{\left/ {\vphantom {{\delta x^{ 2} } {\left( { 3\delta t^{ 2} } \right)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\left( { 3\delta t^{ 2} } \right)}$}}\) (Yuan and Schaefer 2006).

In this work, we use the D2Q9 model for the 2D simulations. The weighting factor and discrete velocity for this model are given below:

$$\begin{aligned} {\user2{e}}_{i} = \left\{ {\begin{array}{ll} {\left( {0,\;0} \right),} &\quad {i = 0} \\ {\left( { \pm 1,\;0} \right)\,\left( {0,\; \pm 1} \right),} & \quad {i = 1,\;2,\;3,\;4} \\ {\left( { \pm 1,\; \pm 1} \right),} & \quad {i = 5,\;6,\;7,\;8} \\ \end{array} } \right. \end{aligned}$$
$$\omega_{i} = \left\{ {\begin{array}{ll} {4/9}, \\ {1/9}, \\ {1/36}, \\ \end{array} } \right. \begin{array}{ll} {i = 0} \\ {i = 1,\;2,\;3,\;4} \\ {i = 5,\;6,\;7,\;8} \\ \end{array}$$

For the implementation of the body force term, ψ i , it is appropriate to use the exact difference method (Kupershtokh and Medvedev 2006; Kupershtokh 2010)

$$\psi_{i} \left( {\vec{x},\;t} \right) = f_{i}^{\text{eq}} \left( {\rho ,\;\vec{u} + \Delta \vec{u}} \right) - f_{i}^{\text{eq}} \left( {\rho ,\;\vec{u}} \right),$$
(6)

where the change of the velocity is determined by the force F acting on the node

$$\Delta {\varvec{u}} = {\varvec{F}} \Delta t/\rho$$
(7)

F is identified in three categories: attractive (or repulsive) force between local fluid and the fluid of their neighbor lattices F ff, attractive force between the local lattice fluid and the boundary wall F sf, and the macro body force, e.g., the gravity, F g.

With the body force F, the real fluid velocity v should be evaluated at half the time step (Kupershtokh 2010)

$$\rho {\varvec{v}} = \sum\limits_{i = 0}^{{q{ - }1}} {f_{i} {\user2{e}}_{i} } + \frac{1}{2}{\user2{F}}\Delta t$$
(8)

Thus, the most important part for LB modeling is the determination of the interaction forces between neighboring fluids F ff and the fluid and rock wall F sf.

2.2 Application of the equation of state to obtain fluid–fluid interaction forces F ff

It is suggested that the fluid–fluid interacting force can be obtained by solving the state equations (Shan and Chen 1993, 1994; Kupershtokh and Medvedev 2009; Yuan and Schaefer 2006)

$${\varvec{F}}_{\text{ff}} \left( \user2{x},\;t \right) = - \nabla U\left( \user2{x},\;t \right),$$
(9)

where U(x, t) is a function of state that can be expressed as (Kupershtokh 2010)

$$U\left( {{\varvec{x}},\;t} \right) = p\left( {\rho_{\text{m}} \left( {{\varvec{x}},\;t} \right),\;T\left( {{\varvec{x}},\;t} \right)} \right) - \rho_{\text{m}} \left( {{\varvec{x}},\;t} \right)\theta,$$
(10)

where ρ m is the specific density of the fluid, which can be expressed as ρ = ρ m M where M is the standard molar quality of fluid component. T is temperature. p(ρ m, T) is a certain state equation. Replacing U with the effective mass density φ, we get

$$\varphi^{2} \left( {{\varvec{x}},\;t} \right) = \left| {U\left( {{\varvec{x}},\;t} \right)} \right|$$
(11)

Then the interacting force between fluids can be written as

$${\user2{F}}_{\text{ff}} \left( {{\user2{x}},\;t} \right) = 2\varphi \left( {{\user2{x}},\;t} \right)\nabla \varphi \left( {{\user2{x}},\;t} \right)$$
(12)

In our work, the Peng–Robinson (P–R) state equation is used in the expression

$$p = \frac{{\rho_{\text{m}} RT}}{{1 - b\rho_{\text{m}} }} - \frac{{a\alpha \left( T \right)\rho_{\text{m}}^{2} }}{{1 + 2b\rho_{\text{m}} - \left( {b\rho_{\text{m}} } \right)^{2} }}$$
(13)

where a = 0.458R 2 T 2c /p c, b = 0.0778RT c/p c, α(T) = [1 + f(ω)(1−(T/T c)0.5)]2 where T c and p c are the critical temperature and pressure of fluid components, ω is the acentric factor which depends on the fluid composition itself.

According to the correspondence principle, the molar density ρ m, viscosity μ, etc. are the same when the two fluids have the same values of T/T c and p/p c. Following this principle, the lattice fluid and the real fluid should satisfy the following equations for the P–R equation to be used in the LB model (Yuan and Schaefer 2006)

$$\frac{{T^{\text{l}} }}{{T_{\text{c}}^{\text{l}} }} = \frac{{T^{\text{r}} }}{{T_{\text{c}}^{\text{r}} }}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \frac{{p^{\text{l}} }}{{p_{\text{c}}^{\text{l}} }} = \frac{{p^{\text{r}} }}{{p_{\text{c}}^{\text{r}} }}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \frac{{\rho_{\text{m}}^{\text{l}} }}{{\rho_{\text{m,c}}^{\text{l}} }} = \frac{{\rho_{\text{m}}^{\text{r}} }}{{\rho_{\text{m,c}}^{\text{r}} }},$$
(14)

where the superscript l and r stand for the lattice and real systems, respectively, and c means the critical state.

2.3 Application of the molecular dynamics simulation to obtain rock–fluid interaction forces F sf

It is clear that the force acting between fluid components and the rock boundary wall has a significant effect on flow modeling with LBM. In fact, this force decides the capillary force and relative permeability curve for multi-phase systems.

In previous studies (Huang et al. 2009, 2011; Huang and Lu 2009; Martys and Chen 1996; Hatiboglu and Babadagli 2007, 2008), the force between the fluid and boundary wall is simplified as

$${\varvec{F}}_{\text{sf}} \left( \user2{x},\;t \right) = - \varphi \left( {\rho \left( \user2{x},\;t \right)} \right)G_{\text{sf}} \sum\limits_{i = 0}^{q} {\omega_{i} \delta \left( {\user2{x} + \user2{e}_{i} } \right)\user2{e}_{i} },$$
(15)

where ρ is the fluid component density, boolean δ = 0, 1 to indicate if it is the fluid or solid lattice, respectively. G sf is the force strength factor between fluid and solid, and it is usually determined by fitting the macroscopic fluid–solid contact angle.

There are two disadvantages of this method. One is that G sf cannot always be obtained because of the lack of contact angle data for some common fluids such as methane, nitrogen, carbon dioxide, and polymers for instance. Another disadvantage is that the assumption that F sf is directly proportional to the fluid effective mass density yields significant error under actual conditions. For example, this assumption cannot represent the adsorption force for coal gas and shale gas to the formation rock.

To overcome these limitations, we propose to obtain the force between fluid components and the rock through molecular dynamic simulation.

There are a variety of minerals in the reservoir rock. But it is mainly composed of minerals including quartz (SiO2), calcite (CaCO3), dolomite (CaMg(CO3)2), feldspar (KAlSi3O8, NaAlSi3O8, CaAl2Si2O8 mixture), and clay (Al3Si2O5(OH)4) with a mixing ratio. In our preliminary investigation, we chose monocrystalline silicon to represent the rock solid, although elemental silicon does not occur in reservoir rocks. It is however convenient for model validation against theoretical and experimental results. In our on-going research, we now use the more realistic assumption that the rock grains are composed of SiO2 and other components.

The SPC/E model (Jorgensen et al. 1983) was used to model water molecules. This model specifies a 3-site rigid water molecule with charges and Lennard-Jones parameters assigned to each of the 3 atoms. The bond length of O–H is 1.0 Angstrom, and the bond angle of H–O–H is 109.47°.

The well-known LJ potential and the standard Coulombic interaction potential were applied to calculate the intermolecular forces between all the molecules. The parameters are listed in Table 1. The cross parameters of LJ potential were obtained by Lorentz Berthelot combining rules. As originally proposed, this model was run with a 9 Angstrom cut-off for both LJ and Coulombic terms.

Table 1 Parameters for LJ potential and Coulombic potential

LAMMPS code was used to construct the simulation system.

As shown in Fig. 2, the simulation domain was a box with periodic boundary conditions applied in the x and y directions. The length along these two directions is both 43.45 Angstrom, and the length along the z direction is 60.14 Angstroms. The solid walls were represented by layers of DM (face-centered cubic) silicon atoms (1152 × 2). The speed and the force applied on the Si atoms were both set as zero to make them represent boundary walls and to keep a constant volume of the system.

Fig. 2
figure 2

The molecular dynamics model of the Si–H2O system. L x  = L y  = 43.45 Angstrom, L z  = 60.14 Angstrom. Green atom is for Si, pink for O, and white for H. The density of water phase is determined by H2O molecules in domain 1. Force between water and the boundary is determined by H2O molecules in domain 2

For different cases, at the beginning of simulation, water molecules of different numbers were sandwiched by the two solid walls.

Firstly, using the constant NVT (certain number, volume, and temperature–canonical ensemble) time integration via the Nose/Hoover method, the whole system was set at a uniform temperature of 373.15 K (110 °C).

Then an annealing schedule of 340,000 steps was applied to allow the system to reach equilibrium (there were four cycles altogether in the annealing schedule. In one single cycle, the temperature is raised from 373.15 to 423.15 K in 20,000 steps, to 473.15 K in 20,000 steps, and then reduced to 423.15 K in 20,000 steps, to 373.15 K in 20,000 steps). After that, the equilibrium state of the system was reached at 373.15 K (110 °C). Then the NVT ensemble was changed into NVE (certain number, volume, and energy– micro-canonical ensemble) and run for 20,000 steps. In these two processes, the equivalent length scale for the simulations was 0.5 feets to ensure energy conservation.

With the equilibrium system, the force between Si and H2O can be calculated. As Fig. 2 shows, since the distance between domain 1 and the solid wall is larger than the cut-off radius (9 Angstroms), the water molecules in domain 1 can be considered as free molecules. So the mass densities of free water in different cases were calculated based on the molecules in this domain. For the water molecules in domain 2, the force F applied by the silicon solid wall was directly calculated according to the potential field in the simulation. Then we can get the stress σ = F/A, where A is the area of the wall.

2.4 Integrated workflow from MD to LBM simulation

For the first step, we build a MD model as presented in Sect. 2.3 to calculate the rock–fluid interaction forces F sf between any solid component of the wall and the fluid of different density. Input parameters for this step include molecular species of the fluid and boundary solid and the potential parameters. The result of this step is the relationship between the solid–fluid interface and the fluid density.

Then we calculate φ(ρ) of different fluid density ρ from P–R EOS calculations as presented in Sect. 2.2. The fluid–fluid interaction force F sf is then determined from Eq. (12). Input parameters for this step include fluid density, critical pressure and temperature, and acentric factor of the fluid component.

With an actual core X-ray scan image for lattice grid construction and the interaction forces being determined from MD and EOS calculation, we use the LB method to simulate the fluid flow in porous media and to obtain the absolute permeability, relative permeability, and capillary pressure curves.

The integrated workflow is illustrated in Fig. 3.

Fig. 3
figure 3

Schematic illustrations of the workflow. First, the interaction forces between fluids are determined from P–R EOS calculation, and the rock–fluid interaction force is determined from MD simulation. Then we run the lattice Boltzmann simulation based on the grid constructed from the core X-ray scan image to obtain the absolute permeability, relative permeability, and capillary pressure curves

3 Results

3.1 LBM simulation on liquid–vapor phase transition process of water

To validate the EOS model, the single-component fluid phase transition process was simulated using the model described in Sect. 2.2.

Water is the fluid we choose in our simulation. Its critical temperature is 373.99 °C, critical pressure is 22.06 MPa, critical density is 322.0 kg/m3, and its acentric factor is 0.344.

A 2D 200 × 200 square lattice was used in this simulation, and the periodic boundary conditions were applied on the four boundaries. The average mass density of the computational domain was set to be 500 kg/m3. At the beginning of simulation, the mass density was homogenously initialized with a small (0.1 %) random perturbation.

Figure 4 shows the mass density contour in the computation domain at different time steps (t = 250, 500, 1000 and 2000) when the temperature is 110 °C. The density in the pink area is high (793 kg/m3), which indicates it is saturated with water liquid. The density in the green area is low (about 0.76 kg/m3), which indicates it is saturated with water vapor. It is clearly shown in this figure that the small liquid droplets aggregate to form bigger ones as time increases. Eventually, all these small droplets coalesce to form bigger droplets and the rest of the space of the computational domain is occupied by vapor only. All these simulation results for the single-component phase transition process are consistent with those reported by Zeng et al. (2009) and Qin (2006).

Fig. 4
figure 4

Mass density (kg/m3) distribution of water vapor and liquid at different time steps t. a t = 250. b t = 500. c t = 1000. d t = 2000

We then repeated the simulation at different temperatures for model validation. Figure 5 shows the density distribution curves of both vapor and liquid when they reach phase equilibrium at different temperatures. This figure indicates that the density curve calculated with LBM is nearly identical to that obtained from P–R EOS using the Maxwell equal-area construction (Yuan and Schaefer 2006). It suggests that the LBM, combined with EOS, provides an accurate method to model single-component gas–fluid two-phase flow.

Fig. 5
figure 5

Saturated water (in blue) and vapor (in red) densities versus temperature. “o” is the result of LB simulation. The solid line is the solution of the P–R equation using the Maxwell equal-area construction. asterisk Denotes the experimental data from Handbook of Chemical Engineering (Liu et al. 2001)

It is noted that there are some differences between the theoretical solution using EOS and the experimental results for liquid density calculations, and this is originated from the inadequacy of P–R EOS and is in agreement with (Atkins and William 2006).

3.2 MD simulation in determination of force between fluid components and the boundary wall

In the MD simulation, 42 sets of systems with different H2O densities were generated. We select 4 cases for illustration in Fig. 6.

Fig. 6
figure 6

Si–H2O system in equilibrium with 4 different water densities. In vapor phase: a ρ = 0.43 kg/m3 and b ρ = 0.66 kg/m3. In liquid phase: c ρ = 842 kg/m3 and d ρ = 911 kg/m3

As shown in Fig. 5, at the simulation temperature (110 °C), the force calculation is only meaningful when the vapor density is smaller than 0.787 kg/m3 or the liquid density is greater than 793 kg/m3. The relationship between density and stress is plotted in Fig. 7. It clearly shows that the stress varies with the fluid density nonlinearly, thus demonstrates the assumption that “the force between fluid and rock is supposed to be proportional to the fluid density” used by former studies (Martys and Chen 1996; Hatiboglu and Babadagli 2007, 2008) is not appropriate.

Fig. 7
figure 7

The stress–density relationship. a in the vapor region, linear fitted by the least squares method and b in the liquid region, quadratic fitted by the least squares method

3.3 Calculation of monocrystalline silicon–water contact angle

Contact angle reflects the interaction forces at the phase interfaces and the wettability. Thus, it is a significant parameter to describe the interaction between oil, gas, water, and rock in petroleum reservoirs (Wolf et al. 2009).

We simulated the contact angle of the monocrystalline Si–water liquid–water vapor system by applying our integrated MD–LBM approach and then compared the value with literature for validation.

Figure 8 demonstrates the equilibrium state of the system after LBM simulation. In the simulation, the computational domain is 100 × 50, where the upper and lower boundaries are solid walls, and the east and west boundary is periodic. For the solid node, before the streaming step, a bounce–back algorithm was implemented to mimic the non-slip wall boundary condition.

Fig. 8
figure 8

Equilibrium state simulated from LBM for a water liquid drop in contact with the Si surface. The gray grid on the top and bottom is for Si, the red for water liquid, and the blue for water vapor

In Fig. 8, the gray grid on the top and bottom is for Si, the red is for water liquid, and the blue is for water vapor. The interaction force between water fluids was calculated by EOS, and the interaction force between water and Si was obtained by MD. This figure shows that the macro contact angel is approximate 101°, which is consistent with the result given by (Williams and Goodman 1974) in which it states that the contact angle is near 90°. Therefore, the method of MD used in fluid–solid interaction force calculation incorporated into LBM is reasonable in porous media flow simulation.

3.4 Rock permeability determination based on an actual X-ray CT image of a reservoir core

Similar to the methodology in previous literature (Guo and Zheng 2009; Huang et al. 2009, 2011; Huang and Lu 2009; Hatiboglu and Babadagli 2007, 2008; Jorgensen et al. 1983), we calculated the relative permeability curves by simulating a two-phase flow in the porous media. Figure 9 is a post-processed 2D X-ray image of a reservoir core in Tarim Basin conglomerate with a length L = 2.7 mm and width A = 1.35 mm. The domain is gridded into 540 × 270 = 145,800 cells with each one being a 5 × 5 μm square. In this image, the part in black represents pores and white for the rock grains. Porosity ϕ = 43.5 %.

Fig. 9
figure 9

A 2D CT image of a reservoir rock in Tarim Basin conglomerate

We applied a single-vapor phase flow of water to calculate the absolute permeability of the core represented by the image in Fig. 9. The system is at temperature T = 110 °C. At the initial state, each cell was saturated with H2O steam with a density of 0.754 kg/m3. In order to use the MD simulation results on interaction forces between H2O and Si consistently, we assumed that the rock grain is made of Si (in our on-going research, we use the more realistic assumption that the rock grains are composed of quartz (SiO2) and other minerals).

As in Fig.  10, we applied a virtual body force g and periodic boundary conditions in calculating permeability based on LBM solution of the water flow problem. The body force is equivalent of adding a pressure drop \(\Delta p = \bar{\rho }gL\) (\(\bar{\rho } = \sum\limits_{i = 1}^{n} {\rho_{i} } /n\) is the average density of water in the simulation domain, n is the total number of the grids filled with water) between the left and right side of the core. By applying different values of g, we can calculate flow velocity under different pressure drops.

Fig. 10
figure 10

The flow problem in calculating absolute permeability. Closed boundaries on the top and bottom. A virtual body force g towards right is applied to the simulation domain, and periodic boundary condition is set on left and right sides of the simulation domain

For a given pressure drop Δp, the flow velocity of H2O steam reaches equilibrium after some steps of simulation. The volumetric velocity of H2O steam flow is calculated as \(v_{\text{g}} = \phi \sum\limits_{i = 0}^{n} v_{i}/n\) (Cihan et al. 2009). Figure 11 depicts the calculated relationship between v g and Δp.

Fig. 11
figure 11

Calculated water flow velocity versus pressure drop

The linearity between v g and Δp shown in Fig. 11 is in agreement with Darcy’s law v = KΔp/(μL), where μ is the viscosity of water vapor, L is the length of the core, and K is permeability of the core.

Plug L = 2.7 mm and μ g = 12.4 × 10−6 Pa s into Darcy’s law and use least square linear fitting of calculated points in Fig. 11, we calculate the permeability of the rock as 636 mD.

3.5 Vapor–liquid two-phase relative permeability determination based on an actual X-ray CT image of a reservoir core

Relative permeability, as a function of phase saturation, could be modeled by multi-phase flow simulation using the proposed workflow. Similar to the conditions set for absolute permeability simulation, virtual body force g and periodic boundary condition were applied to the simulation domain, and temperature was set at 110 °C.

At initial state, the core was randomly filled with vapor–liquid two-phase water at different mixing ratios to represent different saturations (Fig. 12). At the simulation temperature, 110 °C, saturated water vapor density is 0.787 kg/m3, and saturated water liquid density is 793 kg/m3. Then the average density of water in simulation domain, \(\bar{\rho }\), was calculated for different saturations. Given that \(\Delta p = \bar{\rho }gL\), the pressure drop for any values of g can be obtained.

Fig. 12
figure 12

Distribution of vapor (in pink) and liquid (in blue) phases of H2O in rock pores

At the simulation temperature, the viscosities of saturated water vapor and liquid are μ g = 12.4 × 10−6 Pa s and μ w = 252 × 10−6 Pa s.

We calculated the permeability of the vapor and liquid phases using Darcy’s law for different phases, K g = v g μ g Lp, K w = v w μ w Lp. K g and K w at different saturations were obtained from repeated simulations and calculations of volumetric velocity of each phase. Finally, the relative permeability K rg = K g/K and K rw = K w/K is obtained as shown in Fig. 13.

Different from the simulation of absolute permeability, the multi-phase flow modeling results using a statistical method such as LBM could be unstable, thus causing the volumetric velocity obtained at different times be slightly different. This means that the relative permeability of each phase at a given saturation could be a distribution as shown in Fig. 13. The relative permeability curves were constructed by taking the average values of Kr at each saturation.

Fig. 13
figure 13

Calculated vapor–liquid two-phase water relative permeability curves

3.6 Capillary pressure curve determination based on an actual X-ray CT image of a reservoir core

We also applied our methodology to calculate the capillary pressure curve. As shown in Fig. 14, constant pressure boundary conditions (p 1 on the left and p 2 on the right) and closed boundary conditions on the top and bottom were applied to the simulation domain.

Fig. 14
figure 14

The flow problem in calculating capillary pressure curve. A constant pressure boundary is set on both sides of the simulation domain

In the initial state, the domain was filled with saturated water vapor. We injected saturated water liquid from the left side under constant pressure p 1. Since p 1 > p 2, water vapor will flow out of the domain from the right side. By applying different pressure drops Δp = p 1p 2, the injected liquid flowed into the pores to yield different phase saturations. At an equilibrium state as shown in Fig. 15, the capillary pressure is equal to the pressure drop, i.e., p c(S g) = Δp. The calculated capillary pressure curve is shown in Fig. 16.

Fig. 15
figure 15

The viscous–capillary equilibrium of steam flooding

Fig. 16
figure 16

Calculated vapor–liquid H2O capillary pressure curve

4 Conclusions

In this work, we proposed a new systematic workflow to integrate MD simulation with the LB method to model multi-phase flow in porous media. As an improvement, this new approach avoids parameter fitting or incorrectly assuming a linear relationship between the rock–fluid interaction force and fluid density. We have validated this approach by simulating a two-phase separation process and a gas–liquid–solid three-phase contact angle. The success of MD–LBM results in agreement with published EOS solution, and experimental results demonstrated a breakthrough in pore-scale, multi-phase flow modeling. Based on an actual X-ray CT image of a reservoir core, we applied our workflow to calculate absolute permeability of the core, vapor–liquid water relative permeability, and capillary pressure curves. With the application of this workflow to a more realistic model considering actual reservoir rock and fluid parameters, the ultimate goal is to develop an accurate method for prediction of permeability tensor, relative permeability, and capillary curves based on 3D CT image of the rock, actual fluid, and rock components.