time-stepping
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.
What this skill does
# 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 ``` ### 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` | | `scripts/output_schedule.py` | `output_times`, `interval`, `count` | | `scripts/checkpoint_planner.py` | `checkpoint_interval`, `checkpoints`, `overhead_fraction` | ## 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: ```bash python3 scripts/checkpoint_planner.py --run-time 36000 --checkpoint-cost 120 --max-lost-time 1800 --json ``` 2. Interpret: Checkpoint every 30 minutes, overhead ~0.7%, 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 ```bash # 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 | ## Limitations - **Not adaptive control**: Plans static schedules, not runtime adaptation - **Assumes constant physics**: If parameters change, re-plan ## References - `references/cfl_coupling.md` - Combining multiple stability limits - `references/ramping_strategies.md` - Startup policies - `references/output_checkpoint_guidelines.md` - Cadence rules ## Version History - **v1.1.0** (2024-12-24): Enhanced documentation, decision guidance, examples - **v1.0.0**: Initial release with 3 planning scripts
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.