Hydrodynamic force acted on a solid translating in nonuniform stream