Skip to main content

The Exergy Imperative

CI PyPI Python License Guide

A Python Library and Guide for analyzing exergy, emissions, health, and economics using the data that you already have. Give it as little as an equipment name and a country; every default it fills in stays visible, sourced, and is replaceable with your own data or measurements.

Why this library

Energy is never created or destroyed — but its capacity to do useful work is. Every joule can be split into exergy, the part that has capacity to perform useful work, and anergy, the part that does not. Across the entire universe there are two things that are happening: useful work is being performed, and exergy is being destroyed. That one-way flow drives every engine, grid, reactor, and star, yet almost all of our energy accounting ignores it. This library makes it easily visible for any energy carrier, technology, or process, and meets you at whatever level of detail you have. The Exergy Imperative, the guide this library grew out of, tells the full story.

Most exergy tools (TESPy, ExerPy, Aspen Plus) start from a fully specified plant simulation. Most real decisions start earlier — with a utility bill, a telemetry export, or a one-line description of whatever system you are working on. exergy-imperative works at that end of the funnel:

  • Sparse input, transparent output. Progressive-fidelity assessments (F0 upward) from a bare technology name to measured site data. Every number carries provenance, a range, and warnings — screening defaults are never passed off as measurements.
  • The whole business case, not just thermodynamics. Exergetic efficiency and destruction, AR6 20/100-year climate impact, air-pollutant health screening, and project economics (NPV, IRR, payback, levelized cost, marginal abatement cost) in one result.
  • Data plumbing built in. Auditable ingestion from CSV, Excel, Parquet, JSON, and SQL with unit conversion and mapping inference; native Excel input templates and workbook reports; weather normalization from NASA POWER; connectors for World Bank, ERA5-Land, EDGAR, eGRID, and DOE IAC data.
  • Agent-native. Versioned JSON recipes with validate-only / dry-run / execute modes, stable error codes, capability discovery, and an optional MCP server so AI assistants can drive full assessments safely.
  • Zero required dependencies. The core is pure Python (3.11–3.14); pandas, CoolProp, PDF, and MCP support are opt-in extras.

Install

python -m pip install exergy-imperative

Optional extras, only if you need them:

python -m pip install "exergy-imperative[data]"     # Excel / Parquet readers
python -m pip install "exergy-imperative[reports]"  # PDF reports
python -m pip install "exergy-imperative[mcp]"      # MCP server for agents
python -m pip install "exergy-imperative[all]"      # everything

Start from the physics

The same few questions apply to every energy system, from a kettle to a national grid — and each is one line:

import exergy_imperative as xi

# How much of a heat flow could still become useful work?
xi.thermal_exergy_factor_c(80, 20)     # 0.17 — hot water at 80 °C in a 20 °C world
xi.thermal_exergy_factor_c(1500, 20)   # 0.83 — furnace heat is nearly pure work potential
xi.petela_exergy_factor()              # 0.93 — sunlight is very high-quality energy

# How much quality does a technology preserve? Ask by name.
xi.assess("air-source-heat-pump").exergetic_efficiency.value        # 0.32
xi.assess("natural-gas-boiler").exergetic_efficiency.value          # 0.11
xi.assess("electric-resistance-heater").exergetic_efficiency.value  # 0.10
xi.assess("lithium-ion-battery").exergetic_efficiency.value         # 0.93

Three ways to warm the same room, and the heat pump preserves three times more work potential than the boiler advertising "95 % efficiency" — the kind of difference energy accounting cannot see and exergy accounting can. xi.list_profiles("technology") lists everything assessable by name — electrolyzers, fuel cells, chillers, desalination, data centers, batteries — and every profile value can be replaced with your own temperatures, COPs, and efficiencies.

Sixty seconds to a result

import exergy_imperative as xi

case = xi.assess_process("compressed air", energy=2_500, country="DEU")
print(case.summary())
Compressed-air system
Fidelity: F1
Exergetic efficiency: 0.15 dimensionless (screening range 0.08-0.25)
Climate impact: 8.24e+05 kg CO2e (100-year)
Screening energy opportunity: 500 MWh (screening range 125-875)
Warnings and limitations:
  - The improvement opportunity uses a broad template screening prior; ...

Add whatever data you have — efficiency, temperatures, energy prices, capital cost, lifespan, location, and then analyze the results.

Export deliverables at any time:

case.export_html("compressed-air.html")
case.export_pdf("compressed-air.pdf")              # [reports] extra
case.export_excel_compatible("compressed-air-data")

The same works from the command line, from JSON recipes, and from Excel templates:

exergy report examples/process_report_recipe.json --html output/report.html
exergy capabilities --json     # discovery for scripts and agents
exergy validate                # run the bundled reference checks

See the quickstart for the full tour.

