The present invention discloses a miniature thermodynamic device that can be constructed using standard micro-fabrication techniques. The device can be used to provide cooling, generate power, compress gases, pump fluids and reduce pressure below ambient (operate as a vacuum pump). Embodiments of the invention relating to the production of a cooling effect and the generation of electrical power, change the thermodynamic state of the system by extracting energy from a pressurized fluid. Energy extraction is attained using an expansion process, which is as nearly isentropic as possible for the appropriately chosen fluid. An isentropic expansion occurs when a compressed gas does work to expand, and in the disclosed embodiments, the gas does work by overcoming either an electrostatic or a magnetic force