Skip to content

[Epic] Integrate the MultiPhaseVessel architecture #148

Description

@andres9403

Goal

Integrate the MultiPhaseVesselRefactor branch into master via an author-led
rebase, with enough evidence that the change is safe for the physical models.

Why this needs an epic

Verified 2026-07-31: the branch is 47 commits ahead and 263 behind master, with
merge base d6eaf85 dated 2024-05-17 (~2.2 years). It changes 25 files,
~5,925 additions / 1,122 deletions, and adds zero test files. It has no PR.
It rewrites Phases.py (+344/-838), Streams.py, MixedPhases.py, and adds
MultiPhaseVessel.py (+1,601), Mechanisms.py, IntegratorBackends.py,
DataClasses.py, Classifier.py.

The textual conflict surface is currently small (6 files: .gitignore,
Commons.py, Drying_Model.py, Kinetics.py, Phases.py, requirements.txt)
because the crystallizer/reactor/kinetics fixes are still unmerged in open PRs.
Every PR that lands after a rebase forces another rebase.

The risk is semantic, not textual: Phases.py diverged only 9 lines on master,
yet the branch deletes 838 lines of it written against 2024 semantics. Git will
merge that cleanly and silently drop the reasoning behind #18 / PR #100.

Acceptance gates

Sequence

  1. Preserve the tip: tag archive/mpv-refactor-20260731 at 435971ca6471d1ffbed9f25c641ceba7a0ada46e before any rebase
  2. Drain the open PR queue first (Fix semibatch reactor energy flow term #102, Fix crystallizer energy balance units and jacket paths #106, Fix reactor mode crash paths #107, Fix reversible reaction Jacobian #114, Fix BatchCryst concentration Jacobian sign #115, Replace bare except clauses with specific exceptions #126, Publish reproducible PharmaPy documentation #131, Make optional Assimulo imports lazy #135)
  3. Freeze refactors (not fixes) on Phases/Streams/MixedPhases/Crystallizers/Kinetics/ThermoModule
  4. Author rebases, excluding non-production artifacts
  5. Split into a reviewable PR stack
  6. Post-merge stabilization

Decision deadline

End of Month 3. If a rebased PR satisfying G1+G3 is not open by then, fall back
to staged extraction: cherry-pick the reactive-crystallization work (commits 1-37,
2024-03 to 2026-04) and re-plan the architecture natively.

Blocked until decided: #118, #142, #143, #144, #145, #133, #12, #10.

Effort

8-14 FTE-weeks of maintainer review, verification, and integration. The branch
author's implementation effort is tracked separately.

Metadata

Metadata

Assignees

Labels

area:architectureShared abstractions, base classes, constants, or project structurearea:phasesPhase, stream, and mixed-phase property handlingepicTracking / umbrella issuerefactor:mpvOverlaps the MultiPhaseVessel refactor; revalidate after mergetech-debtCode health and refactoring

Type

No type

Projects

Status
No status

Relationships

None yet

Development

No branches or pull requests

Issue actions