In: Mechanical Engineering
write the mathematical code in language fortran 77 about Linda Hanson palstic cryocooler refrigerator using r407c refrigerant with moving coil magnet compressor technology the compressor is used is scroll casing using r407c refrigerant hand blender ammonia and solid CO2
"!Regenerative Rankine Cycle"
"Purpose: Find the optimum extraction pressure, P[2], in psia. Pumps and turbines assumed to operate ideally."
"!To run, select min/max from the Calculate menu (or press F4) and choose to maximize efficiency with respect to the extraction pressure, P[2] (or P[3] or P[6])."
"After running, select Plot Window 1 the cycle efficiency and work versus the extraction pressure. This plot was generated using Solve Table under the Calculate menu.
Plot Window 2 shows the state points for the optimum cycle super-imposed on a T-s diagram for steam. The T-s diagram was generated with the Property Plot option in the Plot menu."
"!Low pressure pump"
P[1]=1 [psia]
x[1]=0 "0 indicates saturatedd liquid"
h[1]=enthalpy(STEAM,P=P[1],x=x[1])
v[1]=volume(STEAM,P=P[1],x=x[1])
s[1]=entropy(STEAM,P=P[1],x=x[1])
T[1]=temperature(STEAM,P=P[1],x=x[1])
W_p2=v[1]*(P[1]-P[2])*Convert((ft^3/lb_m)*(psia), Btu/lb_m)
h[2]=h[1]-W_p2 "energy balance on adiabatic pump"
v[2]=volume(STEAM,P=P[2],h=h[2])
s[2]=entropy(STEAM,P=P[2],h=h[2])
T[2]=temperature(STEAM,P=P[2],h=h[2])
"!High pressure Pump"
P[3]=P[2]
x[3]=0
h[3]=enthalpy(STEAM,P=P[3],x=x[3])
v[3]=volume(STEAM,P=P[3],x=x[3])
T[3]=temperature(STEAM,P=P[3],x=x[3])
s[3]=entropy(STEAM,P=P[3],x=x[3])
P[4]=600 [psia]
W_p1=-v[3]*(P[4]-P[3])*Convert((ft^3/lbm)*(psia), Btu/lb_m)
h[4]=h[3]-W_p1 "energy balance on adiabatic pump"
v[4]=volume(STEAM,P=P[4],h=h[4])
s[4]=entropy(STEAM,P=P[4],h=h[4])
T[4]=temperature(STEAM,P=P[4],h=h[4])
"!Boiler"
T[5]=800 [F]
P[5]=P[4]
h[5]=enthalpy(STEAM,T=T[5],P=P[5])
Q=h[5]-h[4]
s[5]=entropy(STEAM,T=T[5],P=P[5])
v[5]=volume(STEAM,T=T[5],P=P[5])
"!Turbine High Pressure"
s[6]=s[5]
P[6]=P[2]
h[6]=enthalpy(STEAM,s=s[6],P=P[6])
T[6]=temperature(STEAM,s=s[6],P=P[6])
v[6]=volume(STEAM,s=s[6],P=P[6])
W_t1=h[5]-h[6] "energy balance on adiabatic
turbine"
"!Turbine Low Pressure"
s[7]=s[6]
P[7]=P[1] "neglect pressure drop in the
condenser"
h[7]=enthalpy(STEAM,s=s[7],P=P[7])
T[7]=temperature(STEAM,s=s[7],P=P[7])
v[7]=volume(STEAM,s=s[7],P=P[7])
W_t2=h[6]-h[7] "energy balance on adiabatic
turbine"
"!Feedwater Heater"
x*h[6]+(1-x)*h[2]=h[3]
"!Cycle Statistics"
W_net=W_t1+(1-x)*(W_t2+W_p2)+W_p1
eta_thermal=W_net/Q
$Tabstops 0.25 2.5 in
"!Regenerative Rankine Cycle with 2 feedwater heaters"
"Purpose: Investigate the effect of pressures of two feedwater heaters on the efficiency of a Rankine - regenerative cycle. The cycle analysis is done for unit steam flow through the boiler. P[2] is the pressure of the low pressure feedwater heater which in this example is fixed at 200 psia in the Parametric table. P[4] is the higher extraction pressure which is varied in the table.
This problem demonstrates the use of Procedures. The parameters to the left of the : in the Procedure/Call statements are inputs. Outputs appear to the right of the colon. A Call statement references the Procedure.
Arrays are used for state variables so that the values can be plotted. In this case the cycle efficiency is plotted against the extraction pressure.
To run, select Solve Table from the Calculate menu.
"
PROCEDURE pump(P_in,P_out,Eff :h_in,h_out,W_p)
h_in:=ENTHALPY(STEAM,P=P_in,x=0);
v:=volume(STEAM,P=P_in,x=0)
W_p:=v*(P_in-P_out)/Eff*Convert((ft^3/lb_m)*(psia),Btu/lb_m)
h_out:=h_in-W_p
END
PROCEDURE turbine(h_in,P_in,P_out,Eff :h_out,W_t)
s_in:=entropy(STEAM,h=h_in,P=P_in)
h_out_id:=enthalpy(STEAM,s=s_in,P=P_out)
W_t:=(h_in-h_out_id)*Eff
h_out:=h_in-W_t
END
eta_turb=0.84
"Isentropic turbine efficiency; same for all turbines"
eta_pump=0.65
"Isentropic pump efficiency; same for all pumps"
"!Pump 3"
P[1]=1 [psia]
CALL Pump(P[1],P[2],eta_pump:h[1],h[2],W_p_3)
"!Pump 2"
CALL Pump(P[3],P[4],eta_pump:h[3],h[4],W_p_2)
"!Pump 1"
CALL Pump(P[5],P[6],eta_pump:h[5],h[6],W_p_1)
"!Boiler"
P[6]=P[7]
"neglect pressure drop thru boiler"
P[7]=900 [psia]
h[7]=enthalpy(STEAM,T=800,P=P[7])
Q=h[7]-h[6]
"!Turbine 1"
CALL Turbine(h[7],P[7],P[8],eta_turb:h[8],W_t_1)
P[8]=P[4]
"!Turbine 2"
CALL Turbine(h[8],P[8],P[9],eta_turb:h[9],W_t_2)
P[9]=P[2]
"!Turbine 3"
CALL Turbine(h[9],P[9],P[10],eta_turb:h[10],W_t_3)
P[10]=P[1]
"!Feedwater Heater 2"
P[3]=P[2]
f_2*h[9]+(1-f_2)*h[2]=h[3]
"!Feedwater Heater 1"
P[5]=P[4]
f_1*h[8]+(1-f_1)*h[4]=h[5]
"!Cycle Statistics"
W_t=W_t_1+(1-f_1)*(W_t_2)+(1-f_1)*(1-f_2)*W_t_3
W_p=W_p_1+(1-f_1)*W_p_2+(1-f_1)*(1-f_2)*W_p_3
W_net=W_t-W_p
Eff=W_net/Q
DUPLICATE i=1,10
T[i]=temperature(STEAM,h=h[i],P=P[i])
END
$Tabstops 0.25 1.5 in