Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
beita6969 avatar

Convergence Study

  • 16 installs
  • 869 repo stars
  • Updated June 8, 2026
  • beita6969/scienceclaw

convergence-study is a Claude skill that runs spatial and temporal convergence analysis with Richardson extrapolation and the Grid Convergence Index for numerical solution verification.

About

This skill performs spatial and temporal convergence analysis to verify that numerical solutions converge at the expected rate as the mesh or timestep is refined. A developer uses it to compute observed convergence order, estimate discretization error with Richardson extrapolation, and report the Grid Convergence Index for formal solution verification. It provides CLI scripts that output structured JSON.

  • Runs spatial and temporal convergence analysis for numerical solution verification
  • Computes observed order, Richardson extrapolation, and Grid Convergence Index (GCI)
  • Ships CLI scripts for h-refinement, dt-refinement, and GCI calculation

Convergence Study by the numbers

  • 16 all-time installs (skills.sh)
  • Ranked #1,318 of 2,065 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
At a glance

convergence-study capabilities & compatibility

Free; scripts use only the Python math stdlib, NumPy not required

Capabilities
code execution · data stats analysis
Use cases
testing · data analysis · research
Pricing
Free
From the docs

What convergence-study says it does

Provide script-driven convergence analysis for verifying that numerical solutions converge at the expected rate as the mesh or timestep is refined.
SKILL.md
Report GCI** for formal solution verification using `gci_calculator.py`
SKILL.md
Safety factor | GCI safety factor (1.25 default)
SKILL.md
npx skills add https://github.com/beita6969/scienceclaw --skill convergence-study

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs16
repo stars869
Last updatedJune 8, 2026
Repositorybeita6969/scienceclaw

What it does

Verify a numerical solver converges at its expected order using Richardson extrapolation and GCI.

Who is it for?

Verifying numerical solver accuracy via observed order, Richardson extrapolation, and GCI

Skip if: Non-numerical testing or general software unit tests

When should I use this skill?

You have refinement-level solution values and need to confirm convergence order or estimate discretization error

What you get

Confirmed observed convergence order and reported GCI for formal solution verification

  • observed convergence order
  • Richardson-extrapolated value
  • GCI report

By the numbers

  • 4 CLI scripts
  • GCI default safety factor 1.25
  • requires 3+ refinement levels for order verification

Files

SKILL.mdMarkdownGitHub ↗

Convergence Study

Goal

Provide script-driven convergence analysis for verifying that numerical solutions converge at the expected rate as the mesh or timestep is refined.

Requirements

  • Python 3.8+
  • NumPy (not required; scripts use only math stdlib)

Inputs to Gather

InputDescriptionExample
Grid spacingsSequence of mesh sizes (coarse to fine)0.4,0.2,0.1,0.05
Timestep sizesSequence of dt values0.04,0.02,0.01
Solution valuesQoI at each refinement level1.16,1.04,1.01,1.0025
Expected orderFormal order of the numerical scheme2.0
Safety factorGCI safety factor (1.25 default)1.25

Script Outputs (JSON Fields)

ScriptKey Outputs
scripts/h_refinement.pyresults.observed_orders, results.mean_order, results.richardson_extrapolated_value, results.convergence_assessment
scripts/dt_refinement.pySame as h_refinement but for temporal convergence
scripts/richardson_extrapolation.pyresults.extrapolated_value, results.error_estimate, results.observed_order
scripts/gci_calculator.pyresults.observed_order, results.gci_fine, results.gci_coarse, results.asymptotic_ratio, results.in_asymptotic_range

Workflow

1. Run grid/timestep refinement study with at least 3 levels 2. Compute observed convergence order with h_refinement.py or dt_refinement.py 3. Compare observed order to expected order of the scheme 4. Estimate discretization error via Richardson extrapolation 5. Report GCI for formal solution verification using gci_calculator.py 6. Document convergence results and any anomalies

Decision Guidance

Do you have 3+ refinement levels?
+-- YES --> Run h_refinement.py or dt_refinement.py
|           +-- Observed order matches expected? --> Solution verified
|           +-- Order too low? --> Check: pre-asymptotic, coding error, insufficient resolution
|           +-- Order too high? --> Check: superconvergence or cancellation effects
+-- NO (only 2 levels) --> Use richardson_extrapolation.py with assumed order
                           (less reliable without order verification)

CLI Examples

# Spatial convergence with 4 grid levels
python3 scripts/h_refinement.py --spacings 0.4,0.2,0.1,0.05 --values 1.16,1.04,1.01,1.0025 --expected-order 2.0 --json

# Temporal convergence with 3 timestep levels
python3 scripts/dt_refinement.py --timesteps 0.04,0.02,0.01 --values 2.12,2.03,2.0075 --expected-order 2.0 --json

# Richardson extrapolation with assumed 2nd-order
python3 scripts/richardson_extrapolation.py --spacings 0.02,0.01 --values 1.0032,1.0008 --order 2.0 --json

# GCI for 3-mesh verification
python3 scripts/gci_calculator.py --spacings 0.04,0.02,0.01 --values 1.0128,1.0032,1.0008 --json

Error Handling

ErrorCauseResolution
spacings and values must have the same lengthMismatched input arraysProvide equal-length lists
At least 2 refinement levels requiredToo few data pointsAdd more refinement levels
Exactly 3 refinement levels requiredGCI needs 3 levelsProvide fine/medium/coarse
Oscillatory convergence detectedNon-monotone convergenceCheck mesh quality or scheme

Interpretation Guidance

ScenarioMeaningAction
Observed order matches expectedSolution in asymptotic rangeReport GCI, extrapolate
Observed order < expectedPre-asymptotic or coding bugRefine further or debug
Negative observed orderSolution divergingCheck implementation
GCI asymptotic ratio near 1.0Grids in asymptotic rangeResults are reliable
GCI asymptotic ratio far from 1.0Not in asymptotic rangeRefine further

References

  • references/convergence_theory.md - Formal convergence order, log-log analysis, asymptotic range
  • references/gci_guidelines.md - Roache's GCI method, ASME V&V 20, safety factors

Related skills

FAQ

How many refinement levels are needed?

At least 3 levels for h/dt refinement; GCI requires exactly 3 (fine/medium/coarse), and 2 levels can only use Richardson extrapolation with an assumed order.

What do the scripts output?

Structured JSON with fields like observed_orders, mean_order, richardson_extrapolated_value, gci_fine, gci_coarse, and asymptotic_ratio.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.