Modelling and control of crystal purity, size and shape distributions in crystallization processes