CONTINUOUS_MODEL SimChil ABSTRACT "SIMplified CHILler and water pump w ideal control. Cools incoming water to specified temperature, with fixed COP and max. capacity, using some primary energy source. Pressurizes outgoing water to specified pressure, using electricity with a given pump efficiency. PS 980518 Limits for QMax changed PS 980416 QMax in kW, new default for mass MV 971125 Power of coresponding flows are added for presentation purposes. MV 971005 Change Mode section to avoid event, when pump is off AB 970926 Avoid division w MTot = 0 PS 970918 Reformulated equation for POut AB 970915 Renamed links to avoid identity by truncation MV 970429 Only two inlet and two outlet w different setpoints. If requested cooling power is higher than max. cooling power, first the cooler outlet will increase and after that the temperature of both leaving terminals will increase parallel. The constant RHO_WAT has been changed to parameter rhoLiq. PS 970409 Internal mass added for numerical reasons. A lot of consequent redesign. Mass is just tested as well mixed tank after the chiller in the circuit i.e. not as realistically controlled cold storage. " EQUATIONS /* outlet pressure head */ POut - PIn = pSetMax * PumpOn + pSetMin * (1 - PumpOn) ; /* Inlet pressure is given as reference pressure for massflow circuit. This corresponds to the grounding of an electrical circuit, or an expansion vessel for a fluid circuit */ PIn = 0; /* total massflow */ Mtot := MIn1 + MIn2; /* check for mass continuity with a local assignment <>*/ /* pump electrical power */ PPump := (POut - PIn)*Mtot/(rhoLiq*etaPump); /* Entering liquid average temp. */ TLiqEnt := IF MTot > 1E-6 THEN (MIn1 * TIn1 + MIn2 *TIn2) / (MTot) ELSE 0 END_IF; /* requested cooling power */ Temp := IF MTot > 1E-6 THEN MIn1 * cpLiq * (TLiqEnt - TOutReq1) + MIn2 * cpLiq * (TLiqEnt - TOutReq2) ELSE -1.0E-6 END_IF; /* supplied primary energy, and delivered cooling power */ IF NINT(MODE) == 2 THEN /* maximum capacity has been reached */ QSup := QMax*1000 / cOP; Q := QMax*1000; ELSE_IF NINT(MODE) == 0 THEN /* no chil required, leaving water too cold*/ QSup := 0; Q := 0; ELSE /* normal operating regime */ QSup := Temp / cOP; Q := Temp; END_IF; /* mass*cpLiq*TChil' = -Q + cpLiq*(Mtot*TLiqEnt - MOut1*TOut1 - MOut2*TOut2); */ mass*TChil' = -Q/cpLiq + (Mtot*TLiqEnt - MOut1*TOut1 - MOut2*TOut2); TOut1 = IF TChil <= TOutReq1 THEN TOutReq1 ELSE TChil END_IF; TOut2 = IF TChil <= TOutReq2 THEN TOutReq2 ELSE TChil END_IF; QCond := (1+cOP) * QSup; Mode := IF PumpOn < 0.5 THEN 0 ELSE IF Event(G0, Temp) < 0 THEN 0 ELSE_IF Temp - QMax*1000 > 0 THEN 2 ELSE 1 END_IF END_IF; Q1 := MIn1 * cpLiq * (TIn1 - TOut1); Q2 := MIn2 * cpLiq * (TIn2 - TOut2); LINKS PMT Inlet1 PIn, POS_IN MIn1, TIn1; PMT Outlet1 POut, POS_OUT MOut1, TOut1; PMT Inlet2 PIn, POS_IN MIn2, TIn2; PMT Outlet2 POut, POS_OUT MOut2, TOut2; T TempSetp1 TOutReq1; /* Inlet 1 leaving liquid temperature setpoint */ T TempSetp2 TOutReq2; /* Inlet 2 leaving liquid temperature setpoint */ ControlLink PumpControl PumpOn; /* Pump control signal */ VARIABLES /* type name role def min max description */ Pressure POut OUT 600 0 BIG "Outlet pressure" Pressure PIn OUT 0 0 BIG "Inlet pressure, fixed, as from expansion vessel" MassFlow Mtot LOC 0.8 0 BIG "Total massflow" MassFlow MOut1 IN 0.75 0 BIG "Outlet 1 massflow" MassFlow MOut2 IN 0.05 0 BIG "Outlet 2 massflow" MassFlow MIn1 IN 0.75 0 BIG "Inlet 1 massflow" MassFlow MIn2 IN 0.05 0 BIG "Inlet 2 massflow" Temp TChil OUT 4.3 ABS_ZERO BIG "Chiller storage temperature" Temp TIn1 IN 15 ABS_ZERO BIG "Inlet 1 temp of entering liquid" Temp TIn2 IN 9 ABS_ZERO BIG "Inlet 2 temp of entering liquid" Temp TLiqEnt LOC 14 ABS_ZERO BIG "Average temp of entering liquids" Temp TOut1 OUT 15 ABS_ZERO BIG "Outlet 1 temp of leaving liquid" Temp TOut2 OUT 9 ABS_ZERO BIG "Outlet 2 temp of leaving liquid" Temp TOutReq1 IN 15 ABS_ZERO BIG "Outlet 1 requested leaving temperture" Temp TOutReq2 IN 9 ABS_ZERO BIG "Outlet 2 requested leaving temperture" ElPowerCons QSup LOC 1100 0 BIG "Supplied primary energy" ElPowerCons PPump LOC 0.6 0 BIG "Pump electrical power" HeatFlux QCond LOC 3500 0 BIG "Condenser heat" Control PumpOn IN 1 0 BIG "Pump control signal" Power Temp LOC 2373 0 BIG "Temporary variable" Power Q LOC 2373 0 BIG "Temporary variable" Generic Mode A_S 1 0 2 "Chiller mode 0 = Off 1 = Normal regime 2 = Full capacity" Generic G0 A_S 0 0 BIG "G-stop memory " Power Q1 LOC 2373 0 BIG "Power removed from flow circuit 1" Power Q2 LOC 2373 0 BIG "Power removed from flow circuit 2" PARAMETERS /* type name role def min max description */ Factor cOP S_P 2 SMALL 100 "Overall coefficent of performance (efficiency)" Factor etaPump S_P 0.8 SMALL 1 "Pump efficiency" Power_k QMax S_P 99999 0.001 BIG "Maximum cooling capacity" Pressure pSetMax S_P 3000 SMALL BIG "Outlet pressure at full pump speed" Pressure pSetMin S_P 1 SMALL BIG "Outlet pressure at PumpOn = 0 (>0 for numerical reasons)" Mass mass S_P 100 SMALL BIG "Chiller and piping mass" HeatCapM cpLiq S_P 4187 SMALL BIG "Liquid specific heat" Density rhoLiq S_P 1000 SMALL BIG "Liquid density" END_MODEL