A nonlinear model for open cross-section thin-walled beams, Part I: Formulation