Numerical Simulation of Ferrofluid Flow in Heterogeneous and Fractured Porous Media Based on Finite Element Method

Ferrofluid is a kind of magnetic fluid, the flow of which is controlled by an external magnetic field. Owing to this property, ferrofluid, as a new function material, has raised extensive concern in the oil industry. In this paper, the issue of ferrofluid flow in complex porous media has been studied by numerical simulation, and the validity and accuracy of the numerical algorithm are demonstrated through a 1-D horizontal tube example. Later, the effects of the magnetic force on ferrofluid flow in complex porous media, such as heterogeneous and fractured porous media, are investigated. The results show that there is basically no flow in low permeability or secondary fracture without a magnetic field, due to the characteristics of porous media and displacement pressure distribution. However, the ferrofluid flow velocity and domain can be changed by applying an external magnetic field. This novel phenomenon may provide a new idea to enhance oil recovery based on controllable flooding technology or meet other industrial needs by using ferrofluid.


INTRODUCTION
Water flooding, as is well recognized, is an effective approach to maintain reservoir pressure and improve oil recovery. However, heterogeneities or fractures present in reservoirs can significantly decrease the sweep efficiency, leading to poor utilization ratios, and low oil recovery (Qitai, 2000;Han, 2007;Li, 2009). Therefore, how to change the direction of the displacement fluid to increase the flooding area plays a vital role in enhancing oil recovery. At present, there are many methods to achieve that. First, the subsurface fluid flow can be regulated by optimizing the well production and injection. Second, increasing rock permeability in low-sweep zones, such as by fracturing and acidizing methods (Zeng et al., 2018;Lei et al., 2019;Lu et al., 2020;Zeng et al., 2020;Jia et al., 2021), can significantly improve the flow capacity of the zones. In addition, it is also an alternative to apply polymer flooding or surfactant flooding to change the properties of the displacement fluid and reduce its flow ability in high-sweep zones or increase its flow ability in low-sweep zones (Zhu et al., 2019a;Zhu et al., 2019b;Sidiq et al., 2019). However, all of the above methods are time-consuming and labor-intensive work.
Ferrofluid is a stable colloid composed of nanoscale magnetic particles (usually magnetite, Fe 3 O 4 ) which are coated with a molecular layer of a dispersant (amphiphilic molecules, like oleic acid) and suspended in a liquid carrier (Popplewell and Charles, 1981), as is shown in Figure 1. Ferrofluid exhibits the characteristics of a general fluid in that its motion follows the hydrodynamic law. However, it is a magnetic substance that receives the magnetic body force in the presence of an external magnetic field, so that its behavior and property can be controlled by the magnetic field (Odenbach, 2008). The idea of creating a colloidal fluid with ferromagnetic properties was put forward independently and almost simultaneously by several investigators. One of the first and most easily prepared colloidal systems was developed by NASA in the early 1960's (Rosensweig, 1982). At present, ferrofluid has many industrial applications, such as dynamic sealing, inertial and viscous damper, magnetic drug targeting, liquid microrobots, and so on (Raj and Moskowitz, 1990;Hou et al., 1999;Scherer and FigueiredoNeto, 2005;Fan et al., 2020). Recently, researchers have been studying the potential of using ferrofluid to detect fractures and heterogeneity in reservoirs (Sengupta, 2012;Rahmani et al., 2015).
In this paper, we focus on the ferrofluid flow in porous media using the numerical simulation method based on the finite element method. First, the validity and accuracy of the model and the numerical algorithm are demonstrated. Then, several problems of the heterogeneous and fractured porous media flow are studied. The results show that the ferrofluid flow in complex porous media can be manipulated by applying an external magnetic field. For example, the flow velocity and the flow region can be changed under the action of magnetic force. This phenomenon may provide a new idea for enhancing oil recovery, such as using ferrofluid as controllable displacement fluid in complex or unconventional reservoirs.

Magnetic Body Force
When applying an external magnetic field, the secondary magnetic field produced by the magnetic particles in the ferrofluid and the interaction between the two magnetic fields produce a magnetic body force on the ferrofluid (Neuringer and Rosensweig, 1964): where μ 0 4π × 10 −7 Tm/A is the magnetic permeability of vacuum, M (A/m) is magnetization, and H (A/m) is magnetic field strength.
We considered a water-based ferrofluid whose properties are provided by a nanomaterial company in China. Its viscosity and density respectively equal 5.8 mPa·s and 1,187 kg/m 3 . Although the composition of the fluid was not offered, the magnetization curve of the fluid was provided to us as is shown in Figure 2. The ferrofluid magnetization curve can be generally approximated by simple twoparameter arctan functions of the form (Oldenburg et al., 2000): where α 1 × 10 4 , β 3.5 × 10 −5 .

