SUBROUTINE TYPE71(TIME,XIN,OUT,T,DTDT,PAR,INFO,ICNTRL,*) C*********************************************************************** C* PROGRAM: PCHIPLID C* C* LANGUAGE: FORTRAN 77 C* C* PURPOSE: Identification of the internal power of C* the compressor when all the cylinders C* are unloaded C* The pressure drop at the exhaust of the C* compressor cylinders is taken into account. C*********************************************************************** C* INPUT VARIABLES C* Ifluid Selection of the refrigerant (-) C* If Ifluid C* =1: Refrigerant 12 C* =2: Refrigerant 134a C* =3: Refrigerant 114 C* =4: Refrigerant 22 C* =5: Refrigerant 502 C* =6: Refrigerant 717 (Ammonia) C* PLorFL If PLorFL (-) C* =1: the user knows the variables associated with C* a working point in part-load regime C* =2: the user only knows the variables associated C* with a working point in full-load regime C* Mfrwev Water mass flow rate in the evaporator (kg/hr) C* in part-load or in full-load regime according to C* the value of PLorFL C* Mfrwcd Water mass flow rate in the condenser (kg/hr) C* in part-load or in full-load regime according to C* the value of PLorFL C* Choice If Choice (-) C* =1: the supply water temperature is known for both C* evaporator and condenser C* =2: the water temperature is known at the evaporator C* supply and at the condenser exhaust C* =3: the exhaust water temperature is known for both C* evaporator and condenser C* =4: the water temperature is known at the evaporator C* exhaust and at the condenser supply C* Twev1 This value is equal to the evaporator supply or (C) C* exhaust water temperature in part-load or in C* full-load regime according to the value of Choice C* and of PLorFL C* Twcd1 This value is equal to the condenser supply or (C) C* exhaust water temperature in part-load or in C* full-load regime according to the value of Choice C* and of PLorFL C* W Power consumed by the compressor working in (KJ/hr) C* part-load or in full-load regime according to C* the value of PLorFL C* Pev Refrigerating capacity of the chiller in (KJ/hr) C* part-load or in full-load regime according to C* Nc Number of loaded cylinders (-) C* ( set to 0.5*NcFL if PLorFL=2 ) C* NcFL Number of loaded cylinders in full load regime (-) C* C* OUTPUT VARIABLES C* WpumpingId Internal power of the compressor when all the (KJ/hr) C* cylinders are unloaded C* C* PARAMETERS C* AUev Evaporator heat transfer coefficient (KJ/hr-C) C* AUcd Condenser heat transfer coefficient (KJ/hr-C) C* Losses Constant part of the electromechanical losses (KJ/hr) C* Alpha Loss factor allowing to define another (-) C* electromechanical loss which is supposed to be C* proportional to the internal power C* Aex Equivalent nozzle throat area of a cylinder (m**2) C* Cf Clearance factor of the compressor (-) C* VsFL Geometric displacement of the compressor (m**3/s) C* in full load regime C* C* WATER PROPERTY C* CpWat Specific heat of liquid water (KJ/kg-C) C* C* REFRIGERANT PROPERTIES C* To Reference temperature (K) C* cpliq Mean specific heat in saturated liquid state (KJ/kg-C) C* hfo Enthalpy of the saturated liquid at the (KJ/kg) C* reference temperature C* cpvap Mean specific heat at constant pressure (KJ/kg-C) C* in superheated vapor state C* hfgo Enthalpy of vaporization at the reference (KJ/kg) C* temperature C* r Gas constant (KJ/kg-K) C* Zeta Mean compressibility factor (-) C* Gamma Mean isentropic coefficient (-) C* Acl First coefficient in the Clausius-Clapeyron (-) C* equation C* Bcl Second coefficient in the Clausius-Clapeyron (K) C* equation C*********************************************************************** C MAJOR RESTRICTIONS: The surrounding heat exchanges are C neglected. C The compression is assumed to be isentropic. C Perfect gas properties are used. C The chiller is supposed to work with only C one compressor. C C DEVELOPER: Jean Lebrun C (of the TOOLKIT subroutine) Jean-Pascal Bourdouxhe C Marc Grodent C University of Liege, Belgium C C DATE: June 2, 1994 C Modified for TRNSYS: July 1994-Madison C Mark Nott C C SUBROUTINE CALLED: PROPERTY C*********************************************************************** C INTERNAL VARIABLES: C Effev Evaporator effectiveness (-) C Effcd Condenser effectiveness (-) C Tev Evaporating temperature (C) C Tcd Condensing temperature (C) C Pcd Heat rejected in the condenser (KJ/hr) C p1 Evaporating pressure (Pa) C p3 Condensing pressure (Pa) C v2p Specific volume at point 2' (m**3/kg) C p2 Pressure at point 2 (Pa) C T1p Temperature after the heating-up (C) C v1p Specific volume after the heating-up (m**3/kg) C Effvol Volumetric effectiveness of the compressor (-) C MfrRef Refrigerant mass flow rate (kg/hr) C Wpl Power consumed by the compressor in part-load (KJ/hr) C Wis Isentropic compression power consumed by the (KJ/hr) C loaded cylinders C Vs Geometric displacement of the compressor (m**3/s) C for specified working conditions C Win Internal power consumed by the compressor (KJ/hr) C dpex Pressure drop at the compressor exhaust (Pa) C TolRel Relative error tolerance (-) C ErrRel Relative error (-) C C Wpumpp,T1pp and dpexp are variables used in the iterative C scheme. C*********************************************************************** REAL*8 Nc,Mfrwev,Mfrwcd,MfrRef,NcFL INTEGER Ifluid INTEGER*4 INFO DIMENSION XIN(11),OUT(1),PAR(7),INFO(15) DOUBLE PRECISION XIN,OUT COMMON /SIM/ TIMEO,TFINAL,DELT,IWARN COMMON /LUNITS/ LUR,LUW,IFORM,LUK COMMON /STORE/ NSTORE,IAV,S(5000) COMMON /CONFIG/ TRNEDT,PERCOM,HEADER,PRLAB,LNKCHK,PRUNIT,IOCHECK . PRWARN DATA TolRel/1E-05/ C PARAMETERS AUev = PAR(1) AUcd = PAR(2) Losses = PAR(3) Alpha = PAR(4) Aex = PAR(5) Cf = PAR(6) VsFL = PAR(7) C INPUTS Ifluid = XIN(1) PLorFL = XIN(2) Mfrwev = XIN(3) Mfrwcd = XIN(4) Choice = XIN(5) Twev1 = XIN(6) Twcd1 = XIN(7) W = XIN(8) Pev = XIN(9) Nc = XIN(10) NcFL = XIN(11) INFO(6)=1 C Selection of the refrigerant CALL PROPERTY(Ifluid,To,cpliq,hfo,cpvap,hfgo,r,Zeta, & Gamma,Acl,Bcl,*5) 5 CONTINUE CpWat=4.187 Gm1G=(Gamma-1)/Gamma NChoice=INT(Choice) C Calculate the evaporating temperature according to the C information available Effev=1-EXP(-AUev/(CpWat*Mfrwev)) IF ((NChoice.EQ.1).OR.(NChoice.EQ.2)) THEN Tev=Twev1-Pev/(Effev*CpWat*Mfrwev) ELSE Tev=Twev1+(Pev/(CpWat*Mfrwev))*(1-1/Effev) ENDIF C Calculate the condensing temperature according to the C information available Pcd=Pev+W Effcd=1-EXP(-AUcd/(CpWat*Mfrwcd)) IF ((NChoice.EQ.1).OR.(NChoice.EQ.4)) THEN Tcd=Twcd1+Pcd/(Effcd*CpWat*Mfrwcd) ELSE Tcd=Twcd1+(Pcd/(CpWat*Mfrwcd))*(1/Effcd-1) ENDIF C Calculate the evaporating pressure p1=1000*EXP(Acl+Bcl/(Tev+To)) C Calculate the condensing pressure p3=1000*EXP(Acl+Bcl/(Tcd+To)) C Calculate the power consumed by the compressor C in part-load regime IF (PLorFL.EQ.2) THEN Nc=0.5*NcFL Wpl=(0.82*(Nc/NcFL-1)+1)*W ELSE Wpl=W ENDIF C Calculate the geometric displacement of the compressor Vs=Nc/NcFL*VsFL C Calculate the internal power consumed by the C the compressor Win=(Wpl-Losses)/(1+Alpha) C Beginning of the first loop C First guess of the pumping-losses WpumpingId=1 10 CONTINUE C Beginning of the second loop C First guess of the temperature after the heating-up T1p=Tev C Calculate the specific volumes after the heating-up and at point 2' 20 v1p=Zeta*r*1000*(T1p+To)/p1 v2p=Zeta*r*1000*(T1p+To)/p3*(p3/p1)**Gm1G C Beginning of the third loop C First guess of the pressure drop dpex=1 30 p2=p3+dpex C Calculate the volumetric efficiency of the compressor Effvol=1+Cf-Cf*(p2/p1)**(1/Gamma) C Calculate the refrigerant mass flow rate MfrRef=Effvol*Vs*3600/v1p dpexp=dpex C Recalculate the pressure drop dpex=(MfrRef/3600)**2*v2p/(2*(Nc*Aex)**2) ErrRel=ABS((dpex-dpexp)/dpexp) C If converged, leave the third loop IF (ErrRel.GT.TolRel) GOTO 30 C Calculate the isentropic compression power Wis=MfrRef*Zeta*r*(T1p+To)*((p2/p1)**Gm1G-1)/Gm1G T1pp=T1p C Recalculate the temperature after the heating-up T1p=Tev+(Losses+Alpha*Wis+(1+Alpha)*(1-Nc/NcFL)* & WpumpingId)/(MfrRef*cpvap) ErrRel=ABS((T1p-T1pp)/T1pp) C If converged, leave the second loop IF (ErrRel.GT.TolRel) GOTO 20 C Calculate the internal power of the compressor when all the C cylinders are unloaded Wpumpp=WpumpingId WpumpingId=(Win-Wis)/(1-Nc/NcFL) ErrRel=ABS((WpumpingId-Wpumpp)/Wpumpp) C If converged, leave the first loop IF (ErrRel.GT.TolRel) GOTO 10 WpumpingId=Wpumpp C OUTPUT OUT(1) = WpumpingId RETURN 1 END SUBROUTINE PROPERTY(Ifluid,To,cpliq,hfo,cpvap,hfgo,r,Zeta, & Gamma,Acl,Bcl,*) C*********************************************************************** C* SUBROUTINE: PROPERTY C* C* LANGUAGE: FORTRAN 77 C* C* PURPOSE: Selection of the thermodynamic properties C* of a given refrigerant. C*********************************************************************** C* INPUT VARIABLES: C* Ifluid Selection of the refrigerant (-) C* If Ifluid C* =1: Refrigerant 12 C* =2: Refrigerant 134a C* =3: Refrigerant 114 C* =4: Refrigerant 22 C* =5: Refrigerant 502 C* =6: Refrigerant 717 (Ammonia) C*********************************************************************** C* OUTPUT VARIABLES: C* To Reference temperature (K) C* cpliq Mean specific heat in saturated liquid state (KJ/kg-C) C* hfo Enthalpy of the saturated liquid at the (KJ/kg) C* reference temperature C* cpvap Mean specific heat at constant pressure (KJ/kg-C) C* in superheated vapor state C* hfgo Enthalpy of vaporization at the reference (KJ/kg) C* temperature C* r Gas constan (KJ/kg-K) C* Zeta Mean compressibility factor (-) C* Gamma Mean isentropic coefficient (-) C* Acl First coefficient in the Clausius-Clapeyron (-) C* equation C* Bcl Second coefficient in the Clausius-Clapeyron (K) C* equation C*********************************************************************** C MAJOR RESTRICTION: Perfect gas approximation is used C C DEVELOPER: Claudio Saavedra C (of the TOOLKIT subroutine) University of Concepcion, Chile C Marc Grodent C University of Liege, Belgium C C DATE: February 24, 1993 C Modified for TRNSYS: July 1994-Madison C Mark Nott C*********************************************************************** INTEGER Ifluid To=273.15 IF (Ifluid.EQ.1) THEN cpliq = 0.917 hfo = 200.00 hfgo = 152.440 r = 0.0687539 Zeta = 0.9403 Gamma = 1.086 Acl = 14.669 Bcl = -2443.13 cpvap = 0.6416 ENDIF IF (Ifluid.EQ.2) THEN cpliq = 1.265 hfo = 200.00 hfgo = 197.900 r = 0.0814899 Zeta = 0.9411 Gamma = 1.072 Acl = 15.489 Bcl = -2681.99 cpvap = 0.8925 ENDIF IF (Ifluid.EQ.3) THEN cpliq = 925 hfo = 200.00 hfgo = 133.100 r = 0.0486393 Zeta = 0.9757 Gamma = 1.056 Acl = 15.107 Bcl = -2908.73 cpvap = 0.6936 ENDIF IF (Ifluid.EQ.4) THEN cpliq = 1.144 hfo = 200.00 hfgo = 204.590 r = 0.0961426 Zeta = 0.9300 Gamma = 1.114 Acl = 15.070 Bcl = -2421.94 cpvap = 0.7104 ENDIF IF (Ifluid.EQ.5) THEN cpliq = 1.090 hfo = 200.00 hfgo = 146.630 r = 0.0744752 Zeta = 0.9130 Gamma = 1.065 Acl = 14.809 Bcl = -2312.21 cpvap = 0.732 ENDIF IF (Ifluid.EQ.6) THEN cpliq = 4.575 hfo = -762.750 hfgo = 1261.930 r = 0.4882214 Zeta = 0.9570 Gamma = 1.230 Acl = 16.204 Bcl = -2772.39 cpvap = 2.4471 ENDIF RETURN 1 END