Physics of mirror reactors and devices