Lemonergy Wiki

Worked examples

Two cells: reduced thermal coupling

Inspect the same two-cell event model with weaker inter-cell heat transfer.

Document created Updated
Editorially reviewedSource record reviewed

Compare a weaker thermal connection

A conductive link changes where heat goes and which events occur. This example reduces the link between two thermal masses from 2 to 0.1 W/K while preserving the heat pulse, ambient losses and trigger rule. You will compare the temperature histories, inspect the inactive neighboring trigger and account for the heat retained and lost by the pair.

The complete model is tr-reduced-coupling, reference version 1, with 48 prepared blocks and 64 connections. It runs in Lemonergy's Rust/WebAssembly engine. Read triggered heat propagation first to understand the otherwise identical stronger-link case.

Open the prepared model

Open prepared examples and choose Two cells: reduced thermal coupling. The complete supplied model loads automatically. Choose Run prepared model to calculate a fresh result with Rust/WebAssembly, then select blocks to inspect their read-only parameters and connections. You can download the original model data for reference.

The public viewer lets you inspect, run and explore this prepared example. To change parameters, connect blocks, import a file or save an edited model, choose Edit with Pro. The Design app opens the selected example in its authenticated Pro editor; the workflow guide explains both experiences.

The reduced-coupling model viewport in Lemonergy, with two thermal states, trigger branches and energy accounting.
Two cells: reduced thermal coupling: the complete prepared graph and Display outputs in the public Lemonergy example viewer. Fit, zoom and scroll reveal its connected blocks; the graph is read-only. Captured .

The neighboring latch, timer and release branch remain present. No missing block is needed to obtain the absence of a second pulse: the modeled neighboring temperature simply does not satisfy its trigger condition during the observation window.

Set up the controlled comparison

For each cell, heat release and inter-cell conduction compete with heat loss to ambient:

q12 = G (T1 − T2)
C dT1/dt = P1 − H (T1 − Ta) − q12
C dT2/dt = P2 − H (T2 − Ta) + q12
P1 = 200 W for 0 ≤ t < 10 s; otherwise 0 W
P2 = 200 W for ten seconds if a sampled T2 > 320 K trigger occurs

Cell 1 is time-seeded at 0 s. Cell 2 tests its temperature every 0.1 s with a strict greater-than comparison. A trigger latches once; a timer controls its finite release duration.

InputThis exampleStronger-link example
Inter-cell conductance G0.1 W/K2 W/K
Heat capacity C20 J/K per cellSame
Initial temperatures300 K, 300 KSame
Ambient conductance H1 W/K per cellSame
Ambient temperature Ta300 KSame
Release power and duration200 W for 10 s per triggered cellSame
Cell 1 seed0 sSame
Cell 2 thresholdT2 > 320 KSame
Logic sample interval0.1 sSame
Observation window0–40 sSame

The reference evolves mean and difference temperatures analytically between sample instants. With m = (T1 + T2)/2 − Ta and d = (T1 − T2)/2, the decay rates are H/C = 0.05 s⁻¹ for m and (H + 2G)/C = 0.06 s⁻¹ for d. The smaller link lets the temperature difference persist longer. See passive heat exchange for the same mean/difference method without heat release or ambient loss.

Inspect the complete block inventory

Select a block in the prepared diagram to inspect its read-only parameters and connections. In the table, cell-i denotes the corresponding group on each cell.

