Numerical modelling of electromagnetic casting processes