Cody

# Problem 45396. Design a tubesheet for shell-and-tube heat exchangers

Solution 2982934

Submitted on 23 Sep 2020
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   Fail
assert(isequal(tubesheet(17.89),216))

rOfBox = 0.7071 y = 208

Assertion failed.

`  `
2   Pass
assert(isequal(tubesheet(17.88),208))

rOfBox = 0.7071 y = 208

3   Pass
assert(isequal(tubesheet(7.82),32))

rOfBox = 0.7071 y = 32

4   Fail
assert(isequal(tubesheet(12.32),96))

rOfBox = 0.7071 y = 88

Assertion failed.

5   Fail
assert(isequal(tubesheet(19.79),264))

rOfBox = 0.7071 y = 268

Assertion failed.

6   Pass
assert(isequal(tubesheet(19.99),268))

rOfBox = 0.7071 y = 268

7   Pass
assert(isequal(tubesheet(20.00),276))

rOfBox = 0.7071 y = 276

8   Fail
assert(isequal(tubesheet(6.33),24))

rOfBox = 0.7071 y = 16

Assertion failed.

9   Fail
assert(isequal(tubesheet(29.77),640))

rOfBox = 0.7071 y = 632

Assertion failed.

10   Pass
assert(isequal(tubesheet(11.18),76))

rOfBox = 0.7071 y = 76

11   Pass
assert(isequal(tubesheet(15.76),164))

rOfBox = 0.7071 y = 164

12   Fail
assert(isequal(tubesheet(24.08),392))

rOfBox = 0.7071 y = 400

Assertion failed.

13   Fail
assert(isequal(tubesheet(12.29),96))

rOfBox = 0.7071 y = 88

Assertion failed.

14   Fail
assert(isequal(tubesheet(42.37),1320))

rOfBox = 0.7071 y = 1304

Assertion failed.

15   Pass
assert(isequal(tubesheet(10.54),68))

rOfBox = 0.7071 y = 68

16   Pass
assert(isequal(tubesheet(12.07),88))

rOfBox = 0.7071 y = 88

17   Pass
assert(isequal(tubesheet(9.36),52))

rOfBox = 0.7071 y = 52

18   Pass
assert(isequal(tubesheet(12.16),88))

rOfBox = 0.7071 y = 88

19   Fail
assert(isequal(tubesheet(22.35),340))

rOfBox = 0.7071 y = 332

Assertion failed.

20   Fail
assert(isequal(tubesheet(16.24),180))

rOfBox = 0.7071 y = 172

Assertion failed.

21   Fail
assert(isequal(tubesheet(46.25),1592))

rOfBox = 0.7071 y = 1568

Assertion failed.

22   Pass
assert(isequal(tubesheet(22.08),332))

rOfBox = 0.7071 y = 332

23   Pass
assert(isequal(tubesheet(10.06),60))

rOfBox = 0.7071 y = 60

24   Fail
assert(isequal(tubesheet(45.34),1520))

rOfBox = 0.7071 y = 1528

Assertion failed.

25   Pass
assert(isequal(tubesheet(49.01),1788))

rOfBox = 0.7071 y = 1788

26   Fail
assert(isequal(tubesheet(22.50),356))

rOfBox = 0.7071 y = 348

Assertion failed.

27   Fail
assert(isequal(tubesheet(6.44),24))

rOfBox = 0.7071 y = 16

Assertion failed.

28   Pass
assert(isequal(tubesheet(13.65),120))

rOfBox = 0.7071 y = 120

29   Fail
assert(isequal(tubesheet(21.03),308))

rOfBox = 0.7071 y = 300

Assertion failed.

30   Fail
assert(isequal(tubesheet(30.15),656))

rOfBox = 0.7071 y = 648

Assertion failed.

31   Pass
assert(isequal(tubesheet(13.85),120))

rOfBox = 0.7071 y = 120

32   Fail
assert(isequal(tubesheet(30.54),680))

rOfBox = 0.7071 y = 656

Assertion failed.

33   Pass
assert(isequal(tubesheet(35.85),936))

rOfBox = 0.7071 y = 936

34   Pass
assert(isequal(tubesheet(11.87),88))

rOfBox = 0.7071 y = 88

35   Pass
assert(isequal(tubesheet(6.75),24))

rOfBox = 0.7071 y = 24