Calculation of Magnetic Field
In this paper, the external magnetic field provided by the NdFeB magnets and the three-dimensional magnetic field could be calculated by analytic equations (Maccaig, 1987) where, Frontiers in Earth Science | www.frontiersin.org June 2021 | Volume 9 | Article 693531 B r is residual flux density of the magnet and is measured in Tesla (T) in SI units. 2a, 2b, and L are the length of the magnet in three directions as is shown in Figure 3.

Single-phase Ferrofluid Flow Equations
For a ferrofluid affected by an external magnetic field, a body force Fm is produced, as is shown in Eq. 1. Thus, an additional magnetic force term appears in Darcy's equation： where v is the mass flow velocity, k is permeability tensor which changes into scalar k in isotropic porous media, ρ is the density of ferrofluid, μ is the viscosity of ferrofluid, and g is the acceleration of gravity. And the conservation of mass equation is shown as： where Q is the source term and ϕ is the porosity of porous media.

Finite Element Discretization
In this paper, we only take the isothermal flow of impressible single-phase ferrofluid into consideration whereas we neglect the impact of gravity for simplicity, which is similar to the analysis of other flow problems. Eqs.7, 8 can be simplified as: Define mobility as λ k/μ , then: The Galerkin weighted residual method is used to derive the formulation of the finite element in the above equation： where q equals Q/ρ. By applying the Integration by Parts method and considering the impermeable boundary, Eq. 11 turns into: The finite element approximation of the pressure p, magnetic field strength H, and potential function Φ on the grid unit are: where m is the number of grid points, T is the potential function at grid point. Taking Eq. 13 into Eq.12, we can obtain a set of pressure equations: The ferrofluid pressure can be obtained by solving the above equations, and then be combined with Eq.7 to obtain the velocity.

VERIFICATION OF ALGORITHM
Morris et al. set up a one-dimensional experimental system to verify the validity of the magnetic force expression by comparing the experimental and theoretical results (Moridis et al., 1998). Here we used this method to verify the correctness of the algorithm. Consider a one-dimensional closed horizontal tube model with a radius that is small enough to approximate the porous media. The tube is filled with ferrofluid and a magnet is placed on the left side, as is shown in Figure 4. The length L of the magnet is 0.127 m, the width 2a and height 2b of the magnet are both 0.0508 m, and the residual magnetization B r of the magnet is 1.19 T. The distance L 0 between the magnet and the tube is 0.01 m while the length of the tube is 0.19 m.
For the 1-D model, combined Eqs 3, 4, the calculation of magnetic field strength can be simplified as: Based on the Eq.15, the magnetic field strength gradient can be obtained: Combining Eqs 1, 2, 16, the magnetic force term μ 0 M ρ ∇H can be obtained. Moridis et al. used a single exponential function to fit the magnetic force term (Moridis et al., 1998). Based on this form, here the magnetic force term is fitted by a double exponential function to obtain higher precise fitting: where these coefficients u 1 −1860 TAm/(m 3 Kg), u 2 51.55, u 3 1465 TAm/(m 3 Kg), and u 4 50.3. The fitting results of magnetic force term are shown in Figure 5:   Because the tube is closed and horizontal, v and ∇z equals zero. Combining Eqs 7, 17, one can obtain: Solving the above equation, the analytic solution of pressure can be obtained: where P 0 is the initial pressure and is assumed to equal the atmospheric pressure, which is 101.3 × 10 3 Pa, the distance x ∈ [0.01, 0.2]. The analytic solutions obtained by Eq.19 and the numerical solutions obtained by the finite element method are basically the same, as is shown in Figure 6. Therefore, the

