Skip to main content
TANGO, Techno-economic ANalysis of Geoenergy Operations. Reservoir, wells and surface plant coupled in one modular simulator, solved over the project's lifetime, with the levelized cost of electricity or heat.

CI Docs License Python uv Ruff mypy prek gitleaks DVC Version

Techno-economic ANalysis of Geoenergy Operations. TANGO couples reservoir, wells, and surface plant in one modular simulator, solves them over the project's lifetime, and computes the levelized cost of electricity or heat.

What will a geothermal project's electricity or heat cost over its life? You describe the surface plant, the wells, the reservoir and the economics; TANGO couples them into one system, solved over the project's lifetime, for hydrothermal, CPG, EGS and AGS systems; you get LCOE or LCOH, net electric and thermal power, temperature, pressure and flow for every part and timestep, and the best designs from sweeps and optimization

Contents

  1. What TANGO models
  2. How you use TANGO
  3. How the code is organized
  4. Start here
  5. Setup
  6. Documentation and layout
  7. Development and help
  8. License

What TANGO models

Many simulations around one simulation; inside it the system: surface plant, wells, reservoir and economics with their models and the four system types, and what each part takes in and gives out. Connectors lead from each part to the external simulators in a box of their own

How you use TANGO

How you use TANGO in four steps: pick a model for each part, wire them into a workflow, run once, as a sweep or as an optimization, and read the results

How the code is organized

The TANGO core package: tango_core, the optimization module pymoo_api, workflows, orchestrators, the components surface, well, reservoir and economic with their variants and connectors, and core; connecting from outside, a web app, an AI assistant and a data store; below it the TESPy and CoolProp libraries and the external simulators

Start here

To run TANGO, go to Setup. To work on it, read the package tour and CONTRIBUTING.md. Working with an AI agent? Paste this into it:

Read AGENTS.md in GEG-ETHZ/TANGO-core; it holds every instruction for agents in this repository.

Setup

TANGO needs Python 3.11, 3.12, or 3.13 (>=3.11,<3.14) and uv. just and direnv are optional. The distribution is tango-core, the import name is tango_core, and the command is tango_core.

Add it to your own project from PyPI:

uv add tango-core               # or: pip install tango-core
uv run tango_core init .        # copies the templates into ./templates

To install a tagged release from source instead, use uv add "git+https://github.com/GEG-ETHZ/TANGO-core.git" --tag v1.1.0.

Or clone the repository to work on it:

git clone git@github.com:GEG-ETHZ/TANGO-core.git tango-core
cd tango-core
just setup                     # installs dependencies and all git hooks

Then run the flagship example, a single-flash hydrothermal power plant, and save its results:

uv run tango_core validate templates/hydro_sf_electric.yml
uv run tango_core run templates/hydro_sf_electric.yml --save-dir results/

results/ then holds the solved config, a per-timestep CSV and an economics CSV. The same from Python:

from tango_core.workflows.workflow import Workflow

wf = Workflow.from_file("templates/hydro_sf_electric.yml")
wf.run()

The installation guide covers installing from PyPI, pinning a release, upgrades, and setting up a development checkout; Run a simulation describes each result file and the exit codes; optimizations live in applications/.

Documentation and layout

The documentation is published at https://geg-ethz.github.io/TANGO-core/, built from docs/; just docs previews it locally.

Section What it covers
Getting started Installation, first run, templates, applications, Euler
Architecture Package layers, config to objects, the component circuit
Runtime The nested loops, boundary-condition iteration, one run end to end
API reference Generated from the docstrings
Contributing The TANGO commandments, workflow, tests, releases
src/tango_core/        the package: core, components, orchestrators, workflows, CLI, optimization
templates/        maintained configs, one or more per system type; back the tests and applications
applications/     optimizations and demos; each optimization is a DVC pipeline with a SLURM script
tests/            unit/ (fast, run in CI) and regtest/ (full simulations; the fast subset runs before push)
docs/             the documentation site: guides, architecture, runtime, deep dives, API reference
tools/            maintenance scripts, the diagram generators and git-hook helpers

Development and help

just check          # format, lint, strict type check, fast tests
just docs           # documentation site on localhost
just diagrams       # regenerate the banner and the diagrams

Code changes follow the TANGO commandments; branching, pull requests and releases are in CONTRIBUTING.md and changes per release in CHANGELOG.md.

Need Where
A question about using TANGO Open an issue on GitHub
A bug Open an issue with the config and the full traceback; see Error tracebacks
A security problem Follow SECURITY.md; do not open a public issue
A publication Cite TANGO with CITATION.cff; GitHub shows a "Cite this repository" button for it

License

Copyright © 2025 ETH Zurich. Authors: Chad Baker and Dubhaltach McSweeney, Geothermal Energy and Geofluids (GEG) group, Department of Earth and Planetary Sciences.

TANGO is licensed under the Apache License, Version 2.0; see LICENSE.txt.

Metadata

Release files for tango-core 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tango-core 1.1.0
File Size Uploaded Provenance Actions
tango_core-1.1.0.tar.gz 680.3 kB Without provenance Details for tango_core-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tango-core 1.1.0
File Interpreter ABI Platform Actions
tango_core-1.1.0-py3-none-any.whl Python 3 none any Details for tango_core-1.1.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / tango_core-1.1.0.tar.gz

Download URL tango_core-1.1.0.tar.gz
Size 680.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f3eb17593e80effa0caf39786b52eb0a22e3a8851f56957176395f01391353f0
BLAKE2b-256 checksum
How to use checksums
acb71c8f242e0ff066079390487256620967eaf994930db87dec71ee9ea5a273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tango_core-1.1.0-py3-none-any.whl

Download URL tango_core-1.1.0-py3-none-any.whl
Size 495.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa6baeabf51f96cce8a0e320b69b9f604f30dc31e4064e8a94fd674a14b81b6f
BLAKE2b-256 checksum
How to use checksums
5f468b1186af10cc81c815517f37432242d29843bd440d799f4c65f1fecd84bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for tango-core 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page