SUBROUTINE TYPE51 (TIME,XIN,OUT,T,DTDT,PAR,INFO,ICNTRL,*) C*********************************************************************** C* SUBROUTINE: PMPSIM C* C* LANGUAGE: FORTRAN 77 C* C* PURPOSE: Calculate the power and leaving C* temperature for pump using simple part C* load characteristics. C*********************************************************************** C* INPUT VARIABLES DESCRIPTION(UNITS) SAMPLE VALUES C* XIN(1) M Mass flow rate(kg/s) 2.52 C* XIN(2) TEnt Entering fluid temperature(C) 12.78 C* C* OUTPUT VARIABLES C* OUT(1) TLvg Leaving fluid temperature(C) 12.7962 C* OUT(2) Power Pump power(W) 496.754 C* OUT(3)ErrStat Error status indicator,0=ok,1=error(-) 0.0 C* C* Note: If M<0, TEnt is assumed to be pump outlet conditions, C* and TLvg is calculated inlet conditions C* C* PROPERTIES (MUST BE CHANGED IN DATA STATEMENT BELOW) C* CpLiq Specific heat of fluid(J/kg C) 4186.0 C* RhoLiq Fluid density(kg/m3) 998.0 C* C* PARAMETERS C* PAR(1) EffMot Motor drive efficiency(-) .85 C* PAR(2) MotorLoss Fraction of motor heat loss to fluid stream(-)0.0 C* PAR(3) FlowRated Rated volumetric flow rate(m3/s) .00631 C* PAR(4) PowRated Rated total power(W) 1119.0 C* PAR(5) DPRated Rated total pressure rise(Pa) 89700.0 C* C* Coef(i)Fflp Regression coefficient for part load eqn.(-) C* fflp = Coef0+Coef1*plr+Coef2*plr**2+Coef3*plr**3 C* Note: Coef0+Coef1+Coef2+Coef3=1 must be satisfied C* PAR(6) COEF0 .350712 C* PAR(7) COEF1 .3085 C* PAR(8) COEF2 -.54137 C* PAR(9) COEF3 .881 C* C*********************************************************************** C C DEVELOPER: Shauna Gabel C Michael J. Brandemuehl, PhD, PE C University of Colorado at Boulder C C DATE: January 1, 1992 C C INCLUDE FILES: fanpmp.inc C prop.inc C SUBROUTINES CALLED: None C FUNCTIONS CALLED: None C C REVISION HISTORY: None C C REFERENCE: BLAST. 1986. Building Loads Analysis C and System Thermodynamics Program: C User's Manual, Version 3.0. U.S. Army C Construction Engineering Research C Laboratory, Champaign, IL. pp.5-26-5-27. C*********************************************************************** C* INTERNAL VARIABLES: C* rho Entering fluid density (kg/m3) C* fflp Fraction of rated (full-load) power (-) C* plr Part-load flow ratio (-) C* powShaft Shaft power (W) C qLoss Heat transfer to fluid stream (W) C* small Small number used in place of zero C*********************************************************************** INTEGER ErrStat, INFO, IOPT, NI, NP, ND DOUBLE PRECISION XIN, OUT REAL M, PAR C DIMENSION P(NPFanPmp) DIMENSION XIN(2), OUT(3), PAR(9), INFO(15) CHARACTER*3 YCHECK(2), OCHECK(3) C**** You May want to change these values for an individual liquid *** DATA CpLiq/4186.0/, RhoLiq/998.0/ DATA small/1.E-9/ DATA YCHECK/'MF2','TE1'/ DATA OCHECK/'TE1','PW2','DM1'/ ErrStat = 0 IOPT = -1 NI = 2 !CORRECT NUMBER OF INPUTS NP = 9 !CORRECT NUMBER OF PARAMETERS ND = 0 !CORRECT NUMBER OF DERIVATIVES M = XIN(1) TEnt = XIN(2) Effmot = PAR(1) Motorloss = PAR(2) Flowrated = PAR(3) Powrated = PAR(4) DPRated = PAR(5) Coef0 = PAR(6) Coef1 = PAR(7) Coef2 = PAR(8) Coef3 = PAR(9) IF (INFO(7).EQ.-1) THEN CALL TYPECK(IOPT,INFO,NI,NP,ND) C CHECKS TO SEE IF USER'S INFO EQUALS CORRECT NUMBER OF INPUTS CALL RCHECK(INFO,YCHECK,OCHECK) C CHECKS TO SEE IF THE UNITS ON THE INPUTS AND OUTPUTS MATCH ENDIF C2********************************************************************** C2 The code between these bars of asterisks is used to set internal C2 parameters and is independent of component input values. In an C2 hourly simulation, this block of code may be skipped after the C2 first call. effTot = FlowRated*DPRated/PowRated effPmp = effTot/EffMot C2********************************************************************** C1*** Calculate the part load ratio based on rated flow plr=ABS(M)/RhoLiq/FlowRated C1*** Calculate the fraction of full-load power based on rating point C2*** fflp = Coef0 + Coef1*plr + Coef2*plr**2 + Coef3*plr**3 fflp =Coef0+plr*( Coef1 & +plr*( Coef2 & +plr* Coef3 ) ) C1*** Calculate the actual pump shaft power and motor power Power = PowRated*fflp powShaft = Power*EffMot C1*** Calculate the leaving fluid conditions C2*** If flow is zero, ABS(M) < small, the value of M is replaces with C2*** small of the same sign as M in calculating Lvg conditions qLoss = powShaft*(1-effPmp) + (Power-powShaft)*MotorLoss TLvg = TEnt + qLoss/(SIGN(MAX(ABS(M),small),M)*CpLiq) OUT(1) = TLvg OUT(2) = Power OUT(3) = ErrStat RETURN 1 END