Repository navigation
Getting Started
- A recent MATLAB release. The solvers use only base MATLAB (
ode15s, standard array operations,interp1,trapz). No additional toolboxes are needed. - Any operating system MATLAB supports. All paths in the repository are relative, so no configuration is required.
git clone https://github.com/dfieser/ultrafast-laser-ttm-toolbox.gitOpen MATLAB with the repository root as the working directory and add the solver folder to the path:
addpath(genpath('src'))Run the simplest baseline example:
run('examples/Example_Surface_Point_Baseline.m')The script builds a config struct for tungsten (10 W average power, 5 MHz repetition rate, 500 fs pulses, 100 um spot) and calls Surface_Point_Solver. You should see per-pulse progress lines like:
Pulse 1/50: Te_peak=2650.7 K, Teq=567.5 K, Tresid=308.6 K (504 fine + 50 diff steps)
...
Pulse 50/50: Te_peak=2696.5 K, Teq=696.3 K, Tresid=430.2 K (503 fine + 50 diff steps)
Simulation wall time: 0.41 s
followed by a summary block with peak temperatures, the projected steady state, and the path of the text report written under outputs/Example_Surface_Point/. The run also opens diagnostic plots and returns a results struct in the workspace.
Each progress line reports three temperatures per pulse:
-
Te_peak: peak electron temperature during the pulse -
Teq: the equilibrated temperature after the electron and lattice baths couple -
Tresid: the residual surface temperature after inter-pulse thermal diffusion, which becomes the starting temperature of the next pulse
The gap between Tresid and the initial temperature is the heat accumulation the toolbox is built to study.
-
examples/Example_Surface_Point_Baseline.m: the fastest 0D pulse-accumulation case. -
examples/Example_Depth_Profile_Baseline.m: the main 1D depth-resolved solver. Resolves electron and lattice temperatures through depth and captures the surface temperature inversion (see Model Background). -
examples/Example_Radial_Profile_Baseline.m: radial temperature distribution under a Gaussian spot. -
examples/Example_Scanning_Beam_Baseline.m: a moving-beam scan. Note this case simulates 36,000 pulses and takes several minutes. -
scripts/batch/runners for parameter sweeps, once single cases behave as expected. See Batch Workflows.
Each example builds a plain struct and passes it to a solver:
cfg = struct();
cfg.material = 'W';
cfg.Pavg = 10;
cfg.spotRadius = 100e-6;
cfg.f_rep = 5e6;
cfg.tau_FWHM = 500e-15;
cfg.simDuration = 50 / cfg.f_rep;
results = Surface_Point_Solver(cfg);Rules of thumb:
- All inputs use SI units (meters, seconds, watts, hertz). Initial temperature
T0_Cis in degrees Celsius. - Any field you omit falls back to the default documented in the solver's input section. See Solver Reference for every field.
- The pulse count is
simDuration * f_rep. To simulate N pulses, setcfg.simDuration = N / cfg.f_rep. - Set
cfg.makePlots = falsefor scripted runs, andcfg.saveFigures = trueto write figures to the output folder.
Run the smoke test to exercise all supported solver surfaces with small cases:
run('scripts/Verify_Public_Repo_Smoke.m')The test asserts the shared result contract on each solver and confirms output files land under outputs/Smoke_Test/.
- Field-by-field solver documentation: Solver Reference
- The physics and the two-stage numerical strategy: Model Background
- Interpreting the returned structs and text reports: Results and Outputs
Ultrafast Laser TTM Toolbox · MIT License · Paper: 10.1007/s11665-026-14738-6 · Software: 10.5281/zenodo.20389305
Using the toolbox
Understanding the model
Help
Links