-
Notifications
You must be signed in to change notification settings - Fork 57
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
Extended BSM2 Flowsheet Costing #1405
Extended BSM2 Flowsheet Costing #1405
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1405 +/- ##
==========================================
+ Coverage 94.02% 94.03% +0.01%
==========================================
Files 335 335
Lines 35620 35727 +107
==========================================
+ Hits 33491 33597 +106
- Misses 2129 2130 +1 ☔ View full report in Codecov by Sentry. |
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.
Looks good- just a couple of comments to consider
@@ -658,6 +678,184 @@ def solve(m, solver=None): | |||
return results | |||
|
|||
|
|||
def add_costing(m): | |||
m.fs.costing = WaterTAPCosting() | |||
m.fs.costing.base_currency = pyo.units.USD_2020 |
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.
Is this what we use on the conventional BSM2? I think we should avoid 2020 as the base currency because of the pandemic's impact.
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.
Conventional also used 2020... should I switch both to 2018 or 2019?
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.
Good question. I'm not sure that we've selected a standard year that we want to go by. I think I can recall using 2018 for a few of the IEDO models previously. I suppose we can put a pin it this for now if we'd rather settle on a year.
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.
But perhaps the best route is to go with the latest year that we have the CEPCI index for
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 latest year in IDAES is 2022, but it appears that hasn't made it's way into WaterTAP yet. I tried 2021 as well, but the solver failed to return an optimal solution... not sure why that would happen.
|
||
# process costing and add system level metrics | ||
m.fs.costing.cost_process() | ||
m.fs.costing.add_electricity_intensity(m.fs.FeedWater.properties[0].flow_vol) |
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.
Why add electricity intensity and specific energy consumption? They should be the same so you can probably remove this.
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.
This was pretty much a copy+paste from the conventional BSM2 costing. I'll remove electricity intensity from both.
pyo.value(m.fs.AD.electricity_consumption[0]), | ||
pyo.units.get_units(m.fs.AD.electricity_consumption[0]), | ||
) | ||
print( |
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.
Looks like a chunk of these printouts aren't technically under the "costing" category. Maybe you can consider moving those under a separate display function.
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.
Sure, I'll address your comments for the conventional and extended BSM2 flowsheets
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.
LGTM - do we skip the mac test on conventional BSM2 as well? Just want to take note of this
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.
LGTM
Yes, we also skip mac tests for conventional BSM2. |
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: