メインコンテンツまでスキップ

Thermo Cycles

Heat engines, refrigerators, and power cycles — Carnot, Rankine, Brayton, Otto, Diesel — with full T-s and p-V diagrams and efficiency under 0.1%.

  • Live appzeq.dev/apps/thermo-cycles/
  • Sourceapp/artifacts/api-server/public/apps/thermo-cycles/ (1,232 lines)
  • Operators — KO42 · QM14 (Bose-Einstein) · QM15 (Fermi-Dirac) · optional GR35
  • Error budget — ≤ 0.1% vs. Cengel 9e reference cycles at ideal-gas limit

What it solves

A thermodynamic-cycle workbench. Configure working fluid (ideal gas, R-134a, water-steam, CO₂), pick a cycle (Carnot, Rankine, Brayton, Otto, Diesel, Stirling, Ericsson), set the four/five state points, and get:

  • Thermal efficiency η vs. Carnot limit
  • Specific work w_net, specific heat q_in
  • T-s diagram (temperature-entropy)
  • p-V diagram (pressure-volume)
  • Irreversibility / exergy destroyed per component

All plots update once per Zeqond (0.777 s), enough time to scan a parameter sweep across 100 operating points.


The math

Carnot efficiency η_C = 1 − T_cold / T_hot
Rankine (ideal) η = (h_3 − h_4 − h_2 + h_1) / (h_3 − h_2)
Brayton (ideal) η = 1 − 1/r_p^((γ−1)/γ) r_p = pressure ratio
Bose-Einstein (QM14) n_i = 1 / [exp((E_i − µ)/kT) − 1]
Fermi-Dirac (QM15) n_i = 1 / [exp((E_i − µ)/kT) + 1]

Operator picks

StepDecision
1. PrimeKO42 on
2. LimitKO42 + QM14 + QM15 = 3 (both statistics available for multi-species working fluids)
3. ScaleMolecular statistics → macroscopic cycle
4. Precision≤ 0.1% vs. Cengel reference
5. CompileMaster Equation with C_KO42 + C_QM14 + C_QM15
6. ExecuteZ encodes fluid thermodynamic properties, cycle topology
7. VerifyCheck η ≤ η_Carnot and Δs_cycle = 0 (closed cycle, second law)

Runnable worked example — Rankine, superheated steam

Boiler at 8 MPa, 500 °C; condenser at 10 kPa. Textbook η ≈ 37.3% (Cengel 9e, Example 10-1).

curl -s -X POST https://api.zeq.dev/api/playground/compute \
-H "Content-Type: application/json" \
-H "x-demo-key: $DEMO_KEY" \
-d '{
"operators": ["KO42","QM14","QM15"],
"params": {
"cycle": "rankine",
"working_fluid": "water_steam",
"boiler_p_MPa": 8.0,
"boiler_T_C": 500.0,
"condenser_p_kPa": 10.0,
"isentropic_efficiency_pump": 1.0,
"isentropic_efficiency_turbine": 1.0
}
}' | jq

Expected:

{
"result": {
"eta_thermal": 0.3731,
"eta_error_pct": 0.027,
"w_net_kJ_per_kg": 1390.2,
"q_in_kJ_per_kg": 3726.5,
"T_s_diagram": { /* 4 state points */ },
"operators_used": ["KO42","QM14","QM15"]
}
}

η within 0.027% of reference. The gap is fluid-property-table discretisation, not operator drift.


Extend it

  1. Regenerative Rankine — add a feedwater heater; watch η climb 2–3 points
  2. Combined cycle — chain Brayton → Rankine via a heat recovery steam generator
  3. Absorption chiller — lithium-bromide working pair; QM14 dominates at the desorber stage

Seeds

  • Quantum heat engines — pair a two-level system QM5 with QM14 and extract work via phase-coherent pulses
  • Thermodynamic mosaics — tile hundreds of tiny Rankines over a 2D temperature map for district waste-heat
  • Gravitational redshift corrections (GR35) — for space-based solar thermal, the hot reservoir sits at a different potential; η gets a GM/rc² correction

Papers

Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.