Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

time-stepping

БесплатноЗапускает вложенные скриптыНе проверен

Plan and control time-step policies for transient simulations — couple CFL and physics-based stability limits with adaptive stepping, ramp initial transients…

HeshamFSот HeshamFS★ 95 звёзд на GitHub18 установок в других каталогах

Об этом скилле

Time Stepping

Goal

Provide a reliable workflow for choosing, ramping, and monitoring time steps plus output/checkpoint cadence.

Requirements

  • Python 3.10+
  • 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

Ramping Strategy

Problem Type Ramp Steps Initial dt
Smooth IC None needed Full dt
Sharp gradients 5-10 0.1 × dt
Phase change 10-20 0.01 × dt
Cold start 10-50 0.001 × dt

Script Outputs (JSON Fields)

Script Key Outputs
scripts/timestep_planner.py dt_limit, dt_recommended, ramp_schedule, notes
scripts/output_schedule.py output_times, interval, count
scripts/checkpoint_planner.py checkpoint_interval, checkpoints, overhead_fraction, warnings

output_schedule.py count is endpoint-inclusive: it includes both t_start and t_end, so count = number_of_intervals + 1 (e.g. t=0..5 at 0.05 spacing yields 101 frames for 100 intervals).

Workflow

  1. Get stability limits - Use numerical-stability skill
  2. Plan time stepping - Run scripts/timestep_planner.py
  3. Schedule outputs - Run scripts/output_schedule.py
  4. Plan checkpoints - Run scripts/checkpoint_planner.py
  5. Monitor during run - Adjust dt if limits change

Conversational Workflow Example

User: I'm running a 10-hour phase-field simulation. How often should I checkpoint?

Agent workflow:

  1. Plan checkpoints based on acceptable lost work:
    python3 scripts/checkpoint_planner.py --run-time 36000 --checkpoint-cost 120 --max-lost-time 1800 --json
    
  2. Interpret: Checkpoint every 30 minutes, overhead ~6.7% (Acceptable per the interpretation table), max 30 min lost work on crash.

Pre-Run Checklist

  • Confirm dt limits from stability analysis
  • Define ramping strategy for transient startup
  • Choose output interval consistent with physics time scales
  • Plan checkpoints based on restart risk
  • Re-evaluate dt after parameter changes

CLI Examples

# Plan time stepping with ramping
python3 scripts/timestep_planner.py --dt-target 1e-4 --dt-limit 2e-4 --safety 0.8 --ramp-steps 10 --json

# Schedule output times
python3 scripts/output_schedule.py --t-start 0 --t-end 10 --interval 0.1 --json

# Plan checkpoints for long run
python3 scripts/checkpoint_planner.py --run-time 36000 --checkpoint-cost 120 --max-lost-time 1800 --json

Error Handling

Error Cause Resolution
dt-target must be positive Invalid time step Use positive value
t-end must be > t-start Invalid time range Check time bounds
checkpoint-cost must be < run-time Checkpoint too expensive Reduce checkpoint size

Interpretation Guidance

dt Behavior

Observation Meaning Action
dt stable at target Good Continue
dt shrinking Stability issue Check CFL, reduce target
dt oscillating Borderline stability Add safety factor

Checkpoint Overhead

Overhead Acceptability
< 1% Excellent
1-5% Good
5-10% Acceptable
> 10% Too frequent, increase interval

Verification checklist

  • Recorded dt_recommended and dt_limit from timestep_planner.py and confirmed dt_recommended <= dt_limit with no "Recommended dt exceeds stability limit" note in the notes field.
  • Captured the actual dt_limit value from the stability analysis (numerical-stability skill: CFL/Fourier/reaction limit) that was fed to --dt-limit, rather than guessing — and re-ran the planner after any parameter change.
  • Confirmed safety <= 1.0 was applied (a margin below the limit), and logged the notes array (e.g. "Recommended dt reduced by stability limit", min/max clamps) so the binding constraint is known.
  • Recorded the output_schedule.py count and verified it is endpoint-inclusive (count = intervals + 1, both t_start and t_end present), so frame counts and post-processing indices are not off-by-one.
  • Recorded the checkpoint interval, method (daly vs cap), and overhead_fraction from checkpoint_planner.py, and confirmed overhead_fraction <= 0.10 (no warnings entry) against the ov
Полный SKILL.md на GitHub

Установить time-stepping в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Bash
Write
Grep
Glob

Вложенные файлы

CHANGELOG.mdevals/evals.jsonreferences/cfl_coupling.mdreferences/output_checkpoint_guidelines.mdreferences/ramping_strategies.mdscripts/checkpoint_planner.pyscripts/output_schedule.pyscripts/timestep_planner.py

FAQ

Что делает скилл time-stepping?

Plan and control time-step policies for transient simulations — couple CFL and physics-based stability limits with adaptive stepping, ramp initial transients through sharp gradients or phase changes, schedule output intervals and checkpoint cadence, and plan restart strategies for long-running jobs. Use when choosing dt for a new simulation, diagnosing adaptive time-step oscillations, deciding checkpoint frequency to minimize lost work, or setting up output schedules aligned with physical time scales, even if the user only says "my run is too slow" or "how often should I save."

Как установить скилл time-stepping?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл time-stepping запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить time-stepping с