Thin-walled beams: The case of the rectangular cross-section