Cody

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

Solution 2758564

Submitted on 30 Jul 2020 by Hyun Woo Kim
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

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

Re = 3.7509e+03

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

Re = 5.9099e+03

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

Re = 4.6908e+03

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

Re = 6.5875e+03

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

Re = 2.3267e+03

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

Re = 2.9776e+03

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

Re = 4.2417e+03

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

Re = 2.6143e+03

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

Re = 4.0996e+03

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

Re = 3.5034e+03

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

Re = 3.4843e+03

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

Re = 3.0811e+03

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

Re = 2.3108e+03

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

Re = 3.7410e+03

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

Re = 3.3399e+03

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

Re = 2.8042e+03

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

Re = 2.9334e+03

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

Re = 2.7257e+03

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

Re = 5.7252e+03

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

Re = 2.7806e+03

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

Re = 6.0728e+03

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

Re = 6.1374e+03

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

Re = 4.9114e+03

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

Re = 3.2037e+03

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

Re = 3.0604e+03

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

Re = 4.8262e+03

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

Re = 6.1879e+03

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

Re = 4.8969e+03

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

Re = 3.3570e+03

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

Re = 5.8979e+03

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

Re = 3.5583e+03

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

Re = 3.2319e+03

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

Re = 4.4029e+03

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

Re = 6.2277e+03

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

Re = 3.9455e+03

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

Re = 2.9782e+03

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

Re = 2.5574e+03

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

Re = 4.0906e+03

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

Re = 2.1028e+03

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

Re = 3.2907e+03

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

Re = 5.4112e+03

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

Re = 4.7653e+03

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

Re = 4.1498e+03

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

Re = 2.4733e+03

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

Re = 3.0359e+03

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

Re = 7.9358e+03

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

Re = 2.1391e+03

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

Re = 5.6711e+03

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

Re = 2.8607e+03

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

Re = 2.6485e+03

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

Re = 5.0766e+03

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

Re = 5.1034e+03

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

Re = 3.5705e+03

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

Re = 3.9155e+03

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

Re = 4.0946e+03

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

Re = 1.6200e+03

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

Re = 6.2988e+03

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

Re = 6.5392e+03

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

Re = 3.1930e+03

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

Re = 4.6021e+03

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

Re = 3.6400e+03

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

Re = 3.9452e+03

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

Re = 3.8729e+03

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

Re = 5.2062e+03

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

Re = 1.5420e+03

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

Re = 4.1974e+03

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

Re = 2.6099e+03

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

Re = 2.6978e+03

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

Re = 4.5633e+03

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

Re = 3.7418e+03

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

Re = 2.4609e+03

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

Re = 2.9608e+03

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

Re = 3.4333e+03

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

Re = 7.4115e+03

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

Re = 2.6573e+03

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

Re = 4.5673e+03

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

Re = 2.1134e+03

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

Re = 2.7478e+03

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

Re = 1.7121e+03

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

Re = 3.2982e+03

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

Re = 5.4292e+03

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

Re = 3.9582e+03

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

Re = 2.3231e+03

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

Re = 5.1931e+03

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

Re = 4.3629e+03

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

Re = 5.2864e+03

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

Re = 2.7987e+03

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

Re = 5.2264e+03

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

Re = 3.9475e+03

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

Re = 7.1253e+03

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

Re = 2.3902e+03

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

Re = 4.3128e+03

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

Re = 3.8513e+03

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

Re = 2.7397e+03

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

Re = 3.0910e+03

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

Re = 2.0997e+03

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

Re = 2.8200e+03

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

Re = 5.0375e+03

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

Re = 3.5580e+03

### Community Treasure Hunt

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

Start Hunting!