OpenPyTEA 1.2.0__tar.gz → 2.0.0__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.
- {openpytea-1.2.0/src/OpenPyTEA.egg-info → openpytea-2.0.0}/PKG-INFO +30 -10
- {openpytea-1.2.0 → openpytea-2.0.0}/README.md +29 -9
- {openpytea-1.2.0 → openpytea-2.0.0}/pyproject.toml +17 -1
- {openpytea-1.2.0 → openpytea-2.0.0/src/OpenPyTEA.egg-info}/PKG-INFO +30 -10
- {openpytea-1.2.0 → openpytea-2.0.0}/src/OpenPyTEA.egg-info/SOURCES.txt +9 -1
- openpytea-2.0.0/src/openpytea/__init__.py +36 -0
- openpytea-2.0.0/src/openpytea/analysis.py +838 -0
- openpytea-2.0.0/src/openpytea/data/cepci_values.csv +36 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/src/openpytea/equipment.py +174 -97
- openpytea-2.0.0/src/openpytea/helpers.py +753 -0
- openpytea-2.0.0/src/openpytea/io.py +620 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/src/openpytea/plant.py +661 -302
- openpytea-2.0.0/src/openpytea/plotting.py +834 -0
- openpytea-2.0.0/tests/test_analysis.py +98 -0
- openpytea-2.0.0/tests/test_equipment.py +29 -0
- openpytea-2.0.0/tests/test_plant.py +36 -0
- openpytea-2.0.0/tests/test_plotting.py +47 -0
- openpytea-2.0.0/tests/test_run_tea.py +148 -0
- openpytea-2.0.0/tests/test_smoke.py +69 -0
- openpytea-1.2.0/src/openpytea/__init__.py +0 -24
- openpytea-1.2.0/src/openpytea/analysis.py +0 -2127
- openpytea-1.2.0/src/openpytea/data/cepci_values.csv +0 -36
- openpytea-1.2.0/tests/test_import.py +0 -2
- {openpytea-1.2.0 → openpytea-2.0.0}/LICENSE +0 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/setup.cfg +0 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/src/OpenPyTEA.egg-info/dependency_links.txt +0 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/src/OpenPyTEA.egg-info/requires.txt +0 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/src/OpenPyTEA.egg-info/top_level.txt +0 -0
- {openpytea-1.2.0 → openpytea-2.0.0}/src/openpytea/data/cost_correlations.csv +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenPyTEA
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: OpenPyTEA: An open-source Python toolkit for techno-economic assessment of process plants with economic sensitivity and uncertainty evaluation
|
|
5
5
|
Maintainer-email: "Panji B. Tamarona" <P.B.Tamarona@tudelft.nl>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -26,7 +26,7 @@ Dynamic: license-file
|
|
|
26
26
|
|
|
27
27
|
**OpenPyTEA** is an open-source Python toolkit for performing **techno-economic assessment (TEA)** of chemical and energy systems. It was created to address a persistent gap in the TEA workflow: while process simulators model mass and energy balances, researchers often lack an equally transparent and flexible way to evaluate the **economic feasibility** of their designs. Commercial tools remain *black-box tools*, and many academic TEA implementations are process-specific, undocumented, or difficult to reproduce.
|
|
28
28
|
|
|
29
|
-
**OpenPyTEA** provides a fully open, modular, and traceable framework that brings TEA into the Python ecosystem. By integrating **equipment cost estimation**, **capital and operating expenditure modeling**, **cash-flow analysis**, **cost
|
|
29
|
+
**OpenPyTEA** provides a fully open, modular, and traceable framework that brings TEA into the Python ecosystem. By integrating **equipment cost estimation**, **capital and operating expenditure modeling**, **cash-flow analysis**, **cost breakdowns**, **sensitivity evaluation**, and **Monte Carlo uncertainty propagation**, the toolkit enables users to perform end-to-end TEA with clarity and reproducibility.
|
|
30
30
|
|
|
31
31
|
Beyond its functionality, **OpenPyTEA is designed as a community-driven TEA platform**. Users can contribute new equipment cost correlations, improve economic models, report issues, and expand the toolkit’s capabilities over time. This collaborative approach helps build a shared, transparent, and continually improving TEA resource—similar to the open-source progress seen in the LCA community.
|
|
32
32
|
|
|
@@ -43,8 +43,10 @@ https://github.com/pbtamarona/OpenPyTEA/tree/main/examples
|
|
|
43
43
|
## ✨ Key Features
|
|
44
44
|
- **Modular architecture:** clean separation of cost correlations, equipment objects, plant economics, and uncertainty analysis.
|
|
45
45
|
- **Transparent and reproducible:** all algorithms, equations, and assumptions are openly available for full traceability.
|
|
46
|
-
- **Cost breakdown visualization:** built-in
|
|
47
|
-
- **Built-in uncertainty tools:** automatic generation of sensitivity plots and Monte Carlo simulations.
|
|
46
|
+
- **Cost breakdown visualization:** built-in functions to plot stacked bar charts of equipment costs, fixed capital, and operating costs.
|
|
47
|
+
- **Built-in uncertainty tools:** automatic generation of sensitivity plots and Monte Carlo simulations.
|
|
48
|
+
- **Workflow using JSON configuration files:** standardized input/output structure via `io.py` for reproducible analyses and multi-scenario evaluation.
|
|
49
|
+
- **Flexible analysis and visualization:** separation of data processing (`analysis.py`) and plotting (`plotting.py`) allows users to apply custom visualization tools.
|
|
48
50
|
- **Interoperable and extensible:** easy integration with process simulators, optimization frameworks, and LCA tools.
|
|
49
51
|
- **Education-friendly:** ideal for teaching TEA and process design without reliance on proprietary software.
|
|
50
52
|
- **Community-driven:** users can contribute new correlations, improve models, request features, and shape the evolution of the platform.
|
|
@@ -71,7 +73,6 @@ or with `uv`:
|
|
|
71
73
|
uv add git+https://github.com/pbtamarona/OpenPyTEA
|
|
72
74
|
```
|
|
73
75
|
|
|
74
|
-
|
|
75
76
|
**OpenPyTEA** requires **Python ≥ 3.9**.
|
|
76
77
|
The main dependencies include:
|
|
77
78
|
|
|
@@ -91,6 +92,9 @@ src/openpytea/
|
|
|
91
92
|
├── equipment.py # Equipment-level costing and inflation correction
|
|
92
93
|
├── plant.py # Plant-level TEA: CAPEX, OPEX, cash flows, financial metrics
|
|
93
94
|
├── analysis.py # Sensitivity and uncertainty analysis (sensitivity plots, Monte Carlo)
|
|
95
|
+
├── plotting.py # Visualization functions (plots and figures)
|
|
96
|
+
├── io.py # JSON-based workflow: load inputs and export results
|
|
97
|
+
├── helpers.py # Helper functions for data handling and common operations
|
|
94
98
|
└── data/ # Cost correlations database and CEPCI data
|
|
95
99
|
examples/ # Example notebooks and case studies
|
|
96
100
|
walkthrough.ipynb # walkthrough of the package
|
|
@@ -100,6 +104,14 @@ README.md
|
|
|
100
104
|
|
|
101
105
|
---
|
|
102
106
|
|
|
107
|
+
## 🏗️ Software Architecture
|
|
108
|
+
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
Software architecture and data flow of **OpenPyTEA**, illustrating the progression from user input to TEA output. Users provide economic assumptions, process simulation results, and equipment-sizing parameters. Equipment-sizing information is linked with cost correlations and CEPCI values stored in CSV databases to calculate inflation-adjusted purchased and direct costs. `Equipment` objects are aggregated into a `Plant` object, where CAPEX, OPEX, and financial performance metrics are evaluated. The `analysis.py` module subsequently operates on `Plant` objects to perform sensitivity and uncertainty analyses.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
103
115
|
## 🧠 Core Concepts
|
|
104
116
|
|
|
105
117
|
### 1. **Equipment-level costing**
|
|
@@ -212,14 +224,24 @@ results = monte_carlo(
|
|
|
212
224
|
Outputs include probability distributions and confidence intervals for LCOP or NPV—supporting uncertainty-informed decision-making. With `plot_multiple_monte_carlo`, **OpenPyTEA** can also visualize Monte Carlo results for multiple plants to enable uncertainty comparisons.
|
|
213
225
|
|
|
214
226
|
---
|
|
227
|
+
### 5. **Workflow using JSON configuration files**
|
|
228
|
+
|
|
229
|
+
**OpenPyTEA** supports a workflow using structured JSON input files via the `io.py` module. This enables standardized, reproducible, and scalable TEA studies.
|
|
230
|
+
|
|
231
|
+
Key functionalities include:
|
|
232
|
+
- `run_equipment()`: evaluate equipment costs from JSON input
|
|
233
|
+
- `run_plant()`: construct and evaluate a plant configuration
|
|
234
|
+
- `run_tea()`: execute full TEA, including cost breakdowns, sensitivity, and uncertainty analysis
|
|
235
|
+
|
|
236
|
+
This workflow is demonstrated in `case_study_1_with_JSON.ipynb` in the example folder.
|
|
215
237
|
|
|
216
238
|
## 📘 Example Workflows
|
|
217
239
|
|
|
218
240
|
Example notebooks are available in the `examples/` folder, including:
|
|
219
241
|
|
|
220
|
-
-
|
|
221
|
-
- Hydrogen liquefaction
|
|
222
|
-
- Geothermal
|
|
242
|
+
- Comparison of hydrogen production pathwways
|
|
243
|
+
- Hydrogen liquefaction precooling system
|
|
244
|
+
- Geothermal-based heating and power generation
|
|
223
245
|
|
|
224
246
|
Run any example via:
|
|
225
247
|
```bash
|
|
@@ -231,8 +253,6 @@ Each notebook demonstrates:
|
|
|
231
253
|
- Sensitivity and uncertainty analysis
|
|
232
254
|
- Visualization of key economic indicators
|
|
233
255
|
|
|
234
|
-
---
|
|
235
|
-
|
|
236
256
|
## 🧑🏫 Educational Use
|
|
237
257
|
|
|
238
258
|
**OpenPyTEA** is suitable for chemical and process engineering education.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**OpenPyTEA** is an open-source Python toolkit for performing **techno-economic assessment (TEA)** of chemical and energy systems. It was created to address a persistent gap in the TEA workflow: while process simulators model mass and energy balances, researchers often lack an equally transparent and flexible way to evaluate the **economic feasibility** of their designs. Commercial tools remain *black-box tools*, and many academic TEA implementations are process-specific, undocumented, or difficult to reproduce.
|
|
4
4
|
|
|
5
|
-
**OpenPyTEA** provides a fully open, modular, and traceable framework that brings TEA into the Python ecosystem. By integrating **equipment cost estimation**, **capital and operating expenditure modeling**, **cash-flow analysis**, **cost
|
|
5
|
+
**OpenPyTEA** provides a fully open, modular, and traceable framework that brings TEA into the Python ecosystem. By integrating **equipment cost estimation**, **capital and operating expenditure modeling**, **cash-flow analysis**, **cost breakdowns**, **sensitivity evaluation**, and **Monte Carlo uncertainty propagation**, the toolkit enables users to perform end-to-end TEA with clarity and reproducibility.
|
|
6
6
|
|
|
7
7
|
Beyond its functionality, **OpenPyTEA is designed as a community-driven TEA platform**. Users can contribute new equipment cost correlations, improve economic models, report issues, and expand the toolkit’s capabilities over time. This collaborative approach helps build a shared, transparent, and continually improving TEA resource—similar to the open-source progress seen in the LCA community.
|
|
8
8
|
|
|
@@ -19,8 +19,10 @@ https://github.com/pbtamarona/OpenPyTEA/tree/main/examples
|
|
|
19
19
|
## ✨ Key Features
|
|
20
20
|
- **Modular architecture:** clean separation of cost correlations, equipment objects, plant economics, and uncertainty analysis.
|
|
21
21
|
- **Transparent and reproducible:** all algorithms, equations, and assumptions are openly available for full traceability.
|
|
22
|
-
- **Cost breakdown visualization:** built-in
|
|
23
|
-
- **Built-in uncertainty tools:** automatic generation of sensitivity plots and Monte Carlo simulations.
|
|
22
|
+
- **Cost breakdown visualization:** built-in functions to plot stacked bar charts of equipment costs, fixed capital, and operating costs.
|
|
23
|
+
- **Built-in uncertainty tools:** automatic generation of sensitivity plots and Monte Carlo simulations.
|
|
24
|
+
- **Workflow using JSON configuration files:** standardized input/output structure via `io.py` for reproducible analyses and multi-scenario evaluation.
|
|
25
|
+
- **Flexible analysis and visualization:** separation of data processing (`analysis.py`) and plotting (`plotting.py`) allows users to apply custom visualization tools.
|
|
24
26
|
- **Interoperable and extensible:** easy integration with process simulators, optimization frameworks, and LCA tools.
|
|
25
27
|
- **Education-friendly:** ideal for teaching TEA and process design without reliance on proprietary software.
|
|
26
28
|
- **Community-driven:** users can contribute new correlations, improve models, request features, and shape the evolution of the platform.
|
|
@@ -47,7 +49,6 @@ or with `uv`:
|
|
|
47
49
|
uv add git+https://github.com/pbtamarona/OpenPyTEA
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
|
|
51
52
|
**OpenPyTEA** requires **Python ≥ 3.9**.
|
|
52
53
|
The main dependencies include:
|
|
53
54
|
|
|
@@ -67,6 +68,9 @@ src/openpytea/
|
|
|
67
68
|
├── equipment.py # Equipment-level costing and inflation correction
|
|
68
69
|
├── plant.py # Plant-level TEA: CAPEX, OPEX, cash flows, financial metrics
|
|
69
70
|
├── analysis.py # Sensitivity and uncertainty analysis (sensitivity plots, Monte Carlo)
|
|
71
|
+
├── plotting.py # Visualization functions (plots and figures)
|
|
72
|
+
├── io.py # JSON-based workflow: load inputs and export results
|
|
73
|
+
├── helpers.py # Helper functions for data handling and common operations
|
|
70
74
|
└── data/ # Cost correlations database and CEPCI data
|
|
71
75
|
examples/ # Example notebooks and case studies
|
|
72
76
|
walkthrough.ipynb # walkthrough of the package
|
|
@@ -76,6 +80,14 @@ README.md
|
|
|
76
80
|
|
|
77
81
|
---
|
|
78
82
|
|
|
83
|
+
## 🏗️ Software Architecture
|
|
84
|
+
|
|
85
|
+

