Is energy required in generating magnetic field in simple resistance circuit? Consider a simple resistance circuit with a cell and a resistor. It is stated that energy stored in cell appears as heat in resistance as current flows in ideal circuit (neglecting EM radiation) as whole.
POWER/RATE OF HEAT GENERATION = POWER/RATE OF ENERGY CONSUMPTION in CELL = VI
However we also know that flowing current produces magnetic field.

So my questions are:

*

*Is energy needed to create magnetic field in general?


*Does the energy of cell also appears in the energy of the magnetic field?


*Is there any such thing as "energy of magnetic field"


*Any relevant information.
P.S. I am an undergrad. I do not know Special Relativity but I understand that feeling the effects of magnetic field depends on frame of reference.
 A: 
1.Is energy needed to create magnetic field in general?

Yes. When you are using circuit theory the mechanism for dealing with magnetism is called inductance and is usually represented by the variable $L$. The inductance gives the total magnetic field so that you can still use a lumped element approach and do not need to know the details of the magnetic field strength at each location.

2.Does the energy of cell also appears in the energy of the magnetic field?

Yes. Power is given by $P=VI$. Power from the battery goes not only into the resistor but also any inductance or capacitance or any other circuit elements attached.

3.Is there any such thing as "energy of magnetic field"

Yes, for an inductor $V=L\frac{dI}{dt}$ so $P=IV=IL\frac{dI}{dt}$. Notice that when the circuit is at steady state $\frac{dI}{dt}=0$ so $P=0$. Meaning the energy is only briefly put into the magnetic field, not continuously dissipated.
The total energy in the magnetic field is given by the integral of the power over time. It is $E=\frac{1}{2}LI^2$
A: I agree with the answer @Dale provided.
To put things into perspective, the energy stored in the magnetic field of a straight conductor is minuscule compared to the energy dissipated in the resistance of the conductor.
The inductance of a straight copper wire 1 mm in dia and 10 cm long is about 105 nH. The energy stored in the magnetic field of the wire carrying 1 ampere of current is then about 57 nJ ($\frac {Li^2}{2}$). The dc resistance of the same wire is about 2.13 mΩ. The power dissipated in the wire resistance is then about 2.13 mJ per second ($i^{2}R$), or about 74,000 times  more joules dissipated every second in the resistance than the total energy stored in the magnetic field.
Hope this helps.
A: *

*Yes, energy is needed to create the magnetic field. Once the field has been created, no further energy is needed. The electric current in the circuit preserves the magnetic field.    2. The chemical energy in the cell is converted to electrical energy that moves the charges in the current, and as the charges start to move, they produce the magnetic field and its energy.   3. A magnetic field has energy, which is proportional to $B^2$.

