Text this: An Improved Method for Calculating the Power Consumption of Electromagnet Coil