Plan and control time-step policies for simulations. Use when coupling CFL/physics limits with adaptive stepping, ramping initial transients, or scheduling outputs/checkpoints for long runs.
This Claude skill provides a comprehensive framework for planning and controlling time-step policies in numerical simulations. It automates the calculation of stability limits (such as CFL or Fourier conditions), manages initial transient ramping to prevent numerical divergence, and optimizes checkpoint and output schedules to balance data safety with computational overhead during long-duration runs.
Use Cases
Computational Fluid Dynamics (CFD): Calculating optimal time steps and safety factors based on CFL limits to ensure simulation stability and convergence.
Transient Analysis: Implementing ramping strategies for simulations with sharp gradients or 'cold starts' to gradually reach target time steps without crashing the solver.
High-Performance Computing (HPC) Management: Planning checkpoint intervals for multi-day simulations to minimize potential lost work while keeping storage overhead within acceptable limits (e.g., <1%).
Scientific Data Logging: Scheduling output cadences to capture critical physics time scales while managing disk space and I/O frequency.
Restart Strategy Planning: Determining the most efficient frequency for writing restart files based on the cost of the checkpoint versus the risk of simulation failure.
name
time-stepping
description
Plan and control time-step policies for simulations. Use when coupling CFL/physics limits with adaptive stepping, ramping initial transients, scheduling outputs/checkpoints, or planning restart strategies for long runs.
allowed-tools
Read, Bash, Write, Grep, Glob
Time Stepping
Goal
Provide a reliable workflow for choosing, ramping, and monitoring time steps plus output/checkpoint cadence.
Requirements
Python 3.8+
No external dependencies (uses stdlib)
Inputs to Gather
Input
Description
Example
Stability limits
CFL/Fourier/reaction limits
dt_max = 1e-4
Target dt
Desired time step
1e-5
Total run time
Simulation duration
10 s
Output interval
Time between outputs
0.1 s
Checkpoint cost
Time to write checkpoint
120 s
Decision Guidance
Time Step Selection
Is stability limit known?
├── YES → Use min(dt_target, dt_limit × safety)
└── NO → Start conservative, increase adaptively
Need ramping for startup?
├── YES → Start at dt_init, ramp to dt_target over N steps
└── NO → Use dt_target from start