Crackling noise in digital and real rocks - implications for forecasting catastrophic failure in porous granular media