Finite element modelling of thermo-elasto-plastic multiphase porous materials