Skip to content

Medium: [Kinetics] deriv_cryst ignores sup_sat_type and hardcodes relative supersaturation #43

Description

@bernalde

Maintainer triage (June 29, 2026)

  • Status: Verified bug against the current master source in this fork.
  • Severity: Medium.
  • Area labels: area:kinetics, area:crystallizers.
  • Tackle batch: P5 - medium-scope correctness defects.

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

Part of the model-correctness audit — see #17.

Severity: medium | Category: logic | Location: Kinetics.py lines 948

What's wrong

deriv_cryst computes ssat = max(eps,(conc_tg-conc_sat)/conc_sat) (relative) always, but get_kinetics computes the rate with the configured sup_sat_type ('relative'/'ratio'/'absolute'). For 'absolute' or 'ratio' the analytical sensitivity is inconsistent with the rate.


Verification: 2/2 adversarial reviewers confirmed (refuted: 0).

Metadata

Metadata

Assignees

Labels

area:crystallizersCrystallizer models and slurry crystallization behaviorarea:kineticsReaction and crystallization kineticsbugSomething isn't workingcorrectnessModel/numerical correctness defectrefactor:mpvOverlaps the MultiPhaseVessel refactor; revalidate after mergeseverity:mediumConfirmed bug with narrower scope or moderate numerical impactstatus:verifiedSource-reviewed against the current codebase

Type

No type

Projects

Status
No status

Relationships

None yet

Development

No branches or pull requests

Issue actions