Repository navigation
Solver Reference
Every solver accepts a plain config struct and returns a results struct. Omitted fields fall back to the defaults listed here. All inputs use SI units unless the name says otherwise (*_C fields are degrees Celsius, *_um micrometers).
Fields shared by all solvers:
| Field | Default | Meaning |
|---|---|---|
makePlots |
true |
draw diagnostic figures |
saveFigures |
false |
save figures to the output folder (forces makePlots = true) |
outputDir |
solver-specific folder under outputs/
|
where text reports and figures are written |
Returned fields shared by all solvers: solver, solverId, contractVersion, material, outputFile, outputDir, inputConfig, plus nPulses and wallTime_s where meaningful. See Results and Outputs.
results = Surface_Point_Solver(cfg)
0D surface-point TTM. Fastest entry point for pulse-accumulation studies and parameter sweeps. Solves the coupled electron-lattice equations at the surface during each pulse, then runs 1D Crank-Nicolson diffusion into depth for the inter-pulse gap.
| Field | Default | Unit | Meaning |
|---|---|---|---|
material |
'W' |
'W', 'Cu', 'Au', 'Al', or 'custom'
|
|
Pavg |
1 |
W | average laser power |
spotRadius |
80e-6 |
m | 1/e^2 Gaussian spot radius |
f_rep |
1e6 |
Hz | repetition rate |
tau_FWHM |
500e-15 |
s | pulse width (FWHM for Gaussian) |
pulseProfile |
'gaussian' |
'gaussian', 'square', or 'exp'
|
|
simDuration |
100e-6 |
s | total simulated time; pulse count is simDuration * f_rep
|
absorbance |
0.55 |
surface absorbance A, 0 to 1 | |
Leff |
100e-9 |
m | effective heated thickness for the 0D energy balance |
T0_C |
25 |
degC | initial temperature |
depthProfile |
'exponential' |
initial depth profile handed to inter-pulse diffusion, 'box' or 'exponential'
|
|
dzTarget |
500e-9 |
m | diffusion grid spacing |
Ndiff |
100 |
Crank-Nicolson steps per inter-pulse period | |
gamma_manual, Cl_manual, G_manual, kl_manual
|
see file | material properties used when material = 'custom'
|
Key returned fields beyond the shared contract: full surface histories time_s, Te_K, Tl_K, Te_C, Tl_C; per-pulse arrays TeqVals_C and TresidVals_C; peakTe_C, peakTl_C, finalResid_C, projectedSteadyState_C; energy bookkeeping absorbedAreal_J_m2, depthEnergy_J_m2, energyMismatch_pct.
results = Depth_Profile_Solver(cfg)
The main 1D depth-resolved multi-pulse solver. Solves the coupled electron-lattice PDEs along depth with ode15s during each pulse (Phase 1), then maps the end state to a coarser, deeper grid and diffuses it with Crank-Nicolson for the inter-pulse gap (Phase 2). This is the solver that resolves the surface temperature inversion.
| Field | Default | Unit | Meaning |
|---|---|---|---|
material |
'W' |
'W', 'Cu', 'Al', or 'custom'
|
|
Pavg |
40 |
W | average laser power |
spotRadius |
100e-6 |
m | 1/e^2 spot radius |
f_rep |
18e6 |
Hz | repetition rate |
tau_FWHM |
100e-15 |
s | pulse width (FWHM) |
pulseProfile |
'gaussian' |
'gaussian', 'square', or 'exp'
|
|
simDuration |
100e-6 |
s | total simulated time; pulse count is simDuration * f_rep
|
absorbance |
0.55 |
surface absorbance | |
T0_C |
25 |
degC | initial temperature |
Lz |
1000e-9 |
m | Phase 1 simulation depth |
Nz |
200 |
Phase 1 spatial nodes; keep dz at or below a quarter of the optical skin depth |
|
snapshotDelays |
0 to 200 ps set | s | delays for spatial profile snapshots, relative to the first pulse center |
enableRadialProfile |
true |
derive radial surface profiles from the depth solution | |
Nr_radial |
20 |
radial points when enableRadialProfile is on |
|
rMax_factor |
3 |
radial extent as a multiple of spotRadius
|
|
dzTarget_diff |
500e-9 |
m | Phase 2 coarse-grid spacing |
Ndiff |
100 |
Phase 2 Crank-Nicolson steps per inter-pulse period | |
relTol, absTol
|
1e-6, 0.1
|
ode15s tolerances (absTol in kelvin) |
|
gamma_manual, Cl_manual, G_manual, ke0_manual, kl_manual, alpha_opt_manual
|
see file | properties for material = 'custom'
|
Key returned fields: per-pulse arrays TePeakPerPulse_C, TlPeakPerPulse_C, TeqVals_C, TresidVals_C, baseTempPerPulse_C; inversion metrics invMaxPerPulse_K, tMaxInvPerPulse_s, tInvOnsetPerPulse_s, invDurationPerPulse_s, Te_atMaxInvPerPulse_C, Tl_atMaxInvPerPulse_C; the resolved input set (f_rep, Pavg, tau_FWHM, spotRadius, absorbance, F_peak, gamma, Cl, G, ke0, kl, alpha_opt).
results = Radial_Profile_Solver(cfg)
Radial surface-temperature solver under a Gaussian beam. Two modes:
-
'scale'(default, fastest): one 0D solve at beam center, scaled radially by the Gaussian fluence profile. Valid when the spot radius is much larger than the lateral diffusion length. -
'independent': a separate 0D solve at each radial node. RoughlyNrtimes slower, but captures the nonlinear electron heat capacity response at different local fluences.
| Field | Default | Unit | Meaning |
|---|---|---|---|
material |
'W' |
'W', 'Cu', 'Al', or 'custom'
|
|
Pavg |
40 |
W | average laser power |
spotRadius |
100e-6 |
m | 1/e^2 spot radius |
f_rep |
18e6 |
Hz | repetition rate |
tau_FWHM |
100e-15 |
s | pulse width (FWHM) |
pulseProfile |
'gaussian' |
temporal profile | |
simDuration |
1e-3 |
s | total simulated time |
absorbance |
0.55 |
surface absorbance | |
Leff |
100e-9 |
m | effective heated thickness |
T0_C |
25 |
degC | initial temperature |
Nr |
80 |
radial nodes from the beam axis to rMax
|
|
rMax_factor |
5 |
radial extent as a multiple of spotRadius
|
|
radialSolveMode |
'scale' |
'scale' or 'independent'
|
|
earlyStopMeltRadius_um |
0 |
um | if positive, stop when the predicted melt radius reaches this value |
earlyStopT_melt_C |
3422 |
degC | melt temperature used by the early-stop check |
earlyStopCheckInterval |
100 |
pulses between early-stop checks | |
depthProfile, dzTarget, Ndiff
|
as 0D solver | inter-pulse diffusion settings |
Key returned fields: rGrid_um, finalRadialProfile_C, spotRadius_um, peakTeq_C, finalResid_C, mode.
results = Single_Pulse_Visualizer(cfg)
One pulse of the 1D depth-resolved TTM with spatial snapshots at chosen delays. Useful for inspecting early-time behavior and generating teaching figures. Accepts the same material and laser fields as Depth_Profile_Solver (defaults differ: Pavg = 1 W, spotRadius = 80e-6 m, f_rep = 1e6 Hz, tau_FWHM = 100e-15 s), plus:
| Field | Default | Unit | Meaning |
|---|---|---|---|
Lz |
1000e-9 |
m | simulation depth |
Nz |
200 |
spatial nodes | |
snapshotDelays |
[0, 0.5, 1, 2, 5, 10, 50, 200] ps |
s | delays for Te(z) and Tl(z) profile snapshots |
relTol, absTol
|
1e-6, 0.1
|
ode15s tolerances |
Key returned fields: peakTe_C, peakTl_C, finalTe_C, finalTl_C, invDetected, maxInv_C.
results = Inversion_Quantifier(cfg)
Post-processing layer over Depth_Profile_Solver that quantifies the electron-lattice temperature inversion across pulses: magnitude, onset time, duration, and trends against the accumulating base temperature.
Accepts the same fields as Depth_Profile_Solver, plus:
| Field | Default | Meaning |
|---|---|---|
depthResults |
none | pre-computed Depth_Profile_Solver results struct; when supplied, the depth solve is skipped |
Key returned fields: nInvPulses, meanInv_K, maxInv_K, minInv_K, stdInv_K, invSlope_KperPulse, corrBaseTempInv, meanInvFraction, and the per-pulse arrays invMaxPerPulse_K, TePeak_C, TlPeak_C, Tbase_C.
results = Scanning_Beam_Solver(params, outputDir, savePlots)
Moving-beam surface model. Combines scanning kinematics (spot velocity, repetition rate) with per-pulse heating and inter-pulse surface diffusion to build the 2D temperature footprint of a scanned line. Note the interface: a params struct plus two optional positional arguments instead of a single cfg.
| Field | Default in example | Unit | Meaning |
|---|---|---|---|
material |
'W' |
preset or 'custom' (with gamma, Cl, G, kl fields) |
|
Pavg |
40 |
W | average laser power |
spotRadius |
100e-6 |
m | 1/e^2 spot radius |
f_rep |
18e6 |
Hz | repetition rate |
tau_FWHM |
100e-15 |
s | pulse width |
pulseProfile |
'gaussian' |
temporal profile | |
v_scan |
1.0 |
m/s | scan speed |
scanLength |
2e-3 |
m | scanned line length; pulse count is scanLength * f_rep / v_scan
|
absorbance |
0.55 |
surface absorbance | |
Leff |
100e-9 |
m | effective heated thickness |
T0_C |
25 |
degC | initial temperature |
Nx, Ny
|
120, 60
|
surface grid resolution | |
xPad |
3 |
x-extent padding in spot radii beyond the scan line | |
yExtent |
5 |
y-extent in spot radii | |
depthProfile, dzTarget, Ndiff, NadiPerGap
|
'exponential', 500e-9, 100, 10
|
depth and diffusion controls |
Key returned fields: Tpeak_map (peak temperature at each surface point), Tsurf (final surface field), peakT_history, xGrid, yGrid, pulseSpacing, dTeq_single, and a saved .mat snapshot path in matPath.
The baseline example (2 mm at 1 m/s and 18 MHz) simulates 36,000 pulses and takes several minutes.
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