Skip to content

High: [Drying] Energy terms multiply molar drying rates by mass-basis heat quantities #48

Description

@bernalde

Maintainer triage (June 29, 2026)

  • Status: Verified bug against the current master source in this fork.
  • Severity: High.
  • Area labels: area:drying.
  • 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

Independent Codex verification: NEW FINDING

severity_assessment: high
evidence: PharmaPy/Drying_Model.py:72 and PharmaPy/Drying_Model.py:209 make dry_rate a molar volumetric rate, but PharmaPy/Drying_Model.py:373 multiplies dry_rate.sum(axis=1) by mass-basis cpg_mix and PharmaPy/Drying_Model.py:402 multiplies dry_rate by mass-basis latent_heat. These energy terms need molar-to-mass conversion and remain dimensionally wrong even after removing the separate factor-of-2 issue.
fix_note: Use component mass rates, dry_rate * MW / 1000, before multiplying by cpg_mix or latent_heat.

Metadata

Metadata

Assignees

Labels

area:dryingDrying model balances and transport termsbugSomething isn't workingcorrectnessModel/numerical correctness defectseverity:highConfirmed bug with major correctness impact or broken documented workflowstatus:verifiedSource-reviewed against the current codebase

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions