Mathematical Modelling and Numerical Simulation of Dendrite Growth Using Phase-Field Method with a Magnetic Field Effect