CONTINUOUS_MODEL EnvLVO ABSTRACT "The model EnvLVO is obsolete and should be replaced with CeLVO. Flows through a large vertical rectangular opening towards ambient. Density gradients in connected zones are neglected. By: Per Sahlin & Mika Vuolle Date: Well, a long time ago Calls: Enthal from PSYCHRO1.NMF RhoMois from PSYCHRO2.NMF Revisions: 980312 MV EnvLVO is made from CELVO model due to get pressure calc. correct at outside. 980211 AB Width is made a controllable variable 980114 MV Events are changed again 971201 MV RhoDry is changed to rhoMois 971125 MV Density calculation is changed to use rho_dry function rho_20 removed from parameter section hysteresis to slanted A_S parameter 971119 MV linearization when dP is less than 0.001 density difference is reduce for slanted vel. profile A_S parameter for slanted vel. profile 971118 MV cp removed from parameters as well 971104 PS cP removed and call to Enthal inserted " EQUATIONS /* get current width */ Width := Contr * w; /* calculating densities*/ Rho1 := RHOMOIS (T1,Hum1); Rho2 := RHOMOIS (T2,Hum2); /* pressure differences at top and bottom of opening*/ Dp_t := (P1 - Rho1*G*zt_out) - (P2 - Rho2*G*zt_in); Dp_b := (P1 - Rho1*G*zr_out) - (P2 - Rho2*G*zr_in); /* calculating mass flows */ IF Contr < 0.0001 THEN M_12 := 0; M_21 := 0; /* case with slanted vel. profile first */ ELSE_IF Slanted > 0.5 THEN Z_n := Dp_b/(G*(Rho1 - Rho2)); Top := cd*(2/3)*Width*abs(Dp_t)**(3/2)/(G*(Rho1 - Rho2)); Bot := cd*(2/3)*Width*abs(Dp_b)**(3/2)/(G*(Rho1 - Rho2)); /* go thru the different cases of neutral plane position and slope of vel. profile, calculate resulting mass flows */ IF (Z_n < 0 AND Rho1 > Rho2) OR (Z_n > z_t AND Rho2 > Rho1) THEN M_12 := 0; M_21 := (Top - Bot)*sqrt(2*Rho2); ELSE_IF (Z_n > z_t AND Rho1 > Rho2) OR (Z_n < 0 AND Rho2 > Rho1) THEN M_12 := (Bot - Top)*sqrt(2*Rho1); M_21 := 0; ELSE_IF (Rho1 > Rho2) THEN M_12 := Bot*sqrt(2*Rho1); M_21 := Top*sqrt(2*Rho2); ELSE M_12 := -Top*sqrt(2*Rho1); M_21 := -Bot*sqrt(2*Rho2); END_IF /* Case of flat vel. profile */ ELSE_IF dp_b == 0 THEN M_12 := 0; M_21 := 0; ELSE_IF dp_b > 0 THEN M_12 := IF dp_b > dPLin THEN cd*w*z_t*sqrt(2*Rho1*dp_b) ELSE cd*w*z_t*sqrt(2*Rho1*dPLin)/dPLin*dp_b END_IF; M_21 := 0; ELSE M_12 := 0; M_21 := IF -dp_b > dPLin THEN cd*w*z_t*sqrt(2*Rho2*(-dp_b)) ELSE cd*w*z_t*sqrt(2*Rho2*dPLin)/dPLin*(-dp_b) END_IF; END_IF; /* net mass balance */ /* M = M_12 - M_21; */ M = IF LINEARIZE (1) THEN dp_b*cd*Width*z_t*sqrt(2*Rho1*1) ELSE M_12 - M_21 END_IF; /* convected heat */ Q = IF LINEARIZE (1) THEN (T1 - T2) / 2 ELSE M_12 * Enthal(T1,Hum1) - M_21 * Enthal(T2,Hum2) END_IF; /* convected mass fraction */ /* Xf = M_12*X1 - M_21*X2; */ Xf = IF LINEARIZE (1) THEN (X1 - X2) / 2 ELSE M_12 * X1 - M_21 * X2 END_IF; /* convected moisture fraction */ /* Humf = M_12*Hum1 - M_21*Hum2; */ Humf = IF LINEARIZE (1) THEN (Hum1 - Hum2) / 2 ELSE M_12 * Hum1 - M_21 * Hum2 END_IF; SlantOn := Eventp(G0,abs(Rho1 - Rho2)-0.0002); SlantOff := Eventn(G1,abs(Rho1 - Rho2)-0.0001); Slanted := IF SlantOn > 0 THEN 1 ELSE_IF SlantOff < 0 THEN 0 ELSE Slanted END_IF; LINKS /* type name variables...*/ BiDirAir Outside P1, POS_IN M, T1, POS_IN Q, X1, POS_IN Xf, Hum1, POS_IN Humf; BiDirAir Inside P2, POS_OUT M, T2, POS_OUT Q, X2, POS_OUT Xf, Hum2, POS_OUT Humf; ControlLink Opening Contr; VARIABLES /*type name role def min max descr.*/ Temp T1 IN 20 ABS_ZERO BIG "Amb temperature" Temp T2 IN 20 ABS_ZERO BIG "Zone temperature" Density Rho1 LOC 1.2 SMALL BIG "Amb density" Density Rho2 LOC 1.2 SMALL BIG "Zone density" Pressure Dp_t LOC 0.1 -BIG BIG "Pressure diff, top of opening" Pressure Dp_b LOC 0.1 -BIG BIG "Pressure diff, bottom level" Pressure P1 IN 1325 -BIG BIG "Ground level pressure" Pressure P2 IN 1325 -BIG BIG "Zone floor level pressure" Control Contr IN 0 0 1 "Control input, 0 closed, 1 open" Length Z_n LOC 1.1 0 BIG "level of neutral plane, Dp = 0" Length Width LOC "Current width" GENERIC Top LOC "Help variable" GENERIC Bot LOC "Help variable" MassFlow M_12 LOC 0.001 0 BIG "Massflow from zone 1 to 2" MassFlow M_21 LOC 0.001 0 BIG "Massflow from zone 2 to 1" MassFlow M OUT 0 -BIG BIG "Net massflow" HeatFlux Q OUT 0 -BIG BIG "Net heatFlux" FractFlow_y Xf OUT 0 -BIG BIG "Net amount of fraction trnsp." Fraction_y X1 IN 594 0 BIG "Zone 1 fraction" Fraction_y X2 IN 594 0 BIG "Zone 2 fraction" HumRatio Hum1 IN 0.006 SMALL BIG "moisture fraction in" HumRatio Hum2 IN 0.006 SMALL BIG "moisture fraction zone" HumFlow Humf OUT 0 -BIG BIG "moisture transport" Generic G0 A_S 1 0 1 "Memory of slanted vel. profile" Generic G1 A_S 1 0 1 "Memory of slanted vel. profile" Generic Slanted A_S 1 0 1 "Slanted vel. profile" Generic SlantOn LOC 1 -BIG BIG "Slanted On" Generic SlantOff LOC 1 -BIG BIG "Slanted Off" PARAMETERS /* type name role def min max descr.*/ Length z_t S_P 1.5 SMALL 100 "Opening height" Length w S_P 1 SMALL 100 "Opening width" Length z_z S_P 2.4 SMALL BIG "Average zone height" Length zr_in S_P 1 SMALL 100 "Window bottom height from floor" Length za_in S_P 0 -BIG BIG "Absolute floor level of zone" Pressure dPLin S_P 0.001 SMALL BIG "Pressure difference to linearize" /* derived parameter */ Factor cd C_P .6 SMALL 1 "Discharge coefficient" Length zr_out C_P 2 SMALL 100 "Window bottom height from ground" Length zt_in C_P 2 SMALL 100 "Window top height from floor" Length zt_out C_P 2 SMALL 100 "Window bottom height from ground" PARAMETER_PROCESSING /* What is correct z_t in this equation? */ /* Temporary solutions */ cd := 0.65; /* cd := 0.609*(z_t/z_z) - 0.066; */ zr_out := za_in + zr_in; zt_in := zr_in + z_t; zt_out := za_in + zr_in + z_t; END_MODEL