Block or groupParameters and unitsFunction
ambient-temperature, zero, one · Constants300 K, 0, 1Supply environment and logic levels
negative-ambient · Gain−1Provide −Ta to the ambient-difference sums
cell-1-seed · Step; seed-threshold · ConstantBefore 0, after 1, at 0 s; threshold 0.5Issue the seed command
cell-1-trigger · CompareSeed ≥ 0.5Set cell 1 trigger
cell-2-threshold · Constant; cell-2-trigger · Compare320 K; T2 > thresholdTest neighboring temperature
cell-i-latched · Boolean latchSample 0.1 s; initial 0; reset zeroKeep trigger memory
cell-i-release-complete · On-delay timerSample 0.1 s; delay 10 sEnd release after a trigger
cell-i-negative-timer · Gain; cell-i-release-remaining · Sum−1; two inputsForm 1 − timer output
cell-i-release-gate · ProductLatch × release-remaining; scale 1Gate the pulse
cell-i-release-heat · Gain200 W per unit logic levelSupply released heat
cell-i-temperature-rate · Thermal balanceC = 20 J/K; H = 1 W/KCalculate temperature rate
cell-i-temperature · IntegratorInitial 300 K; gain 1Accumulate temperature
cell-i-release-energy · IntegratorInitial 0 J; gain 1Accumulate released energy
cell-i-above-ambient · Sum; cell-i-ambient-heat · GainTi − Ta; gain 1 W/KMeasure ambient heat loss
cell-i-negative-initial · Constant; cell-i-temperature-change · Sum−300 K; two inputsForm temperature change from initial state
cell-i-stored-energy · Gain20 J/KCalculate stored-energy increase
negative-cell-2-temperature · Gain; inter-cell-temperature-difference · Sum−1; two inputsForm T1 − T2
inter-cell-heat · Gain; negative-inter-cell-heat · Gain0.1 W/K; −1Apply equal and opposite conduction
cell-1-net-heat, cell-2-net-heat · SumsP1 − q12; P2 + q12Feed the Thermal balance heat ports
total-ambient-heat · Sum; ambient-energy · IntegratorTwo inputs; initial 0 J, gain 1Accumulate environmental heat transfer
total-release-energy · Sum; negative-release-energy · GainTwo inputs; −1Form the negative release total
energy-residual · SumFour inputsCheck stored change + ambient transfer − release
The reduced-coupling example with a block selected and parameter values visible in Lemonergy.
Two cells: reduced thermal coupling: read-only parameters and connections for the selected cell-2-trigger block. Pro opens the model editor for changes. Captured .

The Gain on inter-cell-heat is the controlled difference between the two cases. Keep both ambient conductances and both heat capacities unchanged for a meaningful comparison.

Run and inspect the inactive trigger

  1. Confirm the loaded binding contains 48 blocks, 64 connections and the 0–40 s window.
  2. Keep the solver contract below and the 0.1 s sample times on the latches and timers.
  3. Choose Run prepared model. Check that the comparison and full-trace completeness pass.
  4. In Scope signal, choose Cell 2 temperature. Inspect its entire trace, not only the final value.
  5. Choose Cell 2 trigger memory, Cell 2 released heat and Cell 2 released energy in turn. They remain zero throughout this case.
  6. Inspect Cell 1 temperature, Cell 1 released heat and Cell 1 released energy. Its pulse ends at 10 s and contributes 2,000 J.
  7. Inspect Energy transferred to ambient and Energy balance residual. Choose Download results CSV for the sampled rows or Download run evidence for the full verification.
Solver settingReference value
MethodDormand–Prince 4(5)
Initial / minimum / maximum step0.001 / 1e−10 / 0.1 s
Relative / absolute tolerance1e−11 / 1e−12
Maximum steps100,000
Algebraic tolerance / iteration limit1e−10 / 30
Implicit tolerance / iteration limit1e−10 / 20

After the run, move Display time to inspect numerical Display outputs at retained solver times. Choose a signal’s Scope button, or use Scope signal, to view its full trajectory and reference-error plot. Scrubbing changes the inspected time, not the prepared model or its result.

Interpret the temperatures and energy

Lemonergy's reduced-coupling result, including the plotted trace and comparison with the independent reference.
Two cells: reduced thermal coupling: fresh Rust/WebAssembly results captured on 2026-10-10. The numerical checks, Scope overlay and error plot come from this same successful run. Captured .

These rounded analytical checkpoints help interpret the plot. Cell 2 remains below its threshold through the complete 40 s verification window. Its modest rise continues after cell 1 stops releasing heat because the warmer first cell is still transferring heat to it.

Time (s)T1 (K)T2 (K)P1 (W)P2 (W)
0300.000000300.0000002000
5343.718403300.5214402000
10376.945964301.74790400
20344.499907303.23033700
40314.994566302.56441000

At 10 s, cell 1 is about 376.95 K here, compared with 357.75 K in the stronger-link example. Less heat is carried away from the seeded cell. Reducing conduction therefore changes both the neighbor's exposure and the seeded cell's temperature; it is not an unconditional improvement in every output.

