/simulacion-numerica:numerical-integrationfrom Simulación numérica
Selects and configures time integration methods for ODE/PDE simulations, including explicit Runge-Kutta, BDF, Rosenbrock, and Adams families. Sets error tolerances, implements adaptive step-size control with P/PI controllers, and plans IMEX operator splitting for mixed stiff/non-stiff terms.
Ships in Simulación numérica. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Provide a reliable workflow to select integrators, set tolerances, and manage adaptive time stepping for time-dependent simulations.
| Input | Description | Example |
|---|---|---|
| Problem type | ODE/PDE, stiff/non-stiff | stiff PDE |
| Jacobian available | Can compute ∂f/∂u? | yes |
| Target accuracy | Desired error level | 1e-6 |
| Constraints | Memory, implicit allowed? | implicit OK |
| Time scale | Characteristic time | 1e-3 s |
Is the problem stiff?
├── YES → Is Jacobian available?
│ ├── YES → Use Rosenbrock or BDF
│ └── NO → Use BDF with numerical Jacobian
└── NO → Is high accuracy needed?
├── YES → Use RK45 or DOP853
└── NO → Use RK4 or Adams-Bashforth
| Symptom | Likely Stiff | Action |
|---|---|---|
| dt shrinks to tiny values | Yes | Switch to implicit |
| Eigenvalues span many decades | Yes | Use BDF/Radau |
| Smooth solution, reasonable dt | No | Stay explicit |
| Script | Key Outputs |
|---|---|
scripts/error_norm.py | error_norm, scale_min, scale_max |
scripts/adaptive_step_controller.py | accept, dt_next, factor |
scripts/integrator_selector.py | recommended, alternatives, notes |
scripts/imex_split_planner.py | implicit_terms, explicit_terms, splitting_strategy |
scripts/splitting_error_estimator.py | error_estimate, substeps |
references/tolerance_guidelines.mdscripts/integrator_selector.pyscripts/error_norm.py for step acceptancescripts/adaptive_step_controller.pyscripts/imex_split_planner.pyUser: I'm solving the Allen-Cahn equation with a stiff double-well potential. What integrator should I use?
Agent workflow:
python3 scripts/integrator_selector.py --stiff --jacobian-available --accuracy high --json
python3 scripts/imex_split_planner.py --stiff-terms diffusion --nonstiff-terms reaction --coupling weak --json
rtol/atol consistent with physics and units# Select integrator for stiff problem with Jacobian
python3 scripts/integrator_selector.py --stiff --jacobian-available --accuracy high --json
# Compute scaled error norm
python3 scripts/error_norm.py --error 0.01,0.02 --solution 1.0,2.0 --rtol 1e-3 --atol 1e-6 --json
# Adaptive step control with PI controller
python3 scripts/adaptive_step_controller.py --dt 1e-2 --error-norm 0.8 --order 4 --controller pi --json
# Plan IMEX splitting
python3 scripts/imex_split_planner.py --stiff-terms diffusion,elastic --nonstiff-terms reaction --coupling strong --json
# Estimate splitting error
python3 scripts/splitting_error_estimator.py --dt 1e-4 --scheme strang --commutator-norm 50 --target-error 1e-6 --json
| Error | Cause | Resolution |
|---|---|---|
rtol must be a non-negative finite number / atol must be a non-negative finite number | Invalid tolerances | Use non-negative finite values |
error_norm must be finite and non-negative | Negative or non-finite error norm | Check error computation |
scale must be positive; with min_scale=0 ensure atol>0 or rtol*|y|>0 | All scale entries collapsed to 0 (e.g. rtol=0, atol=0, default min_scale=0) | Set atol>0, rtol>0, or --min-scale > 0 |
argument --controller: invalid choice: ... (choose from p, pi) | Invalid controller type | Use p or pi |
Provide at least one stiff or non-stiff term | Empty term list | Specify stiff or nonstiff terms |
| Error Norm | Meaning | Action |
|---|---|---|
| < 1.0 | Step acceptable | Accept, maybe increase dt |
| ≈ 1.0 | At tolerance boundary | Accept with current dt |
| > 1.0 | Step rejected | Reject, reduce dt |
| Controller | CLI value | Properties | Best For |
|---|---|---|---|
| P (elementary / integral) | p (default) | Simple, some overshoot | Non-stiff, moderate accuracy |
| PI (proportional-integral) | pi | Smooth, robust (requires --prev-error) | General use |
PID control is described in
references/error_control.mdfor reference only; theadaptive_step_controller.pyCLI implementspandpicontrollers.
| Coupling | Strategy |
|---|---|
| Weak | Simple operator splitting |
| Moderate | Strang splitting |
| Strong | Fully coupled IMEX-RK |
error_norm (and scale_min/scale_max) from scripts/error_norm.py and confirmed scale_min > 0, so no component reduced to atol-only scaling by accident.error_norm <= accept_threshold (default 1.0) per scripts/adaptive_step_controller.py; logged any accept: false steps and the resulting dt_next/factor rather than forcing the step through.--prev-error and verified controller_used reported pi (not the silent p fallback that occurs when --prev-error is omitted).scripts/integrator_selector.py with the actual --stiff/--jacobian-available/--accuracy flags matching the problem and recorded recommended plus the notes (e.g. the "expect smaller dt" warning for stiff-without-implicit).error_estimate, substeps, and dt_effective from scripts/splitting_error_estimator.py and confirmed error_estimate <= target-error after substepping, using the correct --scheme order (lie=1, strang=2).rtol/atol and confirmed the solution change is below the target accuracy, rather than trusting a single tolerance run.| Tempting shortcut | Why it's wrong / what to do |
|---|---|
"I picked an implicit/BDF method, so any dt is fine." | Unconditional stability is not accuracy; large dt still inflates temporal error. Check error_norm against the accept threshold and run the tighter-tolerance convergence check (Workflow step 7). |
"error_norm came back < 1, so the step and the whole run are correct." | The norm only certifies the local step under the chosen rtol/atol. A loose tolerance passes every step while the global solution is wrong — tighten tolerances and confirm convergence before trusting results. |
"I'll use the PI controller for smoother stepping" but omit --prev-error. | Without --prev-error the script silently falls back to the P controller (controller_used: p). You get no PI benefit. Pass the previous accepted error_norm and verify controller_used: pi. |
| "Strang vs Lie splitting won't matter much here." | Splitting error scales as commutator_norm * dt^(order+1) with order 1 (lie) vs 2 (strang). For a nonzero commutator the schemes differ by a full power of dt — run splitting_error_estimator.py with the actual --commutator-norm and --target-error instead of guessing. |
| "The selector recommended IMEX/RK-Chebyshev, so I'll just run explicitly without a Jacobian." | That branch fires only for stiff problems without implicit solves and the script warns "expect smaller dt." Read the notes: provide a Jacobian/Jv product and use BDF/Radau if implicit solves are feasible. |
| "It ran to the final time without crashing, so the integration is valid." | Completion is not correctness. Verify step acceptance (error_norm <= threshold), splitting error within target-error, and convergence under tighter tolerances; for conservative problems pass --conservative to imex_split_planner.py and check conserved quantities. |
dt, rtol, atol, error_norm, stiffness_ratio, commutator_norm, etc.) are validated as finite numbers at the function boundaryimex_split_planner.py validates term names against [a-zA-Z_][a-zA-Z0-9_ -]* with length and count limits, preventing injection payloads in user-supplied term listsdimension capped at 10 billion, order at 20, stiffness_ratio at 1e30--controller is validated against a fixed allowlist (p, pi)--scheme is validated against known splitting schemes (lie, strang)allowed-tools excludes Bash to prevent the agent from executing arbitrary commands when processing user-provided inputseval(), exec(), or dynamic code generationshell=True)references/method_catalog.md - Integrator options and propertiesreferences/tolerance_guidelines.md - Choosing rtol/atolreferences/error_control.md - Error norm and adaptation formulasreferences/imex_guidelines.md - Stiff/non-stiff splittingreferences/splitting_catalog.md - Operator splitting patternsreferences/multiphase_field_patterns.md - Phase-field specific splitsv1.2.3 (2026-10-19): Compute Euclidean error norms without avoidable squaring overflow or underflow.
v1.2.2 (2026-06-24): Added Verification checklist and Common pitfalls & rationalizations sections grounding step acceptance, PI controller usage, integrator selection, and splitting-error checks in the scripts' actual outputs
v1.2.0 (2026-06-23): Fixed PI controller coefficient/sign to standard form, fixed error_norm scale-collapse crash, corrected error-message and controller documentation to match the scripts
v1.1.0 (2024-12-24): Enhanced documentation, decision guidance, examples
v1.0.0: Initial release with 5 integration scripts
CHANGELOG.md (opens in a new tab)evals/evals.json (opens in a new tab)references/error_control.md (opens in a new tab)references/imex_guidelines.md (opens in a new tab)references/method_catalog.md (opens in a new tab)references/multiphase_field_patterns.md (opens in a new tab)references/splitting_catalog.md (opens in a new tab)references/tolerance_guidelines.md (opens in a new tab)scripts/adaptive_step_controller.py (opens in a new tab)scripts/error_norm.py (opens in a new tab)scripts/imex_split_planner.py (opens in a new tab)scripts/integrator_selector.py (opens in a new tab)scripts/splitting_error_estimator.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lagzgabrielmuller-dot/kit-ingenieria-3d --plugin simulacion-numerica17 skills in this plugin
/benchmark-and-mms-plannerPlan verification and validation campaigns for simulation codes using manufactured solutions, canonical benchmark problems, grid/time refinement, uncertainty propagation, and pass/fail acceptance criteria. Use when an agent needs to prove a solver, model, or result is trustworthy rather than only plausible.
/convergence-studyPerform spatial and temporal convergence analysis for solution verification — compute observed convergence orders from grid or timestep refinement studies, apply Richardson extrapolation to estimate discretization error, and calculate the Grid Convergence Index (GCI) per ASME V&V 20 standards. Use when verifying that a numerical solution converges at the expected rate, estimating the error on the finest mesh, checking whether grids are in the asymptotic range, or preparing formal verification reports, even if the user only asks "is my mesh fine enough" or "how accurate is my solution."
/differentiation-schemesSelect and apply numerical differentiation schemes for PDE and ODE discretization — generate finite-difference stencils at arbitrary order and accuracy, choose between central, upwind, compact (Pade), and spectral methods, handle boundary stencils, and estimate truncation error scaling. Use when discretizing spatial derivatives, picking a scheme for advection- or diffusion-dominated problems, building custom stencils for nonstandard operators, or comparing dispersion and dissipation properties of candidate schemes, even if the user just says "how do I approximate this derivative" or "my solution is too diffusive."
/linear-solversSelect and configure linear solvers for Ax=b systems arising in numerical simulations — choose between direct (LU, Cholesky) and iterative (CG, GMRES, BiCGSTAB, MINRES) methods, analyze sparsity patterns and matrix conditioning, recommend preconditioners (AMG, ILU, IC), apply row/column scaling, and diagnose convergence stagnation from residual histories. Use when setting up a linear solve for FEM/FVM assembly, debugging slow or stalled Krylov iterations, choosing a preconditioner for SPD or nonsymmetric systems, or investigating ill-conditioning, even if the user only says "my solver is slow" or "GMRES won't converge."
/md-analysis-plannerPlan molecular dynamics post-processing for materials simulations, including RDF, MSD and diffusion, VACF/VDOS, coordination numbers, bond-angle distributions, stress-strain curves, equilibration detection, PBC unwrapping, and trajectory format choices. Use before writing MD analysis scripts or trusting trajectory-derived results.
/mesh-generationPlan and evaluate mesh generation for numerical simulations — estimate grid resolution from physics scales (interface width, boundary layers, wavelengths), check aspect ratios and skewness against quality thresholds, choose between structured, unstructured, and adaptive mesh refinement strategies, and compute grid sizing for 1D/2D/3D domains. Use when setting up a new mesh, diagnosing poor solver convergence caused by mesh quality, deciding how many points to place across a phase-field interface or boundary layer, or preparing a mesh convergence study, even if the user only asks "what resolution do I need" or "why is my solver failing."
2 plugins ship this exact skill · first indexed Oct 22, 2026
Other plugins' skills for the same job