Pub Date : 2025-11-28DOI: 10.1016/j.cpc.2025.109966
Seokhwan Min, Jonghwa Shin
Controlling the scattering of waves from multi-shell spherical systems and particles is a crucial aspect in many applications in photonics such as superdirective antennae and structural coloring. Nevertheless, the effective design of such systems is non-trivial due to the coexistence of topological (number of shells and their material composition) and shape (shell thicknesses) parameters. Thus far, general-purpose algorithms such as parameter sweeps, gradient descent, differential evolution, and deep neural networks have been used to optimize particle shape under one or a few fixed topologies, limiting the complexity and effectiveness of the resulting designs. To address this shortcoming, we present a topology nucleation algorithm that allows the concurrent design of particle topology and shape through the use of a topology derivative expression derived from the transfer matrix formulation of the analytical Mie scattering theory. The principle behind our algorithm can readily be applied to the design of multi-shell spherical systems in other fields such as acoustics and quantum transport.
{"title":"Eschallot: A topology nucleation algorithm for designing stratified, spherically symmetric systems that exhibit complex angular scattering of electromagnetic waves","authors":"Seokhwan Min, Jonghwa Shin","doi":"10.1016/j.cpc.2025.109966","DOIUrl":"10.1016/j.cpc.2025.109966","url":null,"abstract":"<div><div>Controlling the scattering of waves from multi-shell spherical systems and particles is a crucial aspect in many applications in photonics such as superdirective antennae and structural coloring. Nevertheless, the effective design of such systems is non-trivial due to the coexistence of topological (number of shells and their material composition) and shape (shell thicknesses) parameters. Thus far, general-purpose algorithms such as parameter sweeps, gradient descent, differential evolution, and deep neural networks have been used to optimize particle shape under one or a few fixed topologies, limiting the complexity and effectiveness of the resulting designs. To address this shortcoming, we present a topology nucleation algorithm that allows the concurrent design of particle topology and shape through the use of a topology derivative expression derived from the transfer matrix formulation of the analytical Mie scattering theory. The principle behind our algorithm can readily be applied to the design of multi-shell spherical systems in other fields such as acoustics and quantum transport.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109966"},"PeriodicalIF":3.4,"publicationDate":"2025-11-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145733048","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-11-27DOI: 10.1016/j.cpc.2025.109957
Nicolás F. Barrera , Javiera Cabezas-Escares , Mònica Calatayud , Francisco Munoz , Tatiana Gómez , Carlos Cárdenas
FukuiGrid is a Python-based code that calculates Fukui functions and Fukui potentials in systems with periodic boundary conditions, making it a valuable tool for solid-state chemistry. It focuses on chemical reactivity descriptors from Conceptual Density-Functional Theory (c-DFT) and enables the calculation of Fukui functions through methods such as finite differences and interpolation. FukuiGrid addresses the challenges associated with periodic boundary conditions when calculating the electrostatic potential of a Fukui function (known as the Fukui potential) by integrating various corrections to alleviate the compensating background of charge. These corrections include the electrode approach and self-consistent potential correction as post-processing techniques. This package is compatible with VASP outputs and specifically designed to study the reactivity of surfaces and adsorbates. It generates surface reactivity maps and provides insights into adsorption site preferences, as well as regions prone to electron donation or withdrawal. FukuiGrid has been designed to make c-DFT easier for the surface chemistry community.
{"title":"FukuiGrid: A Python code for c-DFT in solid-state chemistry","authors":"Nicolás F. Barrera , Javiera Cabezas-Escares , Mònica Calatayud , Francisco Munoz , Tatiana Gómez , Carlos Cárdenas","doi":"10.1016/j.cpc.2025.109957","DOIUrl":"10.1016/j.cpc.2025.109957","url":null,"abstract":"<div><div>FukuiGrid is a Python-based code that calculates Fukui functions and Fukui potentials in systems with periodic boundary conditions, making it a valuable tool for solid-state chemistry. It focuses on chemical reactivity descriptors from Conceptual Density-Functional Theory (c-DFT) and enables the calculation of Fukui functions through methods such as finite differences and interpolation. FukuiGrid addresses the challenges associated with periodic boundary conditions when calculating the electrostatic potential of a Fukui function (known as the Fukui potential) by integrating various corrections to alleviate the compensating background of charge. These corrections include the electrode approach and self-consistent potential correction as post-processing techniques. This package is compatible with VASP outputs and specifically designed to study the reactivity of surfaces and adsorbates. It generates surface reactivity maps and provides insights into adsorption site preferences, as well as regions prone to electron donation or withdrawal. FukuiGrid has been designed to make c-DFT easier for the surface chemistry community.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109957"},"PeriodicalIF":3.4,"publicationDate":"2025-11-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145681707","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-11-27DOI: 10.1016/j.cpc.2025.109959
Zhixin Lu, Guo Meng, Roman Hatzky, Philipp Lauber, Matthias Hoelzl
The features of the TRIMEG-GKX code are described with emphasis on the exploration using novel/different schemes compared to other gyrokinetic codes, particularly the use of object-oriented programming, filter/buffer-free treatment, and a high-order piecewise field-aligned finite element method. The TRIMEG-GKX code solves the electromagnetic gyrokinetic equation using the particle-in-cell scheme, taking into account multi-species effects and shear Alfvén physics. The mixed-variable/pullback scheme has been implemented to enable electromagnetic studies. This code is parallelized using particle decomposition and domain cloning among computing nodes, replacing traditional domain decomposition techniques. The applications to study the micro- and macro-instabilities are demonstrated, including the energetic-particle-driven Alfvén eigenmode, ion temperature gradient mode, and kinetic ballooning mode. Good performance is achieved in both ad hoc and experimentally reconstructed equilibria, such as those of the ASDEX Upgrade (AUG), Tokamak á configuration variable (TCV), and the Joint European Torus (JET). Future studies of edge physics using the high-order C1 finite element method for triangular meshes in the TRIMEG-C1 code will be built upon the same numerical methods.
{"title":"TRIMEG-GKX: An electromagnetic gyrokinetic particle code with a piecewise field-aligned finite element method for micro- and macro-instability studies in tokamak core plasmas","authors":"Zhixin Lu, Guo Meng, Roman Hatzky, Philipp Lauber, Matthias Hoelzl","doi":"10.1016/j.cpc.2025.109959","DOIUrl":"10.1016/j.cpc.2025.109959","url":null,"abstract":"<div><div>The features of the TRIMEG-GKX code are described with emphasis on the exploration using novel/different schemes compared to other gyrokinetic codes, particularly the use of object-oriented programming, filter/buffer-free treatment, and a high-order piecewise field-aligned finite element method. The TRIMEG-GKX code solves the electromagnetic gyrokinetic equation using the particle-in-cell scheme, taking into account multi-species effects and shear Alfvén physics. The mixed-variable/pullback scheme has been implemented to enable electromagnetic studies. This code is parallelized using particle decomposition and domain cloning among computing nodes, replacing traditional domain decomposition techniques. The applications to study the micro- and macro-instabilities are demonstrated, including the energetic-particle-driven Alfvén eigenmode, ion temperature gradient mode, and kinetic ballooning mode. Good performance is achieved in both ad hoc and experimentally reconstructed equilibria, such as those of the ASDEX Upgrade (AUG), Tokamak á configuration variable (TCV), and the Joint European Torus (JET). Future studies of edge physics using the high-order <em>C</em><sup>1</sup> finite element method for triangular meshes in the TRIMEG-C1 code will be built upon the same numerical methods.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109959"},"PeriodicalIF":3.4,"publicationDate":"2025-11-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145681673","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-11-26DOI: 10.1016/j.cpc.2025.109954
Mehmet Ali Sarsıl , Mubashir Mansoor , Mert Saraçoğlu , Servet Timur , Onur Ergen
<div><div>The diverse spectrum of material characteristics, including band gap, mechanical moduli, color, phonon and electronic density of states, along with catalytic and surface properties, are intricately intertwined with the atomic structure and the corresponding interatomic bond lengths. This interconnection extends to the manifestation of interplanar spacings within a crystalline lattice. Analysis of these interplanar spacings and the comprehension of any deviations-whether it be lattice compression or expansion, commonly referred to as strain, hold paramount significance in unraveling various unknowns within the field. Transmission Electron Microscopy (TEM) is widely used to capture these atomic-scale ordering, facilitating direct investigation of interplanar spacings. However, creating critical contour maps for visualizing and interpreting lattice stresses in TEM images remains a challenging task. This study introduces an open-source, AI-assisted application, developed entirely in Python, for processing TEM images to facilitate strain analysis through advanced visualization techniques. This application is designed to process a diverse range of materials, including nanoparticles, 2D materials, pure crystals, and solid solutions. By converting local variations in interplanar spacings into contour maps, it provides a visual representation of lattice expansion and compression. With highly versatile settings, as detailed in this paper, the tool is readily accessible for TEM image-based material analysis. It facilitates an in-depth exploration of strain engineering by generating strain contour maps at the atomic scale, offering valuable insights into material properties. <strong>Program summary</strong> <em>Program Title:</em> PyNanoSpacing <em>CPC Library link to program files:</em> “<span><span>https://doi.org/10.17632/y864t5ykxx.1</span><svg><path></path></svg></span> ” <em>Developer’s repository link:</em> “<span><span>https://github.com/malisarsil/PyNanoSpacing</span><svg><path></path></svg></span> ” <em>Licensing provisions:</em> MIT license <em>Programming language:</em> Python 3.11 <em>Nature of problem:</em> Transmission Electron Microscopy (TEM) is widely used to analyze lattice structures in materials, but extracting quantitative strain information from TEM images remains challenging. Existing tools often lack automation, requiring manual calibration and region selection, leading to inconsistencies. Researchers need a user-friendly, automated solution to analyze local lattice strains and interplanar spacing variations efficiently. <em>Solution method:</em> The developed desktop application simplifies TEM image strain analysis by automating key steps. It extracts image details (such as scale and resolution) and detects atomic regions using AI-based segmentation. A correction step ensures proper alignment before measuring interlayer distances, which are then color-mapped to show strain variations. A smoothing technique is applied to re
{"title":"Mapping strain at the atomic scale with PyNanospacing: An AI-assisted approach to TEM image processing and visualization","authors":"Mehmet Ali Sarsıl , Mubashir Mansoor , Mert Saraçoğlu , Servet Timur , Onur Ergen","doi":"10.1016/j.cpc.2025.109954","DOIUrl":"10.1016/j.cpc.2025.109954","url":null,"abstract":"<div><div>The diverse spectrum of material characteristics, including band gap, mechanical moduli, color, phonon and electronic density of states, along with catalytic and surface properties, are intricately intertwined with the atomic structure and the corresponding interatomic bond lengths. This interconnection extends to the manifestation of interplanar spacings within a crystalline lattice. Analysis of these interplanar spacings and the comprehension of any deviations-whether it be lattice compression or expansion, commonly referred to as strain, hold paramount significance in unraveling various unknowns within the field. Transmission Electron Microscopy (TEM) is widely used to capture these atomic-scale ordering, facilitating direct investigation of interplanar spacings. However, creating critical contour maps for visualizing and interpreting lattice stresses in TEM images remains a challenging task. This study introduces an open-source, AI-assisted application, developed entirely in Python, for processing TEM images to facilitate strain analysis through advanced visualization techniques. This application is designed to process a diverse range of materials, including nanoparticles, 2D materials, pure crystals, and solid solutions. By converting local variations in interplanar spacings into contour maps, it provides a visual representation of lattice expansion and compression. With highly versatile settings, as detailed in this paper, the tool is readily accessible for TEM image-based material analysis. It facilitates an in-depth exploration of strain engineering by generating strain contour maps at the atomic scale, offering valuable insights into material properties. <strong>Program summary</strong> <em>Program Title:</em> PyNanoSpacing <em>CPC Library link to program files:</em> “<span><span>https://doi.org/10.17632/y864t5ykxx.1</span><svg><path></path></svg></span> ” <em>Developer’s repository link:</em> “<span><span>https://github.com/malisarsil/PyNanoSpacing</span><svg><path></path></svg></span> ” <em>Licensing provisions:</em> MIT license <em>Programming language:</em> Python 3.11 <em>Nature of problem:</em> Transmission Electron Microscopy (TEM) is widely used to analyze lattice structures in materials, but extracting quantitative strain information from TEM images remains challenging. Existing tools often lack automation, requiring manual calibration and region selection, leading to inconsistencies. Researchers need a user-friendly, automated solution to analyze local lattice strains and interplanar spacing variations efficiently. <em>Solution method:</em> The developed desktop application simplifies TEM image strain analysis by automating key steps. It extracts image details (such as scale and resolution) and detects atomic regions using AI-based segmentation. A correction step ensures proper alignment before measuring interlayer distances, which are then color-mapped to show strain variations. A smoothing technique is applied to re","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109954"},"PeriodicalIF":3.4,"publicationDate":"2025-11-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145681710","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}
We present a software package for the simulation and analysis of far-field diffraction patterns in transient grating (TG) spectroscopy. The code is designed to assist both experimental planning and post-processing interpretation by modeling the optical response of TG configurations across a wide range of conditions. It supports input through structured MATLAB variables or Excel-based spreadsheets and provides automated consistency checks and visual output generation. The implementation includes integration over detector pixels, enabling realistic simulations that account for spatial averaging and resolution effects. We demonstrate the software’s capabilities through representative use cases, including the influence of the grating-to-sample distance, the pump-to-probe intensity ratio, and the selection of the division parameter governing pixel integration accuracy. The code is freely available and modular, facilitating its adaptation to different experimental geometries and beam conditions. While full validation is provided elsewhere, this work establishes the core methodology and illustrates the practical value of the tool for TG spectroscopy research.
Program summary
Program title: TGCalc.
Licensing provisions: GNU GPLv3.
Programming language: MATLAB/GNU Octave.
Operating system: Linux and Windows.
Nature of problem: The code has been developed to compute diffraction patterns of light in a transient grating geometry scheme. The output intensity distribution is calculated based on the diffraction integral in the Fresnel and Fraunhofer regimes. Together with the diffraction pattern, the spatial harmonics are obtained using a post-processing script based on the input data filename.
Solution method: The diffraction image is calculated as the diffraction integral over the whole space of a Gaussian beam and normalized by its maximum value. For a Gaussian beam with a spherical approximation of the wavefront, an analytical expression of the electromagnetic field in the Fresnel and Fraunhofer regimes is developed, and a calculation code is implemented.
Additional comments: The TGCalc script has been tested with MATLAB versions R2021a, R2022b, and R2024b. The script also works under GNU Octave software (tested with version 4.0.0). However, under GNU Octave, the matrix data writing could give an error due to the file writeout permissions.
{"title":"Software for simulation and analysis of far-field diffraction patterns in transient grating spectroscopy","authors":"Andrii Goloborodko , Myhailo Kotov , Carles Serrat","doi":"10.1016/j.cpc.2025.109964","DOIUrl":"10.1016/j.cpc.2025.109964","url":null,"abstract":"<div><div>We present a software package for the simulation and analysis of far-field diffraction patterns in transient grating (TG) spectroscopy. The code is designed to assist both experimental planning and post-processing interpretation by modeling the optical response of TG configurations across a wide range of conditions. It supports input through structured MATLAB variables or Excel-based spreadsheets and provides automated consistency checks and visual output generation. The implementation includes integration over detector pixels, enabling realistic simulations that account for spatial averaging and resolution effects. We demonstrate the software’s capabilities through representative use cases, including the influence of the grating-to-sample distance, the pump-to-probe intensity ratio, and the selection of the division parameter governing pixel integration accuracy. The code is freely available and modular, facilitating its adaptation to different experimental geometries and beam conditions. While full validation is provided elsewhere, this work establishes the core methodology and illustrates the practical value of the tool for TG spectroscopy research.</div><div><strong>Program summary</strong></div><div><em>Program title</em>: TGCalc.</div><div><em>Licensing provisions</em>: GNU GPLv3.</div><div><em>Programming language</em>: MATLAB/GNU Octave.</div><div><em>Operating system</em>: Linux and Windows.</div><div><em>Nature of problem</em>: The code has been developed to compute diffraction patterns of light in a transient grating geometry scheme. The output intensity distribution is calculated based on the diffraction integral in the Fresnel and Fraunhofer regimes. Together with the diffraction pattern, the spatial harmonics are obtained using a post-processing script based on the input data filename.</div><div><em>Solution method</em>: The diffraction image is calculated as the diffraction integral over the whole space of a Gaussian beam and normalized by its maximum value. For a Gaussian beam with a spherical approximation of the wavefront, an analytical expression of the electromagnetic field in the Fresnel and Fraunhofer regimes is developed, and a calculation code is implemented.</div><div><em>Additional comments</em>: The <span>TGCalc</span> script has been tested with MATLAB versions R2021a, R2022b, and R2024b. The script also works under GNU Octave software (tested with version 4.0.0). However, under GNU Octave, the matrix data writing could give an error due to the file writeout permissions.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109964"},"PeriodicalIF":3.4,"publicationDate":"2025-11-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145681709","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-11-25DOI: 10.1016/j.cpc.2025.109956
Alessio Roccon
We present an extended version of MHIT36, a GPU-tailored solver for interface-resolved simulations of multiphase turbulence. The framework couples direct numerical simulation (DNS) of the Navier–Stokes equations, which describe the flow field, with a phase-field method to capture interfacial phenomena. In addition, the transport equation for a scalar can also be solved. The governing equations are discretized using a second-order finite difference scheme. The Navier–Stokes equations are time advanced with an explicit fractional-step method, and the resulting pressure Poisson equation is solved using a FFT-based method. The accurate conservative diffuse interface (ACDI) formulation is used to describe the transport of the phase-field variable. Simulations can be performed in two configurations: a triply-periodic cubic domain or a rectangular domain of arbitrary dimensions bounded by two walls. From a computational standpoint, MHIT36 employs a two-dimensional domain decomposition to distribute the workload across MPI tasks. The cuDecomp library is used to perform pencil transpositions and halo updates, while the cuFFT library and OpenACC directives are leveraged to offload the remaining computational kernels to the GPU. MHIT36 is developed using the managed memory feature and it provides a baseline code that is easy to further extend and modify. MHIT36 is released open source under the MIT license.
{"title":"MHIT36: Extension to wall-bounded turbulence and scalar transport equation","authors":"Alessio Roccon","doi":"10.1016/j.cpc.2025.109956","DOIUrl":"10.1016/j.cpc.2025.109956","url":null,"abstract":"<div><div>We present an extended version of MHIT36, a GPU-tailored solver for interface-resolved simulations of multiphase turbulence. The framework couples direct numerical simulation (DNS) of the Navier–Stokes equations, which describe the flow field, with a phase-field method to capture interfacial phenomena. In addition, the transport equation for a scalar can also be solved. The governing equations are discretized using a second-order finite difference scheme. The Navier–Stokes equations are time advanced with an explicit fractional-step method, and the resulting pressure Poisson equation is solved using a FFT-based method. The accurate conservative diffuse interface (ACDI) formulation is used to describe the transport of the phase-field variable. Simulations can be performed in two configurations: a triply-periodic cubic domain or a rectangular domain of arbitrary dimensions bounded by two walls. From a computational standpoint, MHIT36 employs a two-dimensional domain decomposition to distribute the workload across MPI tasks. The cuDecomp library is used to perform pencil transpositions and halo updates, while the cuFFT library and OpenACC directives are leveraged to offload the remaining computational kernels to the GPU. MHIT36 is developed using the managed memory feature and it provides a baseline code that is easy to further extend and modify. MHIT36 is released open source under the MIT license.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109956"},"PeriodicalIF":3.4,"publicationDate":"2025-11-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145616112","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-11-21DOI: 10.1016/j.cpc.2025.109962
Lianhe Sun , Bin Wang , Yaochen Zhang , Jiacheng Jin , Zelong Mao , Haizhu Wang , Mao Sheng , Bing Yang , Sergey Stanchits , Alexey Cheremisin
Fractures in rock masses are a central focus in research areas such as unconventional energy extraction, nuclear waste disposal, and carbon sequestration. Laboratory investigations of fracture parameters are essential for optimizing field operations. In recent years, CT scanning has emerged as a widely adopted non-destructive inspection technique. However, existing methods for post-processing CT scan data face persistent challenges in achieving high accuracy and efficiency. To address these challenges, we propose a novel Python-based post-processing framework that integrates a slice-by-slice thinning algorithm, local thickness computation, and point cloud data processing techniques. This framework enables precise characterization of fractured digital rocks by quantifying fracture width distribution and fracture surface orientation, alongside standard structural evaluation metrics such as the fractal dimension, volume ratio, and the H-index. Its feasibility, accuracy, and flexibility are validated through analyses of diverse fracturing samples, including fluid-fractured samples, shear-induced fracture samples, and samples containing multiple secondary fractures. PROGRAM SUMMARYProgram title:Digifrac CPC Library link to program files: https://10.17632/hcynpd9hf4.1Developer’s repository link: https://github.com/BinWang0213/DigiFracLicensing provisions: GPLv3 Programming language: Python Nature of problem: This program quantitatively calculates the three-dimensional structural parameters of fracture networks in rocks based on CT scan data. In addition to basic parameters such as fractal dimension, fracture volume, and surface area, it also provides accurate determinations of fracture width distribution and fracture surface orientation. Solution method: The random forest algorithm is employed to improve the accuracy of CT data segmentation, while a slice-by-slice thinning algorithm is used to extract the fracture medial surface, thereby enhancing the precision of fracture aperture distribution calculations. Furthermore, the three-dimensional orientation distribution of fractures is determined from the 3D point cloud data of the extracted medial surface.
{"title":"Digifrac: Reconstruction and quantification of discrete fractures in rocks using micro-CT images","authors":"Lianhe Sun , Bin Wang , Yaochen Zhang , Jiacheng Jin , Zelong Mao , Haizhu Wang , Mao Sheng , Bing Yang , Sergey Stanchits , Alexey Cheremisin","doi":"10.1016/j.cpc.2025.109962","DOIUrl":"10.1016/j.cpc.2025.109962","url":null,"abstract":"<div><div>Fractures in rock masses are a central focus in research areas such as unconventional energy extraction, nuclear waste disposal, and carbon sequestration. Laboratory investigations of fracture parameters are essential for optimizing field operations. In recent years, CT scanning has emerged as a widely adopted non-destructive inspection technique. However, existing methods for post-processing CT scan data face persistent challenges in achieving high accuracy and efficiency. To address these challenges, we propose a novel Python-based post-processing framework that integrates a slice-by-slice thinning algorithm, local thickness computation, and point cloud data processing techniques. This framework enables precise characterization of fractured digital rocks by quantifying fracture width distribution and fracture surface orientation, alongside standard structural evaluation metrics such as the fractal dimension, volume ratio, and the H-index. Its feasibility, accuracy, and flexibility are validated through analyses of diverse fracturing samples, including fluid-fractured samples, shear-induced fracture samples, and samples containing multiple secondary fractures. <strong>PROGRAM SUMMARY</strong> <em>Program title</em>:Digifrac <em>CPC Library link to program files</em>: <span><span>https://10.17632/hcynpd9hf4.1</span><svg><path></path></svg></span> <em>Developer’s repository link</em>: <span><span>https://github.com/BinWang0213/DigiFrac</span><svg><path></path></svg></span> <em>Licensing provisions</em>: GPLv3 <em>Programming language</em>: Python <em>Nature of problem</em>: This program quantitatively calculates the three-dimensional structural parameters of fracture networks in rocks based on CT scan data. In addition to basic parameters such as fractal dimension, fracture volume, and surface area, it also provides accurate determinations of fracture width distribution and fracture surface orientation. <em>Solution method</em>: The random forest algorithm is employed to improve the accuracy of CT data segmentation, while a slice-by-slice thinning algorithm is used to extract the fracture medial surface, thereby enhancing the precision of fracture aperture distribution calculations. Furthermore, the three-dimensional orientation distribution of fractures is determined from the 3D point cloud data of the extracted medial surface.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109962"},"PeriodicalIF":3.4,"publicationDate":"2025-11-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145616214","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-11-21DOI: 10.1016/j.cpc.2025.109948
Antti Vaaranta , Marco Cattaneo
The Markovian dynamics of open quantum systems is typically described through Lindblad equations, which are derived from the Redfield equation via the full secular approximation. The latter neglects the rotating terms in the master equation corresponding to pairs of jump operators with different Bohr frequencies. However, for many physical systems this approximation breaks down, and thus a more accurate treatment of the slowly rotating terms is required. Indeed, more precise physical results can be obtained by performing the partial secular approximation, which takes into account the relevant time scale associated with each pair of jump operators and compares it with the time scale arising from the system-environment coupling. In this work, we introduce a general code for performing the partial secular approximation in the Redfield equation for structured open quantum systems. The code can be applied to a generic Hamiltonian of any multipartite system coupled to bosonic baths. Moreover, it can also reproduce the unified master equation, which captures the same physical behavior as the Redfield equation under the partial secular approximation, but is mathematically guaranteed to generate a completely positive dynamical map. Finally, the code can compute both the local and global version of the master equation for the same physical problem. We illustrate the code by studying the steady-state heat flow in a structured open quantum system composed of two superconducting qubits, each coupled to a bosonic mode, which in turn interacts with a thermal bath. The results in this work can be employed for the numerical study of a wide range of complex open quantum systems.
{"title":"Numerical implementation of the partial secular approximation and unified master equation in structured open quantum systems","authors":"Antti Vaaranta , Marco Cattaneo","doi":"10.1016/j.cpc.2025.109948","DOIUrl":"10.1016/j.cpc.2025.109948","url":null,"abstract":"<div><div>The Markovian dynamics of open quantum systems is typically described through Lindblad equations, which are derived from the Redfield equation via the <em>full</em> secular approximation. The latter neglects the rotating terms in the master equation corresponding to pairs of jump operators with different Bohr frequencies. However, for many physical systems this approximation breaks down, and thus a more accurate treatment of the slowly rotating terms is required. Indeed, more precise physical results can be obtained by performing the <em>partial</em> secular approximation, which takes into account the relevant time scale associated with each pair of jump operators and compares it with the time scale arising from the system-environment coupling. In this work, we introduce a general code for performing the partial secular approximation in the Redfield equation for structured open quantum systems. The code can be applied to a generic Hamiltonian of any multipartite system coupled to bosonic baths. Moreover, it can also reproduce the <em>unified master equation</em>, which captures the same physical behavior as the Redfield equation under the partial secular approximation, but is mathematically guaranteed to generate a completely positive dynamical map. Finally, the code can compute both the local and global version of the master equation for the same physical problem. We illustrate the code by studying the steady-state heat flow in a structured open quantum system composed of two superconducting qubits, each coupled to a bosonic mode, which in turn interacts with a thermal bath. The results in this work can be employed for the numerical study of a wide range of complex open quantum systems.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109948"},"PeriodicalIF":3.4,"publicationDate":"2025-11-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145616216","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-11-21DOI: 10.1016/j.cpc.2025.109958
Martin Thümmler , Thomas Lettau , Alexander Croy , Ulf Peschel , Stefanie Gräfe
The semiconductor Bloch equations (SBEs) with a dephasing operator for the microscopic polarizations are a well established approach to simulate high-harmonic spectra in solids. We discuss the impact of the dephasing operator on the stability of the numerical integration of the SBEs in the Wannier gauge. It is shown that the commonly used phenomenological approach to apply dephasing is ill-defined in the presence of band crossings and leads to artifacts in the carrier distribution. They are caused by rapid changes of the dephasing operator matrix elements in the Wannier gauge, which render the convergence of the simulation in the stationary basis infeasible. In the comoving basis, also called Houston basis, these rapid changes can be resolved, but only at the cost of a largely increased computation time. As a remedy, we propose a modification of the dephasing operator with reduced magnitude in energetically close subspaces. This approach removes the artifacts in the carrier distribution and significantly speeds up the calculations, while affecting the high-harmonic spectrum only marginally. To foster further development, we provide our parallelized source code.
{"title":"Semiconductor Bloch equations in Wannier gauge with well-behaved dephasing","authors":"Martin Thümmler , Thomas Lettau , Alexander Croy , Ulf Peschel , Stefanie Gräfe","doi":"10.1016/j.cpc.2025.109958","DOIUrl":"10.1016/j.cpc.2025.109958","url":null,"abstract":"<div><div>The semiconductor Bloch equations (SBEs) with a dephasing operator for the microscopic polarizations are a well established approach to simulate high-harmonic spectra in solids. We discuss the impact of the dephasing operator on the stability of the numerical integration of the SBEs in the Wannier gauge. It is shown that the commonly used phenomenological approach to apply dephasing is ill-defined in the presence of band crossings and leads to artifacts in the carrier distribution. They are caused by rapid changes of the dephasing operator matrix elements in the Wannier gauge, which render the convergence of the simulation in the stationary basis infeasible. In the comoving basis, also called Houston basis, these rapid changes can be resolved, but only at the cost of a largely increased computation time. As a remedy, we propose a modification of the dephasing operator with reduced magnitude in energetically close subspaces. This approach removes the artifacts in the carrier distribution and significantly speeds up the calculations, while affecting the high-harmonic spectrum only marginally. To foster further development, we provide our parallelized source code.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109958"},"PeriodicalIF":3.4,"publicationDate":"2025-11-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145616215","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-11-19DOI: 10.1016/j.cpc.2025.109942
Roman Vetter
This article introduces TinyDEM, a lightweight implementation of a full-fledged discrete element method (DEM) solver in 3D. Newton’s damped equations of motion are solved explicitly for translations and rotations of a polydisperse ensemble of dry, soft, granular spherical particles, using quaternions to represent their orientation in space without gimbal lock. Particle collisions are modeled as inelastic and frictional, including full exchange of torque. With a general particle-mesh collision routine, complex rigid geometries can be simulated. TinyDEM is designed to be a compact standalone program written in simple C++11, devoid of explicit pointer arithmetics and advanced concepts such as manual memory management or polymorphism. It is parallelized with OpenMP and published freely under the 3-clause BSD license. TinyDEM can serve as an entry point into classical DEM simulations or as a foundation for more complex models of particle dynamics.
PROGRAM SUMMARY
Program Title: TinyDEM
CPC Library link to program files: (to be added by Technical Editor)
Developer’s repository link: —
Licensing provisions: BSD 3-clause
Programming language: C++11
Supplementary material: Videos 1–6
Nature of problem:
Dynamics and statics of polydisperse ensembles of visco-elastic, frictional, non-adhesive spherical particles (such as in granular media) in 1D, 2D and 3D. All three modes of torque exchange (sliding, rolling and twisting) are modeled with slip-stick Coulomb friction.
Solution method:
The discrete element method is used to solve Newton’s damped equations of motion for particle translations and rotations with the semi-implicit Euler scheme. Quaternions are used to represent particle orientations. For efficient collision detection, a linked cell list is used. A static geometrical environment can be defined with a discrete mesh. The program is parallelized with OpenMP for shared-memory systems.
Additional comments including restrictions and unusual features:
The source code is exceptionally compact, consisting of only about 600 commented lines in two files—a header and a source file. With no dependencies, it is highly portable and accessible, making it also suited for educational purposes.
{"title":"TinyDEM: Minimal open granular DEM code with sliding, rolling and twisting friction","authors":"Roman Vetter","doi":"10.1016/j.cpc.2025.109942","DOIUrl":"10.1016/j.cpc.2025.109942","url":null,"abstract":"<div><div>This article introduces TinyDEM, a lightweight implementation of a full-fledged discrete element method (DEM) solver in 3D. Newton’s damped equations of motion are solved explicitly for translations and rotations of a polydisperse ensemble of dry, soft, granular spherical particles, using quaternions to represent their orientation in space without gimbal lock. Particle collisions are modeled as inelastic and frictional, including full exchange of torque. With a general particle-mesh collision routine, complex rigid geometries can be simulated. TinyDEM is designed to be a compact standalone program written in simple C++11, devoid of explicit pointer arithmetics and advanced concepts such as manual memory management or polymorphism. It is parallelized with OpenMP and published freely under the 3-clause BSD license. TinyDEM can serve as an entry point into classical DEM simulations or as a foundation for more complex models of particle dynamics.</div><div><strong>PROGRAM SUMMARY</strong></div><div><em>Program Title:</em> TinyDEM</div><div><em>CPC Library link to program files:</em> (to be added by Technical Editor)</div><div><em>Developer’s repository link:</em> —</div><div><em>Licensing provisions:</em> BSD 3-clause</div><div><em>Programming language:</em> C++11</div><div><em>Supplementary material:</em> Videos 1–6</div><div><strong>Nature of problem:</strong></div><div>Dynamics and statics of polydisperse ensembles of visco-elastic, frictional, non-adhesive spherical particles (such as in granular media) in 1D, 2D and 3D. All three modes of torque exchange (sliding, rolling and twisting) are modeled with slip-stick Coulomb friction.</div><div><strong>Solution method:</strong></div><div>The discrete element method is used to solve Newton’s damped equations of motion for particle translations and rotations with the semi-implicit Euler scheme. Quaternions are used to represent particle orientations. For efficient collision detection, a linked cell list is used. A static geometrical environment can be defined with a discrete mesh. The program is parallelized with OpenMP for shared-memory systems.</div><div><strong>Additional comments including restrictions and unusual features:</strong></div><div>The source code is exceptionally compact, consisting of only about 600 commented lines in two files—a header and a source file. With no dependencies, it is highly portable and accessible, making it also suited for educational purposes.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109942"},"PeriodicalIF":3.4,"publicationDate":"2025-11-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145616218","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}