Optimizing electromagnetic levitation design to enhance thermodynamic measurement