In: Mechanical Engineering
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
"Determination of the outlet state of an R134a throttle"
"Known Information"
T_1=50 [C]; P_1=700 [kPa]; Vel_1=15 [m/s]; A_1=0.0110 [m^2]
{P_2=300 [kPa]}
m_dot_1=m_dot_2 "mass balance"
m_dot_1=A_1*Vel_1/v_1 "relation between mass flowrate
and fluid velocity"
m_dot_2=A_2*Vel_2/v_2
A_2=A_1 "inlet and outlet areas are equal"
"Steady-state energy balance with no heat or power terms"
m_dot_1*(h_1+Vel_1^2/2*convert(m^2/s^2,kJ/kg))=m_dot_2*(h_2+Vel_2^2/2*convert(m^2/s^2,kJ/kg))
v_1=volume(R134a,T=T_1,P=P_1);
h_1=enthalpy(R134a,T=T_1,P=P_1)
v_2=volume(R134a,T=T_2,P=P_2); h_2=enthalpy(R134a,T=T_2,P=P_2)
$TabStops 0.5 2 in
"!Linear and Non-linear regression"
"This problem demonstrates how EES can be used to do linear or non-linear regression. In this case, the coefficients a_0, a_1, and a_2 of a polynomial which best fits the data in the Lookup table are to be determined. Select Min/Max from the Calculate menu.
The x and y data arrays, along with the calculated yp array are displayed in the Arrays window after the calculations are completed. A plot of yP vs x superimposed on a plot of y vs x shows the accuracy of the curve fit. Select Plot from the Windows menu to see the plot.
Because this is a linear problem, it could be more simply solved
using the Linear Regression command in the Tables menu. However,
this example illustrates the general method of least squares
fitting which is useful in itself.
"
"! To run this problem, press F4 or select MinMax from the
Calculate menu.
"
N=10
DUPLICATE i=1,N
{Set X[i] and Y[i] to values in Lookup table}
x[i]=lookup(i,#x)
y[i]=lookup(i,#y)
y`[i]=a_0+a_1*x[i]+a_2*x[i]^2 {predicted (calculated)
value of y}
END
bias=SUM(y`[i]-y[i],i=1,N)/N {bias
error}
sigma=sum((y`[i]-y[i])^2,i=1,N) {sum of square
errors}
$Arrays On
$TabWidth 1 cm
"!Heat pump cycle with heat exchange considerations"
{This problem illustrates:
1. The use of EES refrigeration property routines
2. Refrigeration cycle analysis considering evaporator and
condenser heat transfer limitations.
3. Use of the Parametric table and plotting
4. Use of array variables like P[1]
5. Use of the $SUMROW directive
Select the Solve Table command in the Calculate menu (or press F3)
to initiate the calculations. The Parametric table will appear
showing the results. Select Plot from the Windows menu to view a
plot of the results in the table.}
COP=abs(Q_H/W_c) "Definition of
coefficient of performance"
"!Evaporator"
Alpha=0.75 [kW/C] "HX
effectiveness-capacitance rate product"
Q_evap=m_dot*(h[1]-h[4]) "energy
balance"
Q_evap=Alpha*(T_amb-T[1]) "heat transfer relation"
"!Compressor"
x[1]=1 "saturated vapor at
compressor inlet"
P[1]=pressure(R134a,T=T[1],x=x[1])
h[1]=ENTHALPY(R134a,T=T[1],x=x[1])
s[1]=entropy(R134a,T=T[1],x=x[1])
s_ID[2]=s[1] "ideal compressor is
isentropic"
P[2]=pressure(R134a,T=T[3],x=1)
h_ID[2]=enthalpy(R134a,P=P[2],s=s_ID[2])
W_c_ID=-(h_ID[2]-h[1])*m_dot; "power requirement for
ideal compressor"
ComEff=0.60 "Isentropic
efficiency"
W_c=W_c_ID/ComEff "power
requirement for actual compressor"
h[2]=h[1]-W_c/m_dot "energy
balance on adiabatic compressor"
VolFlow=m_dot*volume(R134a,T=T[1],x=x[1])
VolFlow=4.3E-3 [m^3/s]
"compressor volumetric flowrate"
"!Condenser"
T_H=20 [°C] "building air
temperature"
Beta=1.75 [kW/C] "HX
effectiveness-capacitance rate product"
Q_H=Beta*(T[3]-T_H) "heat exchanger
relationship"
Q_H=(h[2]-h[3])*m_dot "energy
balance"
h[3]=ENTHALPY(R134a,T=T[3],x=0) "saturated liquid at
condenser outlet"
P[3]=P[2]
"!Valve"
h[4]=h[3] "valve is
isenthalpic"
P[4]=P[1]
x[4]=quality(R134a,h=h[4],P=P[4]) "quality at
evaporator inlet"
$TabWidth 1.5 in
$SUMROW ON
{The $SUMROW directive causes a row to be added to each parametric
table with the sum of all values in each column. This directive
overrides the setting in the Preferences dialog (Options
menu).}