Cody

# Problem 45413. Characterize fluid flow in a pipe as to laminar or turbulent

Solution 2531454

Submitted on 12 Jun 2020 by Antoni Prus
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(flow_pattern([0.025 0.089 986.29 0.00087]),'TRANSITION'))

Re = 2.5224e+03 y = 'TRANSITION'

2   Pass
assert(isequal(flow_pattern([0.036 0.095 976.11 0.00089]),'TURBULENT'))

Re = 3.7509e+03 y = 'TURBULENT'

3   Pass
assert(isequal(flow_pattern([0.035 0.124 1089.38 0.00080]),'TURBULENT'))

Re = 5.9099e+03 y = 'TURBULENT'

4   Pass
assert(isequal(flow_pattern([0.036 0.095 1069.84 0.00078]),'TURBULENT'))

Re = 4.6908e+03 y = 'TURBULENT'

5   Pass
assert(isequal(flow_pattern([0.035 0.148 1004.66 0.00079]),'TURBULENT'))

Re = 6.5875e+03 y = 'TURBULENT'

6   Pass
assert(isequal(flow_pattern([0.024 0.082 922.17 0.00078]),'TRANSITION'))

Re = 2.3267e+03 y = 'TRANSITION'

7   Pass
assert(isequal(flow_pattern([0.027 0.084 1063.42 0.00081]),'TURBULENT'))

Re = 2.9776e+03 y = 'TURBULENT'

8   Pass
assert(isequal(flow_pattern([0.030 0.127 924.05 0.00083]),'TURBULENT'))

Re = 4.2417e+03 y = 'TURBULENT'

9   Pass
assert(isequal(flow_pattern([0.027 0.083 1014.92 0.00087]),'TRANSITION'))

Re = 2.6143e+03 y = 'TRANSITION'

10   Pass
assert(isequal(flow_pattern([0.024 0.117 1080.37 0.00074]),'TURBULENT'))

Re = 4.0996e+03 y = 'TURBULENT'

11   Pass
assert(isequal(flow_pattern([0.026 0.100 1077.98 0.00080]),'TURBULENT'))

Re = 3.5034e+03 y = 'TURBULENT'

12   Pass
assert(isequal(flow_pattern([0.026 0.103 1014.85 0.00078]),'TURBULENT'))

Re = 3.4843e+03 y = 'TURBULENT'

13   Pass
assert(isequal(flow_pattern([0.020 0.120 1001.35 0.00078]),'TURBULENT'))

Re = 3.0811e+03 y = 'TURBULENT'

14   Pass
assert(isequal(flow_pattern([0.021 0.086 946.85 0.00074]),'TRANSITION'))

Re = 2.3108e+03 y = 'TRANSITION'

15   Pass
assert(isequal(flow_pattern([0.036 0.089 910.72 0.00078]),'TURBULENT'))

Re = 3.7410e+03 y = 'TURBULENT'

16   Pass
assert(isequal(flow_pattern([0.035 0.067 1082.44 0.00076]),'TURBULENT'))

Re = 3.3399e+03 y = 'TURBULENT'

17   Pass
assert(isequal(flow_pattern([0.027 0.070 1053.44 0.00071]),'TRANSITION'))

Re = 2.8042e+03 y = 'TRANSITION'

18   Pass
assert(isequal(flow_pattern([0.039 0.066 957.29 0.00084]),'TURBULENT'))

Re = 2.9334e+03 y = 'TURBULENT'

19   Pass
assert(isequal(flow_pattern([0.023 0.101 1044.27 0.00089]),'TRANSITION'))

Re = 2.7257e+03 y = 'TRANSITION'

20   Pass
assert(isequal(flow_pattern([0.035 0.125 981.46 0.00075]),'TURBULENT'))

Re = 5.7252e+03 y = 'TURBULENT'

21   Pass
assert(isequal(flow_pattern([0.030 0.072 1068.48 0.00083]),'TRANSITION'))

Re = 2.7806e+03 y = 'TRANSITION'

22   Pass
assert(isequal(flow_pattern([0.036 0.129 993.82 0.00076]),'TURBULENT'))

Re = 6.0728e+03 y = 'TURBULENT'

23   Pass
assert(isequal(flow_pattern([0.034 0.149 1053.99 0.00087]),'TURBULENT'))

Re = 6.1374e+03 y = 'TURBULENT'

24   Pass
assert(isequal(flow_pattern([0.034 0.110 1050.57 0.00080]),'TURBULENT'))

Re = 4.9114e+03 y = 'TURBULENT'

25   Pass
assert(isequal(flow_pattern([0.037 0.057 1093.71 0.00072]),'TURBULENT'))

