SUBROUTINE TYPE89(TIME,XIN,OUT,T,DTDT,PAR,INFO,ICNTRL,*) C*********************************************************************** C* PROGRAM: PCOMPLID C* C* LANGUAGE: FORTRAN 77 C* C* PURPOSE: Identification of the internal power of C* the compressor when all the cylinders C* are unloaded (compressor alone). 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* Tev Evaporating temperature (C) C* Tcd Condensing temperature (C) C* PLorFL =1 if the user knows the power consumed by the (-) C* compressor working in part-load regime at the C* given evaporating and condensing temperatures; C* =2 if the user only knows the power comsumed by C* the compressor working in full-load regime at C* the given evaporating and condensing temperatures. C* W If PLorFL (KJ/hr) C* =1: power consumed by the compressor working in C* part-load regime at the given evaporating and C* condensing temperatures C* =2: power consumed by the compressor working in C* full-load regime at the given evaporating and C* condensing temperatures 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* 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* Cf Clearance factor of the compressor (-) C* VsFL Geometric displacement of the compressor (m**3/s) C* in full load regime 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 C DEVELOPER: Jean Lebrun C (of the TOOLKIT subroutine) Jean-Pascal Bourdouxhe C Marc Grodent C University of Liege, Belgium C C DATE: October 7, 1993 C Modified for TRNSYS: July 1994-Madison C Mark Nott C C SUBROUTINE CALLED: PROPERTY C*********************************************************************** C INTERNAL VARIABLES: C p1 Evaporating pressure (Pa) C p2 Condensing pressure (Pa) C Effvol Volumetric effectiveness of the compressor (-) 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/kg) C for specified working conditions C Win Internal power consumed by the compressor (KJ/hr) C*********************************************************************** REAL*8 Nc,NcFL INTEGER Ifluid INTEGER*4 INFO DIMENSION XIN(7),OUT(1),PAR(4),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 C PARAMETERS Losses = PAR(1) Alpha = PAR(2) Cf = PAR(3) VsFL = PAR(4) C INPUTS Ifluid = XIN(1) Tev = XIN(2) Tcd = XIN(3) PLorFL = XIN(4) W = XIN(5) Nc = XIN(6) NcFL = XIN(7) INFO(6)=1 C Selection of the refrigerant CALL PROPERTY(Ifluid,To,cpliq,hfo,cpvap,hfgo,r,Zeta, & Gamma,Acl,Bcl,*10) 10 CONTINUE Gm1G=(Gamma-1)/Gamma C Calculate the evaporating pressure p1=1000*EXP(Acl+Bcl/(Tev+To)) C Calculate the condensing pressure p2=1000*EXP(Acl+Bcl/(Tcd+To)) C Calculate the volumetric efficiency of the compressor Effvol=1+Cf-Cf*(p2/p1)**(1/Gamma) C Calculate the power consumed by the compressor in C 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 isentropic compression power consumed by C the loaded cylinders Wis=Effvol*Vs*3.6*p1*((p2/p1)**Gm1G-1)/Gm1G C Calculate the internal power consumed by C the compressor Win=(Wpl-Losses)/(1+Alpha) C Calculate the internal power of the compressor when all the C cylinders are unloaded WpumpingId=(Win-Wis)/(1-Nc/NcFL) C OUTPUTS 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