Skip to content

TASK-041: Fluid Configuration Section - #43

Merged
AdamClemens merged 1 commit into
mainfrom
feat/task-041-fluid-configuration-section
Aug 28, 2026
Merged

TASK-041: Fluid Configuration Section#43
AdamClemens merged 1 commit into
mainfrom
feat/task-041-fluid-configuration-section

Conversation

@AdamClemens

Copy link
Copy Markdown
Owner

Summary

Stage 5's first task: gives the simulated fluid's physical properties (viscosity, diffusion_coefficient) their own fluid: config section, separate from numerics: (which selects numerical schemes, not fluid properties). This is the project's first breaking configuration change -- a config still setting the retired numerics.diffusion_coefficient is rejected with a named error pointing at its new home, not silently defaulted.

  • FluidConfig dataclass (viscosity, diffusion_coefficient, both default 1.0) added to PyFlowConfig, wired into load_config.
  • numerics.diffusion_coefficient removed from NumericsConfig; a config still setting it fails loudly (loader.py's _numerics_config_from_raw).
  • tests/features/fluid_configuration.feature (4 scenarios) bound by tests/integration/test_fluid_configuration.py -- lives in integration/, not unit/, since one scenario needs a real CLI subprocess run.
  • Regenerated docs/implementation/config-template.yaml; migrated the Passive Scalar Transport golden demo's own config.

A real gap found while implementing, not predicted by the roadmap's own drafting: TASK-041's Dependencies section claimed "no engine dependency at all," but engine/numerics/assembly.py's assemble_numerics already read NumericsConfig.diffusion_coefficient directly (TASK-024). Moving the field required a real signature change -- assemble_numerics gained its own diffusion_coefficient: float = 1.0 parameter (default preserves every existing scheme-selection-only caller), and bootstrap.py's call site now threads config.fluid.diffusion_coefficient through explicitly. Recorded honestly in the roadmap (a Status note plus a correction in the Dependencies section itself) rather than fixed silently, per this repo's Integrity rule.

Blast radius also covers: tests/unit/numerics/test_assembly.py, tests/unit/test_main.py, tests/unit/test_generator.py, tests/integration/test_cli.py (key-order/field assertions), two architecture diagrams (sequences.md), an ICD signature line (icds.md), an ADR pointer (ADR-002), CLAUDE.md entries in configuration/ and engine/, and the roadmap's own live test/scenario-count paragraph (614→622 tests, 54→58 scenarios) plus regenerated status.md/repository-inventory.md.

Test plan

  • make ci green: 622 tests passing, mypy --strict clean, all doc/graph/scenario/status/config-template checks pass.
  • TDD: tests/features/fluid_configuration.feature scenarios and test_configuration.py's new viscosity tests written and confirmed red before implementation.
  • make check-references/make check-manifest/make check-scenarios all clean against the new files.
  • Golden demo (passive_scalar_transport.yaml) still runs through the real CLI and produces its already-tested quantitative result after migration.

🤖 Generated with Claude Code

…t (TASK-041)

Stage 5's first task: gives the simulated fluid's physical properties
(viscosity, diffusion_coefficient) their own `fluid:` config section,
separate from `numerics:`, which selects numerical schemes rather than
fluid properties. This is the project's first breaking configuration
change -- a config still setting the retired `numerics.diffusion_
coefficient` is rejected with a named error pointing at its new home,
not silently defaulted.

Also fixes a real gap the roadmap's own drafting missed: it claimed
this task had no engine-side dependency, but `assemble_numerics`
already read `NumericsConfig.diffusion_coefficient` directly (TASK-024).
Moving the field required a real signature change (`assemble_numerics`
gained its own `diffusion_coefficient` parameter) plus a `bootstrap.py`
call-site update -- recorded honestly in the roadmap rather than fixed
silently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AdamClemens
AdamClemens merged commit 80e2cff into main Aug 28, 2026
2 checks passed
@AdamClemens
AdamClemens deleted the feat/task-041-fluid-configuration-section branch August 28, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant