Time Steppingのロゴ

Time Stepping

コミュニティ
HeshamFS
time-stepping

非定常シミュレーションの時間刻み方針を計画・管理します。CFL条件と物理に基づく安定限界を適応刻みと組み合わせ、急峻な勾配や相変化を伴う初期過渡状態では刻み幅を段階的に調整します。出力間隔とチェックポイントの頻度を設定し、長時間実行ジョブの再開戦略を計画します。新しいシミュレーションのdtを決める場合、適応時間刻みの振動を診断する場合、作業の損失を最小限に抑えるチェックポイント頻度を決める場合、物理的な時間スケールに合わせて出力スケジュールを設定する場合に使用します。「実行が遅すぎます」「どのくらいの頻度で保存すればよいですか」とだけ尋ねられた場合にも対応します。

Add to TypingMind

概要

公開者HeshamFS
リポジトリmaterials-simulation-skills
スキル名time-stepping
スター
83
フォーク
6
同梱ファイル
8
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 8個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    HeshamFSがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Time Stepping」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/core-numerical/time-stepping
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HeshamFS/materials-simulation-skills.git /tmp/materials-simulation-skills
mkdir -p .claude/skills
cp -r /tmp/materials-simulation-skills/skills/core-numerical/time-stepping .claude/skills/time-stepping
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTime Steppingを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTime Steppingを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Time Steppingは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

InputDescriptionExample
Stability limitsCFL/Fourier/reaction limitsdt_max = 1e-4
Target dtDesired time step1e-5
Total run timeSimulation duration10 s
Output intervalTime between outputs0.1 s
Checkpoint costTime to write checkpoint120 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 TypeRamp StepsInitial dt
Smooth ICNone neededFull dt
Sharp gradients5-100.1 × dt
Phase change10-200.01 × dt
Cold start10-500.001 × dt

Script Outputs (JSON Fields)

ScriptKey Outputs
scripts/timestep_planner.pydt_limit, dt_recommended, ramp_schedule, notes
scripts/output_schedule.pyoutput_times, interval, count
scripts/checkpoint_planner.pycheckpoint_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:
    bash
    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

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

ErrorCauseResolution
dt-target must be positiveInvalid time stepUse positive value
t-end must be > t-startInvalid time rangeCheck time bounds
checkpoint-cost must be < run-timeCheckpoint too expensiveReduce checkpoint size

Interpretation Guidance

dt Behavior

ObservationMeaningAction
dt stable at targetGoodContinue
dt shrinkingStability issueCheck CFL, reduce target
dt oscillatingBorderline stabilityAdd safety factor

Checkpoint Overhead

OverheadAcceptability
< 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 overhead acceptability table.
  • Confirmed every script exited 0 (not exit 2 / stderr ValueError) and that quoted dt/interval/checkpoint values come from the JSON results, not from a run that printed a validation error.

Common pitfalls & rationalizations

Tempting shortcutWhy it's wrong / what to do
"Implicit scheme, so any dt is fine — skip --dt-limit."Unconditional stability is not accuracy; a large dt still ruins temporal error and resolves no transient. Still pass a physics-based dt-target and re-check the recommended dt against time scales.
"Set --safety above 1.0 to take bigger steps."safety is a margin at or below the limit; safety > 1.0 would return a dt above the stability limit, so the planner rejects it (exit 2). Lower dt-limit expectations or use a finer mesh instead.
"It ran without crashing, so the dt is valid."Run completion is not correctness. Verify dt_recommended <= dt_limit, read the notes array, and re-plan whenever v_max, D, dx, or the scheme changes — the limit moves with them.
"The output count looks one too many — drop the last frame."count is endpoint-inclusive by design (intervals + 1); both t_start and t_end are real outputs. Trimming it silently loses the final state.
"Checkpoint every step to never lose work."That drives overhead_fraction past 10% (the planner emits a warnings entry) and dominates runtime. Use --max-lost-time (cap) or --mtbf (Daly) so overhead stays in the Acceptable band.
"Reuse last week's dt/checkpoint plan; the model is basically the same."Stability and optimal checkpoint interval depend on current dx, velocity/diffusivity, checkpoint-cost, and MTBF. Re-run the three scripts with current values rather than copying stale numbers.

Security

