# What do we mean by magnetic field energy? Does this magnetic field energy in a current carrying wire comes from the battery the wire is connected to?

Let me take an example to elaborate my question. Suppose we have a simple circuit with a battery (E) and a resistance (R). Current will be flowing in the circuit, I = E/R. Now, we know that that if there is a current in a wire, then due to this current, a magnetic field will be present around it, and magnetic field will also be carrying some magnetic field energy. Now the question comes here is, where this magnetic field energy comes from? Does it come from the battery? If that is the case then whey do we say that work done by the battery is equal to the heat dissipated in the resistance? Why do we not say that the work done by the battery is equal to the heat dissipated in the resistance + the magnetic field energy stored in the vicinity of the wire?

A steady magnetic field represents a constant store of energy so the battery does not need to supply any energy to maintain the constant magnetic field.

To estimate the energy required to set up the magnetic field assume that a loop of wire of diameter $30\,\rm cm$ represents an electrical circuit.
Such a loop has a self inductance of approximately $10^{-6}\,\rm H$.

If a current of one amp is passing through the loop then the energy stored is $\frac 12 LI^2\approx 5\times 10^{-7}\,\rm J$.
This energy comes from the battery as the magnetic field increases from zero and then once the magnetic field is created the battery does not have to supply any more energy to maintain this magnetic field.

However ohmic heating requires a continuous supply of energy from the battery and if the current is one amp with the resistance of the loop being one ohm then the battery is supplying energy at the rate one joule every second.

That stored energy in the magnetic field is returned to the circuit when the circuit is broken and the current drops to zero.

In your ideal example, the magnetic field is not doing any work. There is energy stored in the field, but you get that energy back when you break the circuit (the field collapses and induces a current in the wire).

• When you make the circuit, the current starts to flow and the field is established. This impedes the flow of current and so is called impedance.
• Once the current is flowing, you have resistive loss (as you described) plus a steady state magnetic field containing a constant amount of energy.
• When you break the circuit, the field collapses, inducing a current that keeps the current flowing a bit longer after the circuit is opened. This energy ends up as heat.

That's because for a straight piece of wire in a circuit, the amount of magnetic energy stored in the field surrounding the wire while current is flowing is often smaller than that dissipated by the resistance of the circuit- and when you turn off the current flow, the energy temporarily stored in the magnetic field is returned to the circuit.

If the straight piece of wire is instead wrapped up into a coil, the magnetic field energy is greatly magnified and can easily exceed the resistive losses in the circuit. In this case, this "inductance effect" cannot be neglected.

In any case, the work required to establish the magnetic field is provided by the battery, but note that this energy is not being steadily dissipated- it gets stored in the magnetic field during a brief time right after the circuit is switched on. After this turn-on transient, the steady-state dissipation occurs in the resistance in the circuit- and we get back the energy stored during the turn-on transient when the current is shut off.

For a very small duration of time, when current was growing in the circuit, the current was variable, due to which the magnetic field associated with it was also variable, due to which induced non conservative electric field came into existence and this electric field, extracted some energy from the system (from battery) and stored this energy in form of magnetic field energy in the contour of circuit. We generally ignore this energy since this energy is very small, due to very small self inductance of a straight wire. Once the current becomes steady, no further storage of energy happens in magnetic field and magnetic field energy becomes steady. Now, all the further energy supplied by battery get consumed only in the resistance in joule heating. Now, if the circuit is broken or it is short circuited, then this stored magnetic field energy returns to the circuit and finally converts into joule heating.