CONTINUOUS_MODEL CeExhT ABSTRACT "Idealized EXHaust Terminal for VAV or natural ventilation. CentralMode > 1E-4 Massflow is controlled in the range (CentralMode*mMin,CentralMode*mMax) by Contr in (0,1). CentralMode < -1E-4 'Natural ventilation mode'; flow depends linearly on Dp, also when Dp > dp0; Massflow = Dp/dp0 * mMax. CentralMode = 0 Massflow is set constant, equal to cLow*mMin. Default for cLow = 0.01. Revisions: 020927 LE Mass flow equation modified = ver 2.11 + events when switching mode 020821 LE Mass flow equation modified 010427 Abg Modified Qn21 replaces Q_R 010220 RSC Defined new local variables Fi12, Q_R 001211 AB Give M an offset cLow*mMin, when CentralMode > 1e-4 980407 PS LocalMode removed altogether. 980226 MV Massflow calc is changed. Now linear behavior will be in use, when fan is on, but localmode is still 0. cLow is changed to 0.05 to get 0.05 ACH infiltration 971204 AB Introduced CentralMode and LocalMode 970604 AB Added LOC enthalpy HExht 971001 MV Contr > -1E-6 is changed to Contr > -0.5 to avoid mode change due to 'numerical noise'. " EQUATIONS Dp := P1 - P2; /* massflow equation */ /* M = IF CentralMode >= -1e-4 THEN max(CentralMode * (mMax*Contr + mMin*(1 - Contr)), cLow * mMin) ELSE Dp/dp0 * mMax END_IF GOOD_INVERSES(M); */ M = IF Mode > 0.5 THEN MAX(CentralMode, 1.0e-4) * (mMax*Contr + mMin*(1 - Contr)) ELSE_IF Mode < -0.5 THEN Dp/dp0 * mMax ELSE cLow * mMin END_IF GOOD_INVERSES(M); /* convected heat through terminal */ HExht := Enthal(T, Hum); Q = IF LINEARIZE (1) THEN T ELSE HExht * M END_IF GOOD_INVERSES (Q); /* fraction transported through terminal */ Xf = IF LINEARIZE (1) THEN X ELSE X * M END_IF GOOD_INVERSES (Xf); /* moisture transported through terminal */ Humf = IF LINEARIZE (1) THEN Hum ELSE Hum * M END_IF GOOD_INVERSES (Humf); /* +*/ /* For the intended heat flux reporting, include only mass flow into zone */ Qn21 := 0; Fi12 := M/RHODRY(T,Hum)*1E+03; /* .*/ /* Set mode of operation */ Mode := IF Event(G0,CentralMode - 1e-4) > 0 THEN 1 ELSE_IF Event(G1,CentralMode + 1e-4) >= 0 THEN 0 ELSE -1 END_IF ; LINKS /* type name variables... */ BiDirAir zone P1, POS_IN M, T, POS_IN Q, X, POS_IN Xf, Hum, POS_IN Humf ; UniAir outlet P2, POS_OUT M, T, X, Hum ; ControlLink control_in Contr; ControlLink force_control CentralMode; VARIABLES /* type name role def min max description */ MassFlow M OUT 0.026 0 BIG "massflow through terminal" Pressure P1 IN 1321 -BIG BIG "zone air pressure" Pressure P2 IN 1275 -BIG BIG "outlet pressure" Pressure Dp LOC 45 0 BIG "eff pressure diff" Temp T IN 15. ABS_ZERO BIG "temperature" Enthalpy HExht LOC 42700 -BIG BIG "enthalpy of exhaust air" HeatFlux Q OUT 1111. -BIG BIG "heat convected by massflow" Fraction_y X IN 594 0 BIG "pollutant fraction" FractFlow_y Xf OUT 15 -BIG BIG "pollution transport" HumRatio Hum IN .006 SMALL BIG "moisture fraction" HumFlow Humf OUT .0001 -BIG BIG "moisture transport" Control Contr IN 0 -BIG 1 "Controller input (for CentralMode >0) 0 -> mMin, 1 -> mMax" Control CentralMode IN 1 -1 BIG "Mode control, = >0 local control 0 low flow (off) <0 natural vent" Generic Mode A_S 1 -1 1 "Mode control, = 1 local control 0 low flow (off) -1 natural vent" Generic G0 A_S 1 -BIG BIG "Memory in event function" Generic G1 A_S 1 -BIG BIG "Memory in event function" HeatFlux Qn21 LOC 0 -BIG BIG "HeatFlux into zone" VolFlow_m Fi12 LOC 0 -BIG BIG "Volume flow out of zone " PARAMETERS /* type name role def min max description */ Pressure dp0 S_P 5 SMALL BIG "limit for linear flow" MassFlow mMax S_P .1 SMALL BIG "max requestable massflow" MassFlow mMin S_P .01 SMALL BIG "min requestable massflow" Factor cLow S_P .05 0 BIG "massflow when 'off', i.e. CentralMode = 0" END_MODEL