A three-dimensional beam formulation for large deformation and an accurate implementation of the free boundary. (September 2021)