In: Mechanical Engineering
write a code in fortran 77 and link with the reference refrigerant properties software and code should be for parametric models and optimisation for rapid thermal design advance solution feature of cinder offline provide thermal analysis to make a preliminary thermal design calculations your code should fulfill the requirement
Fluid$='Air'
{Define the fluid using a string variable}
L=0.5 [m]
"Length of plate in flow direction in m"
Vel=20 [m/s]
"air velocity with an uncertainty of 10% of its value"
T_infinity=300 [°C] "Air
temperature in +/- 1 °C"
T_s=27 [°C] "Plate surface
temperature +/- 1 °C"
Q=h*L*(T_infinity-T_s) "heat
transfer rate per unit width in W/m"
T_film=(T_infinity+T_s)/2 "Film
temperature for evaluating properties in °C"
rho=density(Fluid$,T=T_film,P=100) "Air density in kg/m^3"
k=conductivity(Fluid$,T=T_film) "Thermal conductivity
in W/m-K"
mu=viscosity(Fluid$,T=T_film) "Viscosity in
kg/m-s"
Pr=Prandtl(Fluid$,T=T_film) "Prandtl
number"
Re=rho*Vel*L/mu
"Reynold's number"
Nu#=0.664*Re^0.5*Pr^0.333 "Nusselt
number for laminar flow"
(h*L)/k=Nu#
"Definition of Nusselt number to find h"
LMTD=10 [F] "log mean temperature difference in C -
here F is used to illustrate units checking."
T_h_i=80 [C] "hot stream inlet temperature"
C_h=125 [W/C] "hot steam capacitance rate"
C_c=69.8 [W/C] "cold stream capacitance rate"
UA=200 [W/C] "overall heat transfer coefficient-area
product"
Q=UA*LMTD "heat exchange rate"
"Definition of LMTD for counterflow heat exchange"
Arg=(T_h_i-T_c_o)/(T_h_o-T_c_i) "!define Arg and set
limits so that a division by zero or log of a negative number
cannot occur"
LMTD=((T_h_i-T_c_o)-(T_h_o-T_c_i))/ln(Arg)
"Definition of heat exchanger effectiveness"
Epsilon=Q/(min(C_h,C_c)*(T_h_i-T_c_i))
"Energy balances on hot and cold streams"
Q=C_h*(T_h_i-T_h_o)
Q=C_c*(T_c_o-T_c_i)
D=2
f=A_1*exp(-r_1^2/sigma_1^2)+A_2*exp(-r_2^2/sigma_2^2)
r_1^2=sum((x[j]-0.5)^2,j=1,D)
r_2^2=sum((x[j]-0.2)^2,j=1,D)
A_1=0.7
A_2=1-0.7*exp(-r_1^2/sigma_1^2)
sigma_1^2=0.15
sigma_2^2=0.005
"!Supply Air"
Vol[5]=4000 [cfm]
T[5]=62 [F]
rh[5]=0.55
P_atm=14.7 [psia]
v[5]=volume(AIRH2O,P=P_atm,T=T[5],r=rh[5])
m_dot[5]=Vol[5]/v[5] "mass flowrate
of dry air"
h[5]=enthalpy(AIRH2O,P=P_atm,T=T[5],r=rh[5])
w[5]=humrat(AIRH2O,P=P_atm,T=T[5],r=rh[5])
"!Return air"
T[6]=74 [F]
rh[6]=0.54
h[6]=enthalpy(AIRH2O,P=P_atm,T=T[6],r=rh[6])
w[6]=humrat(AIRH2O,P=P_atm,T=T[6],r=rh[6])
m_dot[1]=0.15*m_dot[5]
"!Outside air"
T[1]=82 [F]
rh[1]=0.48;
h[1]=enthalpy(AIRH2O,P=P_atm,T=T[1],r=rh[1])
w[1]=humrat(AIRH2O,P=P_atm,T=T[1],r=rh[1])
"!Mix return and outdoor"
m_dot[7]=0.85*m_dot[5]*(1-ByPass)
m_dot[2]=m_dot[1]+m_dot[7]
w[2]*m_dot[2]=m_dot[1]*w[1]+m_dot[7]*w[6] {water
balance}
m_dot[1]*h[1]+m_dot[7]*h[6]=m_dot[2]*h[2] {energy
balance}
"!Cooling Coil"
rh[3]=1
m_dot[3]=m_dot[2]
Q_C=m_dot[3]*(h[3]-h[2])
h[3]=enthalpy(AIRH2O,P=P_atm,w=w[3],r=rh[3])
T[3]=temperature(AIRH2O,P=P_atm,w=w[3],r=rh[3])
"!Mix coil outlet with bypass"
m_dot[8]=0.85*m_dot[5]*(ByPass)
m_dot[4]=m_dot[3]+m_dot[8]
w[6]*m_dot[8]+w[3]*m_dot[3]=m_dot[4]*w[4]
m_dot[8]*h[6]+m_dot[3]*h[3]=m_dot[4]*h[4]
"!Reheat coil"
w[5]=w[4]
Q_H=(h[5]-h[4])*m_dot[5]
"!Get missing Temps for plotting states on the Psych
chart"
T[2]=Temperature(AIRH2O,P=P_atm,w=w[2],h=h[2])
T[4]=Temperature(AIRH2O,P=P_atm,w=w[4],h=h[4])