Question

In: Mechanical Engineering

write a Fortran 77 language code for vapour absorption air source water heat pump producing 70k...

write a Fortran 77 language code for vapour absorption air source water heat pump producing 70k temperature

Solutions

Expert Solution

"!This problem demonstrates the use of user-written functions in EES. Logic constructs
such as IF-THEN-ELSE and REPEAT-UNTIL can only be implemented in functions and
procedures."

function Add1(x)
$Common AddMe
{a simple function that just adds the value in variable Addme to the supplied value. Note that $Common allows values that are defined in the Main program to be accessed (but not changed) in Functions and Procedures.}
   x:=x+Addme
   add1:=x
end

function IfTest(x,y)
{demonstration of the one-line form of the IF-THEN-ELSE logic.}
   if (x<y) then a:=x*y else a:=x/y
   IfTest:=a;
end;

function IfGoTo(x,y)
{goto statements are supported, but usually not needed.}
   if (x<y) then goto 10
a:=x
   b:=y
   goto 20
10: a:=y
   b:=x
20: c:=a/b
   IfGoTo:=a/b
end

function IfBlock(x,y)
{demonstration of the block form of the IF-THEN-ELSE statement.}
   if (x<y) then
       a:=y
       b:=x
   else
       a:=x
       b:=y
   endif
   IfBlock:=a/b
end

FUNCTION Factorial(N)
{calculates N factorial using the REPEAT-UNTIL construct.}
F:=1
Repeat
       F:=F*N
       N:=N-1
Until (N=1)
   Factorial=F  
END

Addme=1 "This variable will be used in the Add1 function"
g=Add1(1)
h=ifTest(3,4)
j=IfGoTo(5,6)
k=IfGoTo(5,6)
m=factorial(5)

$TabWidth 0.5 cm

"!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


Related Solutions

Write a FORTRAN 77 SOFTWARE code script for transcritical R407C air source water heat pump using...
Write a FORTRAN 77 SOFTWARE code script for transcritical R407C air source water heat pump using R134a plus R407c refrigerant for space application.....please don't write code in other program.... it's mechanical engineering question
design and experimental setup for Air source water heat pump develop its mathematical model using fortran...
design and experimental setup for Air source water heat pump develop its mathematical model using fortran 77 formulate the governing differential equation and solve it by Photon 77 only no other software as it is to be submitted for course work of Mtech and plot the results for various parameter such as outside air temperature and splitting the evaporator will increase the scope or will decreases that also you discuss and finally the conclusion on the whole experiments performed
design and their source water heat pump using simulation of software Photon 77 and explain step-by-step...
design and their source water heat pump using simulation of software Photon 77 and explain step-by-step the theoretical as well as experimental steps to be carried out in order to design linear compressor technology in the air source heat pump using split evaporator
write the mathematical code in language fortran 77 about Linda Hanson palstic cryocooler refrigerator using r407c...
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
Consider a residential heat pump that uses lake water as the heat source in the winter...
Consider a residential heat pump that uses lake water as the heat source in the winter and as heat sink inthe summer. The house is to maintained at a winter temperature of T= 18 degrees C and a summer temperature of T= 25 degrees C. To do this efficiently, it is found that the indoor coil should be at T= 50 degrees C in the winter and T= 5 degrees C in the summer. The outdoor coil temperature can be...
I need a mathematical model governing the mechanism of air source heat pump with split evaporator...
I need a mathematical model governing the mechanism of air source heat pump with split evaporator connected with bryair dehumidifier for water heating and space cooling application....draw a schematic arrangement using AutoCAD and develop a mathematical model in fortran 77... please don't write irrelevant answers...if u don't know it's ok skip but don't write wrong answers
Question 2. A family in Eastern Australia installs solar panels to run an air-source heat pump...
Question 2. A family in Eastern Australia installs solar panels to run an air-source heat pump to heat their swimming pool. The panels produce a total of around 6 kW of electricity during the day. The heat pump draws 5 kW of electricity and delivers 23 kW of heating to the pool. a) The pool contains 40,000 litres of water. When the heat pump is running, estimate the rate at which the temperature of the water in the pool rises,...
A mixture of dry air and water vapour is at a temperature of 25C. It is...
A mixture of dry air and water vapour is at a temperature of 25C. It is under a pressure of 100kPa. The dew point temperature is 15C. What is: a) Partial pressure of the water vapour? b) Relative humidity? c) Specific humidity? d) Specific volume of the dry air?
A pump is to lift water from a source 10 ft below pump centerline and to...
A pump is to lift water from a source 10 ft below pump centerline and to be discharged to a tank 60ft above pump centerline. The installation uses 3”∅ and 2.5 “∅ pipe for suction and discharge, respectively. A pump is to handle 200 gpm of water at 80°F. The loss of head due to friction can be estimated equal to 8.5 ft. Determine: A) TDH B) WHP C)BHP if np = 60% D)time required to fill the cylindrical tank...
In an environmental project, a ground source heat pump system will be installed, which will result...
In an environmental project, a ground source heat pump system will be installed, which will result in an annual fuel savings of 2000 HK$/year. The initial investment of the heat pump system is 14 000 HK$. The life-time of the heat pump system is 20 years. The annual maintenance cost is 300 HK$/year. At the end of the 20 years' life time, the salvage value is 1500 HK$. The interest rate is 10%. (1) What is the net present value...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT