Skip to content

Comments

Improved Power Plant Costing Methods#978

Merged
andrewlee94 merged 46 commits intoIDAES:mainfrom
bpaul4:TOC_costing_final
Oct 14, 2022
Merged

Improved Power Plant Costing Methods#978
andrewlee94 merged 46 commits intoIDAES:mainfrom
bpaul4:TOC_costing_final

Conversation

@bpaul4
Copy link
Contributor

@bpaul4 bpaul4 commented Oct 4, 2022

Fixes

Summary/Motivation:

Changes proposed in this PR:

  • Adds Nov 2008 and Sep 2019 CEPCI factors to the registered currency units dictionary
  • Significant improvement to physical units handling for process and currency parameters, including allowing users to specify a base year with automatic currency units conversion
  • Ensures units consistency across power plant costing methods, and employs new UnitModelCostingBlock syntax
  • Variables costs were changed from units of $MM/production (implied for one year) to actual units of $MM/year. Only power production is considered, not hydrogen.

Some other changes:

  • Combines costing parameter and exponent dictionaries, and adds bare erected cost currency units for a specific reference year and prefix. For example, dictionaries containing "BEC_units": "K$2018" will tell the costing methods to import the reference costs in kUSD_2018 (Pyomo unit container). Results are reported in MUSD_year, where year is the base year chosen by users.

  • Similarly, scaled parameters now automatically get variable units and reference parameter accounts units must use correct Pyomo units syntax.

  • Finally, the tests were updated, including the ones using the old costing methods. We will remove those in a future update.

  • This will break the current NGCC SOEC example. A fix for this exists in Update NGCC SOEC example for new costing methods examples-pse#151 and should be merged ASAP after merging this PR.

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.

Miguel Zamarripa-Perez and others added 30 commits June 22, 2022 18:57
Adding cost of electricity and cost of capture to report method
Fixing units of cost of electricity
* Sphinx Documentation Build Issue (IDAES#890)

* switch lang flag to 'en'

* Flag formatting

* Update path reference

* updating power plant capcost and QGESS tests to run as expected

* bring over MEA_CCS updates and tests

* running black on costing/ directory

* move custom dicts to new file

* fix some spacing causing doc build errors

* Replace method calls with UnitModelCostingBlocks

* Running black on the entire repo (IDAES#894)

* Running black on the entire repo

* Add pinned requirement for Black stable version

* Add CI check to ensure code is Black-formatted

Co-authored-by: Ludovico Bianchi <[email protected]>

* Fix PySMO tests (IDAES#903)

* Minor change to trigger tests

* Added abs to tolerance check

* Run black

* Remove string comparison

* Tighten tolerance

* Fixed kriging test by removing variable dependence

* bring in report method updates

* bring in more MEA CCS updates

* Add check on total TPC

* final formatting fixes

* Update report method

Adding cost of electricity and cost of capture to report method

* Black reformatting

* Update report method

Fixing units of cost of electricity

Co-authored-by: Keith Beattie <[email protected]>
Co-authored-by: Ludovico Bianchi <[email protected]>
Co-authored-by: OOAmusat <[email protected]>
Co-authored-by: Daison2102 <[email protected]>
Copy link
Contributor

@andrewlee94 andrewlee94 left a comment

Choose a reason for hiding this comment

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

In addition to my request to move the definition of the new costing units from costing_base.py, I also saw a few cases where you have code that executes as the module level which needs to be addressed (just wrap it all in a simple method).

Copy link
Member

@MAZamarripa MAZamarripa left a comment

Choose a reason for hiding this comment

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

lgtm

@MAZamarripa MAZamarripa self-requested a review October 13, 2022 17:28
Copy link
Member

@MAZamarripa MAZamarripa left a comment

Choose a reason for hiding this comment

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

lgtm

@bpaul4 bpaul4 added the CI:run-integration triggers_workflow: Integration label Oct 13, 2022
@idaes-build idaes-build removed the CI:run-integration triggers_workflow: Integration label Oct 13, 2022
Copy link
Contributor

@andrewlee94 andrewlee94 left a comment

Choose a reason for hiding this comment

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

Almost there - I just have a couple more comments, tow of which are commented code I saw whilst going through.

The more significant one however involves the tests - it looks like one of the tests deletes existing files in the main package so that you can test recreating these files. This is not good practice, and runs against what tests should do. If you need to test creating files, you should be creating them in a temporary directory for the tests and cleaning up afterwards, not deleting files in the main package.

@bpaul4 bpaul4 requested a review from andrewlee94 October 13, 2022 18:58
Copy link
Contributor

@andrewlee94 andrewlee94 left a comment

Choose a reason for hiding this comment

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

One more relatively simple request - could you do at least some minimal check of the files that are generated by load_generic_ccs_costing_dictionary (at least check that they were created).

@andrewlee94 andrewlee94 enabled auto-merge (squash) October 14, 2022 13:11
@lbianchi-lbl lbianchi-lbl added the CI:run-integration triggers_workflow: Integration label Oct 14, 2022
@idaes-build idaes-build removed the CI:run-integration triggers_workflow: Integration label Oct 14, 2022
@andrewlee94 andrewlee94 disabled auto-merge October 14, 2022 15:40
@andrewlee94 andrewlee94 merged commit 6f35052 into IDAES:main Oct 14, 2022
@bpaul4 bpaul4 deleted the TOC_costing_final branch September 1, 2023 13:04
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

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

8 participants