Porous Media With Horizontal Heterogeneities
Consider two 1/4 five-spot horizontal heterogeneous porous media models, as Figure 7 shows, both with a size of 0.2 m × 0.2 m. The first model contains elliptical high-permeability zones while the second model contains elliptical lowpermeability zones. The former permeability is 1.0 × 10 −13 m 2 and the latter permeability is 1.0 × 10 −16 m 2 . Assuming both models have a porosity of 0.2 it are outside of the elliptical zones, then the permeability will be 1.0 × 10 −14 m 2 . The injection and production rates of both models were set to 1.0 PV/min, where PV is the total pore volume. The initial pressure is 101.3 × 10 3 Pa. Two magnets were placed on both porous media models, as is shown in Figure 7, and the magnet properties have been mentioned in Verification of Algorithm.  For the former heterogeneous model, the injected ferrofluid mainly flows through the high permeability zone when there is no external magnetic field (the size and direction of black arrows represent the flow velocity). While in the lower permeability area, ferrofluid is barely flowing because the pressure gradient is too low, as is shown in Figure 8C However, when applied to an external magnetic field ( Figure 8B), ferrofluid begins to flow towards the magnets and the pressure increases under the effect of the magnetic force. The magnetic force acts as a "shunt effect," as is shown in Figure 8D.
For the latter heterogeneous porous media, the flow velocity in the low permeability zone is nearly zero. Ferrofluid flows bypassing the low permeability zone and the velocity is low when there is no external magnetic field, as is shown in Figure 9C.
When an external magnetic field is applied ( Figure 9B), the magnetic force speeds up the flow of ferrofluid around the low permeability zone which leads to a "drainage effect." The magnetic force leads to the flow velocity and the fluid pressure increases, as is shown in Figure 9D.

Porous Media With Fractures
The fractures' geometric configuration was simplified by using the discrete-fracture method (Huang et al., 2011). Assuming the representative element volumes of both matrix and fracture system exist, and the flow equations (FEQ) are applied to the entire research area, then for the discretefracture model, the integral form of the flow equation can be expressed as: where m represents the matrix, f represents the fracture, and α is the aperture of fracture. Consider two horizontal fractured porous media models as are shown in Figure 10, and the model size is 0.2 m× 0.2 m. The aperture of fracture equals 1 mm, and the permeability of fracture is 8.33 × 10 −10 m 2 . The other parameters are the same as mentioned above. Both two models have the same magnetic field as is shown in Figure 8B.
Because fracture is regarded as a kind of preferential pathway, the injected ferrofluid mainly flows along with the primary fractures (between the injector and producer), but the ferrofluid in the matrix or secondary fractures hardly flow, as is shown in Figure 11C,E (the red and black arrows stand for flow velocity in fractures and matrix respectively). When an external magnetic field is applied, the ferrofluid is forced to flow towards the magnet. As a result, the flow velocity in the primary fracture decreases and the ferrofluid in the matrix and secondary fractures begins to flow, as is shown in Figure 11D,F.

Heterogeneous and Fractured Porous Media
Consider a heterogeneous and fractured porous media model as is shown in Figure 12A, and the model size is 0.6 m × 0.2 m. The magnetic field and heterogeneous permeability map are shown in Figure 12B,C.
When there is no external magnetic field, the ferrofluid mainly flows in the fractures and the matrix with high permeability between injector and producer, as is shown in Figure 13B. However, the fluid flows slowly in the upper left and lower right corners of the reservoir due to the small pressure gradient.
Instead, if an external magnetic field (shown in Figure 12B) was applied, the flow state of the ferrofluid was changed, as is shown in Figure 13C. First, the flow velocity of the fluid in the matrix and fractures near the magnet increased due to magnetic force. Second, the flow velocity in the area far away from the magnetic source became relatively small. Third, the direction of fluid flow in some fractures is even reversed because the magnetic field force overcomes the displacement pressure gradient. The above results show that the flow of ferrofluid can be significantly affected by the external magnetic field, and therefore, its flow can be changed and the flow region can be expanded.

CONCLUSION
In this paper, the ferrofluid flow in complex porous media is investigated. The magnetic force is introduced into the Darcy equation and the Galerkin finite element method is used for discrete equations. From the simulation results, it is found that the ferrofluid flow in complex porous media can be manipulated by applying an external magnetic field. Moreover, some interesting phenomenon during ferrofluid flow in heterogeneous and fractured porous media have been found: 1) there is basically no flow in low permeability areas or secondary fractures without a magnetic field due to small displacement pressure; and 2) the ferrofluid flow direction and velocity can be changed, so that the magnetic force allows this magnetic fluid to be manipulated to flow in the desired direction through control of the external magnetic field, and makes the flow area larger.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

AUTHOR CONTRIBUTIONS
TH conceived the idea and wrote the manuscript. XL, ZH, and RW contributed to the study and gave final approval for the manuscript.