time-stepping

Plan adaptive time-step policies with CFL limits and ramp schedules.

61|4|Updated Dec 24, 2025
One-click install
npx skills add https://github.com/HeshamFS/materials-simulation-skills --skill time-stepping
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: time-stepping
Source: https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/core-numerical/time-stepping
Command: npx skills add https://github.com/HeshamFS/materials-simulation-skills --skill time-stepping

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

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.

Core Features & Use Cases

  • Adaptive stepping policies: combine stability limits with targets and safety margins.
  • Ramping startup: implement linear, geometric, or adaptive ramping of initial transients.
  • Output & checkpoint cadence: schedule regular outputs and restarts to minimize lost work.
  • Restart planning: precompute restart readiness for long runs.

Quick Start

Run a ramped plan from 1e-4 to 1e-4 target with dt_limit 2e-4 and 10 ramp steps: python3 scripts/timestep_planner.py --dt-target 1e-4 --dt-limit 2e-4 --safety 0.8 --ramp-steps 10 --json

Frequently Asked Questions about time-stepping

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I plan adaptive time steps for stable simulations?

Adaptive time-stepping combines CFL/physics stability limits with target step sizes and safety margins to automatically adjust dt during runs. This prevents instability from exceeding stability thresholds while respecting computational targets, producing recommended dt values that balance accuracy and performance.

What's the best way to handle startup transients in time-stepping?

Ramping startup implements linear, geometric, or adaptive growth of initial time steps to smoothly transition from small dt to target dt, reducing shock and numerical noise at simulation onset. This avoids abrupt jumps that destabilize early iterations while maintaining physical accuracy.

How do I schedule checkpoints and outputs for long simulation runs?

Output and checkpoint cadence scheduling precomputes restart readiness by aligning output intervals and checkpoint costs with total run time, minimizing lost work during interruptions. This ensures frequent saves at predictable intervals without excessive I/O overhead.

Can I use time-stepping planning without external dependencies?

Yes, this Skill requires only Python 3.8+ with stdlib—no external packages needed. It accepts stability limits, target dt, run time, and output intervals as plain inputs and produces dt recommendations and ramp schedules as JSON output.

When should I apply CFL constraints to adaptive time-stepping?

CFL constraints apply when coupling explicit methods or convection-dominated physics that require dt ≤ CFL·Δx/velocity. Adaptive stepping enforces these limits dynamically while respecting safety margins, preventing instability from grid-dependent violations.