-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 1D Fixed Bed reactor model to the IDAES gas-solids contactor library #984
Conversation
|
@chineduobiora The unit consistency problem is a know issue in Pyomo Pyomo/pyomo#1790 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the equations in detail (that would probably be best left to someone with more experience in these types of system), but I had some general comments.
Overall, this looks good but it needs to have at least some minimal documentation.
idaes/models_extra/gas_solid_contactors/unit_models/fixed_bed_1D.py
Outdated
Show resolved
Hide resolved
idaes/models_extra/gas_solid_contactors/unit_models/fixed_bed_1D.py
Outdated
Show resolved
Hide resolved
idaes/models_extra/gas_solid_contactors/unit_models/fixed_bed_1D.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model equations and tests look good, great job @chineduobiora! Everything looks good to me, excluding the known DAE units issue and a minor comment regarding the balance check tests.
idaes/models_extra/gas_solid_contactors/unit_models/tests/test_FB1D.py
Outdated
Show resolved
Hide resolved
idaes/models_extra/gas_solid_contactors/unit_models/tests/test_FB1D.py
Outdated
Show resolved
Hide resolved
idaes/models_extra/gas_solid_contactors/unit_models/tests/test_FB1D.py
Outdated
Show resolved
Hide resolved
idaes/models_extra/gas_solid_contactors/unit_models/tests/test_FB1D.py
Outdated
Show resolved
Hide resolved
How do we resolve it for this PR so the tests don't fail? |
@chineduobiora For now, I would |
…d documentation for FixedBed1D 3. Minor fixes to fixedbed0D and MBR models, and fixedbed0D documentation
docs/reference_guides/model_libraries/gas_solid_contactors/unit_models/fixed_bed_1D.rst
Outdated
Show resolved
Hide resolved
docs/reference_guides/model_libraries/gas_solid_contactors/unit_models/fixed_bed_1D.rst
Outdated
Show resolved
Hide resolved
idaes/models_extra/gas_solid_contactors/unit_models/fixed_bed_1D.py
Outdated
Show resolved
Hide resolved
docs/reference_guides/model_libraries/gas_solid_contactors/unit_models/fixed_bed_1D.rst
Show resolved
Hide resolved
All review comments have been addressed. @andrewlee94 and @bpaul4 do you have ideas why the "check code formatting (Black)" test is failing. I've run black on my local machine without any issues noted. |
@chineduobiora it appears the files |
@chineduobiora First thing to do is make sure you are using a compatible version of |
That's what it says but I've black-formatted them on my local repo. |
Ahh. That might be it. Thanks. |
Codecov ReportBase: 69.95% // Head: 69.97% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #984 +/- ##
==========================================
+ Coverage 69.95% 69.97% +0.01%
==========================================
Files 399 398 -1
Lines 65505 65591 +86
Branches 11984 12070 +86
==========================================
+ Hits 45827 45896 +69
- Misses 17367 17377 +10
- Partials 2311 2318 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@andrewlee94 @bpaul4 @Daison2102, all review comments have been addressed and all tests pass, let me know if there are any additional comments you have. Also, note that the TSA example (IDAES/examples-pse#152) is also dependent on the approval of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chineduobiora I have no further comments on the model, everything looks good. If you'd like to test the example before the model is merged, you could temporarily change the workflow head to the pull request branch (see my PR 151 in examples-pse where I did this for a notebook that depends on unmerged code) and then revert it back before merging the example.
@bpaul4 Thanks! I'll try it out. |
@@ -216,32 +228,18 @@ class FixedBed1DData(UnitModelBlockData): | |||
"pressure_drop_type", | |||
ConfigValue( | |||
default="ergun_correlation", | |||
domain=In(["simple_correlation", "ergun_correlation"]), | |||
domain=In(["ergun_correlation", "simple_correlation"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed now, but for the future you should consider using Python Enums
for this - they have the benefit of auto-completion in IDEs and documentation as a starting point.
Fixes
Summary/Motivation:
This PR will add a 1D fixed bed (1DFixedBed) unit model to the IDAES gas-solids contactor library. The 1DFixedBed is an axially varying time-dependent model with gas and solid phases modeled in detail.
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: