Pub Date : 2025-01-09DOI: 10.1016/j.cpc.2024.109495
Hamid Yousefi, Hossein Afshin
This study focuses on the numerical simulation of the thermal counterflow of helium superfluid around a cylinder. To model helium superfluid behavior, two-fluid equations, incorporating the Gorter-Mellink mutual friction, were employed. The simulation utilized the PIMPLE (Pressure Implicit with Splitting of Operator) algorithm, which couples the velocities of the normal and superfluid components with pressure, thereby enhancing numerical stability. This approach made it possible to simulate the thermal counterflow around the rotating cylinder and heat flux on its surface, including both heating and cooling effects. The research aims to explore the impact of rotation and heat flux on separation angles, drag and lift forces, and in principle, the overall pattern of the flow. The primary objective is to gain a more profound insight into the behavior of superfluid helium and optimize its applications in both research and industrial contexts. The findings reveal that, in contrast to classical fluids, the influences of various factors do not adhere to a consistent rule. Rotation and cooling/heating were observed to significantly affect separation and the aerodynamic forces. However, the nature of this impact can vary across different scenarios. In some cases, rotation increases the separation angle, while in others, it completely eliminates separation. Consequently, the effect of rotation on the drag force coefficient exhibits substantial variation depending on the specific problem at hand. For instance, in one problem, the drag force coefficient increases from approximately 0.7 to about 1.4 due to rotation, whereas in another, it decreases from around 0.8 to approximately 0.1. Additionally, rotation leads to a drag force coefficient of approximately 1.3 in one specific scenario. Furthermore, this study has demonstrated that the rotation of the cylinder induces asymmetry in the mass flow rates of the components. For instance, in one case, the cylinder's rotation resulted in approximately 86 % of the superfluid component passing from one side of the cylinder.
Overall, cooling tends to reduce the separation angle and drag force coefficient, while heating has the opposite effect and increases them. For example, in one scenario, cooling causes the drag force coefficient to drop from 0.8 to about 0.1, whereas heating elevates above 1.6.
{"title":"Numerical simulation of thermal counterflow in superfluid helium: Investigating the effect of rotation and heat flux on the surface of the cylinder","authors":"Hamid Yousefi, Hossein Afshin","doi":"10.1016/j.cpc.2024.109495","DOIUrl":"10.1016/j.cpc.2024.109495","url":null,"abstract":"<div><div>This study focuses on the numerical simulation of the thermal counterflow of helium superfluid around a cylinder. To model helium superfluid behavior, two-fluid equations, incorporating the Gorter-Mellink mutual friction, were employed. The simulation utilized the PIMPLE (Pressure Implicit with Splitting of Operator) algorithm, which couples the velocities of the normal and superfluid components with pressure, thereby enhancing numerical stability. This approach made it possible to simulate the thermal counterflow around the rotating cylinder and heat flux on its surface, including both heating and cooling effects. The research aims to explore the impact of rotation and heat flux on separation angles, drag and lift forces, and in principle, the overall pattern of the flow. The primary objective is to gain a more profound insight into the behavior of superfluid helium and optimize its applications in both research and industrial contexts. The findings reveal that, in contrast to classical fluids, the influences of various factors do not adhere to a consistent rule. Rotation and cooling/heating were observed to significantly affect separation and the aerodynamic forces. However, the nature of this impact can vary across different scenarios. In some cases, rotation increases the separation angle, while in others, it completely eliminates separation. Consequently, the effect of rotation on the drag force coefficient exhibits substantial variation depending on the specific problem at hand. For instance, in one problem, the drag force coefficient increases from approximately 0.7 to about 1.4 due to rotation, whereas in another, it decreases from around 0.8 to approximately 0.1. Additionally, rotation leads to a drag force coefficient of approximately 1.3 in one specific scenario. Furthermore, this study has demonstrated that the rotation of the cylinder induces asymmetry in the mass flow rates of the components. For instance, in one case, the cylinder's rotation resulted in approximately 86 % of the superfluid component passing from one side of the cylinder.</div><div>Overall, cooling tends to reduce the separation angle and drag force coefficient, while heating has the opposite effect and increases them. For example, in one scenario, cooling causes the drag force coefficient to drop from 0.8 to about 0.1, whereas heating elevates above 1.6.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"310 ","pages":"Article 109495"},"PeriodicalIF":7.2,"publicationDate":"2025-01-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143143934","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}
Pub Date : 2025-01-08DOI: 10.1016/j.cpc.2024.109496
Rong Shi , Min-Ye Zhang , Peize Lin , Lixin He , Xinguo Ren
LibRPA is a software package designed for efficient calculations of random phase approximation (RPA) electron correlation energies from first principles using numerical atomic orbital (NAOs). Leveraging a localized resolution of identity (LRI) technique, LibRPA achieves or better scaling behavior, making it suitable for large-scale calculation of periodic systems. Implemented in C++ and Python with MPI/OpenMP parallelism, LibRPA integrates seamlessly with NAO-based density functional theory (DFT) packages through flexible file-based and API-based interfaces. In this work, we present the theoretical framework, algorithm, software architecture, and installation and usage guide of LibRPA. Performance benchmarks, including the parallel efficiency with respect to the computational resources and the adsorption energy calculations for molecules on graphene, demonstrate its nearly ideal scalability and numerical reliability. LibRPA offers a useful tool for RPA-based calculations for large-scale extended systems.
Program summary
Program title: LibRPA
CPC Library link to program files:https://doi.org/10.17632/kdwm5vzgk6.1
Nature of problem: Calculating RPA electron correlation energies is computationally expensive, typically scaling as with system size, hindering its application to large-scale materials science problems.
Solution method: LibRPA utilizes the Localized Resolution of Identity (LRI) technique, reducing computational scaling to or better. Implemented in C++ and Python with MPI/OpenMP parallelization, it integrates with NAO-based DFT packages, facilitating efficient and accurate RPA calculations for large-scale periodic systems.
{"title":"LibRPA: A software package for low-scaling first-principles calculations of random phase approximation electron correlation energy based on numerical atomic orbitals","authors":"Rong Shi , Min-Ye Zhang , Peize Lin , Lixin He , Xinguo Ren","doi":"10.1016/j.cpc.2024.109496","DOIUrl":"10.1016/j.cpc.2024.109496","url":null,"abstract":"<div><div>LibRPA is a software package designed for efficient calculations of random phase approximation (RPA) electron correlation energies from first principles using numerical atomic orbital (NAOs). Leveraging a localized resolution of identity (LRI) technique, LibRPA achieves <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span> or better scaling behavior, making it suitable for large-scale calculation of periodic systems. Implemented in C++ and Python with MPI/OpenMP parallelism, LibRPA integrates seamlessly with NAO-based density functional theory (DFT) packages through flexible file-based and API-based interfaces. In this work, we present the theoretical framework, algorithm, software architecture, and installation and usage guide of LibRPA. Performance benchmarks, including the parallel efficiency with respect to the computational resources and the adsorption energy calculations for <figure><img></figure> molecules on graphene, demonstrate its nearly ideal scalability and numerical reliability. LibRPA offers a useful tool for RPA-based calculations for large-scale extended systems.</div></div><div><h3>Program summary</h3><div><em>Program title:</em> LibRPA</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/kdwm5vzgk6.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/Srlive1201/LibRPA</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> LGPL</div><div><em>Programming language:</em> C++, Fortran, Python</div><div><em>Nature of problem:</em> Calculating RPA electron correlation energies is computationally expensive, typically scaling as <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>N</mi></mrow><mrow><mn>4</mn></mrow></msup><mo>)</mo></math></span> with system size, hindering its application to large-scale materials science problems.</div><div><em>Solution method:</em> LibRPA utilizes the Localized Resolution of Identity (LRI) technique, reducing computational scaling to <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span> or better. Implemented in C++ and Python with MPI/OpenMP parallelization, it integrates with NAO-based DFT packages, facilitating efficient and accurate RPA calculations for large-scale periodic systems.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109496"},"PeriodicalIF":7.2,"publicationDate":"2025-01-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143093085","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}
Pub Date : 2025-01-08DOI: 10.1016/j.cpc.2024.109494
Elmar Westphal , Segun Goh , Roland G. Winkler , Gerhard Gompper
<div><div>We present HTMPC, a Heavily Templated C++ library for large-scale simulations implementing multi-particle collision dynamics (MPC), a particle-based mesoscale hydrodynamic simulation method. The implementation is plugin-based, and designed for distributed computing over an arbitrary number of MPI ranks. By abstracting the hardware-dependent parts of the implementation, we provide an identical application-code base for various architectures, currently supporting CPUs and CUDA-capable GPUs. We have examined the code for a system of more than a trillion MPC particles distributed over a few thousand MPI ranks (GPUs), demonstrating the scalability of the implementation and its applicability to large-scale hydrodynamic simulations. As showcases, we examine passive and active suspension of colloids, which confirms the extensibility and versatility of our plugin-based implementation.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> HTMPC</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/xnxh68zhbt.1</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> C++17, CUDA C++ (optional), MPI (optional)</div><div><em>Supplementary material:</em> Supplementary Information, User Manual</div><div><em>Nature of problem:</em> Complex fluids in soft, active, and living matter are characterized by a wide range of relevant length- and time-scales, from nanometers to millimeters, and from sub-microseconds to seconds. Their dynamics is often governed by the hydrodynamics of the embedding aqueous medium. Thus, it is essential for the numerical study of such systems to develop efficient simulation techniques and highly parallel computer codes, especially when large system sizes and emergent collective behavior are considered. Several mesoscale simulation techniques have been developed in the last decades for this purpose. Multi-particle collision dynamics (MPC), a particle-based hydrodynamics simulation technique, is a promising ansatz for such an endeavor. It is also important to develop an easy-to-extend implementation, so that the code can be adapted to various soft and living matter systems as desired.</div><div><em>Solution method:</em> We develop an implementation of MPC that can exploit large-scale high-performance computing resources for hydrodynamic simulations of complex fluids. The code provides a C++ template library, which is plugin-based and can be extended by user-written plugins, implementing particles or objects interacting with the surrounding fluid. Calculations can be distributed over an arbitrary number of MPI ranks and accelerated with the current implementation supporting CUDA-capable GPUs. The code includes essential features of state-of-the-art MPC algorithms, e.g., thermostat, local angular-momentum conservation, and a variety of boundary conditions, such as periodic, no-slip (both also supporting shear flow) a
{"title":"HTMPC: A heavily templated C++ library for large scale particle-based mesoscale hydrodynamics simulations using multiparticle collision dynamics","authors":"Elmar Westphal , Segun Goh , Roland G. Winkler , Gerhard Gompper","doi":"10.1016/j.cpc.2024.109494","DOIUrl":"10.1016/j.cpc.2024.109494","url":null,"abstract":"<div><div>We present HTMPC, a Heavily Templated C++ library for large-scale simulations implementing multi-particle collision dynamics (MPC), a particle-based mesoscale hydrodynamic simulation method. The implementation is plugin-based, and designed for distributed computing over an arbitrary number of MPI ranks. By abstracting the hardware-dependent parts of the implementation, we provide an identical application-code base for various architectures, currently supporting CPUs and CUDA-capable GPUs. We have examined the code for a system of more than a trillion MPC particles distributed over a few thousand MPI ranks (GPUs), demonstrating the scalability of the implementation and its applicability to large-scale hydrodynamic simulations. As showcases, we examine passive and active suspension of colloids, which confirms the extensibility and versatility of our plugin-based implementation.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> HTMPC</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/xnxh68zhbt.1</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> C++17, CUDA C++ (optional), MPI (optional)</div><div><em>Supplementary material:</em> Supplementary Information, User Manual</div><div><em>Nature of problem:</em> Complex fluids in soft, active, and living matter are characterized by a wide range of relevant length- and time-scales, from nanometers to millimeters, and from sub-microseconds to seconds. Their dynamics is often governed by the hydrodynamics of the embedding aqueous medium. Thus, it is essential for the numerical study of such systems to develop efficient simulation techniques and highly parallel computer codes, especially when large system sizes and emergent collective behavior are considered. Several mesoscale simulation techniques have been developed in the last decades for this purpose. Multi-particle collision dynamics (MPC), a particle-based hydrodynamics simulation technique, is a promising ansatz for such an endeavor. It is also important to develop an easy-to-extend implementation, so that the code can be adapted to various soft and living matter systems as desired.</div><div><em>Solution method:</em> We develop an implementation of MPC that can exploit large-scale high-performance computing resources for hydrodynamic simulations of complex fluids. The code provides a C++ template library, which is plugin-based and can be extended by user-written plugins, implementing particles or objects interacting with the surrounding fluid. Calculations can be distributed over an arbitrary number of MPI ranks and accelerated with the current implementation supporting CUDA-capable GPUs. The code includes essential features of state-of-the-art MPC algorithms, e.g., thermostat, local angular-momentum conservation, and a variety of boundary conditions, such as periodic, no-slip (both also supporting shear flow) a","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109494"},"PeriodicalIF":7.2,"publicationDate":"2025-01-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143127924","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-01-08DOI: 10.1016/j.cpc.2024.109480
Jean Furstoss , Carlos R. Salazar , Philippe Carrez , Pierre Hirel , Julien Lam
To accurately identify local structures in atomic-scale simulations of complex materials is crucial for the study of numerous physical phenomena including dynamic plasticity, crystal nucleation and glass formation. In this work, we propose a data-driven method to characterize local atomic environments, and assign them to crystal phases or lattice defects. After constructing a reference database, our approach uses descriptors based on Steinhardt's parameters and a Gaussian mixture model to identify the most probable environment. This approach is validated against several test cases: polymorph identification in alumina, and dislocation and grain boundary analysis in the olivine structure.
{"title":"All-around local structure classification with supervised learning: The example of crystal phases and dislocations in complex oxides","authors":"Jean Furstoss , Carlos R. Salazar , Philippe Carrez , Pierre Hirel , Julien Lam","doi":"10.1016/j.cpc.2024.109480","DOIUrl":"10.1016/j.cpc.2024.109480","url":null,"abstract":"<div><div>To accurately identify local structures in atomic-scale simulations of complex materials is crucial for the study of numerous physical phenomena including dynamic plasticity, crystal nucleation and glass formation. In this work, we propose a data-driven method to characterize local atomic environments, and assign them to crystal phases or lattice defects. After constructing a reference database, our approach uses descriptors based on Steinhardt's parameters and a Gaussian mixture model to identify the most probable environment. This approach is validated against several test cases: polymorph identification in alumina, and dislocation and grain boundary analysis in the olivine structure.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109480"},"PeriodicalIF":7.2,"publicationDate":"2025-01-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143093087","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-01-08DOI: 10.1016/j.cpc.2025.109498
I. Novikau, I. Joseph
We propose an explicit algorithm based on the Linear Combination of Hamiltonian Simulations technique to simulate both the advection-diffusion equation and a nonunitary discretized version of the Koopman–von Neumann formulation of nonlinear dynamics. By including dissipation into the model, through an upwind discretization of the advection operator, we avoid spurious parasitic oscillations which usually accompany standard finite difference discretizations of the advection equation. In contrast to prior works on quantum simulation of nonlinear problems, we explain in detail how different components of the algorithm can be implemented by using the Quantum Signal Processing (QSP) and Quantum Singular Value Transformation (QSVT) methods. In addition, we discuss the general method for implementing the block-encoding (BE) required for QSP and QSVT circuits and provide explicit implementations of the BE oracles tailored to our specific test cases. We simulate the resulting circuit on a digital emulator of quantum fault-tolerant computers and investigate its complexity and success probability. The proposed algorithm is universal and can be used for modeling a broad class of linear and nonlinear differential equations including the KvN and Carleman embeddings of nonlinear systems, the semiclassical Koopman-van Hove (KvH) equation, as well as the advection and Liouville equations.
{"title":"Quantum algorithm for the advection-diffusion equation and the Koopman-von Neumann approach to nonlinear dynamical systems","authors":"I. Novikau, I. Joseph","doi":"10.1016/j.cpc.2025.109498","DOIUrl":"10.1016/j.cpc.2025.109498","url":null,"abstract":"<div><div>We propose an explicit algorithm based on the Linear Combination of Hamiltonian Simulations technique to simulate both the advection-diffusion equation and a nonunitary discretized version of the Koopman–von Neumann formulation of nonlinear dynamics. By including dissipation into the model, through an upwind discretization of the advection operator, we avoid spurious parasitic oscillations which usually accompany standard finite difference discretizations of the advection equation. In contrast to prior works on quantum simulation of nonlinear problems, we explain in detail how different components of the algorithm can be implemented by using the Quantum Signal Processing (QSP) and Quantum Singular Value Transformation (QSVT) methods. In addition, we discuss the general method for implementing the block-encoding (BE) required for QSP and QSVT circuits and provide explicit implementations of the BE oracles tailored to our specific test cases. We simulate the resulting circuit on a digital emulator of quantum fault-tolerant computers and investigate its complexity and success probability. The proposed algorithm is universal and can be used for modeling a broad class of linear and nonlinear differential equations including the KvN and Carleman embeddings of nonlinear systems, the semiclassical Koopman-van Hove (KvH) equation, as well as the advection and Liouville equations.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109498"},"PeriodicalIF":7.2,"publicationDate":"2025-01-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143127916","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-01-07DOI: 10.1016/j.cpc.2024.109497
Jinyu Wan , Helena Alamprese , Christian Ratcliff , Ji Qiang , Yue Hao
<div><div>Efficient accelerator modeling and particle tracking are key for the design and configuration of modern particle accelerators. In this work, we present JuTrack, a nested accelerator modeling package developed in the Julia programming language and enhanced with compiler-level automatic differentiation (AD). With the aid of AD, JuTrack enables rapid derivative calculations in accelerator modeling, facilitating sensitivity analyses and optimization tasks. We demonstrate the effectiveness of AD-derived derivatives through several practical applications, including sensitivity analysis of space-charge-induced emittance growth, nonlinear beam dynamics analysis for a synchrotron light source, and lattice parameter tuning of the future Electron-Ion Collider (EIC). Through the incorporation of automatic differentiation, this package opens up new possibilities for accelerator physicists in beam physics studies and accelerator design optimization.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> JuTrack</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/r2g5zkwp7s.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/MSU-Beam-Dynamics/JuTrack.jl.git</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> Julia</div><div><em>Nature of problem:</em> Derivatives of the physics parameters calculated in accelerator modeling are critical for sensitivity analysis and optimization of the whole system. Traditional numerical approaches often rely on finite differences for derivative computations, which can prone to numerical inaccuracies. In highly nonlinear accelerator systems, like those encountered in synchrotrons and colliders, accurate sensitivity analysis and optimization require a large number of derivative evaluations. Thus, there is a need for more efficient methods to compute these derivatives accurately, especially when optimizing complex accelerator lattices or studying complicated collective effects, such as space-charge effects, wakefield effects, and beam-beam interaction.</div><div><em>Solution method:</em> JuTrack addresses this problem by integrating compiler-level automatic differentiation (AD) into accelerator modeling routines, offering a powerful toolset for rapid derivative computation. Developed in the Julia programming language, JuTrack uses the Enzyme AD package to perform gradient-based analyses with minimal computational overhead. The package provides an efficient way to compute derivatives by directly differentiating through the model code, thus avoiding approximation errors associated with finite difference methods. It is designed to handle complex beam dynamics simulations, including complicated collective effects, such as space-charge effects, wakefield effects, beam-beam interaction, and combination of Truncated Power Series Algebra (TP
{"title":"JuTrack: A Julia package for auto-differentiable accelerator modeling and particle tracking","authors":"Jinyu Wan , Helena Alamprese , Christian Ratcliff , Ji Qiang , Yue Hao","doi":"10.1016/j.cpc.2024.109497","DOIUrl":"10.1016/j.cpc.2024.109497","url":null,"abstract":"<div><div>Efficient accelerator modeling and particle tracking are key for the design and configuration of modern particle accelerators. In this work, we present JuTrack, a nested accelerator modeling package developed in the Julia programming language and enhanced with compiler-level automatic differentiation (AD). With the aid of AD, JuTrack enables rapid derivative calculations in accelerator modeling, facilitating sensitivity analyses and optimization tasks. We demonstrate the effectiveness of AD-derived derivatives through several practical applications, including sensitivity analysis of space-charge-induced emittance growth, nonlinear beam dynamics analysis for a synchrotron light source, and lattice parameter tuning of the future Electron-Ion Collider (EIC). Through the incorporation of automatic differentiation, this package opens up new possibilities for accelerator physicists in beam physics studies and accelerator design optimization.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> JuTrack</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/r2g5zkwp7s.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/MSU-Beam-Dynamics/JuTrack.jl.git</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> Julia</div><div><em>Nature of problem:</em> Derivatives of the physics parameters calculated in accelerator modeling are critical for sensitivity analysis and optimization of the whole system. Traditional numerical approaches often rely on finite differences for derivative computations, which can prone to numerical inaccuracies. In highly nonlinear accelerator systems, like those encountered in synchrotrons and colliders, accurate sensitivity analysis and optimization require a large number of derivative evaluations. Thus, there is a need for more efficient methods to compute these derivatives accurately, especially when optimizing complex accelerator lattices or studying complicated collective effects, such as space-charge effects, wakefield effects, and beam-beam interaction.</div><div><em>Solution method:</em> JuTrack addresses this problem by integrating compiler-level automatic differentiation (AD) into accelerator modeling routines, offering a powerful toolset for rapid derivative computation. Developed in the Julia programming language, JuTrack uses the Enzyme AD package to perform gradient-based analyses with minimal computational overhead. The package provides an efficient way to compute derivatives by directly differentiating through the model code, thus avoiding approximation errors associated with finite difference methods. It is designed to handle complex beam dynamics simulations, including complicated collective effects, such as space-charge effects, wakefield effects, beam-beam interaction, and combination of Truncated Power Series Algebra (TP","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109497"},"PeriodicalIF":7.2,"publicationDate":"2025-01-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143127923","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}
Pub Date : 2025-01-03DOI: 10.1016/j.cpc.2024.109483
Lukas Hecht, Kay-Robert Dormann, Kai Luca Spanheimer, Mahdieh Ebrahimi, Malte Cordts, Suvendu Mandal, Aritra K. Mukhopadhyay, Benno Liebchen
<div><div>The Active Matter Evaluation Package (<span>AMEP</span>) is a Python library for analyzing simulation data of particle-based and continuum simulations. It provides a powerful and simple interface for handling large data sets and for calculating and visualizing a broad variety of observables that are relevant to active matter systems. Examples range from the mean-square displacement and the structure factor to cluster-size distributions, binder cumulants, and growth exponents. <span>AMEP</span> is written in pure Python and is based on powerful libraries such as NumPy, SciPy, Matplotlib, and scikit-image. Computationally expensive methods are parallelized and optimized to run efficiently on workstations, laptops, and high-performance computing architectures, and an HDF5-based data format is used in the backend to store and handle simulation data as well as analysis results. <span>AMEP</span> provides the first comprehensive framework for analyzing simulation results of both particle-based and continuum simulations (as well as experimental data) of active matter systems. In particular, <span>AMEP</span> also allows it to analyze simulations that combine particle-based and continuum techniques such as used to study the motion of bacteria in chemical fields or for modeling particle motion in a flow field for example.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> Active Matter Evaluation Package (<span>AMEP</span>)</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/zc7pn23g5r.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/amepproject/amep</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Python</div><div><em>Supplementary material:</em> The supplementary material includes Movies S1–S3.</div><div><em>Nature of problem:</em> To date, no comprehensive package for analyzing data from simulations of active matter systems is available. Thus, most research groups in the fields of soft and active matter physics use in-house code to analyze their simulations, which means that often a significant part of the time that is available to students and advanced researchers for performing research projects is spent with the development of data-analysis and visualization software, at the expense of their research time budget. In practice, students (and advanced researchers) might sometimes even be forced to limit their data analysis to a few observables. The availability of a unified framework to rapidly determine a broad variety of key observables that are frequently used to analyze the structure and dynamics of active matter systems from raw particle-based or continuum-based simulation data would therefore be highly beneficial for the research field.</div><div><em>Solution method:</em> <span>AMEP</span> provides the first unified framework for analyz
{"title":"AMEP: The active matter evaluation package for Python","authors":"Lukas Hecht, Kay-Robert Dormann, Kai Luca Spanheimer, Mahdieh Ebrahimi, Malte Cordts, Suvendu Mandal, Aritra K. Mukhopadhyay, Benno Liebchen","doi":"10.1016/j.cpc.2024.109483","DOIUrl":"10.1016/j.cpc.2024.109483","url":null,"abstract":"<div><div>The Active Matter Evaluation Package (<span>AMEP</span>) is a Python library for analyzing simulation data of particle-based and continuum simulations. It provides a powerful and simple interface for handling large data sets and for calculating and visualizing a broad variety of observables that are relevant to active matter systems. Examples range from the mean-square displacement and the structure factor to cluster-size distributions, binder cumulants, and growth exponents. <span>AMEP</span> is written in pure Python and is based on powerful libraries such as NumPy, SciPy, Matplotlib, and scikit-image. Computationally expensive methods are parallelized and optimized to run efficiently on workstations, laptops, and high-performance computing architectures, and an HDF5-based data format is used in the backend to store and handle simulation data as well as analysis results. <span>AMEP</span> provides the first comprehensive framework for analyzing simulation results of both particle-based and continuum simulations (as well as experimental data) of active matter systems. In particular, <span>AMEP</span> also allows it to analyze simulations that combine particle-based and continuum techniques such as used to study the motion of bacteria in chemical fields or for modeling particle motion in a flow field for example.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> Active Matter Evaluation Package (<span>AMEP</span>)</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/zc7pn23g5r.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/amepproject/amep</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Python</div><div><em>Supplementary material:</em> The supplementary material includes Movies S1–S3.</div><div><em>Nature of problem:</em> To date, no comprehensive package for analyzing data from simulations of active matter systems is available. Thus, most research groups in the fields of soft and active matter physics use in-house code to analyze their simulations, which means that often a significant part of the time that is available to students and advanced researchers for performing research projects is spent with the development of data-analysis and visualization software, at the expense of their research time budget. In practice, students (and advanced researchers) might sometimes even be forced to limit their data analysis to a few observables. The availability of a unified framework to rapidly determine a broad variety of key observables that are frequently used to analyze the structure and dynamics of active matter systems from raw particle-based or continuum-based simulation data would therefore be highly beneficial for the research field.</div><div><em>Solution method:</em> <span>AMEP</span> provides the first unified framework for analyz","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109483"},"PeriodicalIF":7.2,"publicationDate":"2025-01-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143127922","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2024-12-31DOI: 10.1016/j.cpc.2024.109493
L.G.S. Duarte, L.A.C.P. da Mota, J.F.E. Skea
<div><div>The set of Maple routines that comprises the package <strong>Ndynamics</strong> has been improved. Apart one of the main motivations for its creation, namely, the routines to calculate the fractal dimension of boundaries (via box counting), the package deals with the numerical evolution of dynamical systems and provide flexible plotting of the results. The package also brings an initial conditions generator, a numerical solver manager, and a focusing set of routines that allow for better analysis of the graphical display of the results. Many new Maple-in-built numerical solvers are now programmed and available for the user of the package. The novelty that the package presented at the time of its release, an optional numerical interface, is maintained and updated.</div></div><div><h3>New version program summary</h3><div><em>Program Title:</em> Ndynamics - Numerical integration of dynamical systems and the fractal dimension of boundaries</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/swkr5w3kx4.1</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> CC by NC 3.0</div><div><em>Programming language:</em> Maple</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 183 (9) (2012) 2019–2020, <span><span>https://doi.org/10.1016/j.cpc.2012.03.024</span><svg><path></path></svg></span></div><div><em>Does the new version supersede the previous version?:</em> Yes</div><div><em>Nature of problem:</em> Computation and plotting of numerical solutions of dynamical systems and the determination of the fractal dimension of the boundaries.</div><div><em>Solution method:</em> The default method of integration is a fifth-order Runge–Kutta procedure, but the following numerical methods of integration are programmed and now available for the user of the <strong>Ndynamics</strong> package: rkf45, ck45, rosenbrock, rkf45_dae, ck45_dae, rosenbrock_dae, dverk78, lsode, gear, taylorseries, mebdfi, and classical. A box counting method is used to calculate the fractal dimension of the boundaries.</div><div><em>Reasons for new version:</em> The <strong>Ndynamics</strong> package is still being used (as can be seen from the very new citation [1]), so it is worth to update its programming, for instance, by including the new numeric integrators available with the commercial release of Maple (just cited above on the solution method). We have also taken out of usage some such commands that are not available anymore, thus making the package current, more powerful and fixing some aspects. The (at the time of release) great novelty of the package, namely, the possibility of opening an interface for outside maple numerical integration was updated, we have changed the numerical C-integrator suggested and have improved some aspects of the RK45 numerical integration routine available with the present Maple package, the last such upgrade was done more than 12 years ago.</div><div><em>Sum
{"title":"Numerical analysis and integration of dynamical systems and the fractal dimension of boundaries","authors":"L.G.S. Duarte, L.A.C.P. da Mota, J.F.E. Skea","doi":"10.1016/j.cpc.2024.109493","DOIUrl":"10.1016/j.cpc.2024.109493","url":null,"abstract":"<div><div>The set of Maple routines that comprises the package <strong>Ndynamics</strong> has been improved. Apart one of the main motivations for its creation, namely, the routines to calculate the fractal dimension of boundaries (via box counting), the package deals with the numerical evolution of dynamical systems and provide flexible plotting of the results. The package also brings an initial conditions generator, a numerical solver manager, and a focusing set of routines that allow for better analysis of the graphical display of the results. Many new Maple-in-built numerical solvers are now programmed and available for the user of the package. The novelty that the package presented at the time of its release, an optional numerical interface, is maintained and updated.</div></div><div><h3>New version program summary</h3><div><em>Program Title:</em> Ndynamics - Numerical integration of dynamical systems and the fractal dimension of boundaries</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/swkr5w3kx4.1</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> CC by NC 3.0</div><div><em>Programming language:</em> Maple</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 183 (9) (2012) 2019–2020, <span><span>https://doi.org/10.1016/j.cpc.2012.03.024</span><svg><path></path></svg></span></div><div><em>Does the new version supersede the previous version?:</em> Yes</div><div><em>Nature of problem:</em> Computation and plotting of numerical solutions of dynamical systems and the determination of the fractal dimension of the boundaries.</div><div><em>Solution method:</em> The default method of integration is a fifth-order Runge–Kutta procedure, but the following numerical methods of integration are programmed and now available for the user of the <strong>Ndynamics</strong> package: rkf45, ck45, rosenbrock, rkf45_dae, ck45_dae, rosenbrock_dae, dverk78, lsode, gear, taylorseries, mebdfi, and classical. A box counting method is used to calculate the fractal dimension of the boundaries.</div><div><em>Reasons for new version:</em> The <strong>Ndynamics</strong> package is still being used (as can be seen from the very new citation [1]), so it is worth to update its programming, for instance, by including the new numeric integrators available with the commercial release of Maple (just cited above on the solution method). We have also taken out of usage some such commands that are not available anymore, thus making the package current, more powerful and fixing some aspects. The (at the time of release) great novelty of the package, namely, the possibility of opening an interface for outside maple numerical integration was updated, we have changed the numerical C-integrator suggested and have improved some aspects of the RK45 numerical integration routine available with the present Maple package, the last such upgrade was done more than 12 years ago.</div><div><em>Sum","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109493"},"PeriodicalIF":7.2,"publicationDate":"2024-12-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143093086","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}
In the quest for a virtual nuclear fusion reactor that can rapidly respond to user demands, we present a study focusing on the development of a fast ion particle collision module and realistic wall modeling using three-dimensional CAD models. The integration of a neutral beam injection code, NuBDeC Rhee et al. (2019) [6] within the Virtual KSTAR platform Kwon et al. (2022) [5] requires efficient detection of the fast ion particle collision events and accurate evaluation of the collision positions on the reactor wall. To achieve this, we investigate six different collision detection algorithms based on the well-known broad and narrow phase framework of collision detection, each utilizing distinct combinations of algorithms based on winding number contour, tri-oval contour, octree, and uniform grid. Furthermore, we explore the utilization of CAD models to create realistic wall surfaces in close resemblance to actual reactor conditions, employing the capabilities of the Unity game engine for mesh-based modeling. Performance tests are conducted, and the total simulation times of the constituent routines are analyzed in comparison. Through this research, in particular, we aim to enhance the reliability and real-time performance of heat load estimation on the plasma-facing components by the neutral beam injection-oriented fast ion losses. The developed fast ion particle collision module and the utilization of realistic wall modeling contribute to improving the authenticity and accuracy of the simulation results.
{"title":"Development of novel collision detection algorithms for the estimation of fast ion losses in tokamak fusion device","authors":"Taeuk Moon , Tongnyeol Rhee , Jae-Min Kwon , Eisung Yoon","doi":"10.1016/j.cpc.2024.109490","DOIUrl":"10.1016/j.cpc.2024.109490","url":null,"abstract":"<div><div>In the quest for a virtual nuclear fusion reactor that can rapidly respond to user demands, we present a study focusing on the development of a fast ion particle collision module and realistic wall modeling using three-dimensional CAD models. The integration of a neutral beam injection code, NuBDeC Rhee et al. (2019) <span><span>[6]</span></span> within the Virtual KSTAR platform Kwon et al. (2022) <span><span>[5]</span></span> requires efficient detection of the fast ion particle collision events and accurate evaluation of the collision positions on the reactor wall. To achieve this, we investigate six different collision detection algorithms based on the well-known broad and narrow phase framework of collision detection, each utilizing distinct combinations of algorithms based on winding number contour, tri-oval contour, octree, and uniform grid. Furthermore, we explore the utilization of CAD models to create realistic wall surfaces in close resemblance to actual reactor conditions, employing the capabilities of the Unity game engine for mesh-based modeling. Performance tests are conducted, and the total simulation times of the constituent routines are analyzed in comparison. Through this research, in particular, we aim to enhance the reliability and real-time performance of heat load estimation on the plasma-facing components by the neutral beam injection-oriented fast ion losses. The developed fast ion particle collision module and the utilization of realistic wall modeling contribute to improving the authenticity and accuracy of the simulation results.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109490"},"PeriodicalIF":7.2,"publicationDate":"2024-12-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143128019","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}
Pub Date : 2024-12-31DOI: 10.1016/j.cpc.2024.109482
Olga Podvigina
The Galerkin method is often employed for numerical integration of evolutionary equations, such as the Navier–Stokes equation or the magnetic induction equation. Application of the method requires solving at each time step a linear equation of the form , where v is an element of a finite-dimensional space with a basis satisfying the boundary conditions. We propose an algorithm giving an opportunity to reduce the computational cost for such a problem. Suppose there exists a space that contains , the difference between the dimensions of and is small compared to the dimension of , and solving the problem , where w is an element of , requires less operations than solving the original problem. The solution to is found in two steps: we solve the problem in and compute a correction that belongs to the kernel of PA, which is a complement to in ; q is computed using a basis in the orthogonal complement to in . We discuss the algorithm both in the general form and its instance when is spanned by Chebyshev polynomials.
{"title":"An efficient Galerkin method for problems with physically realistic boundary conditions","authors":"Olga Podvigina","doi":"10.1016/j.cpc.2024.109482","DOIUrl":"10.1016/j.cpc.2024.109482","url":null,"abstract":"<div><div>The Galerkin method is often employed for numerical integration of evolutionary equations, such as the Navier–Stokes equation or the magnetic induction equation. Application of the method requires solving at each time step a linear equation of the form <span><math><mi>P</mi><mo>(</mo><mi>A</mi><mi>v</mi><mo>−</mo><mi>f</mi><mo>)</mo><mo>=</mo><mn>0</mn></math></span>, where <em>v</em> is an element of a finite-dimensional space <span><math><mi>V</mi></math></span> with a basis satisfying the boundary conditions. We propose an algorithm giving an opportunity to reduce the computational cost for such a problem. Suppose there exists a space <span><math><mi>W</mi></math></span> that contains <span><math><mi>V</mi></math></span>, the difference between the dimensions of <span><math><mi>W</mi></math></span> and <span><math><mi>V</mi></math></span> is small compared to the dimension of <span><math><mi>V</mi></math></span>, and solving the problem <span><math><mi>P</mi><mo>(</mo><mi>A</mi><mi>w</mi><mo>−</mo><mi>f</mi><mo>)</mo><mo>=</mo><mn>0</mn></math></span>, where <em>w</em> is an element of <span><math><mi>W</mi></math></span>, requires less operations than solving the original problem. The solution to <span><math><mi>P</mi><mo>(</mo><mi>A</mi><mi>v</mi><mo>−</mo><mi>f</mi><mo>)</mo><mo>=</mo><mn>0</mn></math></span> is found in two steps: we solve the problem <span><math><mi>P</mi><mo>(</mo><mi>A</mi><mi>w</mi><mo>−</mo><mi>f</mi><mo>)</mo><mo>=</mo><mn>0</mn></math></span> in <span><math><mi>W</mi></math></span> and compute a correction <span><math><mi>q</mi><mo>=</mo><mi>v</mi><mo>−</mo><mi>w</mi></math></span> that belongs to the kernel of <em>PA</em>, which is a complement to <span><math><mi>V</mi></math></span> in <span><math><mi>W</mi></math></span>; <em>q</em> is computed using a basis in the orthogonal complement to <span><math><mi>V</mi></math></span> in <span><math><mi>W</mi></math></span>. We discuss the algorithm both in the general form and its instance when <span><math><mi>W</mi></math></span> is spanned by Chebyshev polynomials.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109482"},"PeriodicalIF":7.2,"publicationDate":"2024-12-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143128590","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}