FUNCTION VOID WETCOIL (MLiq,TLiqEnt,MAir,TAirEnt,WAirEnt,UAIntTot, UAExtTot,ConfigHX,TLiqLvg,TAirLvg,WAirLvg, QTot,QSen,FWet,TSurfEnt,ErrStat) /*********************************************************************/ /* Copyright ASHRAE. Toolkit for HVAC System Energy Calculations */ /*********************************************************************/ /* SUBROUTINE: WETCOIL */ /* */ /* LANGUAGE: FORTRAN 77 */ /* */ /* PURPOSE: Calculate the performance of a cooling coil */ /* when the external fin surface is complete wet. */ /* 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 (-) */ /* */ /* UAIntTot Internal overall heat transfer coefficient (W/m2 C) */ /* UAExtTot External overall heat transfer coefficient (W/m2 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 (-) */ /* QTot Total heat transfer rate (W) */ /* QSen Sensible heat transfer rate (W) */ /* FWet Fraction of surface area wet (W) */ /* TSurfEnt Surface temperature at air entrance (W) */ /* ErrStat Error status indicator, 0 = ok, 1 = error (-) */ /* */ /* PROPERTIES */ /* CpAir Specific heat of air (J/kg C) */ /* CpLiq Specific heat of liquid (J/kg C) */ /*********************************************************************/ /* MAJOR RESTRICTIONS: Models coil as counterflow heat exchanger */ /* Approximates saturated air enthalpy as */ /* a linear function of temperature */ /* */ /* 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: DEWPNT */ /* DRYBULB */ /* ENTHAL */ /* ENTHSAT */ /* HUMTH */ /* TAIRSAT */ /* */ /* REFERENCE: Elmahdy, A.H. and Mitalas, G.P. 1977. */ /* "A Simple Model for Cooling and */ /* Dehumidifying Coils for Use In Calculating */ /* Energy Requirements for Buildings," */ /* ASHRAE Transactions,Vol.83 Part 2, */ /* pp. 103-117. */ /* */ /* TRNSYS. 1990. A Transient System */ /* Simulation Program: Reference Manual. */ /* Solar Energy Laboratory, Univ. Wisconsin- */ /* Madison, pp. 4.6.8-1 - 4.6.8-12. */ /* */ /* Threlkeld, J.L. 1970. Thermal */ /* Environmental Engineering, 2nd Edition, */ /* Englewood Cliffs: Prentice-Hall,Inc. */ /* pp. 254-270. */ /* */ /* ASHRAE HVAC 2 TOOLKIT */ /* Pages 4-17 - 4-23 */ /*********************************************************************/ /* INTERNAL VARIABLES: */ /* extResist Air-side resistance to heat transfer (m2 C/W) */ /* intResist Liquid-side resistance to heat transfer (m2 C/W) */ /* tDewEnt Entering air dew point (C) */ /* uaH Overall enthalpy heat transfer coefficient (kg/s) */ /* capAirWet Air-side capacity rate (kg/s) */ /* capLiqWet Liquid-side capacity rate (kg/s) */ /* resistRatio Ratio of resistances (-) */ /* hAirLvg Outlet air enthalpy */ /* hLiqEntSat Saturated enthalpy of air at (J/kg) */ /* entering water temperature */ /* hLiqLvgSat Saturated enthalpy of air at exit (J/kg) */ /* water temperature */ /* hSurfEntSat Saturated enthalpy of air at (J/kg) */ /* entering surface temperature */ /* hSurfLvgSat Saturated enthalpy of air at exit (J/kg) */ /* surface temperature */ /* cpSat Coefficient for equation below (J/kg C) */ /* EnthSat1-EnthSat2 = cpSat*(TSat1-TSat2) */ /* (all water and surface temperatures are */ /* related to saturated air enthalpies for */ /* wet surface heat transfer calculations) */ /*********************************************************************/ LANGUAGE F77 INPUT FLOAT MLiq,TLiqEnt,MAir,TAirEnt,WAirEnt,UAIntTot,UAExtTot,ConfigHX; OUTPUT FLOAT TLiqLvg,TAirLvg,WAirLvg,QTot,QSen,FWet,TSurfEnt,ErrStat; CODE SUBROUTINE WETCOIL (MLiq,TLiqEnt,MAir,TAirEnt, & WAirEnt,UAIntTot,UAExtTot, & ConfigHX,TLiqLvg,TAirLvg, & WAirLvg,QTot,QSen,FWet,TSurfEnt,ErrStat) DOUBLE PRECISION ENTHAL,ENTHSAT,TAIRSAT,DEWPNT,HUMTH,DRYBULB DOUBLE PRECISION MLiq,TLiqEnt,MAir,TAirEnt,WAirEnt,UAIntTot DOUBLE PRECISION UAExtTot,ConfigHX,TLiqLvg,TAirLvg,WAirLvg DOUBLE PRECISION QTot,QSen,FWet,TSurfEnt,ErrStat DOUBLE PRECISION extResist,intResist,tDewEnt,uaH,capAirWet DOUBLE PRECISION capLiqWet,resistRatio,hAirLvg,hLiqEntSat DOUBLE PRECISION hLiqLvgSat,hSurfEntSat,hSurfLvgSat,cpSat DOUBLE PRECISION capAir,capLiq,cMin,cMax,cRatio,ntu,hAirEnt DOUBLE PRECISION effectiveness,qMax,small,large,capAir2 DOUBLE PRECISION hCondSat,tempCond,ntu2,effectiveness2 INTEGER mode INCLUDE 'globfor.inc' DATA small/1.E-9/,large/1.E9/ ErrStat = 0 FWet = 1. extResist = 1./MAX(UAExtTot,small) intResist = 1./MAX(UAIntTot,small) C1*** Calculate enthalpies of entering air and water hAirEnt = ENTHAL(TAirEnt,WAirEnt) hLiqEntSat = ENTHSAT(TLiqEnt) C1*** Estimate cpSat using entering air dewpoint and water temperature tDewEnt = DEWPNT(WAirEnt) cpSat = (ENTHSAT(tDewEnt)-hLiqEntSat)/(tDewEnt-TLiqEnt) C1*** Enthalpy-based heat transfer calculations C2*** Heat transfer in a wet coil is calculated based on enthalpy C2*** rather than temperature to include latent effects. Air enthalpies C2*** are evaluated using conventional psychrometric equations. The C2*** corresponding enthalpies of the coil and water are related to C2*** that of the air through "fictitious enthalpies," defined as the C2*** enthalpy of saturated air at the temperature of the coil or water. C2 C2*** While heat transfer rates are commonly expressed as the product C2*** of an overall heat transfer coefficient, UA, and a temperature C2*** difference, the use of enthalpy-based heat transfer calculations C2*** requires an enthalpy-based heat transfer coefficient, UAH. C2 C2*** q = UAH * (H1-H2) C2 C2*** where UAH = UA / cp C2*** UA = conventional heat transfer coefficient C2*** cp = specific heat across enthalpy difference C2 C2*** When using fictitious enthalpies, a corresponding fictitious C2*** specific heat must be defined. C2 C2*** EnthSat1-EnthSat2 = cpSat * (Temp1-Temp2) C2 C2*** UAH can be calculated from a combination of series or parallel C2*** enthalpy resistances, similar to thermal resistances modified for C2*** enthalpy as above. Enthalpy capacity rates relate heat transfer C2*** to the enthalpy change of a fluid between inlet and outlet. C2 C2*** q = CapH * (HAirLvg - HAirEnt) C2 C2*** On the air side, enthalpy capacity rate is the air mass flow rate. C2*** On the water side, the enthalpy capacity rate is based on the C2*** enthalpy of saturated air at the water temperature. C1*** Determine air and water enthalpy outlet conditions by modeling C1*** coil as counterflow enthalpy heat exchanger uaH = 1./(cpSat*intResist+CpAir*extResist) c capAirWet = MAir c capLiqWet = MLiq * (CpLiq/cpSat) capAirWet = MAX(SMALL,MAir) capLiqWet = MAX(SMALL,MLiq * (CpLiq/cpSat)) C2*** Next lines are taken from HEATEX.FOR C1*** Ntu and Cmin/Cmax (cRatio) calculations cMin = MIN(capAirWet,capLiqWet) cMax = MAX(capAirWet,capLiqWet) IF( cMax .EQ. 0.) THEN cRatio = 1. ELSE cRatio = cMin/cMax ENDIF IF( cMin .EQ. 0.) THEN ntu = large ELSE ntu = uaH/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(capAirWet-cMin).LT.small .AND. mode.EQ.5) .OR. & (ABS(capLiqWet-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)*(hAirEnt-hLiqEntSat) hAirLvg = hAirEnt - effectiveness*qMax/MAX(capAirWet,small) hLiqLvgSat = hLiqEntSat + effectiveness*qMax/MAX(capLiqWet,small) C1*** Back to original code C1*** Calculate entering and leaving external surface conditions from C1*** air and water conditions and the ratio of resistances resistRatio = (intResist)/(intResist + CpAir/cpSat*extResist) hSurfEntSat = hLiqLvgSat + resistRatio*(hAirEnt-hLiqLvgSat) C1*** hSurfLvgSat = hLiqEntSat + resistRatio*(hAirLvg-hLiqEntSat) TSurfEnt = TAIRSAT(hSurfEntSat) C1*** Calculate outlet air temperature and humidity from enthalpies and C1*** surface conditions. QTot = MAir*(hAirEnt-hAirLvg) TLiqLvg = TLiqEnt+QTot/MAX(MLiq,small)/CpLiq C1*** Next lines are taken from WCOILOUT.FOR C1*** Determine the temperature effectiveness, assuming the temperature C1*** of the condensate is constant (Cmin/Cmax = 0) and the specific heat C1*** of moist air is constant capAir2 = MAir*(CpAir+WAirEnt*CpVap) ntu2 = UAExtTot/MAX(capAir2,small) effectiveness2 = 1 - EXP(-ntu2) C1*** Calculate coil surface enthalpy and temperature at the exit C1*** of the wet part of the coil using the effectiveness relation effectiveness2 = MAX(effectiveness2,small) hCondSat = hAirEnt-(hAirEnt-hAirLvg)/effectiveness2 C1*** Calculate condensate temperature as the saturation temperature C1*** at given saturation enthalpy tempCond = TAIRSAT(hCondSat) C1*** Calculate exit air conditions and sensible heat transfer IF (tempCond .LT. DEWPNT(WAirEnt)) THEN TAirLvg = TAirEnt-(TAirEnt-tempCond)*effectiveness2 WAirLvg = HUMTH(TAirLvg,hAirLvg) ELSE WAirLvg = WAirEnt TAirLvg = DRYBULB(hAirLvg,WAirLvg) ENDIF Qsen = capAir2 * (TAirEnt-TAirLvg) C1*** Back to original code 999 RETURN END END_CODE END_FUNCTION