|
|
86
|
+
|
|
87
|
+
Software architecture and data flow of **OpenPyTEA**, illustrating the progression from user input to TEA output. Users provide economic assumptions, process simulation results, and equipment-sizing parameters. Equipment-sizing information is linked with cost correlations and CEPCI values stored in CSV databases to calculate inflation-adjusted purchased and direct costs. `Equipment` objects are aggregated into a `Plant` object, where CAPEX, OPEX, and financial performance metrics are evaluated. The `analysis.py` module subsequently operates on `Plant` objects to perform sensitivity and uncertainty analyses.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
79
91
|
## 🧠 Core Concepts
|
|
80
92
|
|
|
81
93
|
### 1. **Equipment-level costing**
|
|
@@ -188,14 +200,24 @@ results = monte_carlo(
|
|
|
188
200
|
Outputs include probability distributions and confidence intervals for LCOP or NPV—supporting uncertainty-informed decision-making. With `plot_multiple_monte_carlo`, **OpenPyTEA** can also visualize Monte Carlo results for multiple plants to enable uncertainty comparisons.
|
|
189
201
|
|
|
190
202
|
---
|
|
203
|
+
### 5. **Workflow using JSON configuration files**
|
|
204
|
+
|
|
205
|
+
**OpenPyTEA** supports a workflow using structured JSON input files via the `io.py` module. This enables standardized, reproducible, and scalable TEA studies.
|
|
206
|
+
|
|
207
|
+
Key functionalities include:
|
|
208
|
+
- `run_equipment()`: evaluate equipment costs from JSON input
|
|
209
|
+
- `run_plant()`: construct and evaluate a plant configuration
|
|
210
|
+
- `run_tea()`: execute full TEA, including cost breakdowns, sensitivity, and uncertainty analysis
|
|
211
|
+
|
|
212
|
+
This workflow is demonstrated in `case_study_1_with_JSON.ipynb` in the example folder.
|
|
191
213
|
|
|
192
214
|
## 📘 Example Workflows
|
|
193
215
|
|
|
194
216
|
Example notebooks are available in the `examples/` folder, including:
|
|
195
217
|
|
|
196
|
-
-
|
|
197
|
-
- Hydrogen liquefaction
|
|
198
|
-
- Geothermal
|
|
218
|
+
- Comparison of hydrogen production pathwways
|
|
219
|
+
- Hydrogen liquefaction precooling system
|
|
220
|
+
- Geothermal-based heating and power generation
|
|
199
221
|
|
|
200
222
|
Run any example via:
|
|
201
223
|
```bash
|
|
@@ -207,8 +229,6 @@ Each notebook demonstrates:
|
|
|
207
229
|
- Sensitivity and uncertainty analysis
|
|
208
230
|
- Visualization of key economic indicators
|
|
209
231
|
|
|
210
|
-
---
|
|
211
|
-
|
|
212
232
|
## 🧑🏫 Educational Use
|
|
213
233
|
|
|
214
234
|
**OpenPyTEA** is suitable for chemical and process engineering education.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "OpenPyTEA"
|
|
3
|
-
version = "
|
|
3
|
+
version = "2.0.0"
|
|
4
4
|
description = "OpenPyTEA: An open-source Python toolkit for techno-economic assessment of process plants with economic sensitivity and uncertainty evaluation"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -57,3 +57,19 @@ where = ["src"]
|
|
|
57
57
|
|
|
58
58
|
[tool.setuptools.package-data]
|
|
59
59
|
openpytea = ["data/*.csv"]
|
|
60
|
+
|
|
61
|
+
[tool.ruff]
|
|
62
|
+
# Only check Python files (default, but explicit is cleaner)
|
|
63
|
+
extend-include = ["*.py"]
|
|
64
|
+
extend-exclude = ["*.ipynb", "notebooks/", ".ipynb_checkpoints/"]
|
|
65
|
+
|
|
66
|
+
# Optional but recommended
|
|
67
|
+
line-length = 88
|
|
68
|
+
target-version = "py310"
|
|
69
|
+
|
|
70
|
+
[tool.ruff.lint]
|
|
71
|
+
select = ["E", "F", "W"] # errors, flakes, warnings
|
|
72
|
+
ignore = []
|
|
73
|
+
|
|
74
|
+
[tool.ruff.format]
|
|
75
|
+
quote-style = "double"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenPyTEA
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: OpenPyTEA: An open-source Python toolkit for techno-economic assessment of process plants with economic sensitivity and uncertainty evaluation
|
|
5
5
|
Maintainer-email: "Panji B. Tamarona" <P.B.Tamarona@tudelft.nl>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -26,7 +26,7 @@ Dynamic: license-file
|
|
|
26
26
|
|
|
27
27
|
**OpenPyTEA** is an open-source Python toolkit for performing **techno-economic assessment (TEA)** of chemical and energy systems. It was created to address a persistent gap in the TEA workflow: while process simulators model mass and energy balances, researchers often lack an equally transparent and flexible way to evaluate the **economic feasibility** of their designs. Commercial tools remain *black-box tools*, and many academic TEA implementations are process-specific, undocumented, or difficult to reproduce.
|
|
28
28
|
|
|
29
|
-
**OpenPyTEA** provides a fully open, modular, and traceable framework that brings TEA into the Python ecosystem. By integrating **equipment cost estimation**, **capital and operating expenditure modeling**, **cash-flow analysis**, **cost
|
|
29
|
+
**OpenPyTEA** provides a fully open, modular, and traceable framework that brings TEA into the Python ecosystem. By integrating **equipment cost estimation**, **capital and operating expenditure modeling**, **cash-flow analysis**, **cost breakdowns**, **sensitivity evaluation**, and **Monte Carlo uncertainty propagation**, the toolkit enables users to perform end-to-end TEA with clarity and reproducibility.
|
|
30
30
|
|
|
31
31
|
Beyond its functionality, **OpenPyTEA is designed as a community-driven TEA platform**. Users can contribute new equipment cost correlations, improve economic models, report issues, and expand the toolkit’s capabilities over time. This collaborative approach helps build a shared, transparent, and continually improving TEA resource—similar to the open-source progress seen in the LCA community.
|
|
32
32
|
|
|
@@ -43,8 +43,10 @@ https://github.com/pbtamarona/OpenPyTEA/tree/main/examples
|
|
|
43
43
|
## ✨ Key Features
|
|
44
44
|
- **Modular architecture:** clean separation of cost correlations, equipment objects, plant economics, and uncertainty analysis.
|
|
45
45
|
- **Transparent and reproducible:** all algorithms, equations, and assumptions are openly available for full traceability.
|
|
46
|
-
- **Cost breakdown visualization:** built-in
|
|
47
|
-
- **Built-in uncertainty tools:** automatic generation of sensitivity plots and Monte Carlo simulations.
|
|
46
|
+
- **Cost breakdown visualization:** built-in functions to plot stacked bar charts of equipment costs, fixed capital, and operating costs.
|
|
47
|
+
- **Built-in uncertainty tools:** automatic generation of sensitivity plots and Monte Carlo simulations.
|
|
48
|
+
- **Workflow using JSON configuration files:** standardized input/output structure via `io.py` for reproducible analyses and multi-scenario evaluation.
|
|
49
|
+
- **Flexible analysis and visualization:** separation of data processing (`analysis.py`) and plotting (`plotting.py`) allows users to apply custom visualization tools.
|
|
48
50
|
- **Interoperable and extensible:** easy integration with process simulators, optimization frameworks, and LCA tools.
|
|
49
51
|
- **Education-friendly:** ideal for teaching TEA and process design without reliance on proprietary software.
|
|
50
52
|
- **Community-driven:** users can contribute new correlations, improve models, request features, and shape the evolution of the platform.
|
|
@@ -71,7 +73,6 @@ or with `uv`:
|
|
|
71
73
|
uv add git+https://github.com/pbtamarona/OpenPyTEA
|
|
72
74
|
```
|
|
73
75
|
|
|
74
|
-
|
|
75
76
|
**OpenPyTEA** requires **Python ≥ 3.9**.
|
|
76
77
|
The main dependencies include:
|
|
77
78
|
|
|
@@ -91,6 +92,9 @@ src/openpytea/
|
|
|
91
92
|
├── equipment.py # Equipment-level costing and inflation correction
|
|
92
93
|
├── plant.py # Plant-level TEA: CAPEX, OPEX, cash flows, financial metrics
|
|
93
94
|
├── analysis.py # Sensitivity and uncertainty analysis (sensitivity plots, Monte Carlo)
|
|
95
|
+
├── plotting.py # Visualization functions (plots and figures)
|
|
96
|
+
├── io.py # JSON-based workflow: load inputs and export results
|
|
97
|
+
├── helpers.py # Helper functions for data handling and common operations
|
|
94
98
|
└── data/ # Cost correlations database and CEPCI data
|
|
95
99
|
examples/ # Example notebooks and case studies
|
|
96
100
|
walkthrough.ipynb # walkthrough of the package
|
|
@@ -100,6 +104,14 @@ README.md
|
|
|
100
104
|
|
|
101
105
|
---
|
|
102
106
|
|
|
107
|
+
## 🏗️ Software Architecture
|
|
108
|
+
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
Software architecture and data flow of **OpenPyTEA**, illustrating the progression from user input to TEA output. Users provide economic assumptions, process simulation results, and equipment-sizing parameters. Equipment-sizing information is linked with cost correlations and CEPCI values stored in CSV databases to calculate inflation-adjusted purchased and direct costs. `Equipment` objects are aggregated into a `Plant` object, where CAPEX, OPEX, and financial performance metrics are evaluated. The `analysis.py` module subsequently operates on `Plant` objects to perform sensitivity and uncertainty analyses.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
103
115
|
## 🧠 Core Concepts
|
|
104
116
|
|
|
105
117
|
### 1. **Equipment-level costing**
|
|
@@ -212,14 +224,24 @@ results = monte_carlo(
|
|
|
212
224
|
Outputs include probability distributions and confidence intervals for LCOP or NPV—supporting uncertainty-informed decision-making. With `plot_multiple_monte_carlo`, **OpenPyTEA** can also visualize Monte Carlo results for multiple plants to enable uncertainty comparisons.
|
|
213
225
|
|
|
214
226
|
---
|
|
227
|
+
### 5. **Workflow using JSON configuration files**
|
|
228
|
+
|
|
229
|
+
**OpenPyTEA** supports a workflow using structured JSON input files via the `io.py` module. This enables standardized, reproducible, and scalable TEA studies.
|
|
230
|
+
|
|
231
|
+
Key functionalities include:
|
|
232
|
+
- `run_equipment()`: evaluate equipment costs from JSON input
|
|
233
|
+
- `run_plant()`: construct and evaluate a plant configuration
|
|
234
|
+
- `run_tea()`: execute full TEA, including cost breakdowns, sensitivity, and uncertainty analysis
|
|
235
|
+
|
|
236
|
+
This workflow is demonstrated in `case_study_1_with_JSON.ipynb` in the example folder.
|
|
215
237
|
|
|
216
238
|
## 📘 Example Workflows
|
|
217
239
|
|
|
218
240
|
Example notebooks are available in the `examples/` folder, including:
|
|
219
241
|
|
|
220
|
-
-
|
|
221
|
-
- Hydrogen liquefaction
|
|
222
|
-
- Geothermal
|
|
242
|
+
- Comparison of hydrogen production pathwways
|
|
243
|
+
- Hydrogen liquefaction precooling system
|
|
244
|
+
- Geothermal-based heating and power generation
|
|
223
245
|
|
|
224
246
|
Run any example via:
|
|
225
247
|
```bash
|
|
@@ -231,8 +253,6 @@ Each notebook demonstrates:
|
|
|
231
253
|
- Sensitivity and uncertainty analysis
|
|
232
254
|
- Visualization of key economic indicators
|
|
233
255
|
|
|
234
|
-
---
|
|
235
|
-
|
|
236
256
|
## 🧑🏫 Educational Use
|
|
237
257
|
|
|
238
258
|
**OpenPyTEA** is suitable for chemical and process engineering education.
|
|
@@ -9,7 +9,15 @@ src/OpenPyTEA.egg-info/top_level.txt
|
|
|
9
9
|
src/openpytea/__init__.py
|
|
10
10
|
src/openpytea/analysis.py
|
|
11
11
|
src/openpytea/equipment.py
|
|
12
|
+
src/openpytea/helpers.py
|
|
13
|
+
src/openpytea/io.py
|
|
12
14
|
src/openpytea/plant.py
|
|
15
|
+
src/openpytea/plotting.py
|
|
13
16
|
src/openpytea/data/cepci_values.csv
|
|
14
17
|
src/openpytea/data/cost_correlations.csv
|
|
15
|
-
tests/
|
|
18
|
+
tests/test_analysis.py
|
|
19
|
+
tests/test_equipment.py
|
|
20
|
+
tests/test_plant.py
|
|
21
|
+
tests/test_plotting.py
|
|
22
|
+
tests/test_run_tea.py
|
|
23
|
+
tests/test_smoke.py
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from .plant import Plant
|
|
2
|
+
from .equipment import Equipment
|
|
3
|
+
from .analysis import (direct_costs_data, fixed_capital_data,
|
|
4
|
+
fixed_opex_data, variable_opex_data,
|
|
5
|
+
sensitivity_data, tornado_data,
|
|
6
|
+
monte_carlo)
|
|
7
|
+
from .plotting import (plot_stacked_bar, plot_sensitivity,
|
|
8
|
+
plot_tornado, plot_monte_carlo,
|
|
9
|
+
plot_monte_carlo_inputs,
|
|
10
|
+
plot_multiple_monte_carlo)
|
|
11
|
+
|
|
12
|
+
from .io import (load_results, run_equipment, run_plant, run_tea)
|
|
13
|
+
|
|
14
|
+
__version__ = "2.0.0"
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"Plant",
|
|
18
|
+
"Equipment",
|
|
19
|
+
"direct_costs_data",
|
|
20
|
+
"fixed_capital_data",
|
|
21
|
+
"fixed_opex_data",
|
|
22
|
+
"variable_opex_data",
|
|
23
|
+
"sensitivity_data",
|
|
24
|
+
"tornado_data",
|
|
25
|
+
"monte_carlo",
|
|
26
|
+
"plot_stacked_bar",
|
|
27
|
+
"plot_sensitivity",
|
|
28
|
+
"plot_tornado",
|
|
29
|
+
"plot_monte_carlo",
|
|
30
|
+
"plot_monte_carlo_inputs",
|
|
31
|
+
"plot_multiple_monte_carlo",
|
|
32
|
+
"load_results",
|
|
33
|
+
"run_equipment",
|
|
34
|
+
"run_plant",
|
|
35
|
+
"run_tea"
|
|
36
|
+
]
|