A general relation for standing normal jumps in both hydraulic and dry granular flows