CONTINUOUS_MODEL CeBeam ABSTRACT "Idealized supply terminal w damper and active cooling ceiling BEAM. Most of the code is taken straigth from cesupt model. CentralMode > 0 MassFlow is controlled with equation CentralMode * (mMax*Contr + mMin*(1 - Contr)) CentralMode = 0 Massflow is set constant, equal to cLow*mMin, independent of LocalMode. Default for cLow = 0.01. CentralMode = -1 'Natural ventilation mode'; flow depends linearly on Dp, also when Dp > dp0; m = Dp/dp0 * mMax. Date: 1998-01-19 Made by: Mika Vuolle Limits: Rev 1.1 Coefficients in P = k dT^n are varying as a function of supply air flow. Rev 1.2 Bug fix: Contr is used instead of LiqContr in the IF section of MLiq equation. " EQUATIONS Dp := P1 - P2; /* massflow equation */ M = IF CentralMode > 1e-4 THEN CentralMode * (mMax*Contr + mMin*(1 - Contr)) ELSE_IF CentralMode < -1e-4 THEN Dp/dp0 * mMax ELSE cLow * mMin END_IF GOOD_INVERSES(M); /***************** Begin of beam section ***********************/ DpLiq := PLiqIn - PLiqOut; MLiq = IF DpOkLiq > 0.5 OR (Dp > dp0 AND LiqContr > -0.5) THEN MLiqMax*LiqContr + MLiqMin*(1 - LiqContr) ELSE_IF LiqContr > -0.5 THEN MLiqMin * DpLiq/dp0Liq ELSE MLiqMax * Dp/dp0 END_IF; ExpLoc:=- (TliqOut-TLiqIn)/ dT; TLiqOut = T2 - (T2-TLiqIn)*IF ExpLoc > -0.01 THEN EXP(-0.01) ELSE_IF ExpLoc < -5 THEN EXP(-5) ELSE EXP(ExpLoc) END_IF; FOR i=1, (nPoint-1) IF Point[i] < M and M < Point[i+1] THEN Fac[i+1] := 1; ELSE Fac[i+1] := 0; END_IF END_FOR; Fac[1] := IF M < Point[1] THEN 1 ELSE 0 END_IF; Fac[nPoint+1] := IF Point[nPoint] < M THEN 1 ELSE 0 END_IF; kact := SUM i=1, nSlot Fac[i] * k[i] END_SUM; nact := SUM i=1, nSlot Fac[i] * n[i] END_SUM; P := IF dT < 1 THEN length * kact * dT ELSE length * kact * dT**nact END_IF; P = MLiq * cp_liq * (TLiqOut-TLiqIn); /****************** End of beam section ************************/ /* convected heat through terminal */ HSupt := Enthal(T1, Hum1); Q = IF LINEARIZE (1) THEN T1 ELSE HSupt * M END_IF - P GOOD_INVERSES (Q); /* fraction transported through terminal */ Xf = IF LINEARIZE (1) THEN X1 ELSE X1 * M END_IF GOOD_INVERSES (Xf); /* moisture transported through terminal */ Humf = IF LINEARIZE (1) THEN Hum1 ELSE Hum1 * M END_IF GOOD_INVERSES (Humf); /* saturated modes */ DpOkLiq := IF Event(DpLiqm, DpLiq - dp0Liq) > 0 AND LiqContr > -0.5 THEN 1 ELSE 0 END_IF; LINKS /* type name variables... */ UniAir inlet P1, POS_IN M, T1, X1,Hum1 ; BiDirAir zone P2, POS_OUT M, T2, POS_OUT Q, X2, POS_OUT Xf, Hum2, POS_OUT Humf ; ControlLink control_in Contr; ControlLink force_control CentralMode; PMT LiqIn PLiqIn, POS_IN MLiq, TLiqIn; PMT LiqOut PliqOut, POS_OUT MLiq, TLiqOut; ControlLink ControlLiq LiqContr; VARIABLES /* type name role def min max description */ Pressure P1 IN 1375 -BIG BIG "pressure in" Pressure P2 IN 1325 -BIG BIG "pressure out" massflow M OUT 0.024 0 BIG "massflow through terminal" Pressure Dp LOC 50 0 BIG "eff pressure diff" temp T1 IN 20 ABS_ZERO BIG "temperature in" temp T2 IN 25 ABS_ZERO BIG "temperature zone" Enthalpy HSupt LOC 40000 -BIG BIG "enthalpy of supply air" HeatFlux Q OUT 0. -BIG BIG "heat convected by massflow" fraction_y X1 IN 594 0 BIG "pollutant fractn in" fraction_y X2 IN 594 0 BIG "pollutant fractn zone" FractFlow_y Xf OUT 0 -BIG BIG "pollution transport" HumRatio Hum1 IN 0.006 SMALL BIG "moisture fractn in" HumRatio Hum2 IN 0.006 SMALL BIG "moisture fractn zone" HumFlow Humf OUT 0 -BIG BIG "moisture transport" Control Contr IN 0 0 1 "Controller input 0 -> mMin, 1 -> mMax" Control CentralMode IN 1 -BIG BIG "Forcing control, = >0 local control 0 low flow <0 natural vent" /* Liq part */ Control LiqContr IN 0 0 1 "Liquid control signal" Pressure PLiqIn IN 500 SMALL BIG "Liquid inlet pressure" Pressure PLiqOut IN 0 0 BIG "Liquid outlet pressure" MassFlow MLiq OUT 0.001 SMALL BIG "Water massflow " Temp TLiqIn IN 14 0 BIG "Water inlet temperature" Temp TLiqOut OUT 16 0 BIG "Water outlet temperature" Temp dT OUT 0 0 BIG "Temp. diffrence air and water average" Power P LOC 0 0 BIG "Cooling power" Factor ExpLoc LOC 0.1 SMALL BIG "Help variable" Pressure DpLiq LOC 50 0 BIG "eff liquid pressure diff" Pressure DpLiqm A_S 1 "DpLiq event memory" Pressure DpOKLiq A_S 1 0 1 "Liquid mode memory" Factor kact LOC 10 SMALL BIG "Factor from equation P = k dT^n" Factor nact LOC 1.2 SMALL BIG "Factor from equation P = k dT^n" Factor Fac[nSlot] LOC 0 0 1 "Factor is 1 if interval is valid" MODEL_PARAMETERS INT nPoint SMP 3 1 BIGINT "number of points" INT nSlot SMP 4 2 BIGINT "number of lines" PARAMETERS /* type name role def min max description */ Pressure dp0 S_P 5 SMALL BIG "limit for flow control action" MassFlow mMax S_P .01 SMALL BIG "max requestable massflow" MassFlow mMin S_P .001 SMALL BIG "min requestable massflow" Factor cLow S_P .001 0 BIG "massflow when 'off', i.e. CentralMode = 0" MassFlow MLiqMax S_P .006 SMALL BIG "max requestable water massflow" MassFlow MLiqMin S_P .0001 SMALL BIG "min requestable water massflow" HeatCapM cp_liq S_P 4187 SMALL BIG "Liquid heat capacity" Pressure dp0Liq S_P 5 SMALL BIG "limit for flow control action" Length Length S_P 1 SMALL BIG "Lenght of beam" Factor k[nSlot] S_P 10 SMALL BIG "Factor from equation P = k dT^n" Factor n[nSlot] S_P 1.2 SMALL BIG "Factor from equation P = k dT^n" MassFlow Point[nPoint] S_P 0.024 SMALL BIG "Massflow points in lines " END_MODEL