36   Pass
assert(isequal(tubesheet(15.54),156))

rOfBox = 0.7071 y = 156

37   Fail
assert(isequal(tubesheet(16.62),188))

rOfBox = 0.7071 y = 180

Assertion failed.

38   Pass
assert(isequal(tubesheet(21.78),332))

rOfBox = 0.7071 y = 332

39   Pass
assert(isequal(tubesheet(25.89),468))

rOfBox = 0.7071 y = 468

40   Pass
assert(isequal(tubesheet(5.19),12))

rOfBox = 0.7071 y = 12

41   Pass
assert(isequal(tubesheet(13.86),120))

rOfBox = 0.7071 y = 120

42   Fail
assert(isequal(tubesheet(40.25),1200))

rOfBox = 0.7071 y = 1176

Assertion failed.

43   Pass
assert(isequal(tubesheet(2.43),0))

rOfBox = 0.7071 y = 0

44   Fail
assert(isequal(tubesheet(46.51),1600))

rOfBox = 0.7071 y = 1592

Assertion failed.

45   Fail
assert(isequal(tubesheet(36.79),996))

rOfBox = 0.7071 y = 988

Assertion failed.

46   Pass
assert(isequal(tubesheet(24.94),440))

rOfBox = 0.7071 y = 440

47   Pass
assert(isequal(tubesheet(29.35),616))

rOfBox = 0.7071 y = 616

48   Pass
assert(isequal(tubesheet(12.63),96))

rOfBox = 0.7071 y = 96

49   Fail
assert(isequal(tubesheet(23.48),392))

rOfBox = 0.7071 y = 384

Assertion failed.

50   Fail
assert(isequal(tubesheet(48.19),1732))

rOfBox = 0.7071 y = 1708

Assertion failed.

51   Fail
assert(isequal(tubesheet(27.79),548))

rOfBox = 0.7071 y = 540

Assertion failed.

52   Fail
assert(isequal(tubesheet(26.54),500))

rOfBox = 0.7071 y = 492

Assertion failed.

53   Fail
assert(isequal(tubesheet(12.35),96))

rOfBox = 0.7071 y = 88

Assertion failed.

54   Pass
assert(isequal(tubesheet(24.96),440))

rOfBox = 0.7071 y = 440

55   Pass
assert(isequal(tubesheet(31.58),716))

rOfBox = 0.7071 y = 716

56   Fail
assert(isequal(tubesheet(34.28),864))

rOfBox = 0.7071 y = 840

Assertion failed.

57   Fail
assert(isequal(tubesheet(20.38),284))

rOfBox = 0.7071 y = 276

Assertion failed.

58   Fail
assert(isequal(tubesheet(19.00),256))

rOfBox = 0.7071 y = 248

Assertion failed.

59   Fail
assert(isequal(tubesheet(49.41),1820))

rOfBox = 0.7071 y = 1804

Assertion failed.

60   Pass
assert(isequal(tubesheet(2.85),4))

rOfBox = 0.7071 y = 4

61   Fail
assert(isequal(tubesheet(44.37),1460))

rOfBox = 0.7071 y = 1436

Assertion failed.

62   Fail
assert(isequal(tubesheet(45.75),1560))

rOfBox = 0.7071 y = 1544

Assertion failed.

63   Pass
assert(isequal(tubesheet(40.01),1176))

rOfBox = 0.7071 y = 1176

64   Pass
assert(isequal(tubesheet(5.84),16))

rOfBox = 0.7071 y = 16

65   Pass
assert(isequal(tubesheet(13.83),120))

rOfBox = 0.7071 y = 120

66   Pass
assert(isequal(tubesheet(17.43),208))

rOfBox = 0.7071 y = 208

67   Fail
assert(isequal(tubesheet(34.31),864))

rOfBox = 0.7071 y = 848

Assertion failed.

68   Pass
assert(isequal(tubesheet(7.69),32))

rOfBox = 0.7071 y = 32

69   Fail
assert(isequal(tubesheet(36.34),968))

rOfBox = 0.7071 y = 952

Assertion failed.

70   Pass
assert(isequal(tubesheet(6.23),16))

rOfBox = 0.7071 y = 16

71   Fail
assert(isequal(tubesheet(33.03),796))

rOfBox = 0.7071 y = 788

Assertion failed.

