When a femtosecond laser pulse slams into a metal surface, it does something almost violently counterintuitive: it heats the electrons to temperatures hotter than the surface of the Sun while leaving the crystal lattice beneath them virtually cold. For a few trillionths of a second, a single piece of metal contains two wildly different temperatures at once, and the entire physics of ultrafast laser machining, micromachining and surface structuring flows from how that impossible state relaxes. A new open-source simulation tool called TTMFoam, described in the journal SoftwareX by K. Ivan Kpelly and Yabo Jia, now makes this two-temperature world accessible to any researcher with a laptop, replacing decades of in-house, one-dimensional codes with a modular, quantum-accurate solver built on the widely used OpenFOAM platform.
The two-temperature model at the heart of the code traces back to work by Anisimov and colleagues in the 1970s, building on relaxation analysis by Kaganov and Lifshitz two decades earlier. The idea is elegant: because the laser pulse is far shorter than the time electrons need to hand their energy to vibrating atoms, the metal must be described by two coupled temperatures, one for the electron gas and one for the lattice. Energy is absorbed almost entirely by the electrons, which thermalize among themselves nearly instantaneously, and then trickle that energy into the lattice through electron-phonon coupling over picoseconds. At sufficient fluence, the lattice superheats past the phase-explosion threshold and material erupts away, leaving behind the craters that femtosecond lasers are famous for carving with nanometre precision.
What has limited predictive modelling until now is not the equations but the material properties plugged into them. Most existing codes assume constants, or use the low-temperature Sommerfeld approximation in which the electron heat capacity grows linearly with temperature. That approximation is convenient near ambient conditions but becomes badly wrong, and eventually divergent, at the hundreds of thousands of kelvin reached during ablation. TTMFoam instead integrates the full Fermi-Dirac distribution directly over a free-electron density of states, precomputing tables of the electron heat capacity, chemical potential and electron-phonon coupling factor at startup. The heat capacity correctly saturates toward the classical limit rather than growing without bound, removing a known source of error at ablation fluences.
The optical side receives the same treatment. Rather than fixing the reflectivity and absorption depth, the solver evaluates a Drude-type dielectric function whose damping rate depends on both electron and lattice temperatures, yielding a reflectivity and penetration depth that evolve dynamically throughout the pulse. The reflectivity of aluminium falls from its ambient value of 0.91 during the pulse and recovers as the electron gas cools, meaning the absorbed fraction of the laser energy is itself a moving target rather than a fitted constant. The effective penetration depth combines the optical absorption length with a ballistic term set by the electron relaxation time, and it varies by more than an order of magnitude during a single pulse, which is why the code evaluates it cell by cell rather than globally.
Architecturally, the code follows the modular workflow of an OpenFOAM application, with self-contained header modules handling material properties, optical response, laser source assembly and verification. A user can swap out the coupling model or the optical description by editing a single header without touching the solver loop. The laser source itself is a Gaussian Beer-Lambert deposition with exact cell-averaged absorption, marched down each column from the irradiated surface on a two-dimensional axisymmetric mesh. At each time step, the coupled electron and lattice energy equations are solved by a Picard fixed-point iteration in which the temperature-dependent properties are updated until convergence, typically in two to three outer iterations per step.
Verification and validation are built in rather than bolted on. A runtime switch activates the Method of Manufactured Solutions, feeding a smooth analytical solution through the equations and monitoring the error, which confirmed first-order temporal and second-order spatial convergence consistent with the discretization schemes. The solver was then validated against published experimental crater measurements for aluminium irradiated at 1032 nanometres with 280-femtosecond pulses, spanning fluences from 1 to 9 joules per square centimetre. Above 1 joule per square centimetre, computed crater depths match the measurements to within 8.3 percent and diameters to within 3.4 percent, with peak electron temperatures reaching 213,585 kelvin and lattice temperatures 92,651 kelvin at the highest fluence.
Notably, the validation was achieved without the empirical, fluence-dependent absorption correction that the reference experiments had required, relying instead on a published electron-electron scattering coefficient and a Drude optical model anchored to the measured room-temperature reflectivity. The transient picture the solver paints is striking: the electron temperature peaks near 0.8 picoseconds, between roughly 71,000 and 210,000 kelvin depending on fluence, then decays as the lattice temperature climbs on a several-picosecond timescale, retaining the deposited energy thanks to its much larger heat capacity. Equilibration stretches from about 15 picoseconds at the lowest fluence to well beyond 20 picoseconds at the highest, which is why the simulated time is set per fluence.
The authors are unusually candid about where the physics ends. The free-electron density of states restricts quantitative use to sp-bonded metals such as aluminium; for d-band metals like gold, copper or nickel, where thermal excitation of d states dominates, the coupling behaviour can differ by an order of magnitude, and the code is explicitly not proposed for those materials in this release. The intraband Drude optical model becomes questionable once the electron temperature exceeds roughly 46,000 kelvin at 1032 nanometres, and the lattice heat capacity rests on a constant numerical continuation above 2743 kelvin. A detailed table separates measured properties from numerical guards and modelling assumptions, so a user who replaces one model knows exactly which bound has moved. Collisionless absorption channels at high fluence are likewise not modelled, and the agreement with crater data validates the coupled model rather than the optical description in isolation.
Performance figures suggest the tool is practical for real campaigns. On a modest four-core laptop processor, the reference 60,000-cell aluminium case runs in about 390 seconds for 20 picoseconds of simulated time, at a cost of 1.71 microseconds per cell per time step on four MPI ranks, with crater geometry and peak temperatures identical to all printed digits whether run on one, two or four ranks. Because the nonlinear iteration count is essentially independent of fluence, cost scales close to linearly with simulated time, making large fluence sweeps predictable to plan. The code is released under the GNU General Public License v3, with the full example case, mesh, dictionaries and run scripts available in a public repository for direct reproduction.
The broader significance may lie in what the architecture enables next. Because the property quadratures do not depend on the analytic form of the density of states, a tabulated ab initio density of states from an electronic-structure code can be dropped in to extend the solver to transition metals, with the published ab initio tables of Lin and colleagues providing a ready non-regression test. A hyperbolic two-temperature model with finite heat-flux relaxation, a Drude-Lorentz optical model and a self-consistent treatment of collisionless absorption are all identified as planned extensions that the modular structure already accommodates. For a field that has long relied on fragmented, hard-to-reproduce in-house codes, TTMFoam offers something rarer than accuracy: a shared, verifiable foundation on which the ultrafast laser community can build, test and trust the next generation of physics.
Subject of Research: Two-temperature modeling of ultrashort-pulse laser ablation of metals with quantum thermophysical properties
Article Title: TTMFoam: Two-temperature modeling of ultrashort-pulse laser ablation of metals with temperature-dependent quantum thermophysical properties
Article References: Kpelly, K., & Jia, Y. (2026). TTMFoam: Two-temperature modeling of ultrashort-pulse laser ablation of metals with temperature-dependent quantum thermophysical properties. SoftwareX, 36, Article 103118. https://doi.org/10.1016/j.softx.2026.103118
Image Credits: AI Generated
DOI: 10.1016/j.softx.2026.103118
Keywords: TTMFoam, ultrashort-pulse laser, laser ablation, two-temperature model, OpenFOAM, Fermi-Dirac statistics, electron-phonon coupling, femtosecond lasers, aluminium, computational physics, open-source software, Drude model
News Source: Katie Riggs. (October 13, 2026). Open-source solver brings quantum-accurate physics to femtosecond laser ablation of metals. Scienmag.



