This Matlab source code is used for tracking the evolution of unsteady slug flow in a long curved inclined riser with a catenary shape for subsea oil and gas applications.