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.1.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.1-py3-none-any.whl (53.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythermonomics-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ab210b013035d211d97a3050e57b4e94ab8a0ee9b20951f32d01b575bfc31009
MD5 a93fb84d007dc095ff48a97127837ff7
BLAKE2b-256 654a89f27638946e4ab88318158d6298044be2767619b9ebfc5fa94249da80d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythermonomics-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d64c869e2d1b38dae3b4b4efa0c964910bdaf456ca070afa1b479fdb7f7524ad
MD5 015b3ef2693054271ef25344bb6dc16a
BLAKE2b-256 78ab9021c1143c5ca2364ed86fde6aa94f397552673eb83f2309ba251df645fe

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