c EVAPORATIVE COOLER TYPE 79 c c This subroutine models the performance of an evaporative cooler. c Given the entering dry and wet bulb temperatures and the dry air mass c flow rate, it will return the leaving dry and wet bulb temperatures c based on the evaporative cooler efficiency, as well as the dry air mass c flow rate. c subroutine type79(time,xin,out,t,dtdt,par,info,icntrl,*) c c Variable declaration module: variables from main program c implicit none DOUBLE PRECISION out(3),xin(3) real*4 time,t(1),dtdt(1),par(1) integer*4 info(15) integer icntrl c c Variable declaration module: variables used only in subroutine c real*8 EDB,EWB,eff,LDB,LWB,AMFR character*3 ycheck(3),ocheck(3) c c TYPECK, YCHECK, OCHECK, and RCHECK subroutine calling module: this c program segment sets info(6) and info(9), and calls the subroutines c listed above. c If (info(7) .eq. -1) then info(6) = 3 info(9) = 0 call typeck(1,info,3,1,0) data ycheck/'TE1','TE1','MF1'/ data ocheck/'TE1','TE1','MF1'/ call rcheck(info,ycheck,ocheck) endif c c Constant module: this program segment sets subroutine constants c equal to inputs and parameters passed from the main program. English c units are converted to metric units. c EDB = xin(1)*1.8 + 32.0 EWB = xin(2)*1.8 + 32.0 AMFR = xin(3)*2.2046 eff = par(1) c c Leaving dry bulb calculation module: this program segments determines c the leaving dry and wet bulb temperatures. If the air mass flow rate c is 0, the leaving dry bulb temperature is set equal to the entering c dry bulb temperature. c LDB = EDB - eff*(EDB - EWB) If (AMFR .lt. 1) LDB = EDB LWB = EWB c c Output array module: this program segment fills the array out(3) c with the values calculated above to be returned to the main program. c English units are converted back to metric units. c out(1) = (LDB - 32)/1.8 out(2) = (LWB - 32)/1.8 out(3) = AMFR/2.2046 c c Return module c return 1 end