An analytical solution for one‐dimensional transport in heterogeneous porous media