MCP HubMCP Hub
스킬 목록으로 돌아가기

convergence-study

HeshamFS
업데이트됨 2 days ago
6 조회
40
3
40
GitHub에서 보기
문서general

정보

이 스킬은 수치 시뮬레이션을 위한 자동화된 수렴 분석을 수행하며, Richardson 외삽법과 GCI(Grid Convergence Index) 계산을 통해 관찰된 정확도 차수를 산출하고 이산화 오차를 추정합니다. 이를 통해 개발자는 메시 적절성을 검증하고 점근적 수렴을 확인하며, ASME V&V 20 표준에 따른 공식 검증 보고서를 작성할 수 있습니다. 해의 정확도를 평가하거나 격자 해상도가 충분한지 판단해야 할 때 사용하십시오.

빠른 설치

Claude Code

추천
기본
npx skills add HeshamFS/materials-simulation-skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/HeshamFS/materials-simulation-skills
Git 클론대체
git clone https://github.com/HeshamFS/materials-simulation-skills.git ~/.claude/skills/convergence-study

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

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

Security

Input Validation

  • All numeric parameters (spacings, timesteps, values, expected-order, order) are validated as finite positive numbers
  • Comma-separated value lists are length-matched (spacings and values must have equal length) and capped at 10,000 entries
  • GCI calculator enforces exactly 3 refinement levels; Richardson extrapolation requires at least 2
  • Safety factor is validated as a finite number greater than 1.0

File Access

  • Scripts read no external files; all inputs are provided via CLI arguments
  • Scripts write only to stdout (JSON output); no files are created unless the agent explicitly uses the Write tool

Tool Restrictions

  • Bash: Used to execute the four Python analysis scripts (h_refinement.py, dt_refinement.py, richardson_extrapolation.py, gci_calculator.py) with explicit argument lists
  • Read: Used to inspect script source and reference documentation

Safety Measures

  • No eval(), exec(), or dynamic code generation
  • All subprocess calls use explicit argument lists (no shell=True)
  • Scripts use only Python standard library (math module); no pickle loading or deserialization of untrusted data
  • Minimal tool surface (Bash and Read only) limits the agent's ability to modify the filesystem

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

GitHub 저장소

HeshamFS/materials-simulation-skills
경로: skills/core-numerical/convergence-study
0
agent-skillsagentscli-toolscomputational-sciencellmmaterials-science

연관 스킬

railway-docs

문서

이 스킬은 Railway의 기능, 작동 방식 또는 특정 문서 URL에 대한 질문에 답하기 위해 최신 Railway 문서를 가져옵니다. 개발자들이 Railway의 공식 소스로부터 정확하고 최신 정보를 직접 받을 수 있도록 보장합니다. 사용자가 Railway의 작동 방식을 묻거나 Railway 문서를 참조할 때 사용하세요.

스킬 보기

n8n-code-python

문서

이 Claude Skill은 n8n의 Code 노드에서 Python 코드를 작성할 때 전문적인 지침을 제공하며, 특히 Python 표준 라이브러리 사용과 n8n의 특수 구문인 `_input`, `_json`, `_node` 작업에 중점을 둡니다. 이는 개발자가 n8n 내에서 Python의 제한 사항을 이해하도록 돕고, 대부분의 워크플로에는 JavaScript 사용을 권장하면서도 특정 데이터 변환 요구사항에 대한 Python 솔루션을 제안합니다.

스킬 보기

archon

문서

Archon 스킬은 REST API를 통해 RAG 기반 시맨틱 검색과 프로젝트 관리를 제공합니다. 이 스킬을 사용하여 문서 검색, 계층적 프로젝트/태스크 관리, 문서 업로드 기능을 갖춘 지식 검색을 수행할 수 있습니다. 외부 문서를 검색할 때는 다른 소스를 사용하기 전에 항상 Archon을 최우선으로 활용하세요.

스킬 보기

n8n-code-javascript

문서

이 Claude Skill은 n8n의 Code 노드에서 JavaScript 코드 작성에 대한 전문적인 지침을 제공합니다. `$input`/`$json` 변수, HTTP 헬퍼, DateTime 처리와 같은 필수적인 n8n 특정 구문을 다루며 일반적인 오류를 해결합니다. Code 노드에서 사용자 정의 JavaScript 처리가 필요한 n8n 워크플로우를 개발할 때 활용하세요.

스킬 보기