Skip to main content

Tools for geothermal techno-economics, including NPV, LCOE, well simulation, and more.

Project description

PyThermoNomics Logo

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

Installation

Install the latest version using pip:

pip install pythermonomics

Optional Dependencies

  • Documentation:
    To build and view the documentation, install with the docs extra:
    pip install pythermonomics[docs]
    
  • Testing:
    To run tests, install with the tests extra:
    pip install pythermonomics[tests]
    
  • Run Jupyter Notebook example:
    To run the notebook example, install with the notebook extra:
    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/index.md 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)


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

pythermonomics-0.1.0.tar.gz (67.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythermonomics-0.1.0-py3-none-any.whl (53.0 kB view details)

Uploaded Python 3

File details

Details for the file pythermonomics-0.1.0.tar.gz.

File metadata

  • Download URL: pythermonomics-0.1.0.tar.gz
  • Upload date:
  • Size: 67.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for pythermonomics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f45c2cbd5646ab989c430e865bcd0328721658c1c451d1ed56271c5511dce9a
MD5 a2fbaa8817f66f5bad669681c534e4c2
BLAKE2b-256 53151de5d019aa39b61b45f570505c848c366e3b6dc1cccf34dbd579b71e662b

See more details on using hashes here.

File details

Details for the file pythermonomics-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pythermonomics-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for pythermonomics-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9752c830fa81f9190a87e131b0991ba575b9859632c51b484e7eb32acfdaad7b
MD5 27d7bdbb3c0a3b003a9d8335936c5676
BLAKE2b-256 af93adb74da56b7d1c78d21007856c7d24506431396a2fceeae4ba24d46cb37c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page