Dynamics of engine and shaft