@@ -959,7 +959,7 @@ The swapping is performed if the counterCurrent parameter is true (default value
959959 if not useAverageTemperature then T[j+ 1 ]
960960 else if not adaptiveAverageTemperature then (T[j] + T[j + 1 ])/ 2
961961 else (T[j]+ T[j+ 1 ])/ 2 + (T[j+ 1 ]- T[j])/ 2 * exp (- w_wnom/ sigma);
962- Qw[j] = (Tw[j] - Tvol[j])* omega* l* gamma* Nt;
962+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* kc * gamma* Nt;
963963 end for ;
964964
965965 annotation (
@@ -1025,10 +1025,10 @@ The swapping is performed if the counterCurrent parameter is true (default value
10251025 equation
10261026 Hv* Qv = Hw* Qw "Energy balance on coarser grid" ;
10271027 if Nw > = Nv then
1028- Qw = omega* lw* gamma* (Tw - G* Tv)
1028+ Qw = omega* lw* kc * gamma* (Tw - G* Tv)
10291029 "Convective heat transfer on finer grid" ;
10301030 else
1031- Qv = omega* lv* gamma* (Tv - G* Tw)
1031+ Qv = omega* lv* kc * gamma* (Tv - G* Tw)
10321032 "Convective heat transfer on finer grid" ;
10331033 end if ;
10341034 for j in 1 :Nv loop
@@ -1094,7 +1094,7 @@ the global nominal thermal conductance UA is given instead of the nominal specif
10941094 if not useAverageTemperature then T[j+ 1 ]
10951095 else if not adaptiveAverageTemperature then (T[j] + T[j + 1 ])/ 2
10961096 else (T[j]+ T[j+ 1 ])/ 2 + (T[j+ 1 ]- T[j])/ 2 * exp (- w_wnom/ sigma);
1097- Qw[j] = (Tw[j] - Tvol[j])* gamma* omega* l* Nt;
1097+ Qw[j] = (Tw[j] - Tvol[j])* kc * gamma* omega* l* Nt;
10981098 end for ;
10991099 annotation (
11001100 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
@@ -1175,7 +1175,7 @@ the global nominal thermal conductance UAnom is given instead of the nominal spe
11751175 for j in 1 :Nw loop
11761176 Tvol[j] = if useAverageTemperature then (T[j] + T[j + 1 ])/ 2 else T[j + 1 ];
11771177 gamma_vol[j] = if useAverageTemperature then (gamma[j] + gamma[j+ 1 ])/ 2 else gamma[j+ 1 ];
1178- Qw[j] = (Tw[j] - Tvol[j])* omega* l* gamma_vol[j]* Nt;
1178+ Qw[j] = (Tw[j] - Tvol[j])* kc * omega* l* gamma_vol[j]* Nt;
11791179 end for ;
11801180 annotation (
11811181 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
@@ -1282,37 +1282,37 @@ the global nominal thermal conductance UAnom is given instead of the nominal spe
12821282
12831283 for j in 1 :Nw loop
12841284 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
1285- Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* ((gamma1ph[j] + gamma1ph[j+ 1 ])/ 2 );
1285+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* ((gamma1ph[j] + gamma1ph[j+ 1 ])/ 2 )* kc ;
12861286 state[j] = 1 ;
12871287 alpha_l[j] = 0 ;
12881288 alpha_v[j] = 0 ;
12891289 elseif noEvent ((h[j] < hl and h[j + 1 ] > = hl and h[j + 1 ] < = hv)) then // liquid --> 2-phase
1290- Qw[j] = alpha_l[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* ((gamma1ph[j] + gamma_bubble)/ 2 ) +
1291- (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1290+ Qw[j] = ( alpha_l[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* ((gamma1ph[j] + gamma_bubble)/ 2 ) +
1291+ (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
12921292 state[j] = 2 ;
12931293 alpha_l[j] = (hl - h[j])/ (h[j + 1 ] - h[j]);
12941294 alpha_v[j] = 0 ;
12951295 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > = hl and h[j + 1 ]< = hv) then // 2-phase
1296- Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1296+ Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma2ph* kc ;
12971297 state[j] = 3 ;
12981298 alpha_l[j] = 0 ;
12991299 alpha_v[j] = 0 ;
13001300 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > hv) then // 2-phase --> vapour
13011301 //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;
1302- Qw[j] = alpha_v[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_dew + gamma1ph[j+ 1 ])/ 2 +
1303- (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1302+ Qw[j] = ( alpha_v[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_dew + gamma1ph[j+ 1 ])/ 2 +
1303+ (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13041304 state[j] = 4 ;
13051305 alpha_l[j] = 0 ;
13061306 alpha_v[j] = (h[j + 1 ] - hv)/ (h[j + 1 ] - h[j]);
13071307 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] < hl) then // 2-phase --> liquid
1308- Qw[j] = alpha_l[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_bubble + gamma1ph[j+ 1 ])/ 2 +
1309- (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1308+ Qw[j] = ( alpha_l[j]* (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* (gamma_bubble + gamma1ph[j+ 1 ])/ 2 +
1309+ (1 - alpha_l[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13101310 state[j] = 5 ;
13111311 alpha_l[j] = (hl - h[j + 1 ])/ (h[j] - h[j + 1 ]);
13121312 alpha_v[j] = 0 ;
13131313 else // if noEvent(h[j] > hv and h[j + 1] <= hv and h[j + 1] >= hl) then // vapour --> 2-phase
1314- Qw[j] = alpha_v[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* (gamma1ph[j] + gamma_dew)/ 2 +
1315- (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph;
1314+ Qw[j] = ( alpha_v[j]* (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* (gamma1ph[j] + gamma_dew)/ 2 +
1315+ (1 - alpha_v[j])* (Tw[j] - Ts)* omega* l* Nt* gamma2ph) * kc ;
13161316 state[j] = 6 ;
13171317 alpha_l[j] = 0 ;
13181318 alpha_v[j] = (h[j] - hv)/ (h[j] - h[j + 1 ]);
@@ -1397,41 +1397,41 @@ the global nominal thermal conductance UAnom is given instead of the nominal spe
13971397
13981398 for j in 1 :Nw loop
13991399 if noEvent (h[j] < hl and h[j + 1 ] < hl) then // liquid
1400- Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_liq;
1400+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_liq* kc ;
14011401 state[j] = 0 ;
14021402 alpha_l[j] = 1 ;
14031403 alpha_v[j] = 0 ;
14041404 elseif noEvent (h[j] > hv and h[j + 1 ]> hv) then // vapour
1405- Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_vap;
1405+ Qw[j] = (Tw[j] - Tvol[j])* omega* l* Nt* gamma_vap* kc ;
14061406 state[j] = 1 ;
14071407 alpha_l[j] = 0 ;
14081408 alpha_v[j] = 1 ;
14091409 elseif noEvent ((h[j] < hl and h[j + 1 ] > = hl and h[j + 1 ] < = hv)) then // liquid --> 2-phase
1410- Qw[j] = alpha_l[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1411- (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1410+ Qw[j] = ( alpha_l[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1411+ (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14121412 state[j] = 2 ;
14131413 alpha_l[j] = (hl - h[j])/ (h[j + 1 ] - h[j]);
14141414 alpha_v[j] = 0 ;
14151415 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > = hl and h[j + 1 ]< = hv) then // 2-phase
1416- Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma_2ph;
1416+ Qw[j] = (Tw[j] - Ts)* omega* l* Nt* gamma_2ph* kc ;
14171417 state[j] = 3 ;
14181418 alpha_l[j] = 0 ;
14191419 alpha_v[j] = 0 ;
14201420 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] > hv) then // 2-phase --> vapour
1421- Qw[j] = alpha_v[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1422- (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1421+ Qw[j] = ( alpha_v[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1422+ (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14231423 state[j] = 4 ;
14241424 alpha_l[j] = 0 ;
14251425 alpha_v[j] = (h[j + 1 ] - hv)/ (h[j + 1 ] - h[j]);
14261426 elseif noEvent (h[j] > = hl and h[j] < = hv and h[j + 1 ] < hl) then // 2-phase --> liquid
1427- Qw[j] = alpha_l[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1428- (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1427+ Qw[j] = ( alpha_l[j] * (Tw[j] - (T[j + 1 ] + Ts)/ 2 )* omega* l* Nt* gamma_liq +
1428+ (1 - alpha_l[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14291429 state[j] = 5 ;
14301430 alpha_l[j] = (hl - h[j + 1 ])/ (h[j] - h[j + 1 ]);
14311431 alpha_v[j] = 0 ;
14321432 else // if noEvent(h[j] > hv and h[j + 1] <= hv and h[j + 1] >= hl) then // vapour --> 2-phase
1433- Qw[j] = alpha_v[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1434- (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph;
1433+ Qw[j] = ( alpha_v[j] * (Tw[j] - (T[j] + Ts)/ 2 )* omega* l* Nt* gamma_vap +
1434+ (1 - alpha_v[j])* (Tw[j] - Ts) * omega* l* Nt* gamma_2ph) * kc ;
14351435 state[j] = 6 ;
14361436 alpha_l[j] = 0 ;
14371437 alpha_v[j] = (h[j] - hv)/ (h[j] - h[j + 1 ]);
@@ -2115,6 +2115,7 @@ This package contains models to compute the material properties needed to model
21152115 parameter SI.MassFlowRate wnom "Nominal mass flow rate (single tube)"
21162116 annotation(Dialog(enable=false, tab = "Set by Flow1D model" ));
21172117 final parameter SI.Length l= L/ (Nw) "Length of a single volume" ;
2118+ parameter Modelica.SIunits.PerUnit kc = 1 "Correction factor for heat transfer" ;
21182119
21192120 Medium.Temperature T[Nf] "Temperatures at the fluid side nodes" ;
21202121 Medium.Temperature Tw[Nw] "Temperatures of the wall volumes" ;
0 commit comments