A computational model for mould filling in lomolding and injection moulding