CONTINUOUS_MODEL CeLeak ABSTRACT "Powerlaw LEAK. Bidirectional transport of energy, humidity, & mass fraction. 010427 ABg Modified : Qn12 and Qn21 replace Q_R; both are total heat flux, but w different sign Removed delta. 010219 RSC Defined new local variables delta, Q_R, Fi12, Fi21 990407 MV thermal bridge is added 990216 MV event removed from rho calculation " EQUATIONS /*driving pressure difference*/ Rho1 := rhomois(T1,Hum1); Rho2 := rhomois(T2,Hum2); Dp := P1 - Rho1*G*zr1 - (P2 - Rho2*G*zr2) - Rho*G*dz ; /* powerlaw massflow equation */ M = IF LINEARIZE (1) THEN c * Dp ELSE_IF abs (Dp) < dp0 THEN c0 * Dp ELSE_IF Dp > 0 THEN c * Dp**n ELSE -c * (-Dp)**n END_IF BAD_INVERSES () ; /* convected heat through leak*/ QBridge := uaBridge*(T1 - T2); Q = IF LINEARIZE (1) THEN (T1 - T2) / 2 ELSE_IF M_ass > 0.0 THEN M_ass * Enthal(T1,Hum1) ELSE M_ass * Enthal(T2,Hum2) END_IF /* + conduction*/ + QBridge GOOD_INVERSES (Q) ; /* fraction transported through leak*/ Xf = IF LINEARIZE (1) THEN (X1 - X2) / 2 ELSE_IF M_ass > 0.0 THEN X1 * M_ass ELSE X2 * M_ass END_IF GOOD_INVERSES (Xf) ; /* Hum transported through leak*/ Humf = IF LINEARIZE (1) THEN (Hum1 - Hum2) / 2 ELSE_IF M_ass > 0.0 THEN Hum1 * M_ass ELSE Hum2 * M_ass END_IF GOOD_INVERSES (Humf) ; /* density of crack air is an assigned state (due to hysteresis) */ Rho := IF LINEARIZE (1) THEN rho_air ELSE IF M > 0 THEN rho1 ELSE rho2 END_IF END_IF ; /* + */ delta:=Enthal(T1,Hum1)-Enthal(T2,Hum2); /* For each adjacent zone, include only mass flow into zone; specify relative enthalpy flow */ Qn12 := IF M > 0 THEN M * delta ELSE 0 END_IF; Qn21 := IF M < 0 THEN M * delta ELSE 0 END_IF; IF M>0 THEN Fi12 := (M/Rho1)*1E+03; Fi21 := 0; ELSE Fi21 := (-M/Rho2)*1E+03; Fi12 := 0; END_IF; M_ass := M ; /* .*/ /* Rho := IF LINEARIZE (1) THEN rho_air ELSE IF EVENT(Mm, M) > 0 THEN rhomois(T1,Hum1) ELSE rhomois(T2,Hum2) END_IF END_IF ; */ LINKS /* type name variables... */ BidirAir terminal_1 P1, POS_IN M, T1, POS_IN Q, X1, POS_IN Xf, Hum1, POS_IN Humf; BidirAir terminal_2 P2, POS_OUT M, T2, POS_OUT Q, X2, POS_OUT Xf, Hum2, POS_OUT Humf; VARIABLES /* type name role def min max description */ Density Rho A_S 1.2 .5 3 "density of leak air" Density Rho1 LOC 1.2 .5 3 "density of neighb.1 air" Density Rho2 LOC 1.2 .5 3 "density of neighb.2 air" massflow M OUT 0.001 -BIG BIG "massflow through leak, from 1 to 2" massflow M_ass A_S 0.001 -BIG BIG "massflow through leak, from 1 to 2" Pressure P1 IN 1 -BIG BIG "terminal 1 pressure" Pressure P2 IN 2 -BIG BIG "terminal 2 pressure" Temp T1 IN 20 ABS_ZERO BIG "Temperature of neighbor 1" Temp T2 IN 20 ABS_ZERO BIG "Temperature of neighbor 2" HeatFlux Q OUT 0 -BIG BIG "heat moved by massflow" Fraction_y X1 IN 594 0 BIG "fraction of neighbor 1" Fraction_y X2 IN .1 0 BIG "fraction of neighbor 2" fractflow_y Xf OUT 0.001 -BIG BIG "fraction moved by massflow" HumRatio Hum1 IN .005 0 1 "hum. of neighbor 1" HumRatio Hum2 IN .005 0 1 "hum. of neighbor 2" HumFlow Humf OUT 0.001 -BIG BIG "hum. moved by massflow" Pressure Dp LOC "effective pressure difference" /* + */ Enthalpy delta LOC 1 0 BIG "Enthalpy difference " HeatFlux Qn12 LOC 0 -BIG BIG "Net HeatFlux from 1 to 2" HeatFlux Qn21 LOC 0 -BIG BIG "Net HeatFlux from 2 to 1" /* . */ HeatFlux QBridge LOC 0 -BIG BIG "Cold Bridge HeatFlux " VolFlow_m Fi12 LOC 0 -BIG BIG "Volume flow from term 1 to 2" VolFlow_m Fi21 LOC 0 -BIG BIG "Volume flow from term 2 to 1" PARAMETERS /* type name role def min max description */ /* easy access parameters */ Generic InPar S_P 1 0 1 "Input parameter 0 = ela 1 = c_t" Generic c_t S_P 1 0 BIG "powerlaw coeff [kg/(s Pa**n)]" Generic n S_P .5 .5 1.0 "powerlaw exponent [dimless]" Area ela S_P 0 0 BIG "equivalent leakage area at Dp=4 Pa (C_d = 1)" HeatCond uaBridge S_P 0 0 BIG "UA-value for conductive cold bridge" length dz S_P 0 "rise fr terminal_1 to 2 (may be < 0)" length zr1 S_P 0 0 BIG "leak height from floor of neighb. 1" length za1 S_P "absolute floor level of neighb. 1" length za2 S_P "absolute floor level of neighb. 2" Pressure dp0 S_P .1 SMALL BIG "limit for linear flow" /* derived parameters, c is derived if ela > 0*/ Generic c C_P "powerlaw coeff [kg/(s Pa**n)]" Generic c0 C_P "linear coefficient" length zr2 C_P "leak height fr floor of neighb 2" PARAMETER_PROCESSING zr2 := za1 + zr1 + dz - za2 ; c := IF InPar < 0.5 THEN ela * SQRT(4 * 2 * rho_air)/4**n ELSE c_t END_IF ; c0 := c * dp0**(n-1) ; END_MODEL