numerical-stability

Analyze numerical stability for time-dependent PDE simulations via CFL, von Neumann, and stiffness checks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

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.

Core Features & Use Cases

  • Stability assessment: CFL/Fourier/Reaction checks for explicit schemes.
  • Stiffness detection: identify stiff dynamics via eigenvalues or Jacobians.
  • Diagnostics: von Neumann and conditioning checks for solver readiness.
  • Conversational workflows: quick, actionable guidance to stabilize runs.

Quick Start

Example: check CFL limits python3 scripts/cfl_checker.py --dx 0.01 --dt 1e-4 --diffusivity 1e-3 --dimensions 2 --json

Frequently Asked Questions about numerical-stability

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

FAQPage Schema
How do I check if my PDE simulation will be numerically stable?

Numerical stability for PDEs is enforced by verifying CFL, Fourier, and von Neumann criteria against your time step, grid spacing, and scheme. This Skill analyzes those conditions across advection, diffusion, and reaction problems in 1D–3D, outputting stability verdicts and recommended time steps to prevent blow-up.

What is the CFL condition and why does it matter for explicit schemes?

The CFL (Courant–Friedrichs–Lewy) condition is a stability requirement that constrains your time step relative to grid spacing and velocity. Explicit schemes violate it at their peril; this Skill checks CFL limits automatically and flags unsafe combinations before simulation.

How do I detect stiffness in advection–diffusion–reaction problems?

Stiffness arises when eigenvalues or reaction rates span large ranges, forcing implicit schemes or very small time steps. This Skill detects stiffness via eigenvalue analysis and Jacobian inspection, helping you choose between explicit and implicit integrators.

Can I use this for both explicit and implicit time-stepping schemes?

Yes. This Skill supports stability checks for both explicit schemes (CFL, Fourier, von Neumann) and implicit schemes (matrix conditioning, stiffness detection), covering the full range of time discretizations for PDEs.

What do I need to run stability checks on my simulation?

Provide grid spacing (dx), time step (dt), velocity, diffusivity, reaction rate, problem dimensions (1D–3D), and your discretization scheme. The Skill requires Python 3.8+ and NumPy; it outputs stability verdicts, diagnostics, and a safe recommended time step.

How does matrix conditioning affect my PDE solver's accuracy?

High matrix conditioning numbers indicate ill-posed systems where small input errors amplify into large solution errors. This Skill computes conditioning metrics to warn you when implicit solvers risk numerical inaccuracy or slow convergence.