A Byte of PhysicsLogo

Energy storage

Charging a capacitor stores energy in its electric field. The energy model must agree whether it is computed from capacitance and voltage or from derived charge and voltage. Energy is a ledger value derived from compatible state, not an extra independent control beside Q, V, and C.

Think like a programmer

Choose one canonical energy function such as 0.5 * C * V ** 2, validate its inputs, and derive alternative representations from the same compatible state. Test algebraically equivalent APIs against the canonical result. During a transient, compare the change in stored energy with integrated source and dissipated power; an attractive gauge is not evidence of energy accounting.

Model checklist

Inputs
Positive capacitance C, signed voltage V or signed charge Q, initial state, time samples, source/resistor power convention, and loss model.
State
Compatible Q/V pair, stored energy, source work, dissipated energy, time, and accounting residual.
Rule
Derive Q = CV when needed and calculate U from one canonical relation; accumulate power with a documented quadrature rule.
Output
Nonnegative stored energy, energy change, power ledger, and residual.
Check
All algebraic capacitor-energy forms agree; U is zero at zero V/Q; doubling |V| at fixed C quadruples U; ledger residual is reported rather than silently discarded.
\[U=\frac12CV^2=\frac{Q^2}{2C}=\frac12QV\]

The expressions are equal only when Q = CV describes the same state. At fixed C, changing voltage from V to 2V changes energy from U to 4U. At fixed Q, increasing C reduces energy; these different trends are not a contradiction—they are different constraints. State the source condition before interpreting a capacitance change as “more stored energy.”

An RC charging model gives a useful ledger: source work is the integral of source power, capacitor energy is ½CV², and the difference is heat in the resistor under ideal assumptions. Use sampled time values and a named numerical integration method; do not expect each individual discrete step to balance exactly without considering update order and time resolution.

Try this experiment

Prediction: Doubling voltage quadruples capacitor energy at fixed capacitance; compatible Q/V forms return exactly the same ideal value.

Set C = 2 F, compare V = 3 V and 6 V, then derive Q for each. Calculate U using ½CV² and Q²/(2C), and write an equality-with-tolerance test. Next list source work, stored energy, and resistor heat as three separate ledger entries during an RC charge.

Where this model breaks

Leakage, dielectric loss, dielectric absorption, breakdown, temperature response, and parasitic elements can make stored energy unavailable or unsafe. A discrete transient can have numerical energy error. Field energy also occupies a spatial region, so a single lumped C becomes incomplete when component dimensions and propagation delay matter.

Summary

Use one source of truth for capacitor energy, derive compatible state first, and test equivalent forms. In dynamic circuits, make source work, dissipation, stored energy, and numerical residual separate entries in the ledger.

Glossary

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Energy Storage, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Electric Potential and Capacitance, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Energy Storage as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Energy Storage into a test

Compute capacitor energy from one tested source of truth across equivalent state representations.

  1. Name the inputs and units that the electric potential and capacitance model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: