Numerical Modeling of Granular Materials and Multiphysical Processes in Porous Media