Full text
Contents lists available at ScienceDirect SoftwareX journal homepage: www.elsevier.com/locate/softx Software update Version 3.0 - laserbeamFoam: Laser ray-tracing and thermally induced state transition simulation toolkit Tom Flinta,∗, Petar Ćosić b, Gowthaman Parivendhan b, Simon A. Rodriguez b, Ivan Bunaziv c, Patrick O’Tooled, Philip Cardiffb,∗ aHenry Royce Institute, Department of Materials, University of Manchester, UK bI-Form Centre for Advanced Manufacturing, School of Mechanical and Materials Engineering, University College Dublin, Ireland cMaterials and Nanotechnology, SINTEF Industry, Torgarden, NO 7465, Trondheim, Norway dInstitut für Strahlwerkzeuge (IFSW), Universität Stuttgart, Pfaffenwaldring 43, 70569 Stuttgart, Germany A R T I C L E I N F O Keywords: Thermal-fluid-dynamics Multi-component Laser-deposition Compressible Additive-manufacturing Laser welding A B S T R A C T This update to the growing laserbeamFoam toolbox introduces significant enhancements to the open-source simulation framework for laser–material interaction, enabling high-fidelity modelling of complex multiphysics phenomena. In this release, we extend the toolbox’s capabilities to support fully compressible, multicomponent, and multi-state flow through the compressibleLaserbeamFoam solver. Additionally, the original laserbeamFoam solver now has the option to use the isoAdvector interface treatment. This update also introduces tools to improve the coupling between all solvers in the toolbox and the discrete element method (DEM) that are used to generate particle placements using Lagrangian methods (namely, coupling with the open-source LIGGGHTS software). Another significant enhancement to the simulation toolbox is an overhaul of the laser discretization and ray-tracing algorithm, decoupling the laser spatial resolution from the mesh resolution and improving the ray-tracing algorithm’s parallel performance. Code metadata Current code version V3.0 Permanent link to code/repository used for this code version https://github.com/ElsevierSoftwareX/SOFTX-D-25-00717 Code Ocean compute capsule No Legal Code License GNU GPL V3 Code versioning system used git Software code languages, tools, and services used C++, C, MPI Compilation requirements, operating environments & dependencies OpenFOAM-2506 If available Link to developer documentation/manual https://github.com/laserbeamFoam/LaserbeamFoam/README Support email for questions [email protected], [email protected] 1. Description of the software-update The original laserbeamFoam solver, along with the additional multicomponentlaserbeamFoam that was released with version 2.0, utilized the phenomenological recoil pressure approach to capture the vapourization state transition; whereby the material within the domain was treated as incompressible, and a phenomenological ‘recoil pressure’ term was added to the momentum equation [1–3]. Higher fidelity descriptions of the vapourization/condensation state DOI of original article: https://doi.org/10.1016/j.softx.2022.101299. ∗Corresponding authors. E-mail addresses: [email protected] (T. Flint), [email protected] (P. Cardiff). transition explicitly capture the volumetric changes associated with these transitions and have typically neglected the additional effects of compressibility within the bulk [4–6]. Recently Zenz et al. proposed a mathematical framework that not only captured the volumetric changes due to this vapourization/condensation state transition, but additionally these bulk compressibility effects where the density is considered a function of the temperature and pressure [7–9]. These higher fidelity approaches, particularly where the compressibility is https://doi.org/10.1016/j.softx.2025.102419 Received 10 October 2025; Received in revised form 16 October 2025; Accepted 20 October 2025 SoftwareX 32 (2025) 102419 Available online 30 October 2025 2352-7110/© 2025 The Author(s). Published by Elsevier B.V. All rights are reserved, including those for text and data mining, AI training, and similar technologies.
T. Flint et al. accounted for, more robustly describe the momentum contribution due to vapourization/condensation events that operate to stabilize/ destabilize thermo-capillaries (keyholes) generated during high energy density laser-substrate interactions. Additionally, the versions 1 and 2 of the toolbox relied on discretizing the laser on one of the numerical domain boundaries. This led to an inherent coupling between the mesh resolution and the allowed resolution of the laser. In this update this is de-coupled and instead the laser is discretized in radial and polar coordinates on a plane normal to the laser direction vector. This change in the code structure necessitated the creation of a specialized compactRay C++ class structure to facilitate this implementation in a concise manner. These changes are visible in the src/ directory of the software. Furthermore, the original raytracing algorithm tracked the discrete rays through the entire domain sequentially; this led to relatively poor parallel scaling due to frequent, low-data, MPI synching calls. In this update the algorithm is completely overhauled and parallel communication of the discrete rays are now performed in batches across processor boundaries. The original laserbeamFoam solver is expanded to allow the use of the iso-advector interface treatment or MULES interface treatment [2, 10,11]. In this update to the laserbeamFoam suite we introduce the compressibleLaserbeamFoam solver that extends and generalizes the multi-component version (named multicomponentlaserbeamFoam in version 2.0) to include both the volumetric changes due to the vapourization/condensation state transitions of the multi-component substrate as well as general pressure and temperature dependent compressibility effects. The compressibleLaserbeamFoam framework treats the domain as comprising of 2N + 1 discrete ‘components’ separated into all the metallic chemical components in their condensed and vapour states (2N where 𝑁 is the number of independent chemical elements in the domain) and one non-condensing/vapourizing background gaseous phase; of course this could be generalized to any number of reacting or non-reacting gas phases in the future. This new solver, along with all solvers now use the generalized laserHeatsource object that handles the laser ray-tracing. This laserHeatsource object has received several key updates and performance improvements; including generalizing to M independent laser sources such that now a user can simulate multi-component multi-laser scenarios. Furthermore, this update introduces the tools required for greater coupling between discrete element method tools, namely LIGGGHTS, and the laserbeamfoam solvers through the setSolidFraction utility that can read the output of DEM simulations and generate the input files for a thermal fluid dynamics simulation by one of the laserbeamfoam solvers. The original GitHub repository has expanded to an organization to facilitate further developments in the laser-substrate interaction space, including the generation of a website. The dedicated website, www. laserbeamfoam.com, has been constructed to host information related to the project, such as relevant and up-to-date publications along with descriptions and links to the latest solver and utility code bases. The website also contains online tools in the form of web applications aimed at helping users improve their workflow for conducting simulations using the laserbeamFoam solver. The new LPBF Workbench app https://laserbeamfoam.com/utilities/LPBFWorkbench/app.html allows users to generate input files for the discrete element method simulations of the powder deposition using LIGGGHTS open-source software, along with input files for the laser properties and simulation parameters tailored for simulating the LPBF process using laserbeamFoam [12]. 1.1. compressibleLaserbeamFoam Mathematically describing multi-component substrates subjected to high energy density sources of heat requires capturing the volumetric changes that occur due to the changing density of the substrate (typically the vapour state of a given metallic element has a significantly lower density than its condensed state) [5–7]. Another source of volumetric change is the fact that the density of metallic components is in reality a function of temperature and pressure in all states of matter [7,13–15]. One of the major updates to the laserbeamFoam suite of solvers and utilities is the addition of a pressure based multi-component compressible solver that explicitly captures the transitions between liquid and vapour phases for the chemical components within the domain. This new solver conserves mass through the solution of 2N+1 volume fraction transport equations (𝑁 metallic species’ condensed and vapour phases, plus non-condensing gas phase); where the metallic components are decomposed into their liquid and vapour states and the non-condensing/vapourizing gas phase is also mathematically described. Eq. (1) shows the mathematical form of the transport equation for the 𝑘th component. 𝜕(𝜌𝑘𝛼𝑘) 𝜕𝑡 + ∇ ⋅(𝜌𝑘𝑼𝛼𝑘)= ∇ ⋅(𝜖1𝐷𝑘𝑙∇(𝜌𝑘𝛼𝑘))+𝑚𝑘𝑙.(1) In Eq. (1), 𝐷𝑘𝑙 is the pair-wise diffusion coefficient between components 𝑘 and 𝑙. The mass transfer rate, 𝑚𝑘𝑙, captures transition between the condensed state and vapourized state of a given chemical component; naturally the mass lost from state of a chemical component (e.g. 𝐹 𝑒𝑙𝑖𝑞𝑢𝑖𝑑 ) is gained by the other state (e.g. 𝐹 𝑒𝑣𝑎𝑝𝑜𝑢𝑟) during condensation and vapourization state transitions. We consider pressure driven state transitions following the work of [7]. The transfer rates between the condensed and vapourized states for a given condensing/vapourizing chemical (metallic in our case) component are: 𝑚𝑘𝑙 =|𝛶|(𝑝𝑠𝑎𝑡 −𝑝)(2) where 𝑝𝑠𝑎𝑡 is the saturation pressure, the pressure at which a vapour component is in thermodynamic equilibrium with its condensed state. 𝑝𝑠𝑎𝑡 is calculated according to the Clausius–Clapeyron law. At pressures greater than saturation pressure, vapour will condense, while at lower pressures it will evaporate or sublimate. 𝑝𝑠𝑎𝑡 =𝑝𝑟𝑒𝑓 𝑒 𝑀 𝐿𝑣𝑎𝑝 𝑇𝑣𝑎𝑝 𝑅(1− 𝑇𝑣𝑎𝑝 𝑇)(3) where 𝑇𝑣𝑎𝑝, 𝐿𝑣𝑎𝑝, 𝑀 are the chemical components vapourization temperature, heat of vapourization and molar mass respectively. 𝑝𝑟𝑒𝑓 and 𝑅 are the reference pressure and universal gas constant. The constant 𝛶 is obtained from the Hertz–Knudsen model, related to the theoretical maximum instantaneous evaporation rate (or condensation rate, depending on the sign of the pressure difference). 𝛶=⎧ ⎪ ⎨ ⎪ ⎩ 𝜀𝑒 𝜉√𝑀 2𝜋𝑅𝑇 ∀𝑝sat > 𝑝, −𝜀𝑐 𝜉√𝑀 2𝜋𝑅𝑇 ∀𝑝sat < 𝑝, (4) where 𝜉 is the liquid–vapour interface thickness. Numerical diffusion at the interface, is counteracted through application of an interface compression term between the gaseous/vapour and condensed phases in a pair-wise fashion in an approach adapted and generalized from the standard 2-phase volume of fluid approach [16,17]. Naturally, interface compression should be applied between the gas/vapour and condensed components and diffusion be applied between condensedcondensed phase pairs and vapour/gaseous-vapour/gaseous pairs. The implementation of the diffusion model has been validated against analytical solutions for binary diffusion. Finally, the conservation of energy is written as 𝜕(𝜌𝐸) 𝜕𝑡 +∇·(𝜌𝑼𝐸)+∇·(𝑝𝑼)−∇·(𝜅∇𝑇)=𝑞𝑙𝑎𝑠𝑒𝑟 +𝑞𝑓 𝑢𝑠 +𝑞𝑣𝑎𝑝 (5) where 𝐸 is the total energy including the kinetic energy contribution, given as: 𝐸=𝑒(𝑇) + 𝑼2 2 with the specific internal energy generally given as 𝑒(𝑇) = 𝐶𝑣𝑇 where 𝑇 is the absolute temperature and 𝐶𝑣 is the heat capacity at constant volume (however any available OpenFoam thermodynamic model can be used). 𝜅 is the thermal conductivity coefficient of the material. 𝑞𝑙𝑎𝑠𝑒𝑟, 𝑞𝑓𝑢𝑠 and 𝑞𝑣𝑎𝑝 are the energy deposited by the laser, and the latent heat contributions due to the fusion and vapourization state transitions respectively. Fig. 1 shows the SoftwareX 32 (2025) 102419 2
T. Flint et al. Fig. 1. Simulated initiation of a thermo-capillary generated through laser-irradiation of a multi-component (Fe–Ni–Mn) substrate using the compressibleLaserbeamFoam solver. The vapour plume composition is shown for an arbitrary time-step. compressibleLaserbeamFoam solver applied to a multi-component metallic substrate. In this example the substrate is initial comprised of a homogenous mixture of Fe, Ni and Mn, with volume fractions of 0.5, 0.4 and 0.1 respectively. This substrate is subjected to a simulated laser irradiation of 1000 W, with a laser radius of 40 μm. In this example problem, meant to display the applicability of the new solver, the laser traverses across the substrate at a speed of 0.5 ms−1. Fig. 1 shows the compressibleLaserbeamFoam solver applied to a multi-component substrate. It can be seen in the figure that the vapour plume is ejected from the keyhole and undergoes significant volumetric expansion due to the significantly lower density of the vapour state. Additionally the vapour component volume fractions are plotted in the figure, showing that the solver resolves this complex physics. Interestingly the component fractions of the vapour is not equal to the condensed state volume fractions; reflecting the complex governing physics during vapourization and differences in saturation pressures of the constituent components within the substrates. 1.2. Powder bed generation via Discrete Element Method (DEM) The support for initializing powder beds using particle data, generated using the discrete element method through the LIGGGHTS open source software LIGGGHTS [12], is facilitated using a new dedicated utility setSolidFraction. This utility converts particle position data into a volume fraction field in the OpenFoam mesh, enabling the incorporation of DEM-resolved powder beds into simulations using any of the included solvers. The setSolidFraction utility allows users to map and initialize spatially heterogeneous powder beds from the output of the DEM simulation to the initial OpenFOAM field. This capability enhances the physical fidelity of simulations involving laser powder bed fusion and other powder-based additive manufacturing processes, particularly where initial powder morphology influences melt behaviour and defect formation. Additionally, the output from an OpenFOAM LPBF simulation can also be used iteratively with the DEM software in order to obtain multi-layer simulations of the laser powder bed fusion process using the laserbeamFoam solver. Fig. 2 shows the illustration of a typical workflow of the Laser Powder Bed Fusion (L-PBF) simulation using laserbeamFoam. Firstly, a Discrete Element Method (DEM) simulation can be conducted using the LIGGGHTS software by utilizing the input file that can be found in one of the tutorial cases or which can be generated using the mentioned LPBF Workbench app for an arbitrarily sized domain. After that, the setSolidFraction utility, which utilizes the coordinates and the radius of the particles found in the location file, can be used in order to modify the initial alpha.metal field. Once the alpha.metal field is initialized correctly, the L-PBF simulation using laserbeamFoam can be set up and conducted by modifying the timeVsLaserPosition and timeVsLaserPower input files based on the wanted processing parameters. These files can also be generated using the LPBF Workbench app or found in the solver tutorials. Fig. 3(a) shows the utilization of laserbeamFoam for simulating the L-PBF process while Fig. 3(b) shows the melted track as the output of the simulation rendered using Blender 4.1. 1.3. Interface treatment using MULES and isoAdvector Versions 1.0 and 2.0 of the project exclusively used the MULES (Multidimensional Universal Limiter with Explicit Solution) algorithm for dealing with the interface advection within the Volume of Fluid approach. As shown in [2], the Iso-Advector approach can have advantages in some cases over MULES due to its sharper interface tracking and reduced numerical diffusion. Fig. 4 shows the comparison in the topology between the two approaches in an example case simulated using laserbeamFoam. In this update to the codebase there is now the option to use either the MULES approach or the Iso-advector SoftwareX 32 (2025) 102419 3
T. Flint et al. Fig. 2. A powder bed on top of a solid substrate, generated using LIGGGHTS, and fed into the laserbeamFoam eco-system using the setSolidFraction utility. Fig. 3. Simulation and subsequent rendering of a laserbeamFoam simulation of an arbitrary L-PBF process. SoftwareX 32 (2025) 102419 4
T. Flint et al. Fig. 4. Comparison of simulation results of a L-PBF process using isoAdvector and MULES interface treatments. Three time-steps are shows; in the lower sub-figures the MULES iso-surface is shown in red and the isoAdvector iso-surface in white. approach within the laserbeamFoam solver. This is achieved through a switch in constant/transportProperties called interfaceTrackingScheme that the user can use to specify the interface tracking approach. The compressibleLaserbeamFoam solver exclusively uses MULES. As previously mentioned, for posterity, the isoAdvector only solver laserMeltFoam is also included in this release [2]. Fig. 4 shows a comparison between the results obtained from a simulation using isoAdvector and MULES respectively. As can be seen from Fig. 4, both schemes produce similar results. However, due to the very complex nature of the Laser Powder Bed Fusion and Laser Welding processes, where the surface tension effects play a big role in the shape and the evolution of the melt track, the chosen numerical scheme can result in subtle differences in simulated material topology. It is an area of investigation as-to which scheme is better suited to certain scenarios. This addition makes the solvers more flexible and allows the user to choose the approach that better suits the simulation type and conditions of their case. CRediT authorship contribution statement Tom Flint: Writing – review & editing, Writing – original draft, Visualization, Validation, Supervision, Software, Resources, Project administration, Methodology, Investigation, Funding acquisition, Formal analysis, Data curation, Conceptualization. Petar Ćosić: Writing – review & editing, Writing – original draft, Visualization, Validation, Software, Methodology, Formal analysis. Gowthaman Parivendhan: Software. Simon A. Rodriguez: Writing – review & editing, Software. Ivan Bunaziv: Writing – review & editing, Visualization, Validation. Patrick O’Toole: Writing – review & editing, Visualization, Validation. Philip Cardiff: Writing – review & editing, Writing – original draft, Visualization, Validation, Supervision, Software, Resources, Project administration, Methodology, Investigation, Funding acquisition, Formal analysis, Data curation, Conceptualization. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgements T. Flint gratefully acknowledges the EPSRC, United Kingdom for financial support through the SINDRI: Synergistic utilization of INformatics and Data centRic Integrity engineering project (EP/V038079/1). The authors would like to acknowledge the assistance given by IT Services and the use of the Computational Shared Facility at The University of Manchester. P. Cardiff, P. Cosic, G. Parivendhan, and S. Rodriguez gratefully acknowledge financial support from I-Form, funded by Research Ireland (formerly Science Foundation Ireland), SoftwareX 32 (2025) 102419 5
T. Flint et al. Grant Numbers 16/RC/3872 and 21/RC/10295 P2, co-funded under European Regional Development Fund and by I-Form industry partners. P. Cardiff also acknowledges funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant Agreement No. 101088740). I. Bunaziv gratefully acknowledge the SFI PhysMet (Centre for Research-based Innovation, 309584) project financed by the Research Council of Norway and the partners. P O’Toole gratefully acknowledges funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 398552773. References [1] Flint TF, Robson JD, Parivendhan G, Cardiff P. laserbeamFoam: Laser raytracing and thermally induced state transition simulation toolkit. SoftwareX 2023;21:101299. [2] Parivendhan G, Cardiff P, Flint T, Tuković v, Obeidi M, Brabazon D, Ivanković A. A numerical study of processing parameters and their effect on the melt-track profile in laser powder bed fusion processes. Addit Manuf 2023;67:103482. [3] Flint TF, Robson JD, Esmati P, Grilli N, Parivendhan G, Cardiff P. Version 2.0—LaserbeamFoam: Laser ray-tracing and thermally induced state transition simulation toolkit. SoftwareX 2024;25:101612. [4] Flint TF, Scotti L, Basoalto HC, Smith MC. A thermal fluid dynamics framework applied to multi-component substrates experiencing fusion and vaporisation state transitions. Commun Phys 2020;3(1):196. [5] Flint T, Anderson M, Roy M, Francis J, Smith M. A fundamental analysis of factors affecting chemical homogeneity in the laser powder bed fusion process. Int J Heat Mass Transfer 2022;194:122985. [6] Flint T, Dutilleul T, Kyffin W. A fundamental investigation into the role of beam focal point, and beam divergence, on thermo-capillary stability and evolution in electron beam welding applications. Int J Heat Mass Transfer 2023;212:124262. [7] Zenz C, Buttazzoni M, Florian T, Crespo Armijos KE, Gómez Vázquez R, Liedl G, Otto A. A compressible multiphase mass-of-fluid model for the simulation of laser-based manufacturing processes. Comput & Fluids 2024;268:106109. http: //dx.doi.org/10.1016/j.compfluid.2023.106109, URL https://www.sciencedirect. com/science/article/pii/S0045793023003341. [8] Florian T, Schricker K, Zenz C, Otto A, Schmidt L, Diegel C, Friedmann H, Seibold M, Hellwig P, Fröhlich F, Nagel F, Kallage P, Buttazzoni M, Rack A, Requardt H, Chen Y, Bergmann J. Combining in situ synchrotron X-ray imaging and multiphysics simulation to reveal pore formation dynamics in laser welding of copper. Int J Mach Tools Manuf 2025;204:104224. http://dx.doi.org/10.1016/ j.ijmachtools.2024.104224, URL https://www.sciencedirect.com/science/article/ pii/S089069552400110X. [9] Florian T, Buttazzoni M, Zenz C, Otto A. Ultra-short pulse laser ablation of metals: A comprehensive 3D simulation perspective enlightening novel process insights. Procedia CIRP 2024;124:602–7. http://dx.doi.org/10.1016/j.procir. 2024.08.183, 13th CIRP Conference on Photonic Technologies [LANE 2024], 15-19 September 2024, Fürth, Germany, URL https://www.sciencedirect.com/ science/article/pii/S2212827124005377. [10] Roenby J, Bredmose H, Jasak H. IsoAdvector: Geometric VOF on general meshes. In: Nóbrega JM, Jasak H, editors. OpenFOAM® : selected papers of the 11th workshop. Cham: Springer International Publishing; 2019, p. 281–96. http://dx.doi.org/10.1007/978-3-319-60846-4_21. [11] Roenby J, Bredmose H, Jasak H. A computational method for sharp interface advection. R Soc Open Sci 2016;3(11):160405. [12] Kloss C, Goniva C, Hager A, Amberger S, Pirker S. Models, algorithms and validation for opensource DEM and CFD–DEM. Prog Comput Fluid Dyn Int J 2012;12(2–3):140–52. http://dx.doi.org/10.1504/PCFD.2012.047457. [13] Jiao Y, Schmidt SJ, Adams NA. An all-mach consistent numerical scheme for simulation of compressible multi-component fluids including surface tension, cavitation, turbulence modeling and interface sharpening on compact stencils. Comput & Fluids 2024;274:106186. http://dx.doi.org/10.1016/j.compfluid.2024.106186, URL https://www.sciencedirect.com/science/article/pii/S0045793024000185. [14] McGinn P, Tretola G, Vogiatzaki K. Unified modeling of cavitating sprays using a three-component volume of fluid method accounting for phase change and phase miscibility. Phys Fluids 2022;34(8):082108. http://dx.doi.org/10. 1063/5.0094196, arXiv:https://pubs.aip.org/aip/pof/article-pdf/doi/10.1063/5. 0094196/16570355/082108_1_online.pdf. [15] Poblador-Ibanez J, Sirignano WA. A volume-of-fluid method for variable-density, two-phase flows at supercritical pressure. Phys Fluids 2022;34(5):053321. http: //dx.doi.org/10.1063/5.0086153, arXiv:https://pubs.aip.org/aip/pof/article-pdf/ doi/10.1063/5.0086153/19818106/053321_1_online.pdf. [16] Rusche H. Computational fluid dynamics of dispersed two-phase flows at high phase fractions. 2003, URL http://hdl.handle.net/10044/1/8110. [17] Weller HG. A new approach to VOF-based interface capturing methods for incompressible and compressible flow. Report TR/HGW 4, OpenCFD Ltd.; 2008, p. 35. SoftwareX 32 (2025) 102419 6