Text this: A finite element based optimisation tool for electrical machines