Power flow analysis and applications to vibration and control in maritime engineering