Viscoelastic simulation and optimisation of the polymer flow through the hot-end during filament-based material extrusion additive manufacturing