Rework temperature-dependent Henry's Law constant#903
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Henry's Law constant implementation to support temperature-dependent gas-particle partitioning equilibrium based on issue #892. The changes simplify the API by removing pH estimation and switching from multiple dissociation products (Yield) to a single condensed species (Species).
Changes:
- Replaces
HenrysLawCoefficientwithHenrysLawConstantusing van 't Hoff temperature dependence - Removes the placeholder
PhaseTransferCoefficientclass - Updates
PhaseTransferProcessAPI to useSpeciesinstead ofstd::vector<Yield>for condensed species
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
include/micm/process/transfer_coefficient/henrys_law_constant.hpp |
New implementation of temperature-dependent Henry's Law constant using van 't Hoff equation |
include/micm/process/transfer_coefficient/henrys_law_coefficient.hpp |
Removed old pH-dependent coefficient implementation |
include/micm/process/transfer_coefficient/phase_transfer_coefficient.hpp |
Removed placeholder class |
include/micm/process/phase_transfer_process.hpp |
Updated to use single Species instead of vector of Yield for condensed species |
include/micm/process/phase_transfer_process_builder.hpp |
Updated builder API to accept Species instead of Yield for condensed species |
include/micm/Process.hpp |
Updated includes to reference new HenrysLawConstant instead of removed classes |
test/unit/process/transfer_coefficient/test_henrys_law_constant.cpp |
New comprehensive tests for temperature-dependent Henry's Law constant |
test/unit/process/transfer_coefficient/test_henrys_law_coefficient.cpp |
Removed tests for old pH-dependent implementation |
test/unit/process/test_process.cpp |
Updated tests to use new API with Species instead of Yield |
test/unit/process/transfer_coefficient/CMakeLists.txt |
Updated test configuration to build new test file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #903 +/- ##
==========================================
+ Coverage 94.66% 94.75% +0.09%
==========================================
Files 66 65 -1
Lines 3245 3225 -20
==========================================
- Hits 3072 3056 -16
+ Misses 173 169 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR:
Speciesinstead ofYieldNote: The struct uses more descriptive parameter names than other places. If consistency is preferred, I can change this to the generic A, B, C parameter form.