72   Pass
assert(isequal(tubesheet(25.21),448))

rOfBox = 0.7071 y = 448

73   Pass
assert(isequal(tubesheet(39.17),1124))

rOfBox = 0.7071 y = 1124

74   Pass
assert(isequal(tubesheet(36.04),936))

rOfBox = 0.7071 y = 936

75   Fail
assert(isequal(tubesheet(45.28),1520))

rOfBox = 0.7071 y = 1512

Assertion failed.

76   Fail
assert(isequal(tubesheet(44.66),1476))

rOfBox = 0.7071 y = 1468

Assertion failed.

77   Pass
assert(isequal(tubesheet(17.37),208))

rOfBox = 0.7071 y = 208

78   Pass
assert(isequal(tubesheet(35.24),904))

rOfBox = 0.7071 y = 904

79   Pass
assert(isequal(tubesheet(10.69),68))

rOfBox = 0.7071 y = 68

80   Pass
assert(isequal(tubesheet(2.50),0))

rOfBox = 0.7071 y = 0

81   Fail
assert(isequal(tubesheet(37.46),1028))

rOfBox = 0.7071 y = 1020

Assertion failed.

82   Pass
assert(isequal(tubesheet(25.50),460))

rOfBox = 0.7071 y = 460

83   Fail
assert(isequal(tubesheet(24.52),432))

rOfBox = 0.7071 y = 424

Assertion failed.

84   Fail
assert(isequal(tubesheet(45.33),1520))

rOfBox = 0.7071 y = 1512

Assertion failed.

85   Pass
assert(isequal(tubesheet(30.88),688))

rOfBox = 0.7071 y = 688

86   Pass
assert(isequal(tubesheet(31.27),708))

rOfBox = 0.7071 y = 708

87   Fail
assert(isequal(tubesheet(43.11),1380))

rOfBox = 0.7071 y = 1372

Assertion failed.

88   Fail
assert(isequal(tubesheet(40.47),1208))

rOfBox = 0.7071 y = 1192

Assertion failed.

89   Fail
assert(isequal(tubesheet(29.26),616))

rOfBox = 0.7071 y = 608

Assertion failed.

90   Pass
assert(isequal(tubesheet(9.96),52))

rOfBox = 0.7071 y = 52

91   Fail
assert(isequal(tubesheet(12.76),104))

rOfBox = 0.7071 y = 96

Assertion failed.

92   Fail
assert(isequal(tubesheet(44.44),1476))

rOfBox = 0.7071 y = 1460

Assertion failed.

93   Pass
assert(isequal(tubesheet(2.41),0))

rOfBox = 0.7071 y = 0

94   Pass
assert(isequal(tubesheet(25.01),440))

rOfBox = 0.7071 y = 440

95   Pass
assert(isequal(tubesheet(9.23),52))

rOfBox = 0.7071 y = 52

96   Pass
assert(isequal(tubesheet(48.96),1788))

rOfBox = 0.7071 y = 1788

97   Pass
assert(isequal(tubesheet(35.92),936))

rOfBox = 0.7071 y = 936

98   Pass
assert(isequal(tubesheet(25.52),460))

rOfBox = 0.7071 y = 460

99   Fail
assert(isequal(tubesheet(24.08),392))

rOfBox = 0.7071 y = 400

Assertion failed.

100   Pass
assert(isequal(tubesheet(3.92),4))

rOfBox = 0.7071 y = 4

101   Fail
assert(isequal(tubesheet(34.42),872))

rOfBox = 0.7071 y = 864

Assertion failed.

102   Pass
assert(isequal(tubesheet(3.08),4))

rOfBox = 0.7071 y = 4

103   Fail
assert(isequal(tubesheet(4.50),12))

rOfBox = 0.7071 y = 4

Assertion failed.

104   Fail
assert(isequal(tubesheet(26.56),500))

rOfBox = 0.7071 y = 492

Assertion failed.

105   Pass
assert(isequal(tubesheet(5.74),16))

rOfBox = 0.7071 y = 16

106   Pass
assert(isequal(tubesheet(41.09),1240))

rOfBox = 0.7071 y = 1240

107   Pass
assert(isequal(tubesheet(41.06),1240))

rOfBox = 0.7071 y = 1240

108   Fail
assert(isequal(tubesheet(36.40),968))

rOfBox = 0.7071 y = 952

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!