ProFAST 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. profast-1.0.3/LICENSE +31 -0
  2. profast-1.0.3/MANIFEST.in +2 -0
  3. profast-1.0.3/NOTICE.txt +3 -0
  4. profast-1.0.3/PKG-INFO +221 -0
  5. profast-1.0.3/ProFAST/__init__.py +16 -0
  6. profast-1.0.3/ProFAST/examples/ProFAST_example.py +98 -0
  7. profast-1.0.3/ProFAST/examples/generic_example.py +156 -0
  8. profast-1.0.3/ProFAST/pyc_files/ProFAST_308.pyc +0 -0
  9. profast-1.0.3/ProFAST/pyc_files/ProFAST_309.pyc +0 -0
  10. profast-1.0.3/ProFAST/pyc_files/ProFAST_310.pyc +0 -0
  11. profast-1.0.3/ProFAST/pyc_files/ProFAST_311.pyc +0 -0
  12. profast-1.0.3/ProFAST/resources/central_biomass_gasification.json +102 -0
  13. profast-1.0.3/ProFAST/resources/central_coal_gasification_w_ccs.json +95 -0
  14. profast-1.0.3/ProFAST/resources/central_grid_electrolysis_PEM.json +88 -0
  15. profast-1.0.3/ProFAST/resources/central_grid_electrolysis_solid_oxide.json +95 -0
  16. profast-1.0.3/ProFAST/resources/central_natural_gas_reforming_no_ccs.json +95 -0
  17. profast-1.0.3/ProFAST/resources/central_natural_gas_reforming_w_ccs.json +95 -0
  18. profast-1.0.3/ProFAST/resources/central_solar_electrolysis.json +88 -0
  19. profast-1.0.3/ProFAST/resources/central_wind_electrolysis.json +88 -0
  20. profast-1.0.3/ProFAST/resources/gen_h2_fueling.json +74 -0
  21. profast-1.0.3/ProFAST/resources/h2-fast-2022-07202023-generic-fueling.xlsm +0 -0
  22. profast-1.0.3/ProFAST/resources/h2-fast-2022-0915.xlsm +0 -0
  23. profast-1.0.3/ProFAST/resources/only_variables.json +39 -0
  24. profast-1.0.3/ProFAST/resources/regional_feedstock_costs.csv +101 -0
  25. profast-1.0.3/ProFAST.egg-info/PKG-INFO +221 -0
  26. profast-1.0.3/ProFAST.egg-info/SOURCES.txt +33 -0
  27. profast-1.0.3/ProFAST.egg-info/dependency_links.txt +1 -0
  28. profast-1.0.3/ProFAST.egg-info/requires.txt +9 -0
  29. profast-1.0.3/ProFAST.egg-info/top_level.txt +1 -0
  30. profast-1.0.3/README.md +170 -0
  31. profast-1.0.3/pyproject.toml +26 -0
  32. profast-1.0.3/setup.cfg +4 -0
  33. profast-1.0.3/tests/test_compare_with_excel.py +661 -0
  34. profast-1.0.3/tests/test_setting_variables.py +345 -0
  35. profast-1.0.3/tests/test_solvers.py +20 -0
