Skip to content

[Scoping] Crystallizer model extensions (agglomeration, breakage, polymorphism, 2-D PBE) #15

Description

@bernalde

Goal (scoping issue)

Extend the crystallization models with additional particulate phenomena and discretization options. This issue scopes candidate extensions and where they hook in; each accepted item becomes its own design/implementation issue.

Existing structure to build on

  • Class hierarchy: _BaseCryst (Crystallizers.py:55-1259) → BatchCryst (:1261-1679), MSMPR (:1681-2058) → SemibatchCryst (:2060-2226).
  • Population-balance solvers: method of moments method_of_moments() (:441-470) and 1-D finite-volume fvm_method() with Van Leer limiter (:472-529); RHS dispatched from unit_model() (:531).
  • Kinetics: CrystKinetics (Kinetics.py:617-978) with primary/secondary nucleation, growth, dissolution, and a custom_mechanisms dict for user-defined laws.

Currently implemented

Nucleation (primary + secondary), growth, dissolution, impurity growth-inhibition (alpha_fn), heat effects, MoM and 1-D FVM, sensitivity analysis, state events.

Candidate extensions (each → its own issue)

  1. Agglomeration — add a collision/aggregation kernel as a source term in the PBE RHS (fvm_method); new kinetics parameters. (highest value / moderate effort)
  2. Breakage / attrition — size-dependent breakage rate + daughter distribution in the PBE RHS; relevant to fines and secondary nucleation.
  3. Polymorphism / multi-form — track multiple CSDs with form-specific solubility and inter-form transformation rates; PolymorphicCrystKinetics.
  4. 2-D population balance — bivariate f(L, W, t) for shape/aspect-ratio evolution; anisotropic growth; 2-D FVM.
  5. Additional flux limiters / higher-order schemes — Superbee, MUSCL beyond the current Van Leer.
  6. Generalized steady-state MSMPR solver — make solve_steady_state robust for multi-component/numerical cases (current TODOs note limitations).

Notes / code-quality observations (track alongside #12)

  • _BaseCryst is large (~1200 lines); energy_balances is duplicated across the three subclasses (:1524, 1849, 2163) with magic enthalpy constants (dh_cryst = -1.46e4) that should come from the compound DB.
  • Analytical Jacobian exists only for BatchCryst (:1317-1489).

Deliverables

  • Prioritize the candidate list (suggest starting with agglomeration + breakage).
  • Per accepted item: design spec, implementation behind existing kinetics/PBE hooks, validation against literature CSDs, tests.

Depends conceptually on a working test/CI baseline (#3 theme A).


Upstream PR

Wave 4 — propose before building. Get maintainer buy-in upstream on which phenomena to prioritize before implementing; one phenomenon per PR. See #3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:crystallizersCrystallizer models and slurry crystallization behaviorcrystallizersCrystallization modelsenhancementNew feature or requeststatus:plannedPlanned roadmap or maintenance work, not a verified bug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions