A mathematical model of dendritic microstructures in nickel-based superalloys