@@ -969,7 +969,7 @@ The swapping is performed if the counterCurrent parameter is true (default value
969969 if not useAverageTemperature then T[j+ 1 ]
970970 else if not adaptiveAverageTemperature then (T[j] + T[j + 1 ])/ 2
971971 else (T[j]+ T[j+ 1 ])/ 2 + (T[j+ 1 ]- T[j])/ 2 * exp (- w_wnom/ sigma);
972- Qw[j] = (Tw[j] - Tvol[j])* omega* l* gamma* Nt;
972+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* kc * gamma* Nt;
973973 end for ;
974974
975975 annotation (
@@ -1035,10 +1035,10 @@ The swapping is performed if the counterCurrent parameter is true (default value
10351035 equation
10361036 Hv* Qv = Hw* Qw "Energy balance on coarser grid" ;
10371037 if Nw > = Nv then
1038- Qw = omega* lw* gamma* (Tw - G* Tv)
1038+ Qw = omega* lw* kc * gamma* (Tw - G* Tv)
10391039 "Convective heat transfer on finer grid" ;
10401040 else
1041- Qv = omega* lv* gamma* (Tv - G* Tw)
1041+ Qv = omega* lv* kc * gamma* (Tv - G* Tw)
10421042 "Convective heat transfer on finer grid" ;
10431043 end if ;
10441044 for j in 1 :Nv loop
@@ -1104,7 +1104,7 @@ the global nominal thermal conductance UA is given instead of the nominal specif
11041104 if not useAverageTemperature then T[j+ 1 ]
11051105 else if not adaptiveAverageTemperature then (T[j] + T[j + 1 ])/ 2
11061106 else (T[j]+ T[j+ 1 ])/ 2 + (T[j+ 1 ]- T[j])/ 2 * exp (- w_wnom/ sigma);
1107- Qw[j] = (Tw[j] - Tvol[j])* gamma* omega* l* Nt;
1107+ Qw[j] = (Tw[j] - Tvol[j])* kc * gamma* omega* l* Nt;
11081108 end for ;
11091109 annotation (
11101110 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
@@ -1185,7 +1185,7 @@ the global nominal thermal conductance UAnom is given instead of the nominal spe
11851185 for j in 1 :Nw loop
11861186 Tvol[j] = if useAverageTemperature then (T[j] + T[j + 1 ])/ 2 else T[j + 1 ];
11871187 gamma_vol[j] = if useAverageTemperature then (gamma[j] + gamma[j+ 1 ])/ 2 else gamma[j+ 1 ];
1188- Qw[j] = (Tw[j] - Tvol[j])* omega* l* gamma_vol[j]* Nt;
1188+ Qw[j] = (Tw[j] - Tvol[j])* kc * omega* l* gamma_vol[j]* Nt;
11891189 end for ;
11901190 annotation (
11911191 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
@@ -1292,37 +1292,37 @@ the global nominal thermal conductance UAnom is given instead of the nominal spe
12921292
12931293 for j in 1 :Nw loop
12941294 if noEvent ((h[j] < hl and h[j + 1 ] < hl) or (h[j] > hv and h[j + 1 ]> hv)) then // 1-phase liquid or vapour
1295- Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* ((gamma1ph[j] + gamma1ph[j+ 1 ])/ 2 );
1295+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* ((gamma1ph[j] + gamma1ph[j+ 1 ])/ 2 )* kc ;
12961296 state[j] = 1 ;
12971297 alpha_l[j] = 0 ;
12981298 alpha_v[j] = 0 ;
12991299 elseif noEvent ((h[j] < hl and h[j + 1 ] > = hl and h[j + 1 ] < = hv)) then // liquid --> 2-phase
1300- Qw[j] = alpha_l[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* ((gamma1ph[j] + gamma_bubble)/ 2 ) +
1301- (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1300+ Qw[j] = ( alpha_l[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* ((gamma1ph[j] + gamma_bubble)/ 2 ) +
1301+ (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13021302 state[j] = 2 ;
13031303 alpha_l[j] = (hl - h[j])/ (h[j + 1 ] - h[j]);
13041304 alpha_v[j] = 0 ;
13051305 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > = hl and h[j + 1 ]< = hv) then // 2-phase
1306- Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1306+ Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma2ph* kc ;
13071307 state[j] = 3 ;
13081308 alpha_l[j] = 0 ;
13091309 alpha_v[j] = 0 ;
13101310 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > hv) then // 2-phase --> vapour
13111311 //Qw[j] = alpha_v[j]*(Tw[j] - (T[j + 1] + Ts)/2)*omega*l*(gamma1ph[j] + gamma1ph[j+1])/2 + (1 - alpha_v[j])*(Tw[j] - Ts)*omega*l*gamma2ph;
1312- Qw[j] = alpha_v[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_dew + gamma1ph[j+ 1 ])/ 2 +
1313- (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1312+ Qw[j] = ( alpha_v[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_dew + gamma1ph[j+ 1 ])/ 2 +
1313+ (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13141314 state[j] = 4 ;
13151315 alpha_l[j] = 0 ;
13161316 alpha_v[j] = (h[j + 1 ] - hv)/ (h[j + 1 ] - h[j]);
13171317 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] < hl) then // 2-phase --> liquid
1318- Qw[j] = alpha_l[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_bubble + gamma1ph[j+ 1 ])/ 2 +
1319- (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1318+ Qw[j] = ( alpha_l[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_bubble + gamma1ph[j+ 1 ])/ 2 +
1319+ (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13201320 state[j] = 5 ;
13211321 alpha_l[j] = (hl - h[j + 1 ])/ (h[j] - h[j + 1 ]);
13221322 alpha_v[j] = 0 ;
13231323 else // if noEvent(h[j] > hv and h[j + 1] <= hv and h[j + 1] >= hl) then // vapour --> 2-phase
1324- Qw[j] = alpha_v[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* (gamma1ph[j] + gamma_dew)/ 2 +
1325- (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1324+ Qw[j] = ( alpha_v[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* (gamma1ph[j] + gamma_dew)/ 2 +
1325+ (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13261326 state[j] = 6 ;
13271327 alpha_l[j] = 0 ;
13281328 alpha_v[j] = (h[j] - hv)/ (h[j] - h[j + 1 ]);
@@ -1407,41 +1407,41 @@ the global nominal thermal conductance UAnom is given instead of the nominal spe
14071407
14081408 for j in 1 :Nw loop
14091409 if noEvent (h[j] < hl and h[j + 1 ] < hl) then // liquid
1410- Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_liq;
1410+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_liq* kc ;
14111411 state[j] = 0 ;
14121412 alpha_l[j] = 1 ;
14131413 alpha_v[j] = 0 ;
14141414 elseif noEvent (h[j] > hv and h[j + 1 ]> hv) then // vapour
1415- Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_vap;
1415+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_vap* kc ;
14161416 state[j] = 1 ;
14171417 alpha_l[j] = 0 ;
14181418 alpha_v[j] = 1 ;
14191419 elseif noEvent ((h[j] < hl and h[j + 1 ] > = hl and h[j + 1 ] < = hv)) then // liquid --> 2-phase
1420- Qw[j] = alpha_l[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1421- (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1420+ Qw[j] = ( alpha_l[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1421+ (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14221422 state[j] = 2 ;
14231423 alpha_l[j] = (hl - h[j])/ (h[j + 1 ] - h[j]);
14241424 alpha_v[j] = 0 ;
14251425 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > = hl and h[j + 1 ]< = hv) then // 2-phase
1426- Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma_2ph;
1426+ Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma_2ph* kc ;
14271427 state[j] = 3 ;
14281428 alpha_l[j] = 0 ;
14291429 alpha_v[j] = 0 ;
14301430 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > hv) then // 2-phase --> vapour
1431- Qw[j] = alpha_v[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1432- (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1431+ Qw[j] = ( alpha_v[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1432+ (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14331433 state[j] = 4 ;
14341434 alpha_l[j] = 0 ;
14351435 alpha_v[j] = (h[j + 1 ] - hv)/ (h[j + 1 ] - h[j]);
14361436 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] < hl) then // 2-phase --> liquid
1437- Qw[j] = alpha_l[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1438- (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1437+ Qw[j] = ( alpha_l[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1438+ (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14391439 state[j] = 5 ;
14401440 alpha_l[j] = (hl - h[j + 1 ])/ (h[j] - h[j + 1 ]);
14411441 alpha_v[j] = 0 ;
14421442 else // if noEvent(h[j] > hv and h[j + 1] <= hv and h[j + 1] >= hl) then // vapour --> 2-phase
1443- Qw[j] = alpha_v[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1444- (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1443+ Qw[j] = ( alpha_v[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1444+ (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14451445 state[j] = 6 ;
14461446 alpha_l[j] = 0 ;
14471447 alpha_v[j] = (h[j] - hv)/ (h[j] - h[j + 1 ]);
@@ -2125,6 +2125,7 @@ This package contains models to compute the material properties needed to model
21252125 parameter SI.MassFlowRate wnom "Nominal mass flow rate (single tube)"
21262126 annotation(Dialog(enable=false, tab = "Set by Flow1D model" ));
21272127 final parameter SI.Length l= L/ (Nw) "Length of a single volume" ;
2128+ parameter Modelica.SIunits.PerUnit kc = 1 "Correction factor for heat transfer" ;
21282129
21292130 Medium.Temperature T[Nf] "Temperatures at the fluid side nodes" ;
21302131 Medium.Temperature Tw[Nw] "Temperatures of the wall volumes" ;
0 commit comments