@@ -62,10 +62,10 @@ protected
6262 annotation (Placement(transformation(extent={{110,30},{130,50}})));
6363 Buildings.Fluid.CHPs.BaseClasses.EnergyConversionNormal opeModBas(final per=
6464 per) "Typical energy conversion mode"
65- annotation (Placement(transformation(extent={{-20,-10 },{0,10 }})));
65+ annotation (Placement(transformation(extent={{-20,-40 },{0,-20 }})));
6666 Buildings.Fluid.CHPs.BaseClasses.EnergyConversionWarmUp opeModWarUpEngTem(
6767 final per= per) if not per.warmUpByTimeDelay "Warm-up by engine temperature"
68- annotation (Placement(transformation(extent={{-20,-60 },{0,-40 }})));
68+ annotation (Placement(transformation(extent={{-20,-80 },{0,-60 }})));
6969 Buildings.Controls.OBC.CDL.Reals.Sources.Constant const(final k= 0 )
7070 "Zero constant"
7171 annotation (Placement(transformation(extent={{-100,60},{-80,80}})));
@@ -79,7 +79,7 @@ protected
7979 annotation (Placement(transformation(extent={{-100,90},{-80,110}})));
8080 Buildings.Controls.OBC.CDL.Reals.Switch switch2
8181 "Switch between warm-up and normal value"
82- annotation (Placement(transformation(extent={{80,70 },{100,90 }})));
82+ annotation (Placement(transformation(extent={{80,82 },{100,102 }})));
8383 Buildings.Controls.OBC.CDL.Reals.Switch switch3
8484 "Switch between warm-up and normal value"
8585 annotation (Placement(transformation(extent={{80,10},{100,30}})));
@@ -92,34 +92,45 @@ protected
9292 Buildings.Controls.OBC.CDL.Reals.Sources.Constant PEleTimeDel(final k= 0 )
9393 if per.warmUpByTimeDelay
9494 "Zero power output in case of warm-up by time delay"
95- annotation (Placement(transformation(extent={{-20,90 },{0,110 }})));
95+ annotation (Placement(transformation(extent={{-20,110 },{0,130 }})));
9696 Buildings.Controls.OBC.CDL.Logical.Sources.Constant delWarUp(
9797 final k= per.warmUpByTimeDelay) "Warm-up by time delay"
98- annotation (Placement(transformation(extent={{-100,-120 },{-80,-100 }})));
98+ annotation (Placement(transformation(extent={{-100,-130 },{-80,-110 }})));
9999 Modelica.Blocks.Sources.BooleanExpression wamUpMod(
100100 final y= opeMod == CHPs.BaseClasses.Types.Mode.WarmUp)
101101 "Check whether warm-up mode is active"
102102 annotation (Placement(transformation(extent={{-100,30},{-80,50}})));
103103 Buildings.Controls.OBC.CDL.Logical.Not engTemWarUp
104104 "Warm-up based on engine temperature"
105- annotation (Placement(transformation(extent={{-60,-120 },{-40,-100 }})));
105+ annotation (Placement(transformation(extent={{-60,-130 },{-40,-110 }})));
106106 Buildings.Controls.OBC.CDL.Logical.And and1
107107 "True if warm-up mode and warm-up based on engine temperature"
108- annotation (Placement(transformation(extent={{-20,-90},{0,-70}})));
109- Buildings.Controls.OBC.CDL.Reals.Sources.Constant dumTimDel(
110- final k= 0 ) if per.warmUpByTimeDelay
111- "Set dummy value in case of warm-up by time delay"
112- annotation (Placement(transformation(extent={{-20,30},{0,50}})));
108+ annotation (Placement(transformation(extent={{-20,-122},{0,-102}})));
109+ Buildings.Controls.OBC.CDL.Reals.Sources.Constant dumTimDelFue(
110+ final k= 0 ,
111+ y(unit= "kg/s" ))
112+ if per.warmUpByTimeDelay "Set dummy value in case of warm-up by time delay"
113+ annotation (Placement(transformation(extent={{-20,52},{0,72}})));
114+ Controls.OBC.CDL.Reals.Sources.Constant dumTimDelAir(
115+ final k= 0 ,
116+ y(unit= "kg/s" ))
117+ if per.warmUpByTimeDelay "Set dummy value in case of warm-up by time delay"
118+ annotation (Placement(transformation(extent={{-20,20},{0,40}})));
119+ Controls.OBC.CDL.Reals.Sources.Constant dumTimDelGen(
120+ final k= 0 ,
121+ y(unit= "W" ))
122+ if per.warmUpByTimeDelay "Set dummy value in case of warm-up by time delay"
123+ annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
113124
114125equation
115- connect (opeModBas.mWat_flow, mWat_flow) annotation (Line(points={{-22,0 },{-120 ,
116- 0 },{-120 ,20},{-160,20}}, color={0,0,127}));
117- connect (opeModBas.TWatIn, TWatIn) annotation (Line(points={{-22,-6 },{-100,-6 },
126+ connect (opeModBas.mWat_flow, mWat_flow) annotation (Line(points={{-22,-30 },{-110 ,
127+ -30 },{-110 ,20},{-160,20}}, color={0,0,127}));
128+ connect (opeModBas.TWatIn, TWatIn) annotation (Line(points={{-22,-36 },{-100,-36 },
118129 {-100,-20},{-160,-20}},color={0,0,127}));
119- connect (opeModWarUpEngTem.TEng, TEng) annotation (Line(points={{-22,-58 },{-110,
120- -58 },{-110,-90},{-160,-90}}, color={0,0,127}));
121- connect (opeModWarUpEngTem.TWatIn, TWatIn) annotation (Line(points={{-22,-47 },{
122- -100,-47 },{-100,-20},{-160,-20}},
130+ connect (opeModWarUpEngTem.TEng, TEng) annotation (Line(points={{-22,-78 },{-110,
131+ -78 },{-110,-90},{-160,-90}}, color={0,0,127}));
132+ connect (opeModWarUpEngTem.TWatIn, TWatIn) annotation (Line(points={{-22,-67 },{
133+ -100,-67 },{-100,-20},{-160,-20}},
123134 color={0,0,127}));
124135 connect (const.y, switch.u3) annotation (Line(points={{-78,70},{-70,70},{-70,
125136 92},{-62,92}},
@@ -130,62 +141,65 @@ equation
130141 connect (booExp.y, switch.u2) annotation (Line(points={{-79,100},{-62,100}},
131142 color={255,0,255}));
132143 connect (switch.y, opeModBas.PEle) annotation (Line(points={{-38,100},{-30,100},
133- {-30,6},{-22,6}}, color={0,0,127}));
134- connect (opeModWarUpEngTem.PEleNet, switch2.u1) annotation (Line(points={{2,-42},
135- {20,-42},{20,88},{78,88}}, color={0,0,127}));
136- connect (switch2.y, PEleNet) annotation (Line(points={{102,80},{160,80}},
144+ {-30,-24},{-22,-24}},
145+ color={0,0,127}));
146+ connect (opeModWarUpEngTem.PEleNet, switch2.u1) annotation (Line(points={{2,-62},
147+ {20,-62},{20,100},{78,100}},
148+ color={0,0,127}));
149+ connect (switch2.y, PEleNet) annotation (Line(points={{102,92},{120,92},{120,80},
150+ {160,80}},
137151 color={0,0,127}));
138152 connect (switch3.y, mFue_flow) annotation (Line(points={{102,20},{160,20}},
139153 color={0,0,127}));
140154 connect (switch4.y, mAir_flow) annotation (Line(points={{102,-40},{160,-40}},
141155 color={0,0,127}));
142156 connect (switch5.y, QGen_flow)
143157 annotation (Line(points={{102,-100},{160,-100}}, color={0,0,127}));
144- connect (opeModBas.mFue_flow, switch3.u3) annotation (Line(points={{2,6 },{60,6} ,
145- {60,12},{78,12}}, color={0,0,127}));
146- connect (opeModWarUpEngTem.mFue_flow, switch3.u1) annotation (Line(points={{2,-47 },
147- {26,-47 },{26,28},{78,28}}, color={0,0,127}));
148- connect (opeModBas.mAir_flow, switch4.u3) annotation (Line(points={{2,0 },{60,0} ,
149- {60,-48},{78,-48}}, color={0,0,127}));
150- connect (opeModWarUpEngTem.mAir_flow, switch4.u1) annotation (Line(points={{2,-53 },
151- {40,-53 },{40,-32},{78,-32}}, color={0,0,127}));
152- connect (opeModWarUpEngTem.QGen_flow, switch5.u1) annotation (Line(points={{2,-58 },
153- {32,-58 },{32,-92},{78,-92}}, color={0,0,127}));
154- connect (opeModBas.QGen_flow, switch5.u3) annotation (Line(points={{2.2,-6 },{54,
155- -6 },{54,-108},{78,-108}}, color={0,0,127}));
158+ connect (opeModBas.mFue_flow, switch3.u3) annotation (Line(points={{2,-24 },{60,
159+ -24}, {60,12},{78,12}},color={0,0,127}));
160+ connect (opeModWarUpEngTem.mFue_flow, switch3.u1) annotation (Line(points={{2,-67 },
161+ {26,-67 },{26,28},{78,28}}, color={0,0,127}));
162+ connect (opeModBas.mAir_flow, switch4.u3) annotation (Line(points={{2,-30 },{60,
163+ -30}, {60,-48},{78,-48}}, color={0,0,127}));
164+ connect (opeModWarUpEngTem.mAir_flow, switch4.u1) annotation (Line(points={{2,-73 },
165+ {40,-73 },{40,-32},{78,-32}}, color={0,0,127}));
166+ connect (opeModWarUpEngTem.QGen_flow, switch5.u1) annotation (Line(points={{2,-78 },
167+ {32,-78 },{32,-92},{78,-92}}, color={0,0,127}));
168+ connect (opeModBas.QGen_flow, switch5.u3) annotation (Line(points={{2.2,-36 },{54,
169+ -36 },{54,-108},{78,-108}}, color={0,0,127}));
156170 connect (mWat_flow, opeModWarUpEngTem.mWat_flow) annotation (Line(points={{-160,20},
157- {-120 ,20},{-120,-42 },{-22,-42 }}, color={0,0,127}));
171+ {-110 ,20},{-110,-62 },{-22,-62 }}, color={0,0,127}));
158172 connect (switch3.y, assFue.mFue_flow) annotation (Line(points={{102,20},{104,20},
159173 {104,40},{108,40}}, color={0,0,127}));
160- connect (PEleTimeDel.y, switch2.u1) annotation (Line(points={{2,100},{60,100},{
161- 60,88},{78,88}}, color={0,0,127}));
174+ connect (PEleTimeDel.y, switch2.u1) annotation (Line(points={{2,120},{60,120},{
175+ 60,100},{78,100}},
176+ color={0,0,127}));
162177 connect (switch.y, switch2.u3) annotation (Line(points={{-38,100},{-30,100},{-30,
163- 72 },{78,72 }}, color={0,0,127}));
178+ 84 },{78,84 }}, color={0,0,127}));
164179 connect (TRoo, opeModWarUpEngTem.TRoo) annotation (Line(points={{-160,-60},{-120,
165- -60},{-120,-53 },{-22,-53 }}, color={0,0,127}));
180+ -60},{-120,-73 },{-22,-73 }}, color={0,0,127}));
166181 connect (delWarUp.y, engTemWarUp.u)
167- annotation (Line(points={{-78,-110 },{-62,-110 }}, color={255,0,255}));
168- connect (engTemWarUp.y, and1.u2) annotation (Line(points={{-38,-110 },{-30,-110 },
169- {-30,-88},{-22,-88}}, color={255,0,255}));
170- connect (wamUpMod.y, and1.u1) annotation (Line(points={{-79,40},{-60,40},{-60,
171- -80 },{-22,-80 }},
182+ annotation (Line(points={{-78,-120 },{-62,-120 }}, color={255,0,255}));
183+ connect (engTemWarUp.y, and1.u2) annotation (Line(points={{-38,-120 },{-22,-120} },
184+ color={255,0,255}));
185+ connect (wamUpMod.y, and1.u1) annotation (Line(points={{-79,40},{-60,40},{-60,-100},
186+ {-30,-100 },{-30,-112},{- 22,-112 }},
172187 color={255,0,255}));
173- connect (and1.y, switch3.u2) annotation (Line(points={{2,-80 },{70,-80 },{70,20},
188+ connect (and1.y, switch3.u2) annotation (Line(points={{2,-112 },{70,-112 },{70,20},
174189 {78,20}}, color={255,0,255}));
175- connect (and1.y, switch4.u2) annotation (Line(points={{2,-80 },{70,-80 },{70,-40},
190+ connect (and1.y, switch4.u2) annotation (Line(points={{2,-112 },{70,-112 },{70,-40},
176191 {78,-40}}, color={255,0,255}));
177- connect (and1.y, switch5.u2) annotation (Line(points={{2,-80 },{70,-80 },{70,-100},
192+ connect (and1.y, switch5.u2) annotation (Line(points={{2,-112 },{70,-112 },{70,-100},
178193 {78,-100}}, color={255,0,255}));
179- connect (wamUpMod.y, switch2.u2) annotation (Line(points={{-79,40},{-60,40},{
180- -60,80},{78,80}},
181- color={255,0,255}));
182- connect (dumTimDel.y, switch3.u1) annotation (Line(points={{2,40},{26,40},{26,28},
183- {78,28}}, color={0,0,127}));
184- connect (dumTimDel.y, switch4.u1) annotation (Line(points={{2,40},{40,40},{40,-32},
185- {78,-32}}, color={0,0,127}));
186- connect (dumTimDel.y, switch5.u1) annotation (Line(points={{2,40},{32,40},{32,-92},
187- {78,-92}}, color={0,0,127}));
194+ connect (wamUpMod.y, switch2.u2) annotation (Line(points={{-79,40},{-60,40},{-60,
195+ 92},{78,92}}, color={255,0,255}));
196+ connect (dumTimDelFue.y, switch3.u1) annotation (Line(points={{2,62},{26,62},{26,
197+ 28},{78,28}}, color={0,0,127}));
188198
199+ connect (switch4.u1, dumTimDelAir.y) annotation (Line(points={{78,-32},{40,-32},
200+ {40,30},{2,30}}, color={0,0,127}));
201+ connect (switch5.u1, dumTimDelGen.y) annotation (Line(points={{78,-92},{32,-92},
202+ {32,0},{2,0}}, color={0,0,127}));
189203annotation (
190204 defaultComponentName="eneCon" ,
191205 Diagram(coordinateSystem(extent={{-140,-140},{140,140}})),
@@ -208,6 +222,11 @@ combustion engines).
208222</html>" , revisions="<html>
209223<ul>
210224<li>
225+ March 31, 2026, by Michael Wetter:<br/>
226+ Corrected unit propagation error that causes Dymola 2026x to not show certain units.<br/>
227+ See <a href=\" https://github.com/ibpsa/modelica-ibpsa/issues/2100\">#2100</a>.
228+ </li>
229+ <li>
211230April 8, 2020, by Antoine Gautier:<br/>
212231Refactored implementation.
213232</li>
0 commit comments