A 3D mathematical model for the prediction of mucillage dynamics