Gravity current upstream of a buoyant influx in an open-channel flow: a numerical study