magnetic energy density of a solenoid