Niko Oinonen , Aliaksandr V. Yakutovich , Aurelio Gallardo , Martin Ondráček , Prokop Hapala , Ondřej Krejčí
{"title":"Advancing scanning probe microscopy simulations: A decade of development in probe-particle models","authors":"Niko Oinonen , Aliaksandr V. Yakutovich , Aurelio Gallardo , Martin Ondráček , Prokop Hapala , Ondřej Krejčí","doi":"10.1016/j.cpc.2024.109341","DOIUrl":"10.1016/j.cpc.2024.109341","url":null,"abstract":"<div><p>The Probe-Particle Model combine theories designed for the simulation of scanning probe microscopy experiments, employing non-reactive, flexible tip apices to achieve <em>sub-molecular resolution</em>. In the article we present the latest version of the Probe-Particle Model implemented in the open-source <span>ppafm</span> package, highlighting substantial advancements in accuracy, computational performance, and user-friendliness. To demonstrate this we provide a comprehensive review of approaches for simulating non-contact Atomic Force Microscopy. They vary in complexity from simple Lennard-Jones potential to the latest <em>full density-based model</em>. We compared those approaches with <em>ab initio</em> calculated references, showcasing their respective merits. All parts of the <span>ppafm</span> package have undergone acceleration by 1-2 orders of magnitude using OpenMP and OpenCL technologies. The updated package includes an interactive graphical user interface and seamless integration into the Python ecosystem via <span>pip</span>, facilitating advanced scripting and interoperability with other software. This adaptability positions <span>ppafm</span> as an ideal tool for high-throughput applications, including the training of machine learning models for the automatic recovery of atomic structures from nc-AFM measurements. We envision significant potential for this application in future single-molecule analysis, synthesis, and advancements in surface science in general. Additionally, we discuss simulations of other <em>sub-molecular</em> scanning-probe imaging techniques, such as bond-resolved scanning tunneling microscopy and kelvin probe force microscopy, all built on the robust foundation of the Probe-Particle Model. Altogether this demonstrates the broad impact of the model across diverse domains of on-surface science and molecular chemistry.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109341"},"PeriodicalIF":7.2,"publicationDate":"2024-08-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0010465524002649/pdfft?md5=3c013c21ac97945bc843aef1b4dd416b&pid=1-s2.0-S0010465524002649-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141979431","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}
Yan Wang , Xufeng Xiao , Hong Zhang , Xu Qian , Songhe Song
{"title":"Efficient diffusion domain modeling and fast numerical methods for diblock copolymer melt in complex domains","authors":"Yan Wang , Xufeng Xiao , Hong Zhang , Xu Qian , Songhe Song","doi":"10.1016/j.cpc.2024.109343","DOIUrl":"10.1016/j.cpc.2024.109343","url":null,"abstract":"<div><p>The numerical simulation of diblock copolymers under hydrodynamic action in complex domains is of great significance in academic research and industrial applications. The purpose of this study is to establish a fast, stable, and easily implementable numerical simulation framework for them. A hydrodynamically coupled diblock copolymer phase field model is considered, which includes a conserved Allen-Cahn-Ohta-Kawasaki type equation and an incompressible Navier-Stokes equation. However, rapid numerical simulation of the model in complex domains faces significant challenges, including discretization of complex boundaries, huge computational costs of three-dimensional (3D) problems, strong nonlinear coupling between multiple equations, and preserving the volume conservation properties. To overcome the above difficulties, a new modified model that can be computed in the regular domain is established by diffusion domain (DD) method, avoiding numerical discretization of complex boundaries. Then, we develop a stabilized second-order dimension splitting (DS) technique for the modified model. This approach effectively decomposes 2D or 3D problems into 1D sub-problems in different directions, significantly improving the computation efficiency. For spatial discretization, the central difference scheme is applied on mark and cell (MAC) grid, and the discrete volume conservation is ensured by proper processing. Finally, the efficacy of the modified model and numerical scheme is verified through numerical experiments. A series of numerical simulations are performed to investigate the effects of complex domains and fluid dynamics on the evolution of diblock copolymers.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109343"},"PeriodicalIF":7.2,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141984589","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"L-MAU: A multivariate time-series network for predicting the Cahn-Hilliard microstructure evolutions via low-dimensional approaches","authors":"Sheng-Jer Chen, Hsiu-Yu Yu","doi":"10.1016/j.cpc.2024.109342","DOIUrl":"10.1016/j.cpc.2024.109342","url":null,"abstract":"<div><p>The phase-field model is a prominent mesoscopic computational framework for predicting diverse phase change processes. Recent advancements in machine learning algorithms offer the potential to accelerate simulations by data-driven dimensionality reduction techniques. Here, we detail our development of a multivariate spatiotemporal predicting network, termed the linearized Motion-Aware Unit (L-MAU), to predict phase-field microstructures at reduced dimensions precisely. We employ the numerical Cahn-Hilliard equation incorporating the Flory-Huggins free energy function and concentration-dependent mobility to generate training and validation data. This comprehensive dataset encompasses slow- and fast-coarsening systems exhibiting droplet-like and bicontinuous patterns. To address computational complexity, we propose three dimensionality reduction pipelines: (I) two-point correlation function (TPCF) with principal component analysis (PCA), (II) low-compression autoencoder (LCA) with PCA, and (III) high-compression autoencoder (HCA). Following the steps of transformation, prediction, and reconstruction, we rigorously evaluate the results using statistical descriptors, including the average TPCF, structure factor, domain growth, and the structural similarity index measure (SSIM), to ensure the fidelity of machine predictions. A comparative analysis reveals that the dual-stage LCA approach with 300 principal components delivers optimal outcomes with accurate evolution dynamics and reconstructed morphologies. Moreover, incorporating the physical mass-conservation constraint into this dual-stage configuration (designated as C-LCA) produces more coherent and compact low-dimensional representations, further enhancing spatiotemporal feature predictions. This novel dimensionality reduction approach enables high-fidelity predictions of phase-field evolutions with controllable errors, and the final recovered microstructures may improve numerical integration robustly to achieve desired later-stage phase separation morphologies.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109342"},"PeriodicalIF":7.2,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142083135","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}
Aditya Vasudevan , Jorge Zorrilla Prieto , Sergei Zorkaltsev , Maciej Haranczyk
{"title":"tda-segmentor: A tool to extract and analyze local structure and porosity features in porous materials","authors":"Aditya Vasudevan , Jorge Zorrilla Prieto , Sergei Zorkaltsev , Maciej Haranczyk","doi":"10.1016/j.cpc.2024.109344","DOIUrl":"10.1016/j.cpc.2024.109344","url":null,"abstract":"<div><p>Local geometrical features of a porous material such as the shape and size of a pore or the curvature of a solid ligament do often affect the macroscopic properties of the material, and their characterization is necessary to fully understand the structure-property relationships. In this contribution, we present an approach to automatically segment large porous structures into such local features. Our work takes inspiration from techniques available in Topological Data Analysis (TDA). In particular, using Morse theory, we generate Morse-Smale Complexes of our structures that segment the structure, and/or its porosity into individual features that can then be compared. We develop a tool written in C<span>++</span> that is built on the topology toolkit (TTK) library, an open source platform for the topological analysis of scalar data, with which we can perform segmentation of these structures. Our tool takes a volumetric grid representation as an input, which can be generated from atomistic or mesh structure models and any function defined on such grid, e.g. the distance to the surface or the interaction energy with a probe. We demonstrate the applicability of the tool by two examples related with analysis of porosity in zeolite materials as well as analysis of ligaments in a porous metal structure. Specifically, by segmenting the pores in the structure we demonstrate some applications to zeolites such as assessing pore-similarity between structures or evaluating the accessible volume to a target molecule such as methane that can be adsorbed to its surface. Moreover, once the Morse-Smale complexes are generated, we can construct graph representations of the void space, replacing the entire pore structure by a simply connected graph. Similarly, the same tool is used to segment and generates graphs representing the solid structure and we show how they can be used to correlate structure and mechanical properties of the material. The code is published as open-source and can be accessed here: <span><span>https://github.com/AMDatIMDEA/tda-segmentor</span><svg><path></path></svg></span></p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109344"},"PeriodicalIF":7.2,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142077043","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}
Jiatao Zhang , Xiaohu Guo , Xiufang Feng , Li Zhu , Xiaolu Su
{"title":"A complex geometry isosurface reconstruction algorithm for particle based CFD simulations","authors":"Jiatao Zhang , Xiaohu Guo , Xiufang Feng , Li Zhu , Xiaolu Su","doi":"10.1016/j.cpc.2024.109333","DOIUrl":"10.1016/j.cpc.2024.109333","url":null,"abstract":"<div><p>This paper presents a new preprocessing algorithm to generate accurate initial conditions for particle-method-based CFD simulations with complex geometries. The algorithm is based on the improved Marching Cubes method (MC) with the newly proposed isosurface particle redistribution optimisation. It can not only produce topologically accurate isosurfaces and boundary particles that encompass the entire boundary surface but also offers a seamless method for evenly distributing internal fluid particles, eliminating the necessity for additional fluid field reconstruction algorithms. To address the issue of particle clustering on the surface boundary caused by MC intersection with sharp corners in complex geometries, we have introduced an iterative particle-moving algorithm. This algorithm aims to both achieve a uniform distribution of boundary particles across the surface and to recompute their normal vectors due to particles movement. In introducing our newly developed preprocessing algorithm, we have taken the initiative to systematically elucidate the entire process of generating boundary particles on complex surfaces using optimization theory, marking a pioneering effort in this regard. The developed particle preprocessing optimization techniques can use inputs from both the volume image data format from MRI/CT and standard CAD files, such as STL models. We have used various test cases with standard CAD geometries and complex real-world application geometries to validate and test the algorithms. The results demonstrate the impressive ability of our preprocessing toolkit<span><span><sup>1</sup></span></span> to handle real complex geometries, along with the robustness and efficiency of the newly developed algorithms.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109333"},"PeriodicalIF":7.2,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142013032","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Cache blocking for flux reconstruction: Extension to Navier-Stokes equations and anti-aliasing","authors":"Semih Akkurt , Freddie Witherden , Peter Vincent","doi":"10.1016/j.cpc.2024.109332","DOIUrl":"10.1016/j.cpc.2024.109332","url":null,"abstract":"<div><p>In this article, cache blocking is implemented for the Navier Stokes equations with anti-aliasing support on mixed grids in PyFR for CPUs. In particular, cache blocking is used as an alternative to kernel fusion to eliminate unnecessary data movements between kernels at the main memory level. Specifically, kernels that exchange data are grouped together, and these groups are then executed on small sub-regions of the domain that fit in per-core private data cache. Additionally, cache blocking is also used to efficiently implement a tensor product factorisation of the interpolation operators associated with anti-aliasing. By using cache blocking, the intermediate results between application of the sparse factors are stored in per-core private data cache, and a significant amount of data movement from main memory is avoided. In order to assess the performance gains a theoretical model is developed, and the implementation is benchmarked using a compressible 3D Taylor-Green vortex test case on both hexahedral and prismatic grids, with third-, fourth-, and fifth-order solution polynomials. The expected performance gains based on the theoretical model range from 1.99 to 2.83, and the speedups obtained in practice range from 1.51 to 3.91 compared to PyFR v1.11.0.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109332"},"PeriodicalIF":7.2,"publicationDate":"2024-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0010465524002558/pdfft?md5=f253f41651251a63812f0a8e5e79c01d&pid=1-s2.0-S0010465524002558-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941229","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}
Joao Cunha , José Queiroz , Carlos Silva , Fabio Gentile , Diogo E. Aguiam
{"title":"pyMOE: Mask design and modeling for micro optical elements and flat optics","authors":"Joao Cunha , José Queiroz , Carlos Silva , Fabio Gentile , Diogo E. Aguiam","doi":"10.1016/j.cpc.2024.109331","DOIUrl":"10.1016/j.cpc.2024.109331","url":null,"abstract":"<div><p>We introduce a new open-source software package written in Python to design and model micro optical elements, such as diffractive lenses, holograms, as well as other components within the broad area of flat optics, and generate their corresponding (production-ready) lithography mask files. To this aim, the package provides functions to design a multitude of kinoform lenses, phase masks and holograms, but is versatile and the user can implement any arbitrary numerical or analytical optical component designs. For validating the designs, this package provides scalar diffraction propagation to simulate optical field propagation in different regimes covering near- and far-field regions (Fresnel, Fraunhofer and Rayleigh-Sommerfeld). Particularly, by implementing Rayleigh-Sommerfeld propagation, we demonstrate accurate field propagation within near- and far-field ranges, providing versatility and accuracy. Importantly, the package allows to directly export production-ready multilevel/binary lithography mask files of the designed optical components. Additionally, metasurface masks can conveniently be generated for any user-defined meta-element library given as input. Finally, the software package capabilities are illustrated with examples of mask design and modeling of diffractive lenses, holograms, and metasurfaces susceptible of being fabricated via lithography techniques. Beyond lithography, the package can also straightforwardly be used in other applications requiring mask generation, such as beam shaping, optical trapping and digital holography.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109331"},"PeriodicalIF":7.2,"publicationDate":"2024-08-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0010465524002546/pdfft?md5=72d18388a6734669c1b1b763c0bc9586&pid=1-s2.0-S0010465524002546-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142006818","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}
{"title":"Self-consistent field theory for loop-containing polymers: A general algorithm for path-determination","authors":"Takashi Honda , Yoshinori Tomiyoshi , Toshihiro Kawakatsu","doi":"10.1016/j.cpc.2024.109330","DOIUrl":"10.1016/j.cpc.2024.109330","url":null,"abstract":"<div><p>An algorithm was developed for self-consistent field theory (SCFT) simulations of loop-containing polymers (LCPs), where the total number of independent loops (fundamental cycles in the polymer structure) is characterized by the “cycle rank.” Although various multi-ring and cage-like polymers have been reported, there is no explicit SCFT scheme for LCPs with multiple loops. An LCP was cut to open its fundamental cycles to form a pseudo-tree-like polymer. Conventional SCFT calculations for pseudo-tree-like polymers require extra spatial constraints on the pseudo-free endpoints generated by opening the fundamental cycle, which increases the computational cost. A reduction in the computational cost was observed, and the algorithm was applied to microphase-separated structures of small LCPs.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109330"},"PeriodicalIF":7.2,"publicationDate":"2024-08-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0010465524002534/pdfft?md5=77135b17531be43443e4a762b2eb6cca&pid=1-s2.0-S0010465524002534-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941228","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}
{"title":"A well-balanced finite volume solver for the 2D shallow water magnetohydrodynamic equations with topography","authors":"Abou Cissé , Imad Elmahi , Imad Kissami , Ahmed Ratnani","doi":"10.1016/j.cpc.2024.109328","DOIUrl":"10.1016/j.cpc.2024.109328","url":null,"abstract":"<div><p>In this paper, a second-order finite volume Non-Homogeneous Riemann Solver is used to obtain an approximate solution for the two-dimensional shallow water magnetohydrodynamic (SWMHD) equations considering non-flat bottom topography. We investigate the stability of a perturbed steady state, as well as the stability of energy in these equations after a perturbation of a steady state using a dispersive analysis. To address the elliptic constraint <span><math><mi>∇</mi><mo>⋅</mo><mi>h</mi><mi>B</mi><mo>=</mo><mn>0</mn></math></span>, the GLM (Generalized Lagrange Multiplier) method designed specifically for finite volume schemes, is used. The proposed solver is implemented on unstructured meshes and verifies the exact conservation property. Several numerical results are presented to validate the high accuracy of our schemes, the well-balanced, and the ability to resolve smooth and discontinuous solutions. The developed finite volume Non-Homogeneous Riemann Solver and the GLM method offer a reliable approach for solving the SWMHD equations, preserving numerical and physical equilibrium, and ensuring stability in the presence of perturbations.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109328"},"PeriodicalIF":7.2,"publicationDate":"2024-08-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941231","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}
H.G. Yoon , D.B. Lee , S.M. Park , J.W. Choi , H.Y. Kwon , C. Won
{"title":"Melting phenomena of self-organized magnetic structures investigated by variational autoencoder","authors":"H.G. Yoon , D.B. Lee , S.M. Park , J.W. Choi , H.Y. Kwon , C. Won","doi":"10.1016/j.cpc.2024.109329","DOIUrl":"10.1016/j.cpc.2024.109329","url":null,"abstract":"<div><p>The phase transition phenomenon is an important research topic in various physical studies. However, it is difficult to define the order parameters in many complex systems involving self-organized structures. We propose a method to define order parameters using a variational autoencoder network. To demonstrate these capabilities, we trained a deep learning network with a dataset composed of spin configurations in a chiral magnetic system at various temperatures. It removes thermal fluctuations from the input data and leaves the remaining structural information with a spin magnitude. We define an order parameter with magnitude of output spins and compare the results with those of conventional analysis. The comparison indicates similar results. Using the order parameter, the thermal properties of the chiral magnetic system were investigated by varying the physical parameters and data size.</p></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"305 ","pages":"Article 109329"},"PeriodicalIF":7.2,"publicationDate":"2024-07-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0010465524002522/pdfft?md5=87c6231b57f7642e4d16c417670b366d&pid=1-s2.0-S0010465524002522-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141941230","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}