Input Validation

  • All numeric parameters (dt-target, dt-limit, safety, t-start, t-end, interval, run-time, checkpoint-cost, max-lost-time) are validated as finite positive numbers (non-finite values such as inf/nan are rejected)
  • safety is bounded to <= 1.0 (a safety factor is a stability margin at or below the limit; values above 1.0 are rejected)
  • ramp-steps and preview-steps are validated as non-negative integers with an upper bound of 1,000,000; only the previewed slice of the ramp is materialized to bound memory use
  • Time range consistency is enforced (t-end must exceed t-start; checkpoint-cost must be less than run-time)

File Access

  • Scripts read no external files; all inputs are provided via CLI arguments
  • Scripts write only to stdout (JSON output); no files are created unless the agent explicitly uses the Write tool

Tool Restrictions

  • Read: Used to inspect script source, references, and user configuration files
  • Bash: Used to execute the three Python planning scripts (timestep_planner.py, output_schedule.py, checkpoint_planner.py) with explicit argument lists
  • Write: Used to save generated time-step plans or checkpoint schedules; writes are scoped to the user's working directory
  • Grep/Glob: Used to locate relevant files and search references

Safety Measures

  • No eval(), exec(), or dynamic code generation
  • All subprocess calls use explicit argument lists (no shell=True)
  • Scripts use only Python standard library; no pickle loading or deserialization of untrusted data
  • All output is deterministic JSON with no shell-interpretable content

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.2.3 (2026-10-19): Reject minimum timesteps that violate the specified stability limit and safety factor.

  • v1.2.2 (2026-06-24): Added Verification checklist and Common pitfalls & rationalizations sections grounded in the three planning scripts' actual outputs

  • v1.2.0 (2026-06-23): Corrected overhead/frame-count docs and evals, removed output-time float drift, hardened input validation (checkpoint-cost < run-time, safety <= 1.0, bounded ramp/preview steps, finite checks)

  • v1.1.0 (2024-12-24): Enhanced documentation, decision guidance, examples

  • v1.0.0: Initial release with 3 planning scripts

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Time Stepping」では何ができますか?

非定常シミュレーションの時間刻み方針を計画・管理します。CFL条件と物理に基づく安定限界を適応刻みと組み合わせ、急峻な勾配や相変化を伴う初期過渡状態では刻み幅を段階的に調整します。出力間隔とチェックポイントの頻度を設定し、長時間実行ジョブの再開戦略を計画します。新しいシミュレーションのdtを決める場合、適応時間刻みの振動を診断する場合、作業の損失を最小限に抑えるチェックポイント頻度を決める場合、物理的な時間スケールに合わせて出力スケジュールを設定する場合に使用します。「実行が遅すぎます」「どのくらいの頻度で保存すればよいですか」とだけ尋ねられた場合にも対応します。

TypingMindでTime Steppingを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Time Steppingはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTime Steppingをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/core-numerical/time-steppingを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Time Steppingを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Time Steppingで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTime Steppingを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Time Stepping」は無料ですか?

はい。HeshamFSがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る
affaan-mのロゴ

Context And Decisions

affaan-m
コミュニティ人気

必要に応じて、範囲を絞ったCONTEXT.mdで安定したドメインコンテキストを管理し、元に戻しにくい判断はECC既存のarchitecture-decision-recordsスキルに振り分けます。ドメイン用語について繰り返し説明が必要な場合、1つの用語に複数の意味がある場合、曖昧な表現がモジュール境界の誤りにつながる場合、ドメインの意味をアーキテクチャ上の判断と分けておく必要がある場合に…

41.4K
277.3K
2ファイル
表示
affaan-mのロゴ

Docs Governance

affaan-m
コミュニティ人気

ドキュメントガバナンスに関する幅広い依頼を既存のECCスキルに振り分け、対応付けられたドキュメントの役割、リンク、ADRインデックス、根拠への参照を対象に、任意で読み取り専用の監査を実行します。ユーザーが特定のスキルを指定せずに、ドキュメントガバナンス、プロジェクトのナレッジ整理、ドキュメントの整合性、または再現可能なドキュメント監査を求めた場合に…

41.4K
277.3K
4ファイル
表示
affaan-mのロゴ

Ecc Conventions

affaan-m
コミュニティ人気

ECCの開発規約とパターン。conventional commitsを採用するJavaScriptプロジェクト向けです。

41.4K
277.3K
1ファイル
表示
affaan-mのロゴ

Mcp Dependency Review

affaan-m
コミュニティ人気

承認またはCIの前に、MCP設定に変更可能なパッケージ参照がないか静的にレビューします。検出されたMCPサーバーは実行しません。.mcp.json、Cursor、VS Code、Claude、Windsurf、その他のリポジトリ単位のMCP設定をレビューする際に…

41.4K
277.3K
1ファイル
表示

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