Re = 3.2037e+03 y = 'TURBULENT'

26   Pass
assert(isequal(flow_pattern([0.031 0.090 921.41 0.00084]),'TURBULENT'))

Re = 3.0604e+03 y = 'TURBULENT'

27   Pass
assert(isequal(flow_pattern([0.032 0.128 1013.32 0.00086]),'TURBULENT'))

Re = 4.8262e+03 y = 'TURBULENT'

28   Pass
assert(isequal(flow_pattern([0.032 0.144 1074.29 0.00080]),'TURBULENT'))

Re = 6.1879e+03 y = 'TURBULENT'

29   Pass
assert(isequal(flow_pattern([0.036 0.097 1065.76 0.00076]),'TURBULENT'))

Re = 4.8969e+03 y = 'TURBULENT'

30   Pass
assert(isequal(flow_pattern([0.040 0.078 914.57 0.00085]),'TURBULENT'))

Re = 3.3570e+03 y = 'TURBULENT'

31   Pass
assert(isequal(flow_pattern([0.037 0.142 965.40 0.00086]),'TURBULENT'))

Re = 5.8979e+03 y = 'TURBULENT'

32   Pass
assert(isequal(flow_pattern([0.031 0.096 1064.15 0.00089]),'TURBULENT'))

Re = 3.5583e+03 y = 'TURBULENT'

33   Pass
assert(isequal(flow_pattern([0.022 0.121 946.99 0.00078]),'TURBULENT'))

Re = 3.2319e+03 y = 'TURBULENT'

34   Pass
assert(isequal(flow_pattern([0.025 0.133 1099.07 0.00083]),'TURBULENT'))

Re = 4.4029e+03 y = 'TURBULENT'

35   Pass
assert(isequal(flow_pattern([0.034 0.143 1037.53 0.00081]),'TURBULENT'))

Re = 6.2277e+03 y = 'TURBULENT'

36   Pass
assert(isequal(flow_pattern([0.028 0.113 972.65 0.00078]),'TURBULENT'))

Re = 3.9455e+03 y = 'TURBULENT'

37   Pass
assert(isequal(flow_pattern([0.027 0.097 1000.68 0.00088]),'TURBULENT'))

Re = 2.9782e+03 y = 'TURBULENT'

38   Pass
assert(isequal(flow_pattern([0.024 0.084 1014.83 0.00080]),'TRANSITION'))

Re = 2.5574e+03 y = 'TRANSITION'

39   Pass
assert(isequal(flow_pattern([0.025 0.108 1075.67 0.00071]),'TURBULENT'))

Re = 4.0906e+03 y = 'TURBULENT'

40   Pass
assert(isequal(flow_pattern([0.029 0.058 1012.65 0.00081]),'LAMINAR'))

Re = 2.1028e+03 y = 'LAMINAR'

41   Pass
assert(isequal(flow_pattern([0.035 0.073 1017.47 0.00079]),'TURBULENT'))

Re = 3.2907e+03 y = 'TURBULENT'

42   Pass
assert(isequal(flow_pattern([0.037 0.116 970.78 0.00077]),'TURBULENT'))

Re = 5.4112e+03 y = 'TURBULENT'

43   Pass
assert(isequal(flow_pattern([0.025 0.145 959.64 0.00073]),'TURBULENT'))

Re = 4.7653e+03 y = 'TURBULENT'

44   Pass
assert(isequal(flow_pattern([0.027 0.124 1041.18 0.00084]),'TURBULENT'))

Re = 4.1498e+03 y = 'TURBULENT'

45   Pass
assert(isequal(flow_pattern([0.020 0.087 1080.30 0.00076]),'TRANSITION'))

Re = 2.4733e+03 y = 'TRANSITION'

46   Pass
assert(isequal(flow_pattern([0.032 0.080 925.00 0.00078]),'TURBULENT'))

Re = 3.0359e+03 y = 'TURBULENT'

47   Pass
assert(isequal(flow_pattern([0.036 0.148 1072.40 0.00072]),'TURBULENT'))

Re = 7.9358e+03 y = 'TURBULENT'

48   Pass
assert(isequal(flow_pattern([0.027 0.074 963.56 0.00090]),'LAMINAR'))

Re = 2.1391e+03 y = 'LAMINAR'

49   Pass
assert(isequal(flow_pattern([0.031 0.125 1068.37 0.00073]),'TURBULENT'))

Re = 5.6711e+03 y = 'TURBULENT'

50   Pass
assert(isequal(flow_pattern([0.038 0.061 1049.02 0.00085]),'TRANSITION'))