Energy at 40 sExpected value
Cell 1 release2,000 J
Cell 2 release0 J
Transfer to ambient1,648.820492 J
Combined stored-energy increase351.179508 J
Stored increase + ambient transfer − release0 J analytically

The retained thermal report, generated 1 October 2026 at 18:52:33 UTC, passed with 410 output points and a maximum energy-balance residual of approximately 8.87e−12 J. That historical evidence is distinct from a new run shown in the software screenshots.

The fixed gates apply across the entire trace: 1e−6 K for temperature, 1e−10 W for release power, 1e−3 J for energy and exactly zero latch error. The original settings, complete time window, every accepted point and all 0.1 s sample instants must also be retained. A zero final latch by itself does not prove that the intermediate trace was checked; see read validation results.

Restore the stronger connection (Pro)

Choose Edit with Pro to open this example in the authenticated Design editor. The following changes require Pro editing. Use Run blocks & compare there to solve the edited graph; the public prepared model stays unchanged.

Save this model, then edit Gain on inter-cell-heat from 0.1 to 2 and rerun. The neighboring trigger should appear at 9.7 s, its pulse should end at 19.7 s and total release should become 4,000 J. The edited run should fail against this reduced-coupling reference because its inputs have changed.

Load Two cells: triggered heat propagation for the matching stronger-link reference. Save both runs with their inputs and compare the temperature, pulse and energy traces. Restore the reference blocks before reporting a result for this page's original case.

Troubleshoot and assess the limits

ObservationCheck
Cell 2 triggers in the original reduced-coupling caseInter-cell gain must be 0.1, threshold 320 K, ambient loss 1 W/K and initial temperatures 300 K
Cell 1 releases no heatSeed at 0 s, seed comparison, latch input and zero reset
A second release branch appears unusedThis is expected; keep it connected so the same model can test other coupling values
Cell 2 cools immediately from 300 KCheck the sign of the link heat and the initial temperatures
Residual changes after a Pro parameter editMatch the Thermal balance C/H values to the stored-energy and ambient-heat gains
Comparison is cleared after a Pro editIn the Pro editor, rerun to bind new evidence to the edited model

No neighboring trigger through 40 s is a result for this prescribed synthetic setup. It does not establish a physical barrier, safety margin or certification result. Heat release is rectangular, properties are constant, temperature is uniform within each cell and the trigger is sampled. Reaction kinetics, gas, flame, radiation, venting, ejecta, electrochemistry and spatial gradients are not represented.

References and related reading

The retained thermal evidence preserves this case's historical inputs and full-trace check. External architecture documentation listed among the sources is background rather than measured validation; MATLAB/Simscape was not executed for that retained evidence. Continue with thermal propagation verification, battery thermal management and the worked-example library.

Models and evidence

  • Open Block validation
  • Download original model data 673750 bytes
    Artifact provenance

    Repository origin: outputs/thermal-runaway-validation/models/tr-reduced-coupling.lemon.json

    SHA-256: 3844c427d66b99735db301e881dc661c86543cb3fd662b78c958b9b30c709c20

  • Download thermal evidence (JSON) 3467407 bytes
    Artifact provenance

    Repository origin: outputs/thermal-runaway-validation/native.json

    SHA-256: 3938c96604897de04fcc8d41894179951ca1bc72d179a4fac69a3d50509a7a40

Downloads preserve recorded inputs and results. Opening a saved result does not run a new simulation.

Related papers and references

  • paper

    A Review of Lithium-Ion Battery Thermal Runaway Modeling and Diagnosis Approaches

    Manh-Kien Tran; Anosh Mevawalla; Attar Aziz; Satyam Panchal; Yi Xie; Michael Fowler · MDPI — Processes · 2022-06-15

    A review connecting thermal-runaway model choices with prediction and detection methods; background for understanding what a numerical verification case can and cannot establish.

    Read original · DOI 10.3390/pr10061192

    Source description · Abstract and Sections 3–4: thermal-runaway models, prognosis and diagnosis. Background reading; the numerical verification cases do not reproduce a reviewed experiment.