Air and water flow, II. Gravitational flow with an arbitrary flux boundary condition