Analytical model for geometric and material nonlinear analysis of externally prestressed beams