Simulating earthquake-induced ductile crack propagation and brittle fracture in steel structures