Maintainer triage (June 29, 2026)
- Status: Verified bug against the current
master source in this fork.
- Severity: High.
- Area labels: area:crystallizers.
- Tackle batch: P4 - high-impact numerical/model correctness.
The source review confirmed that the cited code path and failure mode are still present. The original audit details are preserved below for reproduction notes and suggested fixes.
Original audit details
Independent Codex verification: CONFIRMED
severity_assessment: high
evidence: PharmaPy/MixedPhases.py:232-244 returns slurry densities as [liquid, solid], and PharmaPy/Crystallizers.py:548 passes that as rhos_susp. MSMPR then selects rhos[0][1] at PharmaPy/Crystallizers.py:1809 and uses it in c_tank / rho_sol at PharmaPy/Crystallizers.py:1838, while batch and semibatch use liquid density in the analogous correction.
fix_note: Use rho_liq = rhos[0][0] in the MSMPR concentration transfer correction.
Maintainer triage (June 29, 2026)
mastersource in this fork.The source review confirmed that the cited code path and failure mode are still present. The original audit details are preserved below for reproduction notes and suggested fixes.
Original audit details
Independent Codex verification: CONFIRMED
severity_assessment: high
evidence: PharmaPy/MixedPhases.py:232-244 returns slurry densities as [liquid, solid], and PharmaPy/Crystallizers.py:548 passes that as rhos_susp. MSMPR then selects rhos[0][1] at PharmaPy/Crystallizers.py:1809 and uses it in c_tank / rho_sol at PharmaPy/Crystallizers.py:1838, while batch and semibatch use liquid density in the analogous correction.
fix_note: Use rho_liq = rhos[0][0] in the MSMPR concentration transfer correction.