Question: Problems with Optimization

Hey Guys,

I'm new to Maple and am having problems two problems. The first is I can not get anything to show up on my plot and the second is I'm getting a erorr of "Error, (in fsolve) Can't handle expressions with typed procedures". The code can be seen below;

 

Restart:

``

NULL

Heat*Exchanger*Principles

``

Q := Cmin*(Th-Tc)*(1-exp^(-NTU*(1-Cmin/Cmax)))/(1-Cmin*exp^(-NTU*(1-Cmin/Cmax))/Cmax):

NTU := UA/Cmin:

Cmax := (1/4)*rho[1]*Pi*Di^2*U[1]*Cp[1];

(1/4)*rho[1]*Pi*Di^2*U[1]*Cp[1]

(1)

Cmin := (1/4)*rho[2]*Pi*(Do^2-Di^2)*U[2]*Cp[2];

(1/4)*rho[2]*Pi*(Do^2-Di^2)*U[2]*Cp[2]

(2)

UA := 1/(1/(h[2]*Pi*Di*L)+1/(h[1]*Pi*Di*L));

1/(1/(h[2]*Pi*Di*L)+1/(h[1]*Pi*Di*L))

(3)

eq1 := dp[1] = (4*f[1]*L*rho[1]*(1/2))*U[1]^2/Dh[1];

dp[1] = 2*f[1]*L*rho[1]*U[1]^2/Dh[1]

(4)

eq2 := dp[2] = (4*f[2]*L*rho[2]*(1/2))*U[2]^2/Dh[2];

dp[2] = 2*f[2]*L*rho[2]*U[2]^2/Dh[2]

(5)

f[1] := 0.79e-1/(rho[1]*U[1]*Dh[1]/mu[1])^(1/4);

0.79e-1/(rho[1]*U[1]*Dh[1]/mu[1])^(1/4)

(6)

U[1] := (1/.158)^(1/1.75)*(dp[1]*(rho[1]*Dh[1]/mu[1])^(1/4)*Dh[1]/(L*rho[1]))^(1/1.75);

2.870187284*(dp[1]*(rho[1]*Dh[1]/mu[1])^(1/4)*Dh[1]/(L*rho[1]))^.5714285714

(7)

f[2] := 0.79e-1/(rho[2]*U[2]*Dh[2]/mu[2])^(1/4);

0.79e-1/(rho[2]*U[2]*Dh[2]/mu[2])^(1/4)

(8)

U[2] := (1/.158)^(1/1.75)*(dp[2]*(rho[2]*Dh[2]/mu[2])^(1/4)*Dh[2]/(L*rho[2]))^(1/1.75);

2.870187284*(dp[2]*(rho[2]*Dh[2]/mu[2])^(1/4)*Dh[2]/(L*rho[2]))^.5714285714

(9)

h[1] := 0.23e-1*(rho[1]*U[1]*Dh[1]/mu[1])^(4/5)*Pr[1]^(1/3)*k[1]/Dh[1];

0.5346333238e-1*(rho[1]*(dp[1]*(rho[1]*Dh[1]/mu[1])^(1/4)*Dh[1]/(L*rho[1]))^.5714285714*Dh[1]/mu[1])^(4/5)*Pr[1]^(1/3)*k[1]/Dh[1]

(10)

h[2] := 0.23e-1*(rho[2]*U[2]*Dh[2]/mu[2])^(4/5)*Pr[2]^(1/3)*k[2]/Dh[2];

0.5346333238e-1*(rho[2]*(dp[2]*(rho[2]*Dh[2]/mu[2])^(1/4)*Dh[2]/(L*rho[2]))^.5714285714*Dh[2]/mu[2])^(4/5)*Pr[2]^(1/3)*k[2]/Dh[2]

(11)

Dh[1] := Di;

Di

(12)

Dh[2] := Do-Di;

Do-Di

(13)

Qnum := evalf(subs(dp[1] = 750, dp[2] = 250, rho[1] = 1000, rho[2] = 1.2, mu[1] = 0.1e-2, mu[2] = 0.1846e-4, Pr[1] = 3.15, Pr[2] = .7, L = 4*V*Do^2/Pi, V = 0.5e-1, k[1] = .645, k[2] = 0.263e-1, Cp[1] = 4130, Cp[2] = 1004, Di = 0.5e-1, Tc = 25, Th = 95, Q)):

``

plot(Qnum, Do = 0.05 .. 0.5, axes = boxed, labels = ['Do', 'Q'], view = [0 .. 0.5, 0 .. 3000]);

 

``

fsolve(diff(Qnum, Do) = 0, Do, .1 .. 1)

Error, (in fsolve) Can't handle expressions with typed procedures

 

``

 

 

 

 

``

 

Download Assignment_1.mw

 

 

 

Please Wait...