A damage model for concrete beams in compression