Skip to content

High: [MixedPhases] Slurry and Cake volume calculations omit solid shape factor kv #52

Description

@bernalde

Maintainer triage (June 29, 2026)

  • Status: Verified bug against the current master source in this fork.
  • Severity: High.
  • Area labels: area:phases.
  • Tackle batch: P2 - shared thermo, phase, and basis 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

Finding

Several mixed-phase volume calculations use raw moments[3] as solid volume fraction/volume instead of kv * moments[3].

Evidence

  • Slurry.Phases moments branch uses vol_liq = self.vol * (1 - self.moments[3]) at PharmaPy/MixedPhases.py:113-120.
  • Cake.Phases uses self.cake_vol = self.Solid_1.moments[3] / (1 - self.porosity) at PharmaPy/MixedPhases.py:566-568.
  • Other code treats solid volume as mom_three * self.Solid_1.kv, e.g. Slurry.getFractions at PharmaPy/MixedPhases.py:268-277.

Impact

For non-unit crystal shape factors, slurry liquid volume, cake volume, cake height, deliquoring, washing, and drying geometry can be systematically wrong.

Likely fix

Use self.Solid_1.kv * moments[3] wherever moment 3 is converted to physical solid volume.

Metadata

Metadata

Assignees

Labels

area:phasesPhase, stream, and mixed-phase property handlingbugSomething isn't workingcorrectnessModel/numerical correctness defectrefactor:mpvOverlaps the MultiPhaseVessel refactor; revalidate after mergeseverity:highConfirmed bug with major correctness impact or broken documented workflowstatus:verifiedSource-reviewed against the current codebase

Type

No type

Projects

Status
No status

Relationships

None yet

Development

No branches or pull requests

Issue actions