Single and two-phase flows of shear-thinning media in safety valves.