Skip to content
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

Initial REE Costing Framework #1238

Closed
wants to merge 11 commits into from
Closed

Conversation

bpaul4
Copy link
Contributor

@bpaul4 bpaul4 commented Aug 9, 2023

Fixes

Summary/Motivation:

Initial framework for REE costing as part of PrOMMiS cost estimation efforts.

Changes proposed in this PR:

  • Adds first group of cost accounts for REE plants and support to load/execute them in the IDAES Costing Framework
  • Required modifications to IDAES Power Plant Costing Framework, including new methods for REE account handling and an expansion of the report call
  • Example flowsheet and test file with the first two accounts, which will be expanded to include all accounts later
  • Some updates to the power plant methods and documentation, notably for a new option to support multiple trains of a unit operation
  • REE costing documentation and bound estimation methods coming soon

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. 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.

@bpaul4 bpaul4 self-assigned this Aug 9, 2023
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Patch coverage: 69.97% and project coverage change: -0.06% ⚠️

Comparison is base (38b8333) 76.84% compared to head (c3b8ad5) 76.78%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1238      +/-   ##
==========================================
- Coverage   76.84%   76.78%   -0.06%     
==========================================
  Files         390      391       +1     
  Lines       61867    62321     +454     
  Branches    11388    11473      +85     
==========================================
+ Hits        47539    47855     +316     
- Misses      11866    11959      +93     
- Partials     2462     2507      +45     
Files Changed Coverage Δ
...ra/power_generation/costing/power_plant_capcost.py 69.08% <67.02%> (-1.86%) ⬇️
...a/power_generation/costing/costing_dictionaries.py 100.00% <100.00%> (ø)
...extra/rare_earth_recovery/ree_initial_flowsheet.py 100.00% <100.00%> (ø)

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -64,3 +64,9 @@ def load_sCO2_costing_dictionary():
with open(os.path.join(directory, "sCO2_costing_parameters.json"), "r") as file:
sCO2_costing_params = json.load(file)
return sCO2_costing_params


def load_REE_costing_dictionary():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right place for this? It seems really odd that something to do with REEs is ending up in the power plant sub-folder. This might indicate that the power_generation/costing folder really needs to be moved out to a models_extra/costing as it has spread beyond just power generation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewlee94 I am open to a discussion on reorganizing the costing code, this is just an initial implementation and the team decided to leverage our existing framework as a "path of least resistance" in the first pass. The costing folder probably does need to move to support more generic types and we could rename some files (e.g. power_plant_capcost.py >>> plant_capcost.py) to reflect our new capabilities.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it really should be moved before this is merged - otherwise it is likely to linger. Seeing as this is our public repo, we should make an effort to ensure that it is user friendly.

__author__ = "Costing Team (B. Paul and M. Zamarripa)"
__version__ = "1.0.0"

import pyomo.environ as pyo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, is this the right place for this? For one, it is rather isolated at the moment, and it appears to be more of a minimal test case for costing than an actual flowsheet (thus the name would probably be misleading to users). Would this be better placed in the PrOMMiS workspace, which is where the first process flowsheet will go as well (at least until we have something more comprehensive to show to the world)?

Copy link
Contributor Author

@bpaul4 bpaul4 Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the PrOMMiS workspace is ready, I can push the script there once it is complete and remove it from this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ksbeattie ksbeattie added PrOMMiS Issues related to PrOMMiS activities Priority:Normal Normal Priority Issue or PR labels Aug 10, 2023
@bpaul4
Copy link
Contributor Author

bpaul4 commented Sep 21, 2023

Closing this in favor of https://github.com/prommis/workspace/pull/13

@bpaul4 bpaul4 closed this Sep 21, 2023
@bpaul4 bpaul4 deleted the prommis-costing branch February 1, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR PrOMMiS Issues related to PrOMMiS activities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants