A nonlinear beam finite element for the post-buckling analysis of plane frames by Koiter's perturbation approach