get_dynamics function

Calculate hierarchy dynamics