Skip to main content

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.

TODO: EXPAND HERE WHAT PROJECT IT WAS APART OF AND ADD LOGO ETC.

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 package from the repository root:

pip install .

Optional Dependencies

  • Documentation:
    To build and view the documentation, install with the docs extra:
    pip install .[docs]
    
  • Testing:
    To run tests, install with the tests extra:
    pip install .[tests]
    

Usage

Command-Line Interface

After installation, use the CLI tool:

geothermal-calc -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.0.2.tar.gz (67.1 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.0.2-py3-none-any.whl (52.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pythermonomics-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f833479ed767031e154ce78546070085aebcd702633d496a439e45d8f3ee492c
MD5 4662064d564f530054cedf84b3b9cfd8
BLAKE2b-256 6050c98bed13717c8d68bbf34cae463f2c695274b0f0563aeb6c2883561bf523

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythermonomics-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 52.9 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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5997dc04e3339bf8e28a26e12bcdd6a4e7faa440379c340944fe625da78bda1f
MD5 ed9abb12c04e2429135e459a2a12bb73
BLAKE2b-256 1a572251c401f236ecfb806e56bcd88e7bdb5362c4f3a1c790732513df0f1db2

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