rethinking-scientific-modeling-physically

Installation
SKILL.md

Physics-Consistent Simulation-Executable Code Generation

This skill enables Claude to generate structurally sound, simulation-executable code for computational engineering — specifically reinforced concrete frame models in OpenSeesPy. It applies the AutoBM framework's three-pillar approach: domain knowledge construction (formalizing engineering constraints before generation), constraint-oriented alignment (enforcing API compliance and physical laws during generation), and verification-driven evaluation (closed-loop validation of executability, modal period accuracy, and code compliance after generation). The core insight is that physics-constrained generation with multi-granularity verification vastly outperforms unconstrained code generation, even from frontier models.

When to Use

  • When the user asks to generate a structural analysis model (e.g., "create an OpenSeesPy model for a 5-story office building")
  • When the user provides building specifications (function, dimensions, seismic zone) and needs executable simulation code
  • When the user has an OpenSeesPy script with runtime errors or physically implausible results and needs debugging
  • When the user needs to verify that generated structural code satisfies seismic design codes (e.g., GB50011, ASCE 7, Eurocode 8)
  • When the user asks for a complete structural analysis pipeline: geometry, materials, loads, modal analysis, and compliance checks
  • When the user wants to parameterize structural models across building types, story counts, or seismic intensities

Key Technique

The Problem: Frontier LLMs generate structurally plausible-looking code that fails in execution. Benchmarks show Claude, GPT, and Gemini achieve only 18-20% strict compliance (simultaneous executability + period accuracy + code compliance) on structural modeling tasks. The dominant failure mode (87.5% of errors) is syntax/API violations; the rest split between compliance violations (excessive drift) and modal period extraction errors.

The Solution — Three-Stage Pipeline:

Installs
1
GitHub Stars
6
First Seen
11 days ago
rethinking-scientific-modeling-physically — ndpvt-web/arxiv-claude-skills