Repository navigation
Home
Python solvers for ultrafast pulsed-laser heating of metals, built on the two-temperature model (TTM). The package spans single-pulse electron-lattice dynamics on femtosecond timescales, heat accumulation over thousands of pulses, and moving-beam scans.
This is a port of the MATLAB Ultrafast Laser TTM Toolbox, validated solver by solver against that reference. Both implement the model published in:
Fieser, D., Dewanjee, U. N., and Hu, A. (2026). A Computationally Efficient Two-Stage Two-Temperature Model for Multi-pulse Femtosecond Laser Heat Accumulation in Tungsten. Journal of Materials Engineering and Performance. doi:10.1007/s11665-026-14738-6
| Page | What it covers |
|---|---|
| Getting Started | Install, first run, what output to expect, editing parameters |
| Solver Reference | Every solver with its config fields, defaults, units, and returned results |
| Model Background | The TTM equations, the two-stage strategy, the surface inversion, material presets |
| Command Line and MCP | The laserttm command, and driving the solvers from an AI assistant |
| Results and Outputs | The shared result contract, output files, and the outputs folder |
| Validation | How agreement with the MATLAB reference is established and measured |
| FAQ | Common questions and troubleshooting |
| Citing | How to cite the paper and the software |
-
Install:
pip install laserttm. Python 3.10 or newer. - Dependencies: NumPy, SciPy, Numba, Matplotlib. The MCP server is an optional extra.
- Solvers: 0D surface point, 1D depth-resolved, radial profile, single-pulse visualizer, inversion quantifier, scanning beam.
- Speed: the 50-pulse baseline runs in about 0.07 s once the kernels are compiled, roughly 100 times faster than the MATLAB reference on the same machine. See Validation for the full table.
- Materials: presets for tungsten, copper, gold, and aluminum, plus a custom mode for any metal.
-
Interfaces: Python API, a
laserttmcommand-line tool, and an MCP server for AI assistants. -
Self-describing: every config key and every results key, with units and array axes, comes from
laserttm describe;validateshows the fluence and pulse count a config implies before it runs. - License: MIT.
- Software archive: Zenodo concept DOI 10.5281/zenodo.22210435.
from laserttm import surface_point_solver
cfg = {
"material": "W", # tungsten preset
"Pavg": 10, # average power [W]
"spotRadius": 100e-6, # 1/e^2 spot radius [m]
"f_rep": 5e6, # repetition rate [Hz]
"tau_FWHM": 500e-15, # pulse width, FWHM [s]
}
cfg["simDuration"] = 50 / cfg["f_rep"] # 50 pulses
results = surface_point_solver(cfg)
print(results["finalResid_C"])This solves 50 pulses of coupled electron-lattice dynamics with inter-pulse thermal diffusion. The run prints a summary, writes a text report under outputs/, and returns the full surface temperature history. Continue with Getting Started.
Every solver describes itself, so config keys never have to be guessed:
from laserttm import describe_solver, validate_config
describe_solver("depth_profile") # every key with unit, default, range
validate_config("depth_profile", cfg) # check a config in millisecondsThe same information is available from the command line as laserttm describe depth_profile. See Command Line and MCP.
Ultrafast Laser TTM Toolbox (Python) · MIT License · Paper: 10.1007/s11665-026-14738-6 · Software: 10.5281/zenodo.22210435
Using the package
Understanding the model
Help
Links