1
1
within AixLib.ThermalZones.ReducedOrder.ThermalZone;
2
2
model ThermalZone "Thermal zone containing moisture balance"
3
- extends AixLib.ThermalZones.ReducedOrder.ThermalZone.BaseClasses.PartialThermalZone;
3
+ extends
4
+ AixLib.ThermalZones.ReducedOrder.ThermalZone.BaseClasses.PartialThermalZone;
4
5
5
6
replaceable model corG = SolarGain.CorrectionGDoublePane
6
7
constrainedby
@@ -234,13 +235,13 @@ model ThermalZone "Thermal zone containing moisture balance"
234
235
final quantity= "ThermodynamicTemperature" ,
235
236
final unit= "K" ,
236
237
displayUnit= "degC" ,
237
- min = 0 ) if (ATot > 0 or zoneParam.VAir > 0 ) and use_AirExchange
238
+ min = 0 ) if (ATot > 0 or zoneParam.VAir > 0 ) and use_MechanicalAirExchange
238
239
"Ventilation and infiltration temperature"
239
240
annotation (Placement(
240
241
transformation(extent={{-128,-60},{-88,-20}}), iconTransformation(
241
242
extent={{-106,-26},{-86,-6}})));
242
243
Modelica.Blocks.Interfaces.RealInput ventRate(final quantity= "VolumeFlowRate" ,
243
- final unit= "1/h" ) if (ATot > 0 or zoneParam.VAir > 0 ) and use_AirExchange
244
+ final unit= "1/h" ) if (ATot > 0 or zoneParam.VAir > 0 ) and use_MechanicalAirExchange
244
245
"Ventilation and infiltration rate"
245
246
annotation (
246
247
Placement(transformation(
@@ -253,10 +254,10 @@ model ThermalZone "Thermal zone containing moisture balance"
253
254
254
255
// Moisture
255
256
Modelica.Blocks.Math.MultiSum SumQLat1_flow(nu= 2 ) if (ATot > 0 or
256
- zoneParam.VAir > 0 ) and use_moisture_balance and not use_AirExchange
257
+ zoneParam.VAir > 0 ) and use_moisture_balance and not (use_NaturalAirExchange or use_MechanicalAirExchange)
257
258
annotation (Placement(transformation(extent={{-40,-68},{-28,-56}})));
258
259
Modelica.Blocks.Math.MultiSum SumQLat2_flow(nu= 3 ) if (ATot > 0 or
259
- zoneParam.VAir > 0 ) and use_moisture_balance and use_AirExchange
260
+ zoneParam.VAir > 0 ) and use_moisture_balance and (use_NaturalAirExchange or use_MechanicalAirExchange)
260
261
annotation (Placement(transformation(extent={{-40,-68},{-28,-56}})));
261
262
BoundaryConditions.InternalGains.Moisture.MoistureGains moistureGains(
262
263
final roomArea= zoneParam.AZone,
@@ -276,7 +277,7 @@ model ThermalZone "Thermal zone containing moisture balance"
276
277
Modelica.Blocks.Interfaces.RealInput ventHum(
277
278
final quantity= "MassFraction" ,
278
279
final unit= "kg/kg" ,
279
- min = 0 ) if (ATot > 0 or zoneParam.VAir > 0 ) and use_moisture_balance and use_AirExchange
280
+ min = 0 ) if (ATot > 0 or zoneParam.VAir > 0 ) and use_moisture_balance and use_MechanicalAirExchange
280
281
"Ventilation and infiltration humidity" annotation (Placement(
281
282
transformation(extent={{-128,-108},{-88,-68}}), iconTransformation(
282
283
extent={{-106,-82},{-84,-60}})));
@@ -369,16 +370,16 @@ protected
369
370
"Combines infiltration and ventilation"
370
371
annotation (Placement(
371
372
transformation(
372
- extent={{-6,-6 },{6,6 }},
373
+ extent={{-5,-5 },{5,5 }},
373
374
rotation=0,
374
- origin={-34,-28 })));
375
+ origin={-35,-27 })));
375
376
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature preTemVen if (ATot >
376
- 0 or zoneParam.VAir > 0 ) and (use_MechanicalAirExchange or use_AirExchange )
377
+ 0 or zoneParam.VAir > 0 ) and (use_MechanicalAirExchange or use_NaturalAirExchange )
377
378
"Prescribed temperature for ventilation"
378
379
annotation (Placement(transformation(
379
- extent={{-4,-4 },{4,4 }},
380
+ extent={{-3,-3 },{3,3 }},
380
381
rotation=0,
381
- origin={-36,0 })));
382
+ origin={-35,1 })));
382
383
383
384
// protected: MoistAir
384
385
Modelica.Blocks.Sources.RealExpression humVolAirROM(y= ROM.volMoiAir.X_w) if
@@ -400,8 +401,7 @@ public
400
401
"Mixes humidity of infiltration flow and mechanical ventilation flow"
401
402
annotation (Placement(transformation(extent={{-56,-10},{-48,-2}})));
402
403
Utilities.Psychrometrics.X_pTphi x_pTphi if (ATot > 0 or zoneParam.VAir > 0 )
403
- and use_NaturalAirExchange and use_MechanicalAirExchange and
404
- use_moisture_balance
404
+ and use_NaturalAirExchange and use_moisture_balance
405
405
annotation (Placement(transformation(extent={{-70,-12},{-64,-6}})));
406
406
equation
407
407
connect (intGains[2 ], machinesSenHea.uRel) annotation (Line(points={{80,-100},{
@@ -562,9 +562,6 @@ equation
562
562
connect (heaterCoolerController.coolerActive, heaterCooler.coolerActive)
563
563
annotation (Line(points={{76.38,16.4},{76.38,16},{66,16},{66,26},{65.3,26},{
564
564
65.3,28.8}}, color={255,0,255}));
565
- connect (TSetHeat, heaterCooler.setPointHeat) annotation (Line(points={{-108,-16},
566
- {-86,-16},{-86,6},{74,6},{74,18},{75.42,18},{75.42,28.8}}, color={0,0,
567
- 127}));
568
565
connect (TSetCool, heaterCooler.setPointCool) annotation (Line(points={{-108,8},
569
566
{70,8},{70,16},{70.36,16},{70.36,28.8}}, color={0,0,127}));
570
567
connect (heaterCooler.coolingPower, PCooler) annotation (Line(points={{84,35.4},
@@ -594,14 +591,14 @@ equation
594
591
47.24},{9.94,52},{26,52},{26,89},{37,89}}, color={0,0,127}));
595
592
596
593
connect (ventCont.y, addInfVen.u1) annotation (Line(
597
- points={{-49,-24},{-41.2 ,-24},{-41.2,-24.4 }},
594
+ points={{-49,-24},{-41,-24}},
598
595
color={0,0,127},
599
596
smooth=Smooth.None));
600
597
connect (intGains[1 ], ventCont.relOccupation) annotation (Line(points={{80,
601
598
-113.333},{80,-92},{46,-92},{46,-36},{-68,-36},{-68,-30}}, color=
602
599
{0,0,127}));
603
600
connect (ventRate, addInfVen.u2) annotation (Line(points={{-108,-64},{-76,-64},
604
- {-76,-34},{-44,-34},{-44,-31.6 },{-41.2,-31.6 }},
601
+ {-76,-34},{-44,-34},{-44,-30 },{-41,-30 }},
605
602
color={0,0,127}));
606
603
connect (ventRate, mixedTemp.flowRate_flow1) annotation (Line(points={{-108,-64},
607
604
{-76,-64},{-76,3.2},{-55.84,3.2}}, color={0,0,127}));
@@ -611,13 +608,10 @@ equation
611
608
0},{-2,0},{-2,-14},{-72,-14},{-72,-18},{-68,-18}}, color={0,0,
612
609
127}));
613
610
connect (preTemVen.port, airExc.port_a)
614
- annotation (Line(points={{-32,0 },{-26,0 },{-26,-4},{-22,-4}},
611
+ annotation (Line(points={{-32,1 },{-26,1 },{-26,-4},{-22,-4}},
615
612
color={191,0,0}));
616
- connect (mixedTemp.mixedTemperatureOut, preTemVen.T)
617
- annotation (Line(points={{-48,2},{-44,2},{-44,0},{-40.8,0}},
618
- color={0,0,127}));
619
- connect (addInfVen.y, airExc.ventRate) annotation (Line(points={{-27.4,-28},{
620
- -24,-28},{-24,-10},{-21.2,-10},{-21.2,-9.12}}, color={0,0,
613
+ connect (addInfVen.y, airExc.ventRate) annotation (Line(points={{-29.5,-27},{
614
+ -24,-27},{-24,-10},{-21.2,-10},{-21.2,-9.12}}, color={0,0,
621
615
127}));
622
616
connect (airExc.port_b, ROM.intGainsConv) annotation (Line(points={{-6,-4},{44,
623
617
-4},{44,-2},{92,-2},{92,78},{86,78}},color={191,0,0}));
@@ -650,9 +644,9 @@ equation
650
644
end if ;
651
645
652
646
653
- if not use_MechnicalAirExchange then
647
+ if not use_MechanicalAirExchange then
654
648
connect (weaBus.TDryBul, preTemVen.T) annotation (Line(
655
- points={{-100,34},{-86,34},{-86,10},{-42,10},{-42,0 },{-40.8,0 }},
649
+ points={{-100,34},{-86,34},{-86,10},{-42,10},{-42,1 },{-38.6,1 }},
656
650
color={255,204,51},
657
651
thickness=0.5,
658
652
pattern=LinePattern.Dash), Text(
@@ -673,8 +667,11 @@ if not use_MechnicalAirExchange then
673
667
color={0,0,127},
674
668
pattern=LinePattern.Dash));
675
669
if use_moisture_balance then
670
+ connect (x_pTphi.X[1 ], airExcMoi.HumIn) annotation (Line(
671
+ points={{-63.7,-9},{-62,-9},{-62,-10},{-34,-10},{-34,-8},{-21.2,-8}},
672
+ color={0,0,127},
673
+ pattern=LinePattern.Dash));
676
674
end if ;
677
-
678
675
elseif not use_NaturalAirExchange then
679
676
connect (ventRate, cO2Balance.airExc) annotation (Line(
680
677
points={{-108,-64},{-74,-64},{-74,-34},{12,-34},{12,-64.9},{20,-64.9}},
@@ -688,16 +685,31 @@ if not use_MechnicalAirExchange then
688
685
points={{-108,-64},{-74,-64},{-74,-34},{-24,-34},{-24,-9.12},{-21.2,-9.12}},
689
686
color={0,0,127},
690
687
pattern=LinePattern.Dash));
688
+ connect (ventTemp, preTemVen.T) annotation (Line(
689
+ points={{-108,-40},{-78,-40},{-78,6},{-44,6},{-44,1},{-38.6,1}},
690
+ color={0,0,127},
691
+ pattern=LinePattern.Dash));
692
+ if use_moisture_balance then
693
+ connect (ventHum, airExcMoi.HumIn) annotation (Line(
694
+ points={{-108,-88},{-74,-88},{-74,-2},{-46,-2},{-46,-4},{-30,-4},{-30,-8},
695
+ {-21.2,-8}},
696
+ color={0,0,127},
697
+ pattern=LinePattern.Dash));
698
+ end if ;
691
699
else
692
- connect (addInfVen.y, cO2Balance.airExc) annotation (Line(points={{-27.4,-28} ,
693
- {-24,-28 },{-24,-34},{12,-34},{12,-64.9},{20,-64.9}},
700
+ connect (addInfVen.y, cO2Balance.airExc) annotation (Line(points={{-29.5 ,
701
+ -27}, {-24,-27 },{-24,-34},{12,-34},{12,-64.9},{20,-64.9}},
694
702
color={0,0,127}));
695
- connect (addInfVen.y, airExc.ventRate) annotation (Line(points={{-27.4,-28},
696
- {-24,-28},{-24,-9.12},{-21.2,-9.12}}, color={0,0,127}));
697
- connect (addInfVen.y, airExcMoi.ventRate) annotation (Line(points={{-27.4,-28},
698
- {-24,-28},{-24,-9.12},{-21.2,-9.12}}, color={0,0,127}));
703
+ connect (addInfVen.y, airExc.ventRate) annotation (Line(points={{-29.5,-27},
704
+ {-24,-27},{-24,-9.12},{-21.2,-9.12}}, color={0,0,127}));
705
+ connect (addInfVen.y, airExcMoi.ventRate) annotation (Line(points={{-29.5,
706
+ -27},{-24,-27},{-24,-9.12},{-21.2,-9.12}},
707
+ color={0,0,127}));
708
+ connect (mixedTemp.mixedTemperatureOut, preTemVen.T) annotation (Line(points={{-48,2},
709
+ {-44,2},{-44,1},{-38.6,1}}, color={0,0,127}));
699
710
end if ;
700
711
712
+
701
713
connect (moistureGains.QLat_flow, SumQLat1_flow.u[2 ]) annotation (Line(points={{-59.5,
702
714
-73},{-52,-73},{-52,-74},{-46,-74},{-46,-64.1},{-40,-64.1}}, color=
703
715
{0,0,127}));
@@ -711,8 +723,8 @@ end if;
711
723
connect (humVolAirROM.y, X_w) annotation (Line(points={{-59.5,-50},{4,-50},{4,
712
724
-6},{96,-6},{96,-70},{110,-70}},
713
725
color={0,0,127}));
714
- connect (addInfVen.y, cO2Balance.airExc) annotation (Line(points={{-27.4,-28},{
715
- -24,-28 },{-24,-40},{12,-40},{12,-64.9},{20,-64.9}},
726
+ connect (addInfVen.y, cO2Balance.airExc) annotation (Line(points={{-29.5,-27},
727
+ { -24,-27 },{-24,-40},{12,-40},{12,-64.9},{20,-64.9}},
716
728
color={0,0,127}));
717
729
connect (cO2Balance.uRel, intGains[1 ]) annotation (Line(points={{20,-61.4},{20,
718
730
-50},{46,-50},{46,-113.333},{80,-113.333}}, color={0,0,127}));
@@ -726,12 +738,10 @@ end if;
726
738
{10.9,-67}}, color={0,0,127}));
727
739
connect (ROM.C_flow[1 ], cO2Balance.mCO2_flow) annotation (Line(points={{37,84},
728
740
{34,84},{34,-6},{50,-6},{50,-62.8},{34.7,-62.8}}, color={0,0,127}));
729
-
730
- connect (airExcMoi.port_a, preTemVen.port)
731
- annotation (Line(points={{-22,-4},{-26,-4},{-26,0},{-32,0}},
732
- color={191,0,0}));
741
+ connect (airExcMoi.port_a, preTemVen.port) annotation (Line(points={{-22,-4},
742
+ {-26,-4},{-26,1},{-32,1}}, color={191,0,0}));
733
743
connect (airExcMoi.ventRate, addInfVen.y) annotation (Line(points={{-21.2,
734
- -9.12},{-24,-9.12},{-24,-28 },{-27.4,-28 }}, color={0,0,127}));
744
+ -9.12},{-24,-9.12},{-24,-27 },{-29.5,-27 }}, color={0,0,127}));
735
745
connect (airExcMoi.port_b, ROM.intGainsConv) annotation (Line(points={{-6,-4},
736
746
{58,-4},{58,78},{86,78}}, color={191,0,0}));
737
747
connect (airExcMoi.QLat_flow, SumQLat2_flow.u[3 ]) annotation (Line(points={{
@@ -774,12 +784,11 @@ end if;
774
784
index=-1,
775
785
extent={{-6,3},{-6,3}},
776
786
horizontalAlignment=TextAlignment.Right));
777
- connect (x_pTphi.X[1 ], airExcMoi.HumIn) annotation (Line(
778
- points={{-63.7,-9},{-62,-9},{-62,-10},{-34,-10},{-34,-8},{-21.2,-8}},
779
- color={0,0,127},
780
- pattern=LinePattern.Dash));
781
787
connect (mixedHumidity.mixedHumidityOut, airExcMoi.HumIn) annotation (Line(
782
788
points={{-48,-6},{-34,-6},{-34,-8},{-21.2,-8}}, color={0,0,127}));
789
+ connect (TSetHeat, heaterCooler.setPointHeat) annotation (Line(points={{-108,-16},
790
+ {-86,-16},{-86,6},{74,6},{74,18},{75.42,18},{75.42,28.8}}, color={0,0,
791
+ 127}));
783
792
annotation (Documentation(revisions="<html><ul>
784
793
<li>November 20, 2020, by Katharina Breuer:<br/>
785
794
Combine thermal zone models
0 commit comments