Skip to content

phase1-01: Implementation of StateVector and ReactorConfig #2

@anibalrojosan

Description

@anibalrojosan

Issue: phase1-01: Implementation of StateVector and ReactorConfig
Branch: feat/core-data-structures
Type: backend
Priority: High
Dependencies: phase1-00

Description

Define the base structures for the simulator. Following a TDD-like approach, unit tests must be developed alongside the implementation to ensure data integrity.

Mathematical Context

  • Reference: See @docs/MATH_MODEL.md#state-variables.
  • Core Logic: Define the 17 state variables ($C_i$) with their respective units ($gCOD \cdot m^{-3}$, $gN \cdot m^{-3}$, etc.).
  • Reactor Geometry: Implement volume ($V$) and surface area ($A$) calculations based on depth ($h$).

Tasks

  • Test: Write unit tests for StateVector (validation of 17 variables and units).
  • Code: Implement src/core/state.py to satisfy tests.
  • Test: Write unit tests for ReactorConfig (geometry calculations).
  • Code: Implement src/core/reactor.py and config/reactor_setup.yaml.
  • Run quality checks: uv run ruff check src/core/
  • Format code: uv run ruff format src/core/

Acceptance Criteria

  • All new unit tests pass in local and CI environments.
  • StateVector allows access by name (e.g., state.S_NH4) and index.
  • Minimum 90% code coverage for the new modules.
  • Code passes Ruff validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions