Distinct element models for the coupled T-H-M processes : Theory and implementation