Pātuhitia tēnei: Mathematical modelling of energy systems