c CENTRIFUGAL CHILLER MODEL TYPE 202 c c This subroutine models the operation of a chiller based on c a five parameter equation relating the dimensionless power to the c dimensionless load and deviations from design entering condensor c and chilled water set point temperatures. It differs from "type 53" c in that it does not require an external data file. Given values for c the chilled water set point temperature, the evaporator water inlet c temperature and mass flow rate, and the condensor water inlet tempera- c ture and mass flow rate, the subroutine will return the evaporator c water outlet temperature (and mass flow rate), the condensor water c outlet temperature (and mass flow rate), the load, the power require- c ment, the condensor heat rejection, and the coefficient of performance. c A control variable allows the chiller to be shut off when it is not c needed. c ! This component has been assigned Type Number 202. If that number conflicts with ! another user Type number, you will need to change it and recompile the appropriate ! dll. subroutine type202(time,xin,out,t,dtdt,par,info,icntrl,*) !DEC$ATTRIBUTES DLLEXPORT :: TYPE202 c c Variable declaration module: variables from the main program c implicit none double precision xin(6),out(8) real*4 time,t(1),dtdt(1),par(9) integer*4 info(15) integer icntrl c c Variable declaration module: variables used only in subroutine c real*8 SPT,EEWT,EWMFR,ECWT,CWMFR,gam,Qmax,Qmin,Qdes, @ Pdes,a,b,c,d,e,LEWT,LCWT,Qload,Ptot,Qcond,COP,DLEWT,Cp, @ DECWT character*3 ycheck(6),ocheck(8) ! Set the version information for TRNSYS IF (INFO(7).EQ.-2) THEN INFO(12) = 15 RETURN 1 ENDIF 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) = 8 info(9) = 0 call typeck(1,info,6,9,0) data ycheck/'TE1','TE1','MF1','TE1','MF1','CF1'/ data ocheck/'TE1','MF1','TE1','MF1','PW1','PW3','PW1','DM1'/ call rcheck(info,ycheck,ocheck) endif c c Constant module: this program segment converts inputs and parameters c into English units for use in the subroutine. The design entering c condensor water temperature, leaving evaporator water temperature, c and specific heat of water are set here as well. c c Inputs from main program: c SPT = xin(1)*1.8 + 32.0 EEWT = xin(2)*1.8 + 32.0 EWMFR = xin(3)*2.2046 ECWT = xin(4)*1.8 + 32.0 CWMFR = xin(5)*2.2046 gam = xin(6) c c Parameters c Qmax = par(1)/12672 Qmin = par(2)/12672 Qdes = par(3)/12672 Pdes = par(4) a = par(5) b = par(6) c = par(7) d = par(8) e = par(9) c c Design temperatures and specific heat of water c DLEWT = 44.0 DECWT = 85.0 Cp = 1.0 c c Shut down module: if the load is less than the minimum load specified c in the main program, or if the control variable, gam, is set equal to c 0, then the subroutine sets the leaving condensor and evaporator c water temperatures equal to the corresponding entering temperatures, c and sets Qload, Ptot, Qcond, and COP equal to 0. c Qload = EWMFR*Cp*(EEWT - SPT)/12000 If ((gam .lt. 0.0001) .or. (Qload .lt. Qmin)) then LEWT = EEWT LCWT = ECWT Qload = 1e-6 Ptot = 1e-6 Qcond = 1e-6 COP = 1e-6 c c Normal chiller operation module: this program segment calculates c remaining output values for Qmin < Qload < Qmax, in which case the c chilled water set point temperature remains unchanged. c Elseif ((Qload .ge. Qmin) .and. (Qload .le. Qmax)) then LEWT = SPT Ptot = Pdes*(a + b*(Qload/Qdes) + c*(Qload/Qdes)**2) @ *(1 + d*(ECWT - DECWT) - e*(LEWT - DLEWT)) Qcond = Qload + Ptot/3.52 LCWT = ECWT + Qcond*12000/(CWMFR*Cp+1) COP = Qload*3.52/Ptot c c "Overload" chiller operation module: if Qload is found to be c greater than Qmax, then Qload is set equal to Qmax and a new c leaving evaporator water temperature is determined. Remaining c output values are calculated as well. c Elseif (Qload .gt. Qmax) then Qload = Qmax LEWT = EEWT - Qload*12000/(EWMFR*Cp+1) Ptot = Pdes*(a + b*(Qload/Qdes) + c*(Qload/Qdes)**2) @ *(1 + d*(ECWT - DECWT) - e*(LEWT - DLEWT)) Qcond = Qload + Ptot/3.52 LCWT = ECWT + Qcond*12000/(CWMFR*Cp+1) COP = Qload*3.52/Ptot Endif c c Output array module: this program segment fills the array out(8) c with values calculated in the subroutine to be returned to the c main program. English units are converted to metric units. c out(1) = 0.5556*(LEWT - 32.0) out(2) = EWMFR*0.4536 out(3) = 0.5556*(LCWT - 32.0) out(4) = CWMFR*0.4536 out(5) = Qload*12672 out(6) = Ptot out(7) = Qcond*12672 out(8) = COP c c Return module c return 1 end