Re = 2.8607e+03 y = 'TRANSITION'

51   Pass
assert(isequal(flow_pattern([0.034 0.063 989.16 0.00080]),'TRANSITION'))

Re = 2.6485e+03 y = 'TRANSITION'

52   Pass
assert(isequal(flow_pattern([0.031 0.136 1035.54 0.00086]),'TURBULENT'))

Re = 5.0766e+03 y = 'TURBULENT'

53   Pass
assert(isequal(flow_pattern([0.031 0.146 913.34 0.00081]),'TURBULENT'))

Re = 5.1034e+03 y = 'TURBULENT'

54   Pass
assert(isequal(flow_pattern([0.026 0.098 1036.97 0.00074]),'TURBULENT'))

Re = 3.5705e+03 y = 'TURBULENT'

55   Pass
assert(isequal(flow_pattern([0.032 0.083 1076.17 0.00073]),'TURBULENT'))

Re = 3.9155e+03 y = 'TURBULENT'

56   Pass
assert(isequal(flow_pattern([0.022 0.146 930.58 0.00073]),'TURBULENT'))

Re = 4.0946e+03 y = 'TURBULENT'

57   Pass
assert(isequal(flow_pattern([0.023 0.059 990.88 0.00083]),'LAMINAR'))

Re = 1.6200e+03 y = 'LAMINAR'

58   Pass
assert(isequal(flow_pattern([0.037 0.129 1042.54 0.00079]),'TURBULENT'))

Re = 6.2988e+03 y = 'TURBULENT'

59   Pass
assert(isequal(flow_pattern([0.034 0.146 1001.16 0.00076]),'TURBULENT'))

Re = 6.5392e+03 y = 'TURBULENT'

60   Pass
assert(isequal(flow_pattern([0.036 0.074 946.86 0.00079]),'TURBULENT'))

Re = 3.1930e+03 y = 'TURBULENT'

61   Pass
assert(isequal(flow_pattern([0.032 0.112 924.52 0.00072]),'TURBULENT'))

Re = 4.6021e+03 y = 'TURBULENT'

62   Pass
assert(isequal(flow_pattern([0.026 0.124 982.26 0.00087]),'TURBULENT'))

Re = 3.6400e+03 y = 'TURBULENT'

63   Pass
assert(isequal(flow_pattern([0.039 0.090 910.44 0.00081]),'TURBULENT'))

Re = 3.9452e+03 y = 'TURBULENT'

64   Pass
assert(isequal(flow_pattern([0.035 0.082 998.59 0.00074]),'TURBULENT'))

Re = 3.8729e+03 y = 'TURBULENT'

65   Pass
assert(isequal(flow_pattern([0.039 0.098 1008.00 0.00074]),'TURBULENT'))

Re = 5.2062e+03 y = 'TURBULENT'

66   Pass
assert(isequal(flow_pattern([0.022 0.056 1063.90 0.00085]),'LAMINAR'))

Re = 1.5420e+03 y = 'LAMINAR'

67   Pass
assert(isequal(flow_pattern([0.024 0.140 1036.86 0.00083]),'TURBULENT'))

Re = 4.1974e+03 y = 'TURBULENT'

68   Pass
assert(isequal(flow_pattern([0.040 0.053 984.85 0.00080]),'TRANSITION'))

Re = 2.6099e+03 y = 'TRANSITION'

69   Pass
assert(isequal(flow_pattern([0.032 0.058 1032.03 0.00071]),'TRANSITION'))

Re = 2.6978e+03 y = 'TRANSITION'

70   Pass
assert(isequal(flow_pattern([0.031 0.121 997.58 0.00082]),'TURBULENT'))

Re = 4.5633e+03 y = 'TURBULENT'

71   Pass
assert(isequal(flow_pattern([0.024 0.115 976.13 0.00072]),'TURBULENT'))

Re = 3.7418e+03 y = 'TURBULENT'

72   Pass
assert(isequal(flow_pattern([0.028 0.076 948.26 0.00082]),'TRANSITION'))

Re = 2.4609e+03 y = 'TRANSITION'

73   Pass
assert(isequal(flow_pattern([0.030 0.091 943.56 0.00087]),'TURBULENT'))

Re = 2.9608e+03 y = 'TURBULENT'

74   Pass
assert(isequal(flow_pattern([0.037 0.078 1023.08 0.00086]),'TURBULENT'))

Re = 3.4333e+03 y = 'TURBULENT'

75   Pass
assert(isequal(flow_pattern([0.039 0.142 976.96 0.00073]),'TURBULENT'))

