A one-dimensional model for thin-walled beams