Skip to content
Back to skills

Numerical Simulation Physics

ASecurity

Simulate physical systems numerically: ODE integrators (Euler, RK4, Verlet, symplectic), PDE solvers (finite difference, spectral), N-body, molecular dynamics, Schrodinger solvers, stability and error analysis. Includes ready-to-run Python scripts. Use whenever the user wants a physics simulation, numeric solution, or code for physics.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
ai-agentspythongo

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add hamzabellouch/agent-skills --skill numerical-simulation-physics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Numerical Simulation Physics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Numerical Simulation Physics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hamzabellouch-numerical-simulation-physics/badge)](https://www.skillsdirectory.com/skills/hamzabellouch-numerical-simulation-physics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: numerical-simulation-physics
description: "Simulate physical systems numerically: ODE integrators (Euler, RK4, Verlet, symplectic), PDE solvers (finite difference, spectral), N-body, molecular dynamics, Schrodinger solvers, stability and error analysis. Includes ready-to-run Python scripts. Use whenever the user wants a physics simulation, numeric solution, or code for physics."
---

# Numerical Simulation in Physics

## Choose the method
| Problem | Method |
|---|---|
| Generic ODE | RK4 or adaptive RK45 (scipy.integrate.solve_ivp) |
| Long-time Hamiltonian (orbits, MD) | Velocity-Verlet / leapfrog / Yoshida (symplectic, energy error bounded) |
| Stiff ODE | Implicit methods (Radau, BDF) |
| Heat/diffusion | FTCS (r = DΔt/Δx² ≤ 1/2) or Crank-Nicolson |
| Wave equation | Leapfrog; CFL: cΔt/Δx ≤ 1 |
| Schrödinger 1D | Split-operator FFT, Crank-Nicolson, or matrix diagonalization |
| Poisson/Laplace | Gauss-Seidel/SOR, multigrid, FFT |
| Many-body ground states | Exact diagonalization, DMRG, QMC |

## Workflow
1. Non-dimensionalize equations. 2. Pick Δt/Δx from stability and accuracy needs. 3. Validate on an analytic case. 4. Run convergence study (halve step, error should drop by 2^order). 5. Monitor conserved quantities. 6. Plot and interpret.

## Scripts in this skill
- `scripts/integrators.py` — Euler, RK4, velocity-Verlet, with a demo (pendulum energy drift).
- `scripts/schrodinger1d.py` — finite-difference eigenstates of arbitrary 1D potential.
- `scripts/nbody.py` — gravitational N-body with leapfrog and energy diagnostics.
- `scripts/heat_wave_pde.py` — 1D heat and wave equation solvers.
Run: `python scripts/<name>.py` (requires numpy; matplotlib optional).

## Pitfalls
Euler is unstable for oscillators (energy grows). Time-step too large breaks CFL. Floating point: avoid subtracting near-equal numbers; use compensated sums for long runs. Always state the integrator and step size with results.

Files in this skill

  • SKILL.md1.9 KB
  • scripts/heat_wave_pde.py1.3 KB
  • scripts/integrators.py1.4 KB
  • scripts/nbody.py1.4 KB
  • scripts/schrodinger1d.py927 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.