Weierstrass’ variational theory for analysing meniscus stability in ribbon growth processes