Influence of heterogeneity on second-kind self-similar solutions for viscous gravity currents