Tools for geothermal techno-economics, including NPV, LCOE, well simulation, and more.
Project description
PyThermoNomics
PyThermoNomics is a Python package for techno-economic analysis of geothermal energy projects. It provides tools to compute Net Present Value (NPV), Levelized Cost of Energy (LCOE), and related financial metrics using simulation data, well trajectories, and project configuration.
Features
- Calculate NPV and LCOE for geothermal projects
- Integrate simulation results (CSV, OPM/Eclipse output)
- Model well trajectories and deviations
- Flexible configuration via YAML files
- Command-line interface (CLI) for easy usage
- Extensible API for custom workflows
- Documentation and tests included
Reference in the literature
The PyThermoNomics has been used in:
Barros, E.G.D.; Szklarz, S.P.; Khoshnevis Gargar, N.; Wollenweber, J.; van Wees, J.D. Optimization of Well Locations and Trajectories: Comparing Sub-Vertical, Sub-Horizontal and Multi-Lateral Well Concepts for Marginal Geothermal Reservoir in The Netherlands. Energies 2025, 18, 627. DOI
Installation
Install the latest version using pip:
pip install pythermonomics
Optional Dependencies
- Documentation:
To build and view the documentation, install with thedocsextra:pip install pythermonomics[docs]
- Testing:
To run tests, install with thetestsextra:pip install pythermonomics[tests]
- Run Jupyter Notebook example:
To run the notebook example, install with thenotebookextra:pip install pythermonomics[notebook]
Install from source
Install the package from the repository root:
pip install .
Usage
Command-Line Interface
After installation, use the CLI tool:
pythermonomics -c config.yml -i sim_data.csv -d deviations/ -t trajectory.yml
See CLI Documentation for all options.
Python API
Import and use in your own scripts, for example, when using summary (reservoir simulation out in CSV format) and deviation files (XYZMD-records for each well):
from pythermonomics.geothermal_economics import GeothermalEconomics
economics = GeothermalEconomics.from_summary_deviation_file(
settingfile='config_file.yml',
summary_file='sim_data.csv',
deviation_files_dir='dev_files/',
)
npv, lcoe_val, cashflow, wellRes, well_states, well_results = economics.compute_economics()
or if you want to use GeothermalEconomics using only the config and a well trajectory file (see examples for a trajectory file):
from pythermonomics.geothermal_economics import GeothermalEconomics
economics = GeothermalEconomics.from_trajectory(
settingfile='config_file.yml',
trajectoryfile='trajectoryfile,yml',
)
npv, lcoe_val, cashflow, wellRes, well_states, well_results = economics.compute_economics()
Documentation
Browse the full API reference and usage examples at Docs or build locally:
mkdocs serve
Testing
Run the test suite with:
pytest
Project Structure
src/
pythermonomics/ # Main package code
config/
data/
energy_model/
npv_model/
cli.py
geothermal_economics.py
docs/
api/ # API documentation
tests/ # Unit and integration tests
pyproject.toml # Package setup
mkdocs.yml # Documentation config
Contributing
Contributions are welcome! Please open issues or submit pull requests.
License
GNU General Public License v3 (GPLv3)
Contact information
Stephan de Hoop (stephan.dehoop@tno.nl)
Acknowledgements
This study has been performed as part of the RESULT project (Enhancing REServoirs in Urban deveLopmenT: smart wells and reservoir development). RESULT has been subsidized through the ERANET Cofund GEOTHERMICA (EC Project no. 731117), by the Ministry of Economic Affairs and Climate Policy (the Netherlands), Rannis (Iceland) and GSI (Ireland).
For more information, see the API Reference or contact the maintainers.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythermonomics-0.1.2.tar.gz.
File metadata
- Download URL: pythermonomics-0.1.2.tar.gz
- Upload date:
- Size: 68.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e021583a3fb62226a716981a208710c7cef8f1b379e3c76d4dfa5835720a3a3
|
|
| MD5 |
f72ee18ef6d8bb30d34351106d06feeb
|
|
| BLAKE2b-256 |
5a3fb8890cb953210add8f3bdaefb8ac0fd1ed7d1fc0f2c49b1405652aff1755
|
File details
Details for the file pythermonomics-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pythermonomics-0.1.2-py3-none-any.whl
- Upload date:
- Size: 53.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e72a88be3117c1fc7a1448720c5668bc42af9f36d9096801ad61eb4f38604c64
|
|
| MD5 |
35455672391f79f6dd303dca2dd0c406
|
|
| BLAKE2b-256 |
a21f23c951755d629e280b46aa5933b3a47edd680a9fe51b04fec616cbc65578
|