I'm trying to calculate the battery requirements for an experimental home built air compressor. I understand that electromagnetic air compressors operate using attraction and repulsion forces created by electromagnets using the basic magnetic principle that like poles of two magnets repel and opposite poles attract. I 'm trying to calculate two things. Firstly the force required to repel a permanent magnet, which acts as a piston, through a cylinder with diameter 2cm and length 30cm. Secondly how much electrical power in watts it would take to create sufficient magnetic force to repel the piston at one end and attract at the other end.. I believe the SI unit for magnetic force is N (Newton meters). Is there a formula I could use to determine these two measures? .