Solar to mechanical energy conversion using a magnetic-thermal engine