forked from CryPTSys/PharmaPy
-
Notifications
You must be signed in to change notification settings - Fork 2
Medium: [Thermo] Centralize activity-model selector validation #122
Copy link
Copy link
Open
Labels
area:distillationDistillation models and shortcut column designDistillation models and shortcut column designarea:evaporatorsBatch and continuous evaporator modelsBatch and continuous evaporator modelsarea:extractionLiquid-liquid extraction and dynamic extraction modelsLiquid-liquid extraction and dynamic extraction modelsarea:phasesPhase, stream, and mixed-phase property handlingPhase, stream, and mixed-phase property handlingarea:thermoThermodynamics, VLE, enthalpy, Cp, density, and viscosityThermodynamics, VLE, enthalpy, Cp, density, and viscositycorrectnessModel/numerical correctness defectModel/numerical correctness defectseverity:mediumConfirmed bug with narrower scope or moderate numerical impactConfirmed bug with narrower scope or moderate numerical impactstatus:plannedPlanned roadmap or maintenance work, not a verified bug reportPlanned roadmap or maintenance work, not a verified bug reporttech-debtCode health and refactoringCode health and refactoring
Description
Metadata
Metadata
Assignees
Labels
area:distillationDistillation models and shortcut column designDistillation models and shortcut column designarea:evaporatorsBatch and continuous evaporator modelsBatch and continuous evaporator modelsarea:extractionLiquid-liquid extraction and dynamic extraction modelsLiquid-liquid extraction and dynamic extraction modelsarea:phasesPhase, stream, and mixed-phase property handlingPhase, stream, and mixed-phase property handlingarea:thermoThermodynamics, VLE, enthalpy, Cp, density, and viscosityThermodynamics, VLE, enthalpy, Cp, density, and viscositycorrectnessModel/numerical correctness defectModel/numerical correctness defectseverity:mediumConfirmed bug with narrower scope or moderate numerical impactConfirmed bug with narrower scope or moderate numerical impactstatus:plannedPlanned roadmap or maintenance work, not a verified bug reportPlanned roadmap or maintenance work, not a verified bug reporttech-debtCode health and refactoringCode health and refactoring
Follow-up from #120 / #56
PR #120 fixes #56 by giving
DynamicExtractora default equilibrium function and by adding local validation for the documented activity-model selectors in extraction constructors. That PR intentionally keeps the broader selector source-of-truth cleanup out of scope so the #56 bug fix stays narrow.Problem
PharmaPy/Extractors.pynow hasVALID_GAMMA_METHODS = ('ideal', 'UNIFAC', 'UNIQUAC'), whilePharmaPy/Phases.pystill encodes the same selector set implicitly insidegetActivityCoeff. If a supported activity-coefficient model is added, renamed, or deprecated in one place, the extractor validation can drift from the thermo implementation.The same family of selectors appears under several names, including
gamma_model,gamma_method, andactivity_model. Related open issues #27 and #59 show adjacent places where activity-model routing already gets dropped or misapplied.Scope
gamma_model,gamma_method, andactivity_modelinPharmaPy/Phases.py,PharmaPy/Extractors.py,PharmaPy/DynamicExtraction.py,PharmaPy/Distillation.py, andPharmaPy/Evaporators.py.[-].References