Skip to content

About

TANGO is a scientific simulator for Techno-economic ANalysis of Geo-energy Operations

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

604 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 DOI 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

Note

TANGO is research software of the Geothermal Energy and Geofluids group at ETH Zürich, released under the Apache License 2.0.

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.2.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 or DOI 10.5281/zenodo.23952662, which always resolves to the latest release; GitHub shows a "Cite this repository" button

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.

About

TANGO is a scientific simulator for Techno-economic ANalysis of Geo-energy Operations

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages