Hello everyone, I'm trying to come up with modeling for one of my experiments and I was wondering if I could get some help. I've piston that is going to be levitated using two magnets: north facing north or south facing south. I'm going to be using the repelling effect of the magnets to levitate this piston. I was wondering how I can find the potential energy of the two magnets. I was also wondering if someone can guide me to find potential energy of gas that is being compressed due to increase in heat. Thank you. PS: My experiment is for Stirling engine, so the increase in temperature causes a piston to move which in turn compresses the gas, then decompresses and compresses it again. This cycle goes on for a while.