{"title":"An efficient GPU-accelerated adaptive mesh refinement framework for high-fidelity compressible reactive flows modeling","authors":"Yuqi Wang , Yadong Zeng , Ralf Deiterding , Jianhan Liang","doi":"10.1016/j.cpc.2025.109870","DOIUrl":"10.1016/j.cpc.2025.109870","url":null,"abstract":"<div><div>This paper presents a heterogeneous adaptive mesh refinement (AMR) framework for exascale simulations of non-stiff/moderately stiff chemical kinetics. The framework features an efficient time-subcycling stepping algorithm along with a specialized refluxing method, all unified in a highly parallel, scalable codebase. In addition, we develope a GPU-optimized low-storage explicit Runge–Kutta chemical integrator designed to minimize register usage, achieving higher efficiency than its implicit counterparts for detailed chemical kinetics with small mechanism size in high-speed combustion problems. A suite of benchmarks demonstrates the framework's high fidelity for both non-reactive and reactive simulations on both uniform and adaptively refined grids. By leveraging our parallelization strategy developed on top of AMReX, we demonstrate significant speedups on various problems using an NVIDIA V100 GPU compared to an Intel i9 CPU within the same codebase. In particular, for problems with complex physics and spatiotemporally distributed stiffness, such as hydrogen detonation propagation, we achieve an overall speedup of 6.49× with substantial computational throughput. Finally, this AMR framework is applied to a large-scale three-dimensional direct numerical simulation. Compared to prior CPU computations on a uniform grid, it yields a substantial reduction in total degrees of freedom involved in the calculation without compromising accuracy.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"318 ","pages":"Article 109870"},"PeriodicalIF":3.4,"publicationDate":"2025-09-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145120734","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"JAX-WSPM: A GPU-accelerated parallel framework based on the JAX library for modeling water flow and solute transport in unsaturated porous media using an implicit finite element method","authors":"Nour-Eddine Toutlini , Azzeddine Soulaïmani , Abdelaziz Beljadid","doi":"10.1016/j.cpc.2025.109866","DOIUrl":"10.1016/j.cpc.2025.109866","url":null,"abstract":"<div><div>Accurate simulation of water flow and solute transport in unsaturated porous media requires solving complex, nonlinear partial differential equations. Traditionally, implicit finite element methods have been used due to their robustness and stability. However, they are well known for their computational expense when addressing coupled dynamics. In this study, we present JAX-WSPM, a GPU-accelerated framework built with the JAX library that leverages just-in-time (JIT) compilation and automatic differentiation (AD) to reduce computational cost and improve scalability for coupled water flow and solute transport systems in porous media. We use an implicit finite element method to solve the Richards equation, which models water flow in unsaturated media, and the transport equation. JAX-WSPM implements two complementary strategies for computing water fluxes that are critical for the solute transport equation: one based on conventional finite element formulations and another that supports automatic differentiation. In addition, an adaptive time-stepping strategy is employed to optimize performance.</div><div>Benchmark tests are conducted to examine the accuracy, efficiency, and scalability of JAX-WSPM in solving the Richards equation and the coupled flow-solute transport system. The results confirm the accuracy and efficiency of the framework and demonstrate significant speedups when comparing the GPU-accelerated JAX-WSPM implementation to both the CPU-based JAX-WSPM and serial Python implementations. For example, when performing simulations on a mesh with 1.03 million degrees of freedom, the GPU-accelerated solver achieved a speedup of approximately 107× relative to the serial Python implementation running on a single CPU. JAX-WSPM is available at <span><span>https://github.com/NourEddine-Toutlini/JAX-WSPM</span><svg><path></path></svg></span>, offering a flexible, user-friendly, and high-performance tool for simulations in porous media.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"318 ","pages":"Article 109866"},"PeriodicalIF":3.4,"publicationDate":"2025-09-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145156845","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"BESLE: Boundary element software for 3D linear elasticity. Version 2.0","authors":"Andres F. Galvis , Rahim Si Hadj Mohand","doi":"10.1016/j.cpc.2025.109871","DOIUrl":"10.1016/j.cpc.2025.109871","url":null,"abstract":"<div><div>The version 2.0 of the <strong>B</strong>oundary <strong>E</strong>lement <strong>S</strong>oftware for 3D <strong>L</strong>inear <strong>E</strong>lasticity (<span>BESLE</span>) is presented. <span>BESLE</span> is an open-source Fortran 90 code for the simulation of isotropic and anisotropic solids under quasi-static, dynamic, and high-rate boundary conditions using elastostatic and elastodynamic boundary element formulations. Compared to the initial release, this new version introduces a substantially simplified installation procedure. <span>BESLE</span> v1.0 required users to manually download, configure, and integrate external libraries such as MUMPS, SCOTCH, and ScaLAPACK, which often represented a barrier for new users. In contrast, version 2.0 provides an online installer, which automatically downloads, prepares, and installs the required libraries from public repositories. This new approach makes the deployment of <span>BESLE</span> straightforward, reducing installation time and minimising potential user errors. No changes have been made to the core numerical methods, input structure, or supported physics. <span>BESLE</span> v2.0 therefore retains full compatibility with existing simulations and examples, while significantly improving ease of installation, accessibility, and reproducibility.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"318 ","pages":"Article 109871"},"PeriodicalIF":3.4,"publicationDate":"2025-09-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145109930","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Arseniy Kholod , Yuriy Polyakov , Michael Schlottke-Lakemper
{"title":"Secure numerical simulations using fully homomorphic encryption","authors":"Arseniy Kholod , Yuriy Polyakov , Michael Schlottke-Lakemper","doi":"10.1016/j.cpc.2025.109868","DOIUrl":"10.1016/j.cpc.2025.109868","url":null,"abstract":"<div><div>Data privacy is a significant concern when using numerical simulations for sensitive information such as medical, financial, or engineering data—especially in untrusted environments like public cloud infrastructures. Fully homomorphic encryption (FHE) offers a promising solution for achieving data privacy by enabling secure computations directly on encrypted data. Aimed at computational scientists, this work explores the viability of FHE-based, privacy-preserving numerical simulations of partial differential equations. The presented approach utilizes the Cheon-Kim-Kim-Song (CKKS) scheme, a widely used FHE method for approximate arithmetic on real numbers. Two Julia packages are introduced, OpenFHE.jl and SecureArithmetic.jl, which wrap the OpenFHE C++ library to provide a convenient interface for secure arithmetic operations. With these tools, the accuracy and performance of key FHE operations in OpenFHE are evaluated, and implementations of finite difference schemes for solving the linear advection equation with encrypted data are demonstrated. The results show that cryptographically secure numerical simulations are possible, but that careful consideration must be given to the computational overhead and the numerical errors introduced by using FHE. An analysis of the algorithmic restrictions imposed by FHE highlights potential challenges and solutions for extending the approach to other models and methods. While it remains uncertain how broadly the approach can be generalized to more complex algorithms due to CKKS limitations, these findings lay the groundwork for further research on privacy-preserving scientific computing.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"318 ","pages":"Article 109868"},"PeriodicalIF":3.4,"publicationDate":"2025-09-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145120735","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"An efficient second-order scalar auxiliary variable approach for unsteady non-Newtonian incompressible fluids","authors":"Mofdi El-Amrani , Anouar Obbadi , Mohammed Seaid , Driss Yakoubi","doi":"10.1016/j.cpc.2025.109865","DOIUrl":"10.1016/j.cpc.2025.109865","url":null,"abstract":"<div><div>A novel second-order time-splitting method is proposed for the numerical solution of non-Newtonian fluid flows governed by the incompressible Navier-Stokes equations with a shear-rate dependent viscosity. In many applications, this class of fluid flows is challenging to numerically solve using the conventional monolithic methods. The proposed approach belongs to a family of viscosity-splitting methods and it separates the convection term from the incompressibility constraint into two steps using the second-order implicit backward differentiation formula for the time integration. To ensure the stability of this method, we introduce a numerical scheme based on the scalar auxiliary variable approach an efficient pressure incrementation is introduced using the scalar auxiliary variable approach. Unlike most projection methods for solving incompressible Navier-Stokes equations, the proposed method is free of any numerical inconsistencies generated by the treatment of boundary conditions in the pressure solution. A rigorous stability analysis is also carried out in this study and the proposed method is demonstrated to be consistent and stable with no restrictions on the time step. Numerical results are presented for three flow problems to validate the second-order convergence rates and to illustrate the performance of the proposed time-splitting scheme for unsteady non-Newtonian incompressible fluids.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109865"},"PeriodicalIF":3.4,"publicationDate":"2025-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145109514","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"TensorSymmetry: a package to get symmetry-adapted tensors disentangling spin-orbit coupling effect and establishing analytical relationship with magnetic order","authors":"Rui-Chun Xiao , Yuanjun Jin , Zhi-Fan Zhang , Zi-Hao Feng , Ding-Fu Shao , Mingliang Tian","doi":"10.1016/j.cpc.2025.109872","DOIUrl":"10.1016/j.cpc.2025.109872","url":null,"abstract":"<div><div>The symmetry-constrained response tensors on transport, optical, and electromagnetic effects are of central importance in condensed matter physics because they can guide experimental detections and verify theoretical calculations. These tensors encompass various forms, including polar, axial, <em>i</em>-type (time-reversal even), and <em>c</em>-type (time-reversal odd) matrixes. The commonly used magnetic groups, however, fail to describe the phenomena without the spin-orbit coupling (SOC) effect and cannot build the analytical relationship between magnetic orders with response tensors in magnetic materials. Developing approaches on these two aspects is quite demanding for theory and experiment. In this paper, we use the magnetic group, spin group, and extrinsic parameter method comprehensively to investigate the symmetry-constrained response tensors, then implement the above method in a platform called \"TensorSymmetry\". With the package, we can get the response tensors disentangling the effect free of SOC and establish the analytical relationship with magnetic order, which provides useful guidance for theoretical and experimental investigation for magnetic materials.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"318 ","pages":"Article 109872"},"PeriodicalIF":3.4,"publicationDate":"2025-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145156855","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Harshwardhan Praveen , Jacob Brown , Christopher Earls
{"title":"chebgreen: Learning and interpolating continuous Empirical Green's Functions from data","authors":"Harshwardhan Praveen , Jacob Brown , Christopher Earls","doi":"10.1016/j.cpc.2025.109867","DOIUrl":"10.1016/j.cpc.2025.109867","url":null,"abstract":"<div><div>In this work, we present a mesh-independent, data-driven library, <span>chebgreen</span>, to mathematically model one-dimensional systems, possessing an associated control parameter, and whose governing partial differential equation is <em>unknown</em>. The proposed method learns an Empirical Green's Function for the associated, but hidden, boundary value problem, in the form of a Rational Neural Network from which we subsequently construct a bivariate representation in a Chebyshev basis. We uncover the Green's function, at an unseen control parameter value, by interpolating the left and right singular functions within a suitable library, expressed as points on a manifold of Quasimatrices, while the associated singular values are interpolated with Lagrange polynomials. This work improves upon prior work by extending the scope of applicability to non-self-adjoint operators and improves data efficiency.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109867"},"PeriodicalIF":3.4,"publicationDate":"2025-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145109515","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Packing3D.jl: An open-source analytical framework for computing packing density and mixing indices using partial spherical volumes","authors":"Freddie J. Barter , Christopher R.K. Windows-Yule","doi":"10.1016/j.cpc.2025.109863","DOIUrl":"10.1016/j.cpc.2025.109863","url":null,"abstract":"<div><div>Accurate quantification of local packing density and mixing in simulations of particulate systems is essential for many industrial applications. Traditional methods which simply count the number of particle centres within a given volume of space (cell) introduce discontinuities at cell boundaries, leading to unreliable measurements of packing density. We introduce Packing3D.jl, an open-source Julia package providing analytic partial-volume calculations for spheres intersecting Cartesian and cylindrical meshes. We derive closed-form solutions for single, double and triple spherical-cap intersections, plus sphere-cylinder overlaps. We implement efficient mesh-generation routines, principal-cell indexing, and data-splitting functions for time-series analyses. Performance and accuracy were validated against simple cubic and face-centred cubic lattices and via boundary-shift continuity tests. Packing3D.jl converges exactly to theoretical lattice densities, eliminates discontinuities at sub-particle resolution, and scales linearly with particle count. Memory usage remains modest (40 B per particle, 48 B per cell). Packing3D.jl provides researchers with continuous, reproducible volume-fraction fields and robust mixing indices at high performance, facilitating sensitivity analyses and optimisation in granular process engineering.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> Packing3D.jl</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/srdxk6f77w.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/fjbarter/Packing3D.jl</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> <span>Julia</span></div><div><em>Nature of problem:</em> Inaccuracy and discontinuity of packing density calculation by counting centres</div><div><em>Solution method:</em> Derive and implement a fast algorithm for analytically calculating particle volumes intersected by planes, providing a continuous and much more accurate measurement of packing density</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109863"},"PeriodicalIF":3.4,"publicationDate":"2025-09-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145095929","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Chanyoung Lee, Juhyung Kim, Gahyung Jo, Jae-Min Kwon, J.G. Bak, Jeongwon Lee
{"title":"Scalable modeling of 3D eddy current problem for magnetic fusion devices","authors":"Chanyoung Lee, Juhyung Kim, Gahyung Jo, Jae-Min Kwon, J.G. Bak, Jeongwon Lee","doi":"10.1016/j.cpc.2025.109864","DOIUrl":"10.1016/j.cpc.2025.109864","url":null,"abstract":"<div><div>A novel three-dimensional time-domain eddy current solver, ERRAHI (Eddy cuRRent Analysis on Hierarchical Inductance), is presented. The solver is built upon a vector potential formulation derived from the electric field integral equation (EFIE), with degrees of freedom systematically identified using a spanning tree technique. Topological holes in the domain give rise to additional degrees of freedom associated with global cycles, and these global cycles are efficiently identified and optimized using a robust algorithm.</div><div>Designed for high-performance computing (HPC) environments, ERRAHI integrates the fast multipole method (FMM) with hierarchical matrix compression. In particular, matrix compression is performed via a randomized embedding scheme with FMM, which efficiently constructs low-rank blocks without assembling or storing the full matrix. This approach achieves empirical scaling of <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>N</mi></mrow><mrow><mn>1.5</mn></mrow></msup><mo>)</mo></math></span> and asymptotic scaling of <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span> for total computation time. Leveraging FMM-based hierarchical compression and solving the resulting system with the generalized minimal residual method (GMRES), the code enables scalable analysis of complex tokamak CAD geometries.</div><div>To enhance locality and compressibility of the system matrix, global cycles are decomposed into local basis functions subject to additional constraints. This decomposition, combined with global cycle optimization, significantly improves the compressibility and structural coherence of the system matrix while maintaining accuracy. The solver has been validated against the TEAM7 benchmark, showing excellent agreement. Furthermore, large-scale simulations of the full KSTAR conductor model successfully reproduce the Rogowski coil and magnetic probe measurements from KSTAR vacuum experiments, demonstrating both the validity and applicability of the method in realistic tokamak scenarios.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109864"},"PeriodicalIF":3.4,"publicationDate":"2025-09-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145095936","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"An automated parallel program of Clean Numerical Simulation for chaotic systems governed by ODEs","authors":"Bo Zhang , Shijun Liao","doi":"10.1016/j.cpc.2025.109855","DOIUrl":"10.1016/j.cpc.2025.109855","url":null,"abstract":"<div><div>Due to the butterfly-effect, numerical noise in chaotic systems grows exponentially, presenting a significant challenge. This issue can be mitigated through the use of Clean Numerical Simulation (CNS) proposed by Liao in 2009, which can effectively reduce numerical noise to a desired (say, arbitrarily low) level in an interval of time that is long enough for statistics. In this paper, we propose the <span>CNSPy</span>, a novel, highly efficient, self-adaptive CNS implementation to obtain the convergent (i.e. reproducible) numerical simulation of chaotic systems governed by a set of ordinary differential equations (ODEs). This software automates the CNS computational workflow by automatically converting Python-defined ODEs into a parallelized C code, eliminating the need for error-prone manual derivation and coding while ensuring high efficiency in high-performance computing (HPC) environments. The code is free and available at <span><span>https://github.com/sjtu-liao/cnspy</span><svg><path></path></svg></span>.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109855"},"PeriodicalIF":3.4,"publicationDate":"2025-09-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145109516","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}