Start a fresh conversation. Replace the highlighted placeholders.
Use numerical-stability to assess stability for [PDE and scheme] using [dx, dt, and physics parameters] in [dimensions and boundary assumptions], and provide a stability verdict with a recommended time step or scheme change.
Required inputs
[PDE and scheme]
[dx, dt, and physics parameters]
[dimensions and boundary assumptions]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: numerical-stabilitydescription: Analyze and enforce numerical stability for time-dependent PDE simulations. Use when selecting time steps, choosing explicit/implicit schemes, diagnosing numerical blow-up, checking CFL/Fourier criteria, von Neumann analysis, matrix conditioning, or detecting stiffness in advection/diffusion/reaction problems.allowed-tools: Read, Bash, Write, Grep, Glob
Numerical Stability
Goal
Provide a repeatable checklist and script-driven checks to keep time-dependent simulations stable and defensible.
Requirements
Python 3.8+
NumPy (for matrix_condition.py and von_neumann_analyzer.py)
See scripts/requirements.txt for dependencies
Inputs to Gather
Input
Description
Example
Grid spacing dx
Spatial discretization
0.01 m
Time step dt
Temporal discretization
1e-4 s
Velocity v
Advection speed
1.0 m/s
Diffusivity D
Thermal/mass diffusivity
1e-5 m²/s
Reaction rate k
First-order rate constant
100 s⁻¹
Dimensions
1D, 2D, or 3D
2
Scheme type
Explicit or implicit
explicit
Decision Guidance
Choosing Explicit vs Implicit
Is the problem stiff (fast + slow dynamics)?
├── YES → Use implicit or IMEX scheme
│ └── Check conditioning with matrix_condition.py
└── NO → Is CFL/Fourier satisfied with reasonable dt?
├── YES → Use explicit scheme (cheaper per step)
└── NO → Consider implicit or reduce dx
Stability Limit Quick Reference
Physics
Number
Explicit Limit (1D)
Formula
Advection
CFL
C ≤ 1
C = v·dt/dx
Diffusion
Fourier
Fo ≤ 0.5
Fo = D·dt/dx²
Reaction
Reaction
R ≤ 1
R = k·dt
Multi-dimensional correction: For d dimensions, diffusion limit is Fo ≤ 1/(2d).