🔬 Interactive Flux Explorer

Explore Conservation Laws in Real-Time

Manipulate flows and sources to see how the discrete divergence theorem works in accounting

How to use: Adjust the sliders below to change transaction flows and external sources. Watch how the account balances and divergence values update in real-time. The conservation law requires that the sum of all divergences equals zero (unless external sources are present).
🔍 Why Internal Flows Cancel: The Telescoping Theorem
Hover over the diagram to see cancellation in action
A B C +100 +80 -20 Source: +50 Outflow: -130 div(A) = 50 + 20 - 100 = -30 div(B) = 100 - 20 - 80 = 0 div(C) = 80 - 130 = -50

👆 Hover to see internal flows fade (they cancel pairwise!)

Σ internal = (+100 - 100) + (+80 - 80) + (-20 + 20) = 0
Σ boundary + Σ sources = (+50 - 130) = -80 = Δ stock
Local Balance (Per Node)
Δρᵢ = inflowsᵢ − outflowsᵢ + sourcesᵢ
All 5 nodes balanced
Global Conservation
Σ div(i) = Σ sourcesᵢ
Conservation holds

Click to randomly adjust a flow by ±10%. Watch the golden checks respond to show violations!

📊 Transaction Flows

Revenue → A/R $500

Credit sales (Revenue generates receivables)

A/R → Cash $400

Collections (customers pay invoices)

Revenue → Cash $300

Cash sales (direct revenue to cash)

COGS → Inventory $200

Cost of goods sold (expense inventory)

Cash → Inventory $250

Inventory purchases (cash outflow)

⚡ External Sources

Cash Source $0

Owner injection/withdrawal

Equity Source $0

External equity adjustment (FX, revaluation)

🌐 Account Network

📋 Conservation Law Verification

Account Inflows (+) Outflows (−) Source Divergence Net Change (Δ Balance)

Sum of Divergences (excluding sources):

$0

✓ Conservation law satisfied: $\mathbf{1}^T P \mathbf{a} = 0$ (debits = credits)

Mathematical Interpretation:

The divergence at each account is: $\text{div} = \sum (\text{outflows}) - \sum (\text{inflows})$

For a closed system (no external sources), the discrete divergence theorem requires: $$ \sum_{i=1}^{|A|} \text{div}(i) = 0 $$

This is equivalent to Kirchhoff's law ($\sum I_{\text{in}} = \sum I_{\text{out}}$) and the accounting identity (debits = credits).