Mathematical model and numerical simulation of aluminum casting and solidification in magnetic fields with allowance for free surface dynamics