Simulation of crack propagation and failure of concrete