Heating heavy ions in the polar corona by collisionless shocks: A one-dimensional simulation