Marco De Paoli , Guru Sreevanshu Yerragolam , Detlef Lohse , Roberto Verzicco
{"title":"AFiD-Darcy: A finite difference solver for numerical simulations of convective porous media flows","authors":"Marco De Paoli , Guru Sreevanshu Yerragolam , Detlef Lohse , Roberto Verzicco","doi":"10.1016/j.cpc.2025.109579","DOIUrl":null,"url":null,"abstract":"<div><div>We present an efficient solver for massively-parallel simulations of convective, wall-bounded and incompressible porous media flows. The algorithm consists of a second-order finite-difference pressure-correction scheme, allowing the use of an efficient FFT-based solver in problems with different boundary conditions. The parallelization method is implemented in a two-dimensional pencil-like domain decomposition, which enables efficient parallel large-scale simulations. The original version of the code presented by van der Poel et al. (2015) <span><span>[35]</span></span> has been modified to solve the Darcy equation for the momentum transport, representative of porous media flows driven by buoyancy. Two schemes are implemented to treat the diffusive term of the advection-diffusion equation, namely a fully implicit and semi-implicit formulation. Despite exhibiting a higher computational cost per time step, the fully implicit scheme allows an efficient simulation of transient flows, leading to a smaller time-to-solution compared to the semi-implicit scheme. The implementation was verified against different canonical flows, and the computational performance was examined. To show the code's capabilities, the maximal driving strength explored has been doubled as compared to state-of-art simulations, corresponding to an increase of the associated computational effort of about 8 to 16 times. Excellent strong scaling performance is demonstrated for both schemes developed and for domains with more than 10<sup>10</sup> spatial degrees of freedom.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> AFiD-Darcy</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/xhx3gzpj6n.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/depaolimarco/AFiD-Darcy</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> CC BY 4.0</div><div><em>Programming language:</em> Fortran 90, MPI</div><div><em>External routines:</em> FFTW3, HDF5</div><div><em>Nature of problem:</em> Solving two- and three-dimensional Darcy equation coupled with a scalar field in a box bounded between two walls in one-direction and with periodic boundary conditions in the other two directions.</div><div><em>Solution method:</em> Second order finite difference method for spatial discretization, third order Runge–Kutta scheme in combination with Crank–Nicolson for the implicit terms for time advancement, two dimensional pencil distributed MPI parallelization. Implicit and semi-implicit formulations for the solution of the diffusive terms in the scalar transport equation.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109579"},"PeriodicalIF":7.2000,"publicationDate":"2025-03-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465525000827","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
We present an efficient solver for massively-parallel simulations of convective, wall-bounded and incompressible porous media flows. The algorithm consists of a second-order finite-difference pressure-correction scheme, allowing the use of an efficient FFT-based solver in problems with different boundary conditions. The parallelization method is implemented in a two-dimensional pencil-like domain decomposition, which enables efficient parallel large-scale simulations. The original version of the code presented by van der Poel et al. (2015) [35] has been modified to solve the Darcy equation for the momentum transport, representative of porous media flows driven by buoyancy. Two schemes are implemented to treat the diffusive term of the advection-diffusion equation, namely a fully implicit and semi-implicit formulation. Despite exhibiting a higher computational cost per time step, the fully implicit scheme allows an efficient simulation of transient flows, leading to a smaller time-to-solution compared to the semi-implicit scheme. The implementation was verified against different canonical flows, and the computational performance was examined. To show the code's capabilities, the maximal driving strength explored has been doubled as compared to state-of-art simulations, corresponding to an increase of the associated computational effort of about 8 to 16 times. Excellent strong scaling performance is demonstrated for both schemes developed and for domains with more than 1010 spatial degrees of freedom.
Program summary
Program Title: AFiD-Darcy
CPC Library link to program files:https://doi.org/10.17632/xhx3gzpj6n.1
Nature of problem: Solving two- and three-dimensional Darcy equation coupled with a scalar field in a box bounded between two walls in one-direction and with periodic boundary conditions in the other two directions.
Solution method: Second order finite difference method for spatial discretization, third order Runge–Kutta scheme in combination with Crank–Nicolson for the implicit terms for time advancement, two dimensional pencil distributed MPI parallelization. Implicit and semi-implicit formulations for the solution of the diffusive terms in the scalar transport equation.
期刊介绍:
The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper.
Computer Programs in Physics (CPiP)
These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged.
Computational Physics Papers (CP)
These are research papers in, but are not limited to, the following themes across computational physics and related disciplines.
mathematical and numerical methods and algorithms;
computational models including those associated with the design, control and analysis of experiments; and
algebraic computation.
Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.