In-process simulation of the extrusion to support optimisation and real-time monitoring in fused filament fabrication