Cosserat continuum theory to simulate microscopic rotation of magnetic powder in applied magnetic field