Factors affecting strength of electromagnet