Energy-based aeroelastic analysis of a morphing wing