profast-1.0.3/LICENSE ADDED
@@ -0,0 +1,31 @@
1
+ END USER SOFTWARE LICENSE AGREEMENT
2
+
3
+ This License Agreement (“Agreement”) is between the Alliance for Sustainable Energy, LLC (“Alliance”), the manager and operator of the National Renewable Energy Laboratory (“NREL”) for the U.S. Department of Energy (the “DOE”) and you (“Licensee”) hereinafter “Party” or collectively the “Parties.” By downloading, accessing, or using the Software described hereunder, you agree to be bound by the terms of this Agreement.
4
+
5
+ IF YOU ARE ENTERING INTO THIS AGREEMENT WITHIN THE SCOPE OF YOUR EMPLOYMENT OR IN CONNECTION WITH YOUR ENGAGEMENT AS AN INDEPENDENT CONTRACTOR, THEN THE TERM “LICENSEE” INCLUDES YOUR EMPLOYER OR PRINCIPAL CONTRACTOR, AS APPLICABLE, AND YOU REPRESENT AND WARRANT TO ALLIANCE THAT YOU ARE AUTHORIZED TO ACCEPT THIS AGREEMENT ON SUCH EMPLOYER’S OR PRINCIPAL CONTRACTOR’S BEHALF.
6
+
7
+ 1. License Grant.
8
+ Alliance hereby grants Licensee a royalty-free, nonexclusive, nontransferable, limited license for the computer software program “ProFAST (Production Financial Analysis Scenario Tool)” (NREL Software Record no. SWR-23-88) in executable format, together with any documentation provided by Alliance which relates to its functional, operational or performance characteristics, as made available to Licensee via https://www.github.com/nrel/profast, and as modified from time to time (“Software”) to install, copy, and run the Software for noncommercial, internal research purposes only.
9
+ 1.1. Licensee may not disclose Software source code or any executable code generated therefrom to any third party.
10
+ 1.2. Licensee may not translate, decompile, reverse engineer, disassemble or otherwise attempt to create a human-readable version of the Software to the extent supplied in object code format.
11
+ 1.3. Any copies of the Software made by Licensee shall be subject to the terms of this Agreement.
12
+ 1.4. Alliance reserves and retains all rights, title, and other interests in the Software and any copies thereof, which are not explicitly granted to Licensee herein.
13
+ 1.5. Any copies of Software shall bear the following notice:
14
+
15
+ NOTICE
16
+
17
+ Copyright © 2024 Alliance for Sustainable Energy, LLC, Inc. All Rights Reserved
18
+
19
+ This computer software was produced by the Alliance for Sustainable Energy, LLC (Contractor) under Contract No. DE-AC36-08GO28308 with the U.S. Department of Energy (DOE). During the period of commercialization or such other time period specified by the DOE, the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, and perform publicly and display publicly, by or on behalf of the Government. Subsequent to that period the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so. The specific term of the license can be identified by inquiry made to the Contractor or DOE. NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY DATA, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
20
+
21
+ 1.6. Licensee agrees to credit the DOE, NREL, and Alliance in any publication or public presentation that results from use of the Software. However, the names of NREL, DOE, or Alliance may not be used to endorse or promote products derived from this software without specific prior written permission.
22
+ 1.7. Alliance makes no guarantee of accessibility or ongoing availability of the Repository or of the Software. Alliance may revoke Licensee’s access or remove any or all portions of the Software from the Repository at any time and for any reason (or for no reason). Licensee agrees that Alliance has no obligation to provide access to the Repository or provide the Software.
23
+
24
+ 2. Maintenance or Support. Licensee assumes sole responsibility for the installation, use and results obtained from use of the Software. Alliance shall be under no obligation whatsoever to: (i) provide maintenance or support for Software; or (ii) to notify Licensee of bug fixes, patches, or upgrades to Software (if any). If, in its sole discretion, Alliance makes a Software bug fix, patch or upgrade available to Licensee and Alliance does not separately enter into a written license agreement with Licensee relating to such bug fix, patch or upgrade, then it shall be deemed incorporated into the Software and subject to this Agreement.
25
+ 3. United States Government Rights. The Software was developed under funding from the DOE, and the United States Government retains certain rights as follows: For five (5) years after the date permission to assert copyright is obtained from the DOE, and during any subsequent five (5) year renewals, the United States Government is granted for itself and others acting on its behalf a non-exclusive, paid-up, irrevocable, worldwide license in the Software to reproduce, prepare derivative works, perform publicly and display publicly. Subsequent to that period or any extension granted, the Government is granted for itself and others acting on its behalf, a nonexclusive, paid-up, irrevocable worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, perform publicly and display publicly, and to permit others to do so.
26
+ 4. Warranty Disclaimer. THE SOFTWARE IS SUPPLIED “AS IS” WITHOUT WARRANTY OF ANY KIND. ALLIANCE, NREL, THE UNITED STATES GOVERNMENT, DOE, AND THEIR EMPLOYEES, OFFICERS AND AGENTS: (i) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (ii) DO NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF SOFTWARE, (iii) DO NOT REPRESENT THAT USE OF SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, AND (iv) DO NOT WARRANT THAT THE OPERATION OF SOFTWARE WILL BE UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.
27
+ 5. Limitation of Liability. IN NO EVENT WILL ALLIANCE, NREL, DOE OR THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE (INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, LOSS OF DATA, LOSS OF USE, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES OR BUSINESS INTERRUPTION) FOR ANY REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ALLIANCE, NREL, DOE OR THE UNITED STATES GOVERNMENT IS MADE AWARE OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES.
28
+ 6. Indemnity. Licensee shall indemnify, defend, and hold harmless Alliance, the DOE, the U.S. Government, and their agents, officers, and employees, against any and all claims, suits, losses, damage, costs, fees, and expenses arising out of or in connection with Licensee’s use of the Software pursuant to this Agreement. Licensee shall pay all costs incurred by Alliance, the DOE and the U.S. Government in enforcing this provision, including reasonable attorney fees. Licensee shall comply with all applicable laws and regulations (including privacy laws and regulations) having application to or governing its use and/or operation of the Software and agrees to indemnify and hold DOE, Alliance and the U.S. Government harmless from and against any claims, damages, losses or obligations suffered or incurred by Alliance directly or indirectly arising from its failure to so comply.
29
+ 7. Term and Termination. The license granted to Licensee under this Agreement shall continue unless terminated earlier in accordance with this Agreement. Alliance shall have the right to terminate this license in its sole discretion at any time and for any reason (or for no reason) upon notice to Licensee. If Licensee breaches any term of this Agreement, and fails to cure such breach within thirty (30) days of the date of written notice, this Agreement shall immediately terminate. Licensee may terminate this Agreement without cause upon thirty (30) days written notice to Alliance. Upon termination of the Agreement, Licensee shall immediately cease using the Software, destroy all copies of the Software, and provide Alliance with written certification of Licensee’s compliance with the foregoing. Notwithstanding any provision of this Agreement to the contrary, Sections 1.5, 1.6, and 3 through 9 shall survive termination of this Agreement.
30
+ 8. Export Controls. Licensee shall observe all applicable United States and foreign laws and regulations (if any) with respect to the export, re-export, diversion or transfer of Software, related technical data and direct products thereof, including, without limitation, the Export Administration Regulations.
31
+ 9. General. This Agreement, and the rights and liabilities of the Parties with respect to this Agreement and its subject matter, shall be governed by the laws of the State of Colorado, without reference to the principles of conflicts of laws thereof. Any dispute arising out of or relating to this Agreement or its subject matter not settled by the Parties may be resolved only by the courts of the State of Colorado, or if subject matter jurisdiction exists, by the United States federal courts, with venue in the County of Denver (in the case of state court) or in the U.S. District Court for the District of Colorado (in the case of federal court). Each of the Parties hereby consents to the jurisdiction of such courts over it in any action involving any such dispute. Each of the Parties agree not to commence or maintain a legal proceeding involving any such dispute in any forum except a court of the State of Colorado located in Denver County or the United States District Court for the District of Colorado (other than to enforce a judgment obtained in such courts) and agrees not to contest the venue of any action involving any such dispute in the County of Denver or the District of Colorado, as the case may be, nor to assert in any such court the doctrine of forum non conveniens, or the like. Any modification or amendment of this Agreement must be in writing signed by a duly authorized representative of each Party. This Agreement is binding upon and shall inure to the benefit of Alliance, its successors and assignees and therefore may be assigned to a successor operator of NREL for the United States Government. This Agreement represents the entire understanding of the Parties, and supersedes all previous communications, written or oral, relating to the subject of this Agreement. This license does not constitute an endorsement of Licensee’s products and/or services, if any, and Licensee shall not use the names, logos or brands of Alliance, NREL or DOE without the express written consent of Alliance, or DOE as applicable. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.
@@ -0,0 +1,2 @@
1
+ include ProFAST/pyc_files/*
2
+ include ProFAST/resources/*
@@ -0,0 +1,3 @@
1
+ NOTICE
2
+ Copyright © 2023 Alliance for Sustainable Energy, LLC
3
+ These data were produced by the Alliance for Sustainable Energy, LLC (Contractor) under Contract No. DE-AC36-08GO28308 with the U.S. Department of Energy (DOE). During the period of commercialization or such other time period specified by the DOE, the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, and perform publicly and display publicly, by or on behalf of the Government. Subsequent to that period the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so. The specific term of the license can be identified by inquiry made to the Contractor or DOE. NEITHER CONTRACTOR, THE UNITED STATES, NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY DATA, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
profast-1.0.3/PKG-INFO ADDED
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.1
2
+ Name: ProFAST
3
+ Version: 1.0.3
4
+ Summary: Production Financial Analysis Scenario Tool
5
+ Author-email: Jamie Kee <Jamie.Kee@nrel.gov>, Michael Penev <Michael.Penev@nrel.gov>
6
+ License: END USER SOFTWARE LICENSE AGREEMENT
7
+
8
+ This License Agreement (“Agreement”) is between the Alliance for Sustainable Energy, LLC (“Alliance”), the manager and operator of the National Renewable Energy Laboratory (“NREL”) for the U.S. Department of Energy (the “DOE”) and you (“Licensee”) hereinafter “Party” or collectively the “Parties.” By downloading, accessing, or using the Software described hereunder, you agree to be bound by the terms of this Agreement.
9
+
10
+ IF YOU ARE ENTERING INTO THIS AGREEMENT WITHIN THE SCOPE OF YOUR EMPLOYMENT OR IN CONNECTION WITH YOUR ENGAGEMENT AS AN INDEPENDENT CONTRACTOR, THEN THE TERM “LICENSEE” INCLUDES YOUR EMPLOYER OR PRINCIPAL CONTRACTOR, AS APPLICABLE, AND YOU REPRESENT AND WARRANT TO ALLIANCE THAT YOU ARE AUTHORIZED TO ACCEPT THIS AGREEMENT ON SUCH EMPLOYER’S OR PRINCIPAL CONTRACTOR’S BEHALF.
11
+
12
+ 1. License Grant.
13
+ Alliance hereby grants Licensee a royalty-free, nonexclusive, nontransferable, limited license for the computer software program “ProFAST (Production Financial Analysis Scenario Tool)” (NREL Software Record no. SWR-23-88) in executable format, together with any documentation provided by Alliance which relates to its functional, operational or performance characteristics, as made available to Licensee via https://www.github.com/nrel/profast, and as modified from time to time (“Software”) to install, copy, and run the Software for noncommercial, internal research purposes only.
14
+ 1.1. Licensee may not disclose Software source code or any executable code generated therefrom to any third party.
15
+ 1.2. Licensee may not translate, decompile, reverse engineer, disassemble or otherwise attempt to create a human-readable version of the Software to the extent supplied in object code format.
16
+ 1.3. Any copies of the Software made by Licensee shall be subject to the terms of this Agreement.
17
+ 1.4. Alliance reserves and retains all rights, title, and other interests in the Software and any copies thereof, which are not explicitly granted to Licensee herein.
18
+ 1.5. Any copies of Software shall bear the following notice:
19
+
20
+ NOTICE
21
+
22
+ Copyright © 2024 Alliance for Sustainable Energy, LLC, Inc. All Rights Reserved
23
+
24
+ This computer software was produced by the Alliance for Sustainable Energy, LLC (Contractor) under Contract No. DE-AC36-08GO28308 with the U.S. Department of Energy (DOE). During the period of commercialization or such other time period specified by the DOE, the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, and perform publicly and display publicly, by or on behalf of the Government. Subsequent to that period the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so. The specific term of the license can be identified by inquiry made to the Contractor or DOE. NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY DATA, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
25
+
26
+ 1.6. Licensee agrees to credit the DOE, NREL, and Alliance in any publication or public presentation that results from use of the Software. However, the names of NREL, DOE, or Alliance may not be used to endorse or promote products derived from this software without specific prior written permission.
27
+ 1.7. Alliance makes no guarantee of accessibility or ongoing availability of the Repository or of the Software. Alliance may revoke Licensee’s access or remove any or all portions of the Software from the Repository at any time and for any reason (or for no reason). Licensee agrees that Alliance has no obligation to provide access to the Repository or provide the Software.
28
+
29
+ 2. Maintenance or Support. Licensee assumes sole responsibility for the installation, use and results obtained from use of the Software. Alliance shall be under no obligation whatsoever to: (i) provide maintenance or support for Software; or (ii) to notify Licensee of bug fixes, patches, or upgrades to Software (if any). If, in its sole discretion, Alliance makes a Software bug fix, patch or upgrade available to Licensee and Alliance does not separately enter into a written license agreement with Licensee relating to such bug fix, patch or upgrade, then it shall be deemed incorporated into the Software and subject to this Agreement.
30
+ 3. United States Government Rights. The Software was developed under funding from the DOE, and the United States Government retains certain rights as follows: For five (5) years after the date permission to assert copyright is obtained from the DOE, and during any subsequent five (5) year renewals, the United States Government is granted for itself and others acting on its behalf a non-exclusive, paid-up, irrevocable, worldwide license in the Software to reproduce, prepare derivative works, perform publicly and display publicly. Subsequent to that period or any extension granted, the Government is granted for itself and others acting on its behalf, a nonexclusive, paid-up, irrevocable worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, perform publicly and display publicly, and to permit others to do so.
31
+ 4. Warranty Disclaimer. THE SOFTWARE IS SUPPLIED “AS IS” WITHOUT WARRANTY OF ANY KIND. ALLIANCE, NREL, THE UNITED STATES GOVERNMENT, DOE, AND THEIR EMPLOYEES, OFFICERS AND AGENTS: (i) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (ii) DO NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF SOFTWARE, (iii) DO NOT REPRESENT THAT USE OF SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, AND (iv) DO NOT WARRANT THAT THE OPERATION OF SOFTWARE WILL BE UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.
32
+ 5. Limitation of Liability. IN NO EVENT WILL ALLIANCE, NREL, DOE OR THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE (INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, LOSS OF DATA, LOSS OF USE, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES OR BUSINESS INTERRUPTION) FOR ANY REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ALLIANCE, NREL, DOE OR THE UNITED STATES GOVERNMENT IS MADE AWARE OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES.
33
+ 6. Indemnity. Licensee shall indemnify, defend, and hold harmless Alliance, the DOE, the U.S. Government, and their agents, officers, and employees, against any and all claims, suits, losses, damage, costs, fees, and expenses arising out of or in connection with Licensee’s use of the Software pursuant to this Agreement. Licensee shall pay all costs incurred by Alliance, the DOE and the U.S. Government in enforcing this provision, including reasonable attorney fees. Licensee shall comply with all applicable laws and regulations (including privacy laws and regulations) having application to or governing its use and/or operation of the Software and agrees to indemnify and hold DOE, Alliance and the U.S. Government harmless from and against any claims, damages, losses or obligations suffered or incurred by Alliance directly or indirectly arising from its failure to so comply.
34
+ 7. Term and Termination. The license granted to Licensee under this Agreement shall continue unless terminated earlier in accordance with this Agreement. Alliance shall have the right to terminate this license in its sole discretion at any time and for any reason (or for no reason) upon notice to Licensee. If Licensee breaches any term of this Agreement, and fails to cure such breach within thirty (30) days of the date of written notice, this Agreement shall immediately terminate. Licensee may terminate this Agreement without cause upon thirty (30) days written notice to Alliance. Upon termination of the Agreement, Licensee shall immediately cease using the Software, destroy all copies of the Software, and provide Alliance with written certification of Licensee’s compliance with the foregoing. Notwithstanding any provision of this Agreement to the contrary, Sections 1.5, 1.6, and 3 through 9 shall survive termination of this Agreement.
35
+ 8. Export Controls. Licensee shall observe all applicable United States and foreign laws and regulations (if any) with respect to the export, re-export, diversion or transfer of Software, related technical data and direct products thereof, including, without limitation, the Export Administration Regulations.
36
+ 9. General. This Agreement, and the rights and liabilities of the Parties with respect to this Agreement and its subject matter, shall be governed by the laws of the State of Colorado, without reference to the principles of conflicts of laws thereof. Any dispute arising out of or relating to this Agreement or its subject matter not settled by the Parties may be resolved only by the courts of the State of Colorado, or if subject matter jurisdiction exists, by the United States federal courts, with venue in the County of Denver (in the case of state court) or in the U.S. District Court for the District of Colorado (in the case of federal court). Each of the Parties hereby consents to the jurisdiction of such courts over it in any action involving any such dispute. Each of the Parties agree not to commence or maintain a legal proceeding involving any such dispute in any forum except a court of the State of Colorado located in Denver County or the United States District Court for the District of Colorado (other than to enforce a judgment obtained in such courts) and agrees not to contest the venue of any action involving any such dispute in the County of Denver or the District of Colorado, as the case may be, nor to assert in any such court the doctrine of forum non conveniens, or the like. Any modification or amendment of this Agreement must be in writing signed by a duly authorized representative of each Party. This Agreement is binding upon and shall inure to the benefit of Alliance, its successors and assignees and therefore may be assigned to a successor operator of NREL for the United States Government. This Agreement represents the entire understanding of the Parties, and supersedes all previous communications, written or oral, relating to the subject of this Agreement. This license does not constitute an endorsement of Licensee’s products and/or services, if any, and Licensee shall not use the names, logos or brands of Alliance, NREL or DOE without the express written consent of Alliance, or DOE as applicable. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.
37
+
38
+ Requires-Python: >=3.8
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE
41
+ License-File: NOTICE.txt
42
+ Requires-Dist: importlib_resources
43
+ Requires-Dist: matplotlib
44
+ Requires-Dist: numpy
45
+ Requires-Dist: numpy_financial
46
+ Requires-Dist: pandas
47
+ Requires-Dist: plotly
48
+ Requires-Dist: pyarrow
49
+ Requires-Dist: pytest
50
+ Requires-Dist: xlwings
51
+
52
+ # ProFAST
53
+ The Production Financial Analysis Scenario Tool (ProFAST) is the python version of H2FAST. ProFAST provides a quick and convenient in-depth financial analysis for production systems and services based on Generally Accepted Accounting Principles (GAAP) methodology.
54
+
55
+ Please see https://www.nrel.gov/hydrogen/h2fast.html for the H2FAST excel model
56
+
57
+ <img src="https://www.nrel.gov/hydrogen/assets/images/h2fast-icon.png" alt="H2FAST Logo" style="width:200px;"/>
58
+
59
+ # NOTICE
60
+ [NOTICE.txt](NOTICE.txt)
61
+
62
+ Copyright © 2023 Alliance for Sustainable Energy, LLC
63
+ These data were produced by the Alliance for Sustainable Energy, LLC (Contractor) under Contract No. DE-AC36-08GO28308 with the U.S. Department of Energy (DOE). During the period of commercialization or such other time period specified by the DOE, the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, and perform publicly and display publicly, by or on behalf of the Government. Subsequent to that period the Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this data to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so. The specific term of the license can be identified by inquiry made to the Contractor or DOE. NEITHER CONTRACTOR, THE UNITED STATES, NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY DATA, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
64
+
65
+ # LICENSE
66
+ [LICENSE](LICENSE)
67
+
68
+ # Citation
69
+ Kee, Jamie, Penev, Michael, and USDOE Office of Energy Efficiency and Renewable Energy. ProFAST (Production Financial Analysis Scenario Tool) [SWR-23-88]. Computer software. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Office of Sustainable Transportation. Hydrogen Fuel Cell Technologies Office (HFTO). 9 Nov. 2023. Web. doi:10.11578/dc.20231211.1.
70
+
71
+ # Setup
72
+ ProFAST can be installed using pip. Refer to [pyproject.toml](pyproject.toml) for configuration. ProFAST is installed as a compiled python file.
73
+
74
+ ## Installation
75
+ `$ pip install .`
76
+
77
+ ## Testing
78
+ `$ pytest`
79
+
80
+
81
+ # Quick Start Example
82
+
83
+ This quick start example is also in [generic_example.py](ProFAST/examples/generic_example.py) and can be accessed for exmaple usage.
84
+
85
+ Start by importing the ProFAST class from the ProFAST package
86
+
87
+ ```python
88
+ from ProFAST import ProFAST
89
+ ```
90
+
91
+ Initialize a ProFAST instance
92
+
93
+ ```python
94
+ pf = ProFAST()
95
+ ```
96
+
97
+ Set parameter values for the financial model (you set some of them to 0 or not set them at all)
98
+ ```python
99
+ # Define general inflation rate
100
+ gen_inflation = 0.019
101
+
102
+ # Sales specification
103
+ pf.set_params('commodity',{"name":'Hydrogen',"unit":"kg","initial price":4,"escalation":gen_inflation}) # Define the primary commodity
104
+ pf.set_params('analysis start year',2025)
105
+ pf.set_params('operating life',30) # Years of production
106
+ pf.set_params('installation months',20) # Months of installation (no production)
107
+ pf.set_params('demand rampup',2) # Years of ramp up (linear)
108
+ pf.set_params('long term utilization',0.9) # The utilization or capacity factor of the plant, relative to the nameplate capacity
109
+
110
+ # Installation information:
111
+ pf.set_params('capacity',50000) #units/day # Nameplate capacity
112
+ pf.set_params('installation cost',{"value":0,"depr type":"Straight line","depr period":5,"depreciable":False}) # Can be separated from capital items
113
+ pf.set_params('non depr assets',10000) # Such as land
114
+ pf.set_params('end of proj sale non depr assets',10000*(1+gen_inflation)**30) # Sale of land at project end
115
+ pf.set_params('maintenance',{"value":5000,"escalation":gen_inflation}) # Annual maintenance cost
116
+
117
+ # Incentives specification
118
+ pf.set_params('one time cap inct',{"value":250000,"depr type":"MACRS","depr period":5,"depreciable":False}) # Such as a capital grant, cost share, or investment tax credit
119
+ pf.set_params('annual operating incentive',{"value":1000,"decay":0,"sunset years":6,"taxable":True}) # Annual incentive (treated as income)
120
+ pf.set_params('incidental revenue',{"value":500,"escalation":gen_inflation}) # Such as coffee sales
121
+
122
+ # Take or pay specification
123
+ pf.set_params('TOPC',{"unit price":1,"decay":0.01,"support utilization":0.6,"sunset years":3}) # Underutilization support
124
+
125
+ # Other operating expenses
126
+ pf.set_params('credit card fees',0.025) # Fraction of sales revenue
127
+ pf.set_params('sales tax',0.023) # Fraction of sales revenue
128
+ # pf.set_params('road tax',{"value":0,"escalation":0}) # Cost per unit of commodity ($/kg)
129
+ pf.set_params('labor',{"value":20*40*52,"rate":20,"escalation":gen_inflation}) # 20 workers at 40hrs a week for 20$/hr
130
+ pf.set_params('license and permit',{'value':2000,'escalation':gen_inflation}) # $/yr for licensing and permitting
131
+ pf.set_params('rent',{'value':50000,'escalation':gen_inflation}) # $/yr, for example for equipment
132
+ pf.set_params('property tax and insurance',0.009) # Fraction of plant property and equipment
133
+ pf.set_params('admin expense',0.005) # Fraction of sales revenue
134
+
135
+ # Financing information
136
+ pf.set_params('total income tax rate',0.2574) # Combined tax rate
137
+ pf.set_params('capital gains tax rate',0.15) # Only for any gains made on non depreciable assets
138
+ pf.set_params('sell undepreciated cap',True)
139
+ pf.set_params('tax losses monetized',True) # Offset coupled business tax liabilities
140
+ pf.set_params('tax loss carry forward years',0) # If tax losses are carried forward
141
+ pf.set_params('general inflation rate',gen_inflation)
142
+ pf.set_params('leverage after tax nominal discount rate',0.08) # Discount rate, and expected financial performance
143
+ pf.set_params('debt equity ratio of initial financing',1.5) # D2E ratio at start
144
+ pf.set_params('debt type','Revolving debt') # Bond/Revolving debt or one time loan
145
+ pf.set_params('loan period if used',0) # Only for one time loan
146
+ pf.set_params('debt interest rate',0.037) # Interest rate for loan
147
+ pf.set_params('cash onhand',1) # Number of month of monthly expenses in liquidity
148
+ ```
149
+
150
+
151
+ Set the feedstocks
152
+ ```python
153
+ pf.add_feedstock(name='Water',usage=3.78,unit='gal',cost=0.005,escalation=gen_inflation) #3.78gal/kg H2
154
+ pf.add_feedstock(name='Electricity (industrial)',usage=55.5,unit='kWh',cost=0.15,escalation=gen_inflation)
155
+ ```
156
+
157
+ You can also use dictionaries and list to set the usages and costs
158
+ ```python
159
+ years = list(map(str,range(2025-1,2025+30+2)))
160
+ elec_usage = np.linspace(55.5,65,len(years))
161
+ elec_usage_dict = dict(zip(years,elec_usage))
162
+ pf.add_feedstock(name='Electricity (industrial) dict',usage=elec_usage_dict,unit='kWh',cost=0.15,escalation=gen_inflation)
163
+ pf.remove_feedstock(name='Electricity (industrial) dict')
164
+ ```
165
+
166
+ You can also use AEO feedstocks (Name and Cost must be valid values from AEO list)
167
+ ```python
168
+ pf.edit_feedstock(name='Electricity (industrial)',value={'cost':'Mountain'})
169
+ # AEO feedstocks can be modified for sensitivity analysis
170
+ pf.edit_feedstock(name='Electricity (industrial)',value={'usage':55.5,'cost':'1.1X Mountain'})
171
+ ```
172
+
173
+ Set the coproducts
174
+ ```python
175
+ pf.add_coproduct(name='Oxygen',usage=7,unit='mol',cost=0.01,escalation=gen_inflation)
176
+ pf.edit_coproduct(name='Oxygen',value={'usage':7})
177
+ ```
178
+
179
+
180
+ Set the capital items. These have a depreciation and a refurbishment schedule
181
+ ```python
182
+ dol_per_kw = 500
183
+ kW = 50000/24*55.5
184
+ pf.add_capital_item(name='PEM Stack',cost=kW*dol_per_kw,depr_type='MACRS',depr_period=7,refurb=[0,0,0,0,0,0,0.15]*4) # Refurb 15% every 7 years
185
+ pf.add_capital_item(name='BOP',cost=1000000,depr_type='MACRS',depr_period=7,refurb=[0])
186
+ ```
187
+
188
+
189
+ Set the fixed costs. which is a annual cost
190
+ ```python
191
+ pf.add_fixed_cost(name='Fixed costs',usage=1,unit='$',cost=3000000,escalation=gen_inflation)
192
+ ```
193
+
194
+ Set the incentives, which is a per unit commodity based incentive
195
+ ```python
196
+ pf.add_incentive(name='PTC',value=3,decay=0,sunset_years=10,tax_credit=True)
197
+ ```
198
+
199
+ This solves for the break even price - access it with ``sol["price"]``
200
+
201
+ ```python
202
+ sol = pf.solve_price()
203
+
204
+ unit = pf.vals['commodity']['unit']
205
+ name = pf.vals['commodity']['name']
206
+ print('\n')
207
+ print(f'Levelized cost of {name} price: ${round(sol["lco"],2)}/{unit}')
208
+ print('\n')
209
+ ```
210
+
211
+ Plot the cost breakdowns
212
+ ```python
213
+ pf.plot_costs()
214
+ ```
215
+
216
+ # Premade files
217
+ Refer to the resources directory for premade JSON files to load in a ProFAST instance, where the input parameter is the filename. For example, to load in a sample [central grid electrolysis PEM](ProFAST/resources/central_grid_electrolysis_PEM.json)
218
+ ```python
219
+ pf = ProFAST('central_grid_electrolysis_PEM')
220
+ ```
221
+
@@ -0,0 +1,16 @@
1
+ import sys
2
+
3
+ version_info = sys.version_info
4
+ major_versions = [3]
5
+ minor_versions = [8,9,10,11]
6
+ if version_info.major not in major_versions and version_info.minor not in minor_versions:
7
+ raise (ImportError(f"ProFAST is not currenly available for your Python version ({version_info[0]}.{version_info[1]}.{version_info[2]}). ProFAST is only compatible with Python 3.8, 3.9, 3.10, 3.11"))
8
+
9
+ if version_info.minor == 8:
10
+ from .pyc_files.ProFAST_308 import ProFAST
11
+ elif version_info.minor == 9:
12
+ from .pyc_files.ProFAST_309 import ProFAST
13
+ elif version_info.minor == 10:
14
+ from .pyc_files.ProFAST_310 import ProFAST
15
+ elif version_info.minor == 11:
16
+ from .pyc_files.ProFAST_311 import ProFAST
@@ -0,0 +1,98 @@
1
+
2
+ def ProFAST_example():
3
+ """This function gives an example file to run ProFAST
4
+ :param None
5
+ :return None
6
+ """
7
+
8
+ # ProFAST example
9
+ import ProFAST
10
+ import time
11
+
12
+ # Initialize ProFAST class
13
+ pf = ProFAST.ProFAST('central_wind_electrolysis')
14
+ # h2a = ProFAST.H2A_case('smr')
15
+
16
+ # Premade JSON input files can also be loaded using the load_json functionality
17
+ pf.load_json('central_wind_electrolysis')
18
+
19
+ # Add a feed stock
20
+ pf.add_feedstock(name='Residential electricity',usage=4,unit='kWh',cost=0.105427462,escalation=0.005)
21
+ # Add a capital item
22
+ pf.add_capital_item(name='Compressor',cost=475286.1648,depr_type='MACRS',depr_period=5,refurb=[0.4401, 0.4401, 0.1011, 0.3871, 0.4686, 0.905 , 0.4024, 0.3172, 0.926 , 0.6936, 0.271 , 0 , 0 , 0 ])
23
+ # Add a fixed cost
24
+ pf.add_fixed_cost(name='purity testing',usage=1,unit='$',cost=3483.816459,escalation=0.015246584)
25
+ # Add a coproduct
26
+ pf.add_coproduct(name='Apples',usage=0.013394611,unit='bundles',cost=0.934823018,escalation=0.007012072)
27
+ # Add an incentive
28
+ pf.add_incentive(name='LCFS',value=0.167811004,decay=0.00828,sunset_years=5,tax_credit=True)
29
+
30
+ # Remove a feedstock
31
+ pf.remove_feedstock(name='Residential electricity')
32
+
33
+ # Edit a coproduct
34
+ # pf.edit_coproduct('Apples',{'name':'Pears','usage':0.02})
35
+
36
+ # Dictionary (year,value) pairs can be used to set the usage and cost metrics
37
+ years = list(map(str,range(1992,2100)))
38
+ juice_costs = [1]*len(years)
39
+ juice_cost_dict = dict(zip(years,juice_costs))
40
+ juice_usage_dict = dict(zip(years,[10]*len(years)))
41
+ pf.add_feedstock(name='juice',usage=juice_usage_dict,unit='barrels',cost=juice_cost_dict,escalation=2)
42
+
43
+ # Timer
44
+ t1 = time.time()
45
+
46
+ # Solve for the break-price
47
+ sol=pf.solve_price()
48
+
49
+ # Print out break even price
50
+ price = sol['price']
51
+ irr = sol['irr']
52
+ ipp = sol['investor payback period']
53
+ lco = sol['lco']
54
+ print(f'First year price = {round(price,2)}')
55
+ print(f'Levelized cost = {round(lco,2)}')
56
+ print(f'IRR = {irr*100}%')
57
+ print(f'Investor payback period = {round(ipp,2)}')
58
+
59
+ # Timer
60
+ t2 = time.time()
61
+ print(f'Time elapsed: {t2-t1}s')
62
+
63
+ # Load defaults from json file (the default inputs are loaded by default)
64
+ pf.load_json('central_wind_electrolysis')
65
+
66
+ # Change sales tax
67
+ # pf.set_params('sales tax',0.50)
68
+ sol=pf.solve_price()
69
+
70
+ # Plot investor cash flow
71
+ pf.plot_cashflow()
72
+
73
+ # Plot cost breakdown
74
+ pf.plot_costs()
75
+
76
+ # Plot cost yearly breakdown
77
+ pf.plot_costs_yearly()
78
+
79
+ # Plot cost yearly breakdown in plotly (interactive)
80
+ pf.plot_costs_yearly2()
81
+
82
+ # Plot all time series in plotly (interactive)
83
+ pf.plot_time_series()
84
+
85
+ # Solve for the break-price
86
+ sol=pf.solve_price()
87
+ price = sol['price']
88
+ irr = sol['irr']
89
+ ipp = sol['investor payback period']
90
+ lco = sol['lco']
91
+ print(f'First year price = {round(price,2)}')
92
+ print(f'Levelized cost = {round(lco,2)}')
93
+ print(f'IRR = {irr*100}%')
94
+ print(f'Investor payback period = {round(ipp,2)}')
95
+
96
+
97
+ if __name__ == "__main__":
98
+ ProFAST_example()
@@ -0,0 +1,156 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+
5
+ def pf_setup():
6
+ # Import the ProFAST module
7
+ import ProFAST
8
+
9
+ # Create an ProFAST instance
10
+ pf = ProFAST.ProFAST()
11
+
12
+ #
13
+ # Set the parameters
14
+ #
15
+
16
+ # Define general inflation rate
17
+ gen_inflation = 0.019
18
+
19
+ # Sales specification
20
+ pf.set_params('commodity',{"name":'Hydrogen',"unit":"kg","initial price":4,"escalation":gen_inflation}) # Define the primary commodity
21
+ pf.set_params('analysis start year',2025)
22
+ pf.set_params('operating life',30) # Years of production
23
+ pf.set_params('installation months',20) # Months of installation (no production)
24
+ pf.set_params('demand rampup',2) # Years of ramp up (linear)
25
+ pf.set_params('long term utilization',0.9) # The utilization or capacity factor of the plant, relative to the nameplate capacity
26
+
27
+ # Installation information:
28
+ pf.set_params('capacity',50000) #units/day # Nameplate capacity
29
+ pf.set_params('installation cost',{"value":0,"depr type":"Straight line","depr period":5,"depreciable":False}) # Can be separated from capital items
30
+ pf.set_params('non depr assets',10000) # Such as land
31
+ pf.set_params('end of proj sale non depr assets',10000*(1+gen_inflation)**30) # Sale of land at project end
32
+ pf.set_params('maintenance',{"value":5000,"escalation":gen_inflation}) # Annual maintenance cost
33
+
34
+ # Incentives specification
35
+ pf.set_params('one time cap inct',{"value":250000,"depr type":"MACRS","depr period":5,"depreciable":False}) # Such as a capital grant, cost share, or investment tax credit
36
+ pf.set_params('annual operating incentive',{"value":1000,"decay":0,"sunset years":6,"taxable":True}) # Annual incentive (treated as income)
37
+ pf.set_params('incidental revenue',{"value":500,"escalation":gen_inflation}) # Such as coffee sales
38
+
39
+ # Take or pay specification
40
+ pf.set_params('TOPC',{"unit price":1,"decay":0.01,"support utilization":0.6,"sunset years":3}) # Underutilization support
41
+
42
+ # Other operating expenses
43
+ pf.set_params('credit card fees',0.025) # Fraction of sales revenue
44
+ pf.set_params('sales tax',0.023) # Fraction of sales revenue
45
+ # pf.set_params('road tax',{"value":0,"escalation":0}) # Cost per unit of commodity ($/kg)
46
+ pf.set_params('labor',{"value":20*40*52,"rate":20,"escalation":gen_inflation}) # 20 workers at 40hrs a week for 20$/hr
47
+ pf.set_params('license and permit',{'value':2000,'escalation':gen_inflation}) # $/yr for licensing and permitting
48
+ pf.set_params('rent',{'value':50000,'escalation':gen_inflation}) # $/yr, for example for equipment
49
+ pf.set_params('property tax and insurance',0.009) # Fraction of plant property and equipment
50
+ pf.set_params('admin expense',0.005) # Fraction of sales revenue
51
+
52
+ # Financing information
53
+ pf.set_params('total income tax rate',0.2574) # Combined tax rate
54
+ pf.set_params('capital gains tax rate',0.15) # Only for any gains made on non depreciable assets
55
+ pf.set_params('sell undepreciated cap',True)
56
+ pf.set_params('tax losses monetized',True) # Offset coupled business tax liabilities
57
+ pf.set_params('tax loss carry forward years',0) # If tax losses are carried forward
58
+ pf.set_params('general inflation rate',gen_inflation)
59
+ pf.set_params('leverage after tax nominal discount rate',0.08) # Discount rate, and expected financial performance
60
+ pf.set_params('debt equity ratio of initial financing',1.5) # D2E ratio at start
61
+ pf.set_params('debt type','Revolving debt') # Bond/Revolving debt or one time loan
62
+ pf.set_params('loan period if used',0) # Only for one time loan
63
+ pf.set_params('debt interest rate',0.037) # Interest rate for loan
64
+ pf.set_params('cash onhand',1) # Number of month of monthly expenses in liquidity
65
+
66
+
67
+ #
68
+ # Set the feedstocks
69
+ #
70
+ pf.add_feedstock(name='Water',usage=3.78,unit='gal',cost=0.005,escalation=gen_inflation) #3.78gal/kg H2
71
+ pf.add_feedstock(name='Electricity (industrial)',usage=55.5,unit='kWh',cost=0.15,escalation=gen_inflation)
72
+
73
+ # You can also use dictionaries and list to set the usages and costs
74
+ years = list(map(str,range(2025-1,2025+30+2)))
75
+ elec_usage = np.linspace(55.5,65,len(years))
76
+ elec_usage_dict = dict(zip(years,elec_usage))
77
+ elec_cost_dict = dict(zip(years, [0.15,0.14,0.2,0.75] ))
78
+ pf.add_feedstock(name='Electricity (industrial) dict',usage=elec_usage_dict,unit='kWh',cost=0.15,escalation=gen_inflation)
79
+ pf.remove_feedstock(name='Electricity (industrial) dict')
80
+
81
+ # AEO feedstocks (Name and Cost must be valid values from AEO list)
82
+ pf.edit_feedstock(name='Electricity (industrial)',value={'cost':'Mountain'})
83
+ # AEO feedstocks can be modified for sensitivity analysis
84
+ pf.edit_feedstock(name='Electricity (industrial)',value={'usage':55.5,'cost':'1.1X Mountain'})
85
+
86
+ #
87
+ # Set the coproducts
88
+ #
89
+ pf.add_coproduct(name='Oxygen',usage=7,unit='mol',cost=0.01,escalation=gen_inflation)
90
+ pf.edit_coproduct(name='Oxygen',value={'usage':7})
91
+
92
+
93
+ #
94
+ # Set the capital items
95
+ #
96
+ dol_per_kw = 500
97
+ kW = 50000/24*55.5
98
+ pf.add_capital_item(name='PEM Stack',cost=kW*dol_per_kw,depr_type='MACRS',depr_period=7,refurb=[0,0,0,0,0,0,0.15]*4) # Refurb 15% every 7 years
99
+ pf.add_capital_item(name='BOP',cost=1000000,depr_type='MACRS',depr_period=7,refurb=[0])
100
+
101
+ #
102
+ # Set the fixed costs
103
+ #
104
+ pf.add_fixed_cost(name='Fixed costs',usage=1,unit='$',cost=3000000,escalation=gen_inflation)
105
+
106
+ #
107
+ # Set the incentives
108
+ #
109
+ pf.add_incentive(name='45V',value=3,decay=0,sunset_years=10,tax_credit=True)
110
+
111
+ return pf
112
+
113
+
114
+
115
+ if __name__ == '__main__':
116
+ pf = pf_setup()
117
+
118
+ # Price setter mode
119
+ NPV = pf.cash_flow()
120
+ print(f'IRR: {pf.irr}')
121
+ print(f'NPV: {NPV}')
122
+ print("\n")
123
+
124
+ # Price taker mode
125
+ sol = pf.solve_price()
126
+ price = sol['price']
127
+ irr = sol['irr']
128
+ ipp = sol['investor payback period']
129
+ lco = sol['lco']
130
+ print(f'First year price = {round(price,2)}')
131
+ print(f'Levelized cost = {round(lco,2)}')
132
+ print(f'IRR = {irr*100}%')
133
+ print(f'Investor payback period = {round(ipp,2)}')
134
+
135
+ # Plot cost breakdown
136
+ pf.plot_costs()
137
+
138
+ # Plot everything
139
+ pf.plot_time_series()
140
+
141
+
142
+
143
+ # What is the sensitivity to Electricity region?
144
+ regions = ['US Average','East North Central','East South Central','Middle Atlantic','Mountain','New England','Pacific','South Atlantic','West North Central','West South Central']
145
+ lcoh = []
146
+
147
+ for region in regions:
148
+ pf.edit_feedstock(name='Electricity (industrial)',value={'cost':region})
149
+ sol = pf.solve_price()
150
+ lcoh.append(sol['lco'])
151
+
152
+ plt.bar(regions, lcoh)
153
+ plt.xlabel("Regions")
154
+ plt.ylabel("Levelized cost of H2 ($/kg)")
155
+ plt.show()
156
+ pass