Simulating contaminant transport in unsaturated and saturated groundwater zones