Re = 7.4115e+03 y = 'TURBULENT'

76   Pass
assert(isequal(flow_pattern([0.036 0.061 931.76 0.00077]),'TRANSITION'))

Re = 2.6573e+03 y = 'TRANSITION'

77   Pass
assert(isequal(flow_pattern([0.037 0.108 1017.24 0.00089]),'TURBULENT'))

Re = 4.5673e+03 y = 'TURBULENT'

78   Pass
assert(isequal(flow_pattern([0.032 0.051 1061.88 0.00082]),'LAMINAR'))

Re = 2.1134e+03 y = 'LAMINAR'

79   Pass
assert(isequal(flow_pattern([0.030 0.077 951.62 0.00080]),'TRANSITION'))

Re = 2.7478e+03 y = 'TRANSITION'

80   Pass
assert(isequal(flow_pattern([0.025 0.055 933.85 0.00075]),'LAMINAR'))

Re = 1.7121e+03 y = 'LAMINAR'

81   Pass
assert(isequal(flow_pattern([0.024 0.111 1064.74 0.00086]),'TURBULENT'))

Re = 3.2982e+03 y = 'TURBULENT'

82   Pass
assert(isequal(flow_pattern([0.036 0.121 1071.88 0.00086]),'TURBULENT'))

Re = 5.4292e+03 y = 'TURBULENT'

83   Pass
assert(isequal(flow_pattern([0.024 0.149 918.72 0.00083]),'TURBULENT'))

Re = 3.9582e+03 y = 'TURBULENT'

84   Pass
assert(isequal(flow_pattern([0.024 0.074 967.94 0.00074]),'TRANSITION'))

Re = 2.3231e+03 y = 'TRANSITION'

85   Pass
assert(isequal(flow_pattern([0.030 0.145 978.92 0.00082]),'TURBULENT'))

Re = 5.1931e+03 y = 'TURBULENT'

86   Pass
assert(isequal(flow_pattern([0.032 0.121 980.31 0.00087]),'TURBULENT'))

Re = 4.3629e+03 y = 'TURBULENT'

87   Pass
assert(isequal(flow_pattern([0.038 0.125 957.12 0.00086]),'TURBULENT'))

Re = 5.2864e+03 y = 'TURBULENT'

88   Pass
assert(isequal(flow_pattern([0.023 0.100 1022.14 0.00084]),'TRANSITION'))

Re = 2.7987e+03 y = 'TRANSITION'

89   Pass
assert(isequal(flow_pattern([0.028 0.123 1077.46 0.00071]),'TURBULENT'))

Re = 5.2264e+03 y = 'TURBULENT'

90   Pass
assert(isequal(flow_pattern([0.023 0.136 984.35 0.00078]),'TURBULENT'))

Re = 3.9475e+03 y = 'TURBULENT'

91   Pass
assert(isequal(flow_pattern([0.039 0.125 1096.20 0.00075]),'TURBULENT'))

Re = 7.1253e+03 y = 'TURBULENT'

92   Pass
assert(isequal(flow_pattern([0.022 0.088 1000.05 0.00081]),'TRANSITION'))

Re = 2.3902e+03 y = 'TRANSITION'

93   Pass
assert(isequal(flow_pattern([0.040 0.099 980.18 0.00090]),'TURBULENT'))

Re = 4.3128e+03 y = 'TURBULENT'

94   Pass
assert(isequal(flow_pattern([0.025 0.117 1092.85 0.00083]),'TURBULENT'))

Re = 3.8513e+03 y = 'TURBULENT'

95   Pass
assert(isequal(flow_pattern([0.026 0.103 900.29 0.00088]),'TRANSITION'))

Re = 2.7397e+03 y = 'TRANSITION'

96   Pass
assert(isequal(flow_pattern([0.028 0.080 1090.12 0.00079]),'TURBULENT'))

Re = 3.0910e+03 y = 'TURBULENT'

97   Pass
assert(isequal(flow_pattern([0.026 0.058 1016.44 0.00073]),'LAMINAR'))

Re = 2.0997e+03 y = 'LAMINAR'

98   Pass
assert(isequal(flow_pattern([0.021 0.108 957.40 0.00077]),'TRANSITION'))

Re = 2.8200e+03 y = 'TRANSITION'

99   Pass
assert(isequal(flow_pattern([0.034 0.136 969.58 0.00089]),'TURBULENT'))

Re = 5.0375e+03 y = 'TURBULENT'

100   Pass
assert(isequal(flow_pattern([0.039 0.071 1053.65 0.00082]),'TURBULENT'))

Re = 3.5580e+03 y = 'TURBULENT'

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!