FUNCTION VOID DRYCOIL (MLiq,TLiqEnt,MAir,TAirEnt,WAirEnt,UA,ConfigHX, TLiqLvg,TAirLvg,WAirLvg,Q,ErrStat) /*********************************************************************/ /* Copyright ASHRAE. Toolkit for HVAC System Energy Calculations */ /*********************************************************************/ /* SUBROUTINE: DRYCOIL */ /* */ /* LANGUAGE: FORTRAN 77 */ /* */ /* PURPOSE: Calculate the performance of a sensible */ /* air-liquid heat exchanger. */ /* CODE IS TAKEN FROM ASHRAE HVAC 2 TOOLKIT */ /*********************************************************************/ /* INPUT VARIABLES */ /* MLiq Liquid mass flow rate (kg/s) */ /* TLiqEnt Entering water temperature (C) */ /* MAir Dry air mass flow rate (kg/s) */ /* TAirEnt Entering air dry bulb temperature (C) */ /* WAirEnt Entering air humidity ratio (-) */ /* */ /* UA Overall heat transfer coefficient (W/C) */ /* ConfigHX Heat exchanger configuration (-) */ /* 1 - Counterflow */ /* 2 - Parallel flow */ /* 3 - Cross flow, both streams unmixed */ /* 4 - Cross flow, both streams mixed */ /* 5 - Cross flow, stream 1 unmixed */ /* 6 - Cross flow, stream 2 unmixed */ /* */ /* OUTPUT VARIABLES */ /* TLiqLvg Leaving water temperature (C) */ /* TAirLvg Leaving air dry bulb temperature (C) */ /* WAirLvg Leaving air humidity ratio (-) */ /* Q Heat transfer rate (W) */ /* ErrStat Error status indicator, 0 = ok, 1 = error (-) */ /* */ /* PROPERTIES */ /* CpAir Specific heat of air (J/kg C) */ /* CpVap Specific heat of water vapor (J/kg C) */ /* CpLiq Specific heat of liquid (J/kg C) */ /*********************************************************************/ /* MAJOR RESTRICTIONS: Models coil using effectiveness-Ntu model. */ /* */ /* WRITTEN: Shauna Gabel */ /* Michael J. Brandemuehl */ /* */ /* ADDAPTED TO NMF BY: Jari Hyttinen */ /* */ /* */ /* DATE: January 1, 1992 */ /* April 10, 1997 rev 1.0 */ /* */ /* INCLUDE FILES: globfor.inc */ /* SUBROUTINES CALLED: None */ /* FUNCTIONS CALLED: None */ /* */ /* REFERENCE: Kays, W.M. and A.L. London. 1964. */ /* Compact Heat Exchangers, 2nd Edition, */ /* New York: McGraw-Hill */ /* */ /* ASHRAE HVAC 2 TOOLKIT */ /* Pages 4-13 - 4-16 */ /*********************************************************************/ /* INTERNAL VARIABLES: */ /* capAir Air-side capacity rate (W/C) */ /* capLiq Water-side capacity rate (W/C) */ /*********************************************************************/ LANGUAGE F77 INPUT FLOAT MLiq,TLiqEnt,MAir,TAirEnt,WAirEnt,UA,ConfigHX; OUTPUT FLOAT TLiqLvg,TAirLvg,WAirLvg,Q,ErrStat; CODE SUBROUTINE DRYCOIL (MLiq,TLiqEnt,MAir,TAirEnt, & WAirEnt,UA,ConfigHX,TLiqLvg, & TAirLvg,WAirLvg,Q,ErrStat) DOUBLE PRECISION MLiq,TLiqEnt,MAir,TAirEnt,WAirEnt,UA,ConfigHX DOUBLE PRECISION TLiqLvg,TAirLvg,WAirLvg,Q DOUBLE PRECISION capAir,capLiq,cMin,cMax,cRatio,ntu DOUBLE PRECISION effectiveness,qMax,small,large INTEGER ErrStat,mode INCLUDE 'globfor.inc' DATA small/1.E-15/, large/1.E15/ Errstat = 0 C2*** Calculate air and water capacity rates c capAir = MAir * (CpAir + WAirEnt * CpVap) c capLiq = MLiq * CpLiq capAir = MAX(SMALL,MAir * (CpAir + WAirEnt * CpVap)) capLiq = MAX(SMALL,MLiq * CpLiq) C1*** Determine the air and water outlet conditions C2*** Next lines are taken from HEATEX.FOR C1*** Ntu and Cmin/Cmax (cRatio) calculations cMin = MIN(CapLiq,CapAir) cMax = MAX(CapLiq,CapAir) IF( cMax .EQ. 0.) THEN cRatio = 1. ELSE cRatio = cMin/cMax ENDIF IF( cMin .EQ. 0.) THEN ntu = large ELSE ntu = ua/cMin ENDIF C1*** Calculate effectiveness for special limiting cases mode = NINT(ConfigHX) IF(ntu .LE. 0) THEN effectiveness = 0. ELSE IF(cRatio .LT. small) THEN C2*** Cmin/Cmax = 0 and effectiveness is independent of configuration effectiveness = 1 - EXP(-ntu) C1*** Calculate effectiveness depending on heat exchanger configuration ELSE IF (mode .EQ. 1) THEN C2*** Counterflow IF (ABS(cRatio-1.) .LT. small) THEN effectiveness = ntu/(ntu+1.) ELSE effectiveness = (1-EXP(-ntu*(1-cRatio)))/ & (1-cRatio*EXP(-ntu*(1-cRatio))) ENDIF ELSE IF (mode .EQ. 2) THEN C2*** Parallel flow effectiveness = (1-EXP(-ntu*(1+cRatio)))/(1+cRatio) ELSE IF (mode .EQ. 3) THEN C2*** Cross flow, both streams unmixed effectiveness = 1 - EXP((EXP(-ntu*cRatio*ntu**(-0.22))-1)/ & (cRatio*ntu**(-0.22))) ELSE IF (mode .EQ. 4) THEN C2*** Cross flow, both streams mixed effectiveness = ((1/(1-EXP(-ntu)))+ & (cRatio/(1-EXP(-ntu*cRatio)))-(1/(-ntu)))**(-1) ELSE C2*** One stream is mixed and one is unmixed. Determine whether the C2*** minimum or maximum capacity rate stream is mixed. IF ( (ABS(CapLiq-cMin).LT.small .AND. mode.EQ.5) .OR. & (ABS(CapAir-cMin).LT.small .AND. mode.EQ.6) ) THEN C2*** Cross flow, stream with minimum capacity rate unmixed effectiveness = (1-EXP(-cRatio*(1-EXP(-ntu))))/cRatio ELSE C2*** Cross flow, stream with maximum capacity rate unmixed effectiveness = 1-EXP(-(1-EXP(-ntu*cRatio))/cRatio) ENDIF ENDIF C1*** Determine leaving conditions for the two streams qMax = MAX(cMin,small)*(TLiqEnt-TAirEnt) TLiqLvg = TLiqEnt - effectiveness*qMax/MAX(CapLiq,small) TAirLvg = TAirEnt + effectiveness*qMax/MAX(CapAir,small) C1*** Back to original code C1*** Calculate the total and sensible heat transfer rate Q = capAir*(TAirEnt-TAirLvg) WAirLvg = WAirEnt RETURN END END_CODE END_FUNCTION