summaryrefslogtreecommitdiff
path: root/1373/CH12/EX12.18/Chapter12_Example18.sce
blob: 8fc9aa03ed76c378d79ba550c308241848aac684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//Chapter-12, Example 12.18, Page 534
//=============================================================================
clc
clear

//INPUT DATA
T=100;//Total length of tubes in m
//ct=10000 Rs - Cost of the tubes in Rs
//cs=(15000*D^3*L) Cost of the shell in Rs
//cf=(2000*D*L) Cost of the floor space occupied by the exchanger in Rs

//CALCULATIONS
//Cost=(ct+cs+cf) Total first cost in Rs
//Cost=(10000+(15000*D^3*L)+(2000*D*L))
//The constraint requires the heat exchanger to include 100m tubes such that (((3.1414*D^2)/4)*L*200)=100
//L=(2/(3.1415*D^2))
//Substitute L in the equation in line 8
//Cost=(10000+(15000*D^3*(2/(3.1415*D^2)))+(2000*D*(2/(3.1415*D^2))))
//Cost=(10000+((30000*D)/3.1415)+(4000/(3.1415*D)))
//For optimizaation partial derivative of Cost w.r.t D should be zero
//((30000/3.1415)-(4000/(3.1415*D^2)))=0
D=((3.1415*4000)/(3.1415*30000))^0.5;//Diameter of the exchanger in m
L=(2/(3.1415*D^2));//Length of the exchanger in m
Cost=(10000+(15000*D^3*L)+(2000*D*L));//Optimal cost in Rs

//Output
mprintf('The diameter of the exchanger is %3.3f m \n The Length of the exchanger is %3.2f m \n Optimal cost is %3.0f Rs',D,L,Cost)

//=================================END OF PROGRAM==============================