What's inside

  • Twelve ready-made process templates spanning the energy landscape: steam, furnaces, compressed air, refrigeration, drying, desalination, hydrogen electrolysis, data centers, cement, steel reheat, food processing, district energy.
  • Engineering screens for steam systems, heat pumps, furnaces, refrigeration, compressed air, and waste-heat matching.
  • Explicit GHG boundaries (combustion, process, fugitive, purchased energy), methane vent/flare/recovery project analysis, and grid intensities for 213 countries (Ember / Our World in Data, 2020–2025).
  • Monte Carlo uncertainty propagation, sensitivity ranking, and value of perfect information.
  • Dependency-free SVG/HTML reports, optional PDF, and auditable Excel-compatible bundles with complete source payloads.
  • Optional real-fluid physical exergy via CoolProp ([properties] extra).

When to use it — and when not to

Your situation Use
Screening any energy technology, site, or portfolio from bills, telemetry, or one-line descriptions exergy-imperative
Building the emissions + health + economics case around an efficiency project exergy-imperative
Letting an AI assistant run auditable energy assessments (MCP / JSON recipes) exergy-imperative
Component-level exergy analysis of a fully specified thermodynamic cycle TESPy
Exergy analysis on top of an existing Aspen Plus or Ebsilon simulation ExerPy
Detailed process simulation, equipment design, or guarantee calculations Aspen Plus, gPROMS, EBSILON, EES

This library is deliberately a screening tool: its thermodynamics are closed-form (Carnot factors, Gouy–Stodola, Petela, ideal-mixture separation) plus optional CoolProp real-fluid properties. Results based on bundled profiles are screening estimates with declared ranges — a triage and business-case layer that tells you where a detailed simulation or site audit is worth the money, not a substitute for one.

Data, provenance, and validation

Bundled reference data ships with sources, versions, licenses, and confidence labels: Ember/OWID electricity intensities, IPCC AR6 warming potentials, IPCC 2006 fuel factors, EPA and EMEP/EEA pollutant screening profiles. No restricted publisher data (IEA, Energy Institute) is redistributed — local adapters map your licensed copies with SHA-256 fingerprinting. Run exergy validate to execute the bundled reference calculations and see every expected value, tolerance, and citation.

Documentation

Guide What it covers
Quickstart Install to first report
Python library Full API tour
Engineering models Equipment screens and their assumptions
Environment, health, economics Impacts and project finance
Data & fidelity Fidelity tiers, units, boundaries
Ingestion · Excel & local data Getting your data in
External data integrations World Bank, ERA5-Land, EDGAR, eGRID, IAC
Agent integration JSON recipes, discovery, MCP server
Validation Reference checks and their scope
Architecture How the modules fit together
Changelog Release history
The Exergy Imperative The complete guide to exergy and the energy transition

Status

Alpha — the released version is shown in the PyPI badge above. The public Python API, CLI commands, recipe contract 1.0, packaged JSON Schemas, and MCP tools are stable surfaces within a minor version (see AGENTS.md). Release history lives in the changelog. Contributions are welcome — especially reviewed profiles, validation cases against published literature, and dataset adapters; see CONTRIBUTING.md.

License and citation

Code is Apache-2.0. The guide, explanatory documentation, and bundled profile data are CC BY 4.0; licensing details and third-party data attributions are in NOTICE. To cite this project, reference The Exergy Imperative (Exergy Lab, 2026), https://github.com/cdimurro/the-exergy-imperative.


Published by Exergy Lab — a platform for accelerating scientific discovery and technological innovation, purpose-built for energy and deep-tech industries. Free for anyone to use.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exergy_imperative-0.4.3.tar.gz (219.7 kB view details)

Uploaded Source

Built Distribution

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

exergy_imperative-0.4.3-py3-none-any.whl (192.3 kB view details)

Uploaded Python 3

File details

Details for the file exergy_imperative-0.4.3.tar.gz.

File metadata

  • Download URL: exergy_imperative-0.4.3.tar.gz
  • Upload date:
  • Size: 219.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for exergy_imperative-0.4.3.tar.gz
Algorithm Hash digest
SHA256 07427837415f9235dbe233c80506e082cee846f63ac41f36f565fc4c7bc918c4
MD5 715f8c4a07b0697d26f33c4abea2709b
BLAKE2b-256 a5ed89d2f10f85930fad53443d45e3455274d2ee10cdd7e3a6f985d5bf901652

See more details on using hashes here.

Provenance

The following attestation bundles were made for exergy_imperative-0.4.3.tar.gz:

Publisher: release.yml on cdimurro/the-exergy-imperative

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exergy_imperative-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for exergy_imperative-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1b3e789a1422924e15ac0b98727f26a1b0c327a391b03426362fc56527426eed
MD5 0b1ce71a9c20f48a8c744f44043bd649
BLAKE2b-256 c20ecb947870cad2e6355f8f5ee27e34cf6ed2975e87748baf2802f2ca6ac40a

See more details on using hashes here.

Provenance

The following attestation bundles were made for exergy_imperative-0.4.3-py3-none-any.whl:

Publisher: release.yml on cdimurro/the-exergy-imperative

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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