Byproduct recovery framework tutorial#141
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
- Coverage 97.21% 97.20% -0.01%
==========================================
Files 93 93
Lines 12587 12589 +2
==========================================
+ Hits 12236 12237 +1
- Misses 351 352 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bpaul4
left a comment
There was a problem hiding this comment.
Hi @Lingyan90, the content here is good, I have some initial comments.
rename the tutorial file fix typos
|
This is related to the generally applicable functionality introduced mainly in #123. |
|
@MAZamarripa addressed your comments based on our meeting discussion |
|
@MAZamarripa provided review feedback offline and the corresponding changes have already been applied. A second round of review is underway. This should be in the June release. Also: the RtD check failure is due to this tutorial expecting the Costing tutorial being added in #91 to be already present. It is expected to be resolved by itself once #91 is merged in. |
|
This is waiting for a last round of feedback/approval by @MAZamarripa. It should be merged once #91 has been merged in (RTD checks are expected to fail until then). |
agarciadiego
left a comment
There was a problem hiding this comment.
Mostly looks good, although there is a large number of warnings. Is there a way to fix those values to exist in the bounds?
|
@sufikaur can you take a look into the failing docs test |
|
@agarciadiego @sufikaur the docs test failure is a reference to a file added in #91 and should pass once that PR is merged. |
@mollydougher The warnings mentioned above happens when build the dialfiltration model. What's your thought on this? |
bpaul4
left a comment
There was a problem hiding this comment.
I think this is great, thank you @Lingyan90 for your efforts here. My one question is why the "Package Installation" section is at the very end of the notebook, and not somewhere after the introduction?
@bpaul4 , the "Package Installation" section was at the Step 1 part, @MAZamarripa commented that "Package Installation" was not important or not the major foqus of the tutorial, and suggest that the "Package Installaiton" park could be moved to the end of the tutorial or remove it. So I moved it to the end of the tutorial. |
@Lingyan90 @bpaul4 I have 2 notes on this issue:
but the value of |
|
Hi @Lingyan90 @bpaul4 @mollydougher This issue with a large number of warnings also appears in the diafiltration flowsheet model. It has been a while so the details are not clear to me anymore, but there were initially no warnings when Andrew wrote the diafiltration tutorial and they started showing up after a later IDAES update. |
MarcusHolly
left a comment
There was a problem hiding this comment.
A few minor suggestions
There was a problem hiding this comment.
Do we expect this to be resolved by now? If not, is there some way we can modify these equations to display correctly? My concern is that the equations will be forgotten and remain like this for a while.
| "\n", | ||
| "This section gives a brief introduction of how to build upon the pre-defined diafiltration process model. The lithium-cobalt diafiltration process is implemented in the file [diafiltration.py](https://github.com/prommis/prommis/blob/main/src/prommis/nanofiltration/diafiltration.py), available in the PrOMMiS repository. \n", | ||
| "\n", | ||
| "To construct a process flowsheet using this existing model, users can refer to the detailed walkthrough provided in the [Multi_Stream Contactor Tutorial (Solution)](https://github.com/prommis/prommis/blob/main/docs/tutorials/diafiltration-solution.ipynb). This tutorial outlines major order for building the flowsheet. \n", |
There was a problem hiding this comment.
| "To construct a process flowsheet using this existing model, users can refer to the detailed walkthrough provided in the [Multi_Stream Contactor Tutorial (Solution)](https://github.com/prommis/prommis/blob/main/docs/tutorials/diafiltration-solution.ipynb). This tutorial outlines major order for building the flowsheet. \n", | |
| "To construct a process flowsheet using this existing model, users can refer to the detailed walkthrough provided in the [Multi_Stream Contactor Tutorial (Solution)](https://github.com/prommis/prommis/blob/main/docs/tutorials/diafiltration-solution.ipynb). This tutorial outlines the major steps for building the flowsheet. \n", |
There was a problem hiding this comment.
the equations was displaying right in local run. It shows differently in the Jupyter platform online, this is more like a platform issue and we've discussed this before, and was decided to let it remain like this for now.
| "\n", | ||
| "To determine whether lithium and cobalt should be recovered, the user first needs to __build the diafiltration process__ and __access the cost and revenue__.\n", | ||
| "\n", | ||
| "Refer the process model defined in ``diafiltration.py``. Specifically, call the functions in the order specified within the ``main()`` function. Following this order is crucial because the diafiltration process consists of three membrane stages, and the model is built stage by stage. \n", |
There was a problem hiding this comment.
| "Refer the process model defined in ``diafiltration.py``. Specifically, call the functions in the order specified within the ``main()`` function. Following this order is crucial because the diafiltration process consists of three membrane stages, and the model is built stage by stage. \n", | |
| "Refer to the process model defined in ``diafiltration.py``. Specifically, call the functions in the order specified within the ``main()`` function. Following this order is crucial because the diafiltration process consists of three membrane stages, and the model is built stage by stage. \n", |
| "\n", | ||
| "__3.1. Specify Product Prices__\n", | ||
| "\n", | ||
| "Product prices are defined in [costing_dictionary.py](https://github.com/prommis/workspace/blob/main/prommis_workspace/UKy_flowsheet/costing/costing_dictionaries.py). Users can access the default sale prices via ``load_default_sale_prices()`` function, as shown below:" |
There was a problem hiding this comment.
| "Product prices are defined in [costing_dictionary.py](https://github.com/prommis/workspace/blob/main/prommis_workspace/UKy_flowsheet/costing/costing_dictionaries.py). Users can access the default sale prices via ``load_default_sale_prices()`` function, as shown below:" | |
| "Product prices are defined in [costing_dictionaries.py](https://github.com/prommis/workspace/blob/main/prommis_workspace/UKy_flowsheet/costing/costing_dictionaries.py). Users can access the default sale prices via ``load_default_sale_prices()`` function, as shown below:" |
| "source": [ | ||
| "## __Package Installation__\n", | ||
| "\n", | ||
| "As mentioned previously, Pyomo, IDAES, and PrOMMiS packages are necessary to use the framework. If these packages are not installed, this maybe done using the following commands in Anaconda Prompt:" |
There was a problem hiding this comment.
| "As mentioned previously, Pyomo, IDAES, and PrOMMiS packages are necessary to use the framework. If these packages are not installed, this maybe done using the following commands in Anaconda Prompt:" | |
| "As mentioned previously, Pyomo, IDAES, and PrOMMiS packages are necessary to use the framework. If these packages are not installed, this may be done using the following commands in Anaconda Prompt:" |
There was a problem hiding this comment.
"the following commands in Anaconda Prompt" are not being shown here
There was a problem hiding this comment.
updated the text type, it should show up now.
MarcusHolly
left a comment
There was a problem hiding this comment.
Seems like you addressed all my comments, so LGTM
Addresses Issue:
This tutorial explains how to use the byproduct recovery framework.
Summary/Motivation:
This tutorial demonstrated how to apply the byproduct recovery framework to an elements recovery plants. A case study of lithium-colbalt recovery from diafiltration process is utilized.
Changes proposed in this PR:
doc\_toc.ymlReviewer's checklist / merge requirements:
mainbranch on the PR author's forkLegal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution:
I agree my contributions are submitted under the license terms described in the LICENSE.md file
at the top level of this directory.
I represent I am authorized to make the contributions and grant the license. If my employer has
rights to intellectual property that includes these contributions, I represent that I have
received permission to make contributions and grant the required license on behalf of that
employer.