Solenoids basically are electrical devices used to convert electrical energy into linear mechanical motion. The energy produces within a solenoid can either be used to provide a straight linear pulling action, or it may be converted to provide rotary action. In either case the magnetic pull force increases as the air gap is reduced between armature and core.