Abstract
Multiphase flow in porous media often occurs with the formation and coalescence of fluid ganglia. Accurate predictions of such mechanisms in complex pore geometries require simulation models with local mass conservation and with the option to improve resolution in areas of interest. In this work, we incorporate patch-based, structured adaptive mesh refinement capabilities into a method for local volume conservation that describes the behaviour of disconnected fluid ganglia during level set simulations of capillary-controlled displacement in porous media. We validate the model against analytical solutions for three-phase fluid configurations in idealized pores containing gas, oil, and water, by modelling the intermediate-wet oil layers as separate domains with their volumes preserved. Both the pressures and volumes of disconnected ganglia converge to analytical values with increased refinement levels of the adaptive mesh. Favourable results from strong and weak scaling tests emphasize that the number of patches per processor and the total number of patches are important parameters for efficient parallel simulations with adaptive mesh refinement. Simulations of two-phase imbibition and three-phase gas invasion on segmented 3D images of water-wet sandstone show that adaptive mesh refinement has the highest impact on three-phase displacements, especially concerning the behaviour of the conserved, intermediate-wet phase.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
Availability of data and materials
The datasets generated during and/or analysed during the current study are available in the Figshare repository at: https://doi.org/10.6084/m9.figshare.21202469.v1.
Code Availability
Available on request.
References
Adalsteinsson, D., Sethian, J.: Transport and diffusion of material quantities on propagating interfaces via level set methods. Journal of Computational Physics 185(1), 271–288 (2003). https://doi.org/10.1016/s0021-9991(02)00057-8
Al-Dhahli, A., van Dijke, M.I.J., Geiger, S.: Accurate modelling of pore-scale films and layers for three-phase flow processes in clastic and carbonate rocks with arbitrary wettability. Transport in Porous Media 98, 259–286 (2013). https://doi.org/10.1007/s11242-013-0144-z
Anderson, R.W., Arrighi, W.J., Elliott, N.S., et al. (2013) SAMRAI concepts and software design. Tech. Rep. LLNL-SM-617092-DRAFT, Center for Applied Scientific Computing (CASC), Lawrence Livermore National Laboratory, Livermore, CA (Available at https://computing.llnl.gov/sites/default/files/SAMRAI-Concepts_SoftwareDesign.pdf)
Berger, M., Colella, P.: Local adaptive mesh refinement for shock hydrodynamics. Journal of Computational Physics 82(1), 64–84 (1989). https://doi.org/10.1016/0021-9991(89)90035-1
de Chalendar, J.A., Garing, C., Benson, S.M.: Pore-scale modelling of ostwald ripening. Journal of Fluid Mechanics 835, 363–392 (2017). https://doi.org/10.1017/jfm.2017.720
Childs H, Brugger E, Whitlock B, Meredith J, Ahern S, Pugmire D, Biagas K, Miller M, Harrison C, Weber GH, Krishnan H, Fogal T, Sanderson A, Garth C, Bethel EW, Camp D, Durant ORM, Favre JM, and Navrátil P (2012) VisIt: An end-user tool for visualizing and analyzing very large data. In: High Performance Visualization–Enabling Extreme-Scale Scientific Insight, 16. Chapman and Hall/CRC, p 358–396. https://doi.org/10.1201/b12985 (Available for download at: https://visit-dav.github.io/visit-website/releases-as-tables/)
Cueto-Felgueroso, L., Juanes, R.: A discrete-domain description of multiphase flow in porous media: Rugged energy landscapes and the origin of hysteresis. Geophysical Research Letters 43, 1615–1622 (2016). https://doi.org/10.1002/2015GL067015
van Dijke, M.I.J., Sorbie, K.S.: The relation between interfacial tensions and wettability in three-phase systems: Consequences for pore occupancy and relative permeability. Journal of Petroleum Science and Engineering 33(1–3), 39–48 (2002). https://doi.org/10.1016/S0920-4105(01)00174-7
Enright, D., Fedkiw, R., Ferziger, J., et al.: A hybrid particle level set method for improved interface capturing. Journal of Computational Physics 183(1), 83–116 (2002). https://doi.org/10.1006/jcph.2002.7166
Favino, M., Hunziker, J., Caspari, E., et al.: Fully-automated adaptive mesh refinement for media embedding complex heterogeneities: application to poroelastic fluid pressure diffusion. Computational Geosciences 24(3), 1101–1120 (2020). https://doi.org/10.1007/s10596-019-09928-2
Friis, H.A., Pedersen, J., Jettestuen, E., et al.: Pore-scale level set simulations of capillary-controlled displacement with adaptive mesh refinement. Transport in Porous Media 128(1), 123–151 (2019). https://doi.org/10.1007/s11242-019-01238-6
Garing, C., de Chalendar, J.A., Voltolini, M., et al.: Pore-scale capillary pressure analysis using multi-scale x-ray micromotography. Advances in Water Resources 104, 223–241 (2017). https://doi.org/10.1016/j.advwatres.2017.04.006
Ge, Z., Loiseau, J.C., Tammisola, O., et al.: An efficient mass-preserving interface-correction level set/ghost fluid method for droplet suspensions under depletion forces. Journal of Computational Physics 353, 435–459 (2018). https://doi.org/10.1016/j.jcp.2017.10.046
Gunney, B.T., Anderson, R.W.: Advances in patch-based adaptive mesh refinement scalability. Journal of Parallel and Distributed Computing 89, 65–84 (2016). https://doi.org/10.1016/j.jpdc.2015.11.005
Hazlett, R.D.: Simulation of capillary-dominated displacements in microtomographic images of reservoir rocks. Transport in Porous Media 20, 21–35 (1995). https://doi.org/10.1007/BF00616924
Helland, J.O., Jettestuen, E.: Mechanisms for trapping and mobilization of residual fluids during capillary-dominated three-phase flow in porous rock. Water Resources Research 52, 5376–5392 (2016). https://doi.org/10.1002/2016WR018912
Helland, J.O., Friis, H.A., Jettestuen, E., et al.: Footprints of spontaneous fluid redistribution on capillary pressure in porous rock. Geophysical Research Letters 44(10), 4933–4943 (2017). https://doi.org/10.1002/2017gl073442
Helland, J.O., Pedersen, J., Friis, H.A., et al.: A multiphase level set approach to motion of disconnected fluid ganglia during capillary-dominated three-phase flow in porous media: Numerical validation and applications. Chemical Engineering Science 203, 138–162 (2019). https://doi.org/10.1016/j.ces.2019.03.060
Helland JO, Jettestuen E, Friis HA (2021) A discrete-domain approach to three-phase hysteresis in porous media. Water Resources Research 57:e2021WR029–560. https://doi.org/10.1029/2021WR029560
Herring, A., Middleton, J., Walsh, R., et al.: Flow rate impacts on capillary pressure and interface curvature of connected and disconnected fluid phases during multiphase flow in sandstone. Advances in Water Resources 107, 460–469 (2017). https://doi.org/10.1016/j.advwatres.2017.05.011
Hilfer, R., Øren, P.E.: Dimensional analysis of pore scale and field scale immiscible displacement. Transport in Porous Media 22(1), 53–72 (1996). https://doi.org/10.1007/bf00974311
Hilpert, M., Miller, C.T.: Pore-morphology-based simulation of drainage in totally wetting porous media. Advances in Water Resources 24, 243–255 (2001). https://doi.org/10.1016/S0309-1708(00)00056-7
Hirt, C.W., Nichols, B.D.: Volume of fluid (VOF) method for the dynamics of free boundaries. Journal of Computational Physics 39, 201–225 (1981). https://doi.org/10.1016/0021-9991(81)90145-5
Hornung RD, Kohn SR (2002) Managing application complexity in the SAMRAI object-oriented framework. Concurrency and Computation: Practice and Experience 14:347–368. (SAMRAI is available at https://github.com/llnl/samrai)
Hornung, R.D., Wissink, A.M., Kohn, S.R.: Managing complex data and geometry in parallel structured AMR applications. Engineering with Computers 22, 181–195 (2006). https://doi.org/10.1007/s00366-006-0038-6
Hui, M.H., Blunt, M.J.: Effects of wettability on three-phase flow in porous media. The Journal of Physical Chemistry B 104(16), 3833–3845 (2000). https://doi.org/10.1021/jp9933222
Jettestuen, E., Helland, J.O., Prodanović, M.: A level set method for simulating capillary-controlled displacements at the pore scale with nonzero contact angles. Water Resources Research 49, 4645–4661 (2013). https://doi.org/10.1002/wrcr.20334
Jettestuen, E., Friis, H.A., Helland, J.O.: A locally conservative multiphase level set method for capillary-controlled displacements in porous media. Journal of Computational Physics 428, 109–965 (2021). https://doi.org/10.1016/j.jcp.2020.109965
Jiang, F., Tsuji, T.: Estimation of three-phase relative permeability by simulating fluid dynamics directly on rock-microstructure images. Water Resources Research 53(1), 11–32 (2017). https://doi.org/10.1002/2016WR019098
van Kats, F.M., Egberts, P.J.P.: Simulation of three-phase displacement mechanisms using a 2D lattice-Boltzmann model. Transport in Porous Media 37, 55–68 (1999). https://doi.org/10.1023/A:1006502831641
Kim, J., Lowengrub, J.: Phase field modelling and simulation of three-phase flows. Interfaces and Free Boundaries 7, 435–466 (2005). https://doi.org/10.4171/IFB/132
Krimi, A., Rezoug, M., Khelladi, S., et al.: Smoothed particle hydrodynamics: A consistent model for interfacial multiphase fluid flow simulations. Journal of Computational Physics 358, 53–87 (2018). https://doi.org/10.1016/j.jcp.2017.12.006
Li, L., Zhu, J., Zhang, Y.: Absolutely convergent fixed-point fast sweeping WENO methods for steady state of hyperbolic conservation laws. Journal of Computational Physics 443, 110516 (2021). https://doi.org/10.1016/j.jcp.2021.110516
Li, T., Schlüter, S., Dragila, M.I., et al.: An improved method for estimating capillary pressure from 3D microtomography images and its application to the study of disconnected nonwetting phase. Advances in Water Resources 114, 249–260 (2018). https://doi.org/10.1016/j.advwatres.2018.02.012
Liang, H., Xu, J., Chen, J., et al.: Lattice boltzmann modeling of wall-bounded ternary fluid flows. Applied Mathematical Modelling 73, 487–513 (2019). https://doi.org/10.1016/j.apm.2019.03.009
Losasso, F., Shinar, T., Selle, A., et al.: Multiple interacting liquids. ACM Transactions on Graphics 25(3), 812–819 (2006). https://doi.org/10.1145/1141911.1141960
Luo, K., Shao, C., Yang, Y., et al.: A mass conserving level set method for detailed numerical simulation of liquid atomization. Journal of Computational Physics 298(1), 495–519 (2015). https://doi.org/10.1016/j.jcp.2015.06.009
Merriman, B., Bence, J.K., Osher, S.J.: Motion of multiple junctions: A level set approach. Journal of Computational Physics 112, 334–363 (1994). https://doi.org/10.1006/jcph.1994.1105
Mohammadmoradi, P., Kantzas, A.: Toward direct pore-scale modeling of three-phase displacements. Advances in Water Resources 110, 120–135 (2017). https://doi.org/10.1016/j.advwatres.2017.10.010
Nourgaliev, R.R., Theofanous, T.G.: High-fidelity interface tracking in compressible flows: Unlimited anchored adaptive level set. Journal of Computational Physics 224, 836–866 (2007). https://doi.org/10.1016/j.jcp.2006.10.031
Olsson, E., Kreiss, G.: A conservative level set method for two phase flow. Journal of Computational Physics 210, 225–246 (2005). https://doi.org/10.1016/j.jcp.2005.04.007
Øren, P., Pinczewski, W.: Fluid distribution and pore-scale displacement mechanisms in drainage dominated three-phase flow. Transport in Porous Media 20, 105–133 (1995). https://doi.org/10.1007/BF00616927
Øren, P.E., Bakke, S., Arntzen, O.J.: Extending predictive capabilities to network models. SPE Journal 3, 324–336 (1998). https://doi.org/10.2118/52052-PA
Osher, S., Fedkiw, R.: Level Set Methods and Dynamic Implicit Surfaces. Springer, New York, (2003). https://doi.org/10.1007/b98879
Piri, M., Blunt, M.: Three-dimensional mixed-wet random pore-scale network modeling of two- and three-phase flow in porous media. I. Model description. Physical Review E 71, 026–301 (2005). https://doi.org/10.1103/PhysRevE.71.026301
Popinet, S.: A quadtree-adaptive multigrid solver for the serre–green–naghdi equations. Journal of Computational Physics 302, 336–358 (2015). https://doi.org/10.1016/j.jcp.2015.09.009
Prodanović, M., Bryant, S.: A level set method for determining critical curvatures for drainage and imbibition. Journal of Colloid and Interface Science 304, 442–458 (2006). https://doi.org/10.1016/j.jcis.2006.08.048
Raeini, A.Q., Blunt, M.J., Bijeljic, B.: Direct simulations of two-phase flow on micro-CT images of porous media and upscaling of pore-scale forces. Advances in Water Resources 74, 116–126 (2014). https://doi.org/10.1016/j.advwatres.2014.08.012
Ramstad, T., Idowu, N., Nardi, C., et al.: Relative permeability calculations from two-phase flow simulations directly on digital images of porous rocks. Transport in Porous Media 94, 487–504 (2012). https://doi.org/10.1007/s11242-011-9877-8
Rücker, M., Berg, S., Armstrong, R.T., et al.: From connected pathway flow to ganglion dynamics. Geophysical Research Letters 42, 3888–3894 (2015). https://doi.org/10.1002/2015GL064007
Ruuth, S.J.: A diffusion-generated approach to multiphase motion. Journal of Computational Physics 145, 166–192 (1998). https://doi.org/10.1006/jcph.1998.6028
Saye RI, Sethian JA (2011) The voronoi implicit interface method for computing multiphase physics. Proceedings of the National Academy of Sciences 108(49):19,498–19,503. https://doi.org/10.1073/pnas.1111557108
Scanziani, A., Singh, K., Bultreys, T., et al.: In situ characterization of immiscible three-phase flow at the pore scale for a water-wet carbonate rock. Advances in Water Resources 121, 446–455 (2018). https://doi.org/10.1016/j.advwatres.2018.09.010
Scanziani, A., Singh, K., Menke, H., et al.: Dynamics of enhanced gas trapping applied to CO\(_{\rm 2 }\) storage in the presence of oil using synchrotron X-ray micro tomography. Applied Energy 259, 114–136 (2020). https://doi.org/10.1016/j.apenergy.2019.114136
Sethian, J.A.: Level set methods and fast marching methods, 2nd edn. Cambridge University Press (1999)
Shams, M., Raeini, A.Q., Blunt, M.J., et al.: A numerical model of two-phase flow at the micro-scale using the volume-of-fluid method. Journal of Computational Physics 357, 159–182 (2018). https://doi.org/10.1016/j.jcp.2017.12.027
Shan, X., Chen, H.: Lattice Boltzmann model for simulating flows with multiple phases and components. Physical Review E 47(3), 1815–1819 (1993). https://doi.org/10.1103/PhysRevE.47.1815
Sheppard A, Schroeder-Turk G (2015) Network generation comparison forum. https://doi.org/10.17612/P7059V
Shi, Y., Tang, G.H., Wang, Y.: Simulation of three-component fluid flows using the multiphase lattice Boltzmann flux solver. Journal of Computational Physics 314, 228–243 (2016). https://doi.org/10.1016/j.jcp.2016.03.011
Sun, Y., Beckermann, C.: Sharp interface tracking using the phase-field equation. Journal of Computational Physics 220, 626–653 (2007). https://doi.org/10.1016/j.jcp.2006.05.025
Sussman, M., Puckett, E.: A coupled level set and volume-of-fluid method for computing 3d and axisymmetric incompressible two-phase flows. Journal of Computational Physics 162, 301–337 (2000). https://doi.org/10.1006/jcph.2000.6537
Svadlenka, K., Ginder, E., Omata, S.: A variational method for multiphase volume-preserving interface motions. Journal of Computational and Applied Mathematics 257, 157–179 (2014). https://doi.org/10.1016/j.cam.2013.08.027
Tabarraei, A., Sukumar, N.: Adaptive computations on conforming quadtree meshes. Finite Elements in Analysis and Design 41(7–8), 686–702 (2005). https://doi.org/10.1016/j.finel.2004.08.002
Tanino Y, Blunt MJ (2012) Capillary trapping in sandstones and carbonates: Dependence on pore structure. Water Resources Research 48(8). https://doi.org/10.1029/2011wr011712
Tartakovsky, A.M., Meakin, P.: Modeling of surface tension and contact angles with smoothed particle hydrodynamics. Physical Review E 72(2), 026–301 (2005). https://doi.org/10.1103/PhysRevE.72.026301
Tomutsa, L., Silin, D., Radmilovic, V.: Analysis of chalk petrophysical properties by means of submicron-scale pore imaging and modeling. SPE Reservoir Evaluation & Engineering 10(3), 285–293 (2007). https://doi.org/10.2118/99558-PA
Wei, B., Huang, H., Hou, J., et al.: Study on the meniscus-induced motion of droplets and bubbles by a three-phase Lattice Boltzmann model. Chemical Engineering Science 176, 35–49 (2018). https://doi.org/10.1016/j.ces.2017.10.025
Wu, L., Zhang, Y., Zhang, S., et al.: High order fixed-point sweeping WENO methods for steady state of hyperbolic conservation laws and Its convergence study. Communications in Computational Physics 20(4), 835–869 (2016). https://doi.org/10.4208/cicp.130715.010216a
Xu, J., Louge, M.Y.: Statistical mechanics of unsaturated porous media. Physical Review E 92(6), 062–405 (2015). https://doi.org/10.1103/physreve.92.062405
Yerry, M., Shephard, M.: A modified quadtree approach to finite element mesh generation. IEEE Computer Graphics and Applications 3(1), 39–46 (1983). https://doi.org/10.1109/mcg.1983.262997
Yu, Y., Liu, H., Liang, D., et al.: A versatile lattice Boltzmann model for immiscible ternary fluid flows. Physics of Fluids 31, 012108 (2018). https://doi.org/10.1063/1.5056765
Zhang, Q., Wang, X.P.: Phase field modeling and simulation of three-phase flow on solid surfaces. Journal of Computational Physics 319, 79–107 (2016). https://doi.org/10.1016/j.jcp.2016.05.016
Zolfaghari, A., Piri, M.: Pore-scale network modeling of three-phase flow based on thermodynamically consistent threshold capillary pressures. I. Cusp formation and collapse. Transport in Porous Media 116(3), 1093–1137 (2017). https://doi.org/10.1007/s11242-016-0814-8
Acknowledgements
Financial support was provided by the Research Council of Norway through Petromaks2 project “Foam dynamics in the presence of oil during multiphase flow in porous rock (grant no. 294886)”. The computations on 3D geometry were performed on resources provided by UNINETT Sigma2, the National Infrastructure for High Performance Computing and Data Storage in Norway.
Funding
Open access funding provided by University of Stavanger & Stavanger University Hospital. The financial support was provided by the Research Council of Norway through Petromaks2 project “Foam dynamics in the presence of oil during multiphase flow in porous rock (grant no. 294886)”.
Author information
Authors and Affiliations
Contributions
Deepak Singh: Conceptualization, Investigation, Methodology, Software, Validation, Visualization, Writing - original draft, Writing - review & editing. Helmer Andrè Friis: Conceptualization, Methodology, Software, Writing - review & editing. Espen Jettestuen: Conceptualization, Methodology, Software, Writing - review & editing. Johan Olav Helland: Conceptualization, Funding acquisition, Methodology, Software, Supervision, Validation, Visualization, Writing - review & editing.
Corresponding author
Ethics declarations
Competing interests
The authors declare no conflict of interest/competing interests.
Ethics approval
Not applicable.
Consent to participate
Not applicable.
Consent for publication
Not applicable.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Helmer André Friis, Espen Jettestuen and Johan Olav Helland contributed equally to this work
Supplementary information The supplementary information file provided with this article contains additional results from scaling tests, close-up of three-phase configurations in different corners of the triangular pore, equilibrium states for two cylindrical pores, and evolution videos of two-phase and three-phase displacement in the Castlegate sandstone geometry.
Supplementary Information
Below is the link to the electronic supplementary material.
Supplementary file 2 (mp4 10867 KB)
Supplementary file 3 (mp4 8251 KB)
Appendix A: Analysis of isolated domain identification methodology
Appendix A: Analysis of isolated domain identification methodology
In our work, isolated domains are identified in two steps: (1) Identify isolated regions on a patch, and (2) generate unique global tags for isolated domains. The first step provides isolated regions on a patch with patch-level unique tags on each processor. The second step uses the processor rank and patch-level unique tags to generate unique global tags for isolated domains. When an isolated domain lies on more than two patches on a processor, we identify it with a different tag on each patch. Identifying the same domain by multiple tags on a processor leads to more data communication with the root processor. A higher communication load negatively impacts computational performance. An intuitive way to reduce the data communication is to split the second step into two parts: (i) processor level unique identification and (ii) unique global identification from a reduced list aggregated from the processors. We refer to the two-step identification method as serial identification and the three-step identification method as parallel identification.
We carry out three sets of strong scaling tests with both serial and parallel identification of isolated domains following the procedure described in Section 4.3. The tests are carried out on a cubic geometry with two phases (using LS-LVC model) such that one phase is completely continuous and the other is completely disjointed (see Fig. 23). We refine grid cells around all interfaces (\(\vert \phi \vert <\Delta x\)). This kind of geometry provides the highest level of overlaps between patches with different levels of refinement that identify the same isolated region. Therefore, it is highly suitable for an algorithm that gives processor-level unique tags to isolated domains before providing them with globally unique tags in the root processor. Table 8 shows the data from these tests. We can see that the tagging criteria provides a large number of refined grid cells because the number of grid cells between different processors remains the same while the number of patches increases. This is unlike the result seen in Section 4.3 with three phases.
Geometry used for strong scaling tests with isolated domains of one phase (in blue) surrounded by a continuous phase that occupies the remaining part of the computational domain. (a) Geometry used for \(16,\ 32,\) and 64 processors contains \(50\times 50\times 50\) coarse grid cells. (b) Geometry used for 128, 256 and 512 processors contains \(160\times 160\times 160\) coarse grid cells
Although not intuitive, Table 8 shows that the parallel identification does not provide any gains. Instead, it is generally slightly slower than serial identification. The drop in speed can be attributed to three factors. First parallel identification requires an extra iteration of reading and writing data on a patch along with a processor level run for the unique labelling of domains. These additional executions increase the time spent on each processor before unique global labelling. Second, over the years, there has been a continuous reduction in MPI data communication time between processors, and nowadays, it is of linear order [14]. This reduction diminishes the possible gain from a reduction in computational time from parallel processing. Finally, in our model we utilise the patch generation and load balancing capabilities of the SAMRAI framework. SAMRAI provides adequate load balancing by striving to put nearby patches into the same processor. However, using the framework reduces our control in forcing adequate overlap onto the patches in a processor to ensure that parallel identification improves computation time.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Singh, D., Friis, H.A., Jettestuen, E. et al. Adaptive mesh refinement in locally conservative level set methods for multiphase fluid displacements in porous media. Comput Geosci 27, 707–736 (2023). https://doi.org/10.1007/s10596-023-10219-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10596-023-10219-0