root/branches/maintenance/2.2.1/Modelica/Thermal/HeatTransfer.mo

Revision 463, 88.0 kB (checked in by hubertus, 22 months ago)

Created maintenance version from Dynasims version with minimal changes (no checksum, 1 graphics, a few improved documentation places, structurallyIncomplete annotations in Visualizers)

Line 
1package HeatTransfer "1-dimensional heat transfer with lumped elements" 
2  import Modelica.SIunits.Conversions.*;
3  import SI = Modelica.SIunits;
4  import NonSI = Modelica.SIunits.Conversions.NonSIunits;
5  extends Modelica.Icons.Library2;
6 
7  annotation (version="1.1", versionDate="2005-06-13",
8    preferedView="info", Icon(
9      Polygon(points=[-54, -6; -61, -7; -75, -15; -79, -24; -80, -34; -78, -42;
10              -73, -49; -64, -51; -57, -51; -47, -50; -41, -43; -38, -35; -40,
11            -27; -40, -20; -42, -13; -47, -7; -54, -5; -54, -6], style(color=10,
12              fillColor=8)),
13      Polygon(points=[-75, -15; -79, -25; -80, -34; -78, -42; -72, -49; -64, -
14            51; -57, -51; -47, -50; -57, -47; -65, -45; -71, -40; -74, -33; -76,
15              -23; -75, -15; -75, -15], style(color=0, fillColor=9)),
16      Polygon(points=[39, -6; 32, -7; 18, -15; 14, -24; 13, -34; 15, -42; 20, -
17            49; 29, -51; 36, -51; 46, -50; 52, -43; 55, -35; 53, -27; 53, -20;
18            51, -13; 46, -7; 39, -5; 39, -6], style(color=9, fillColor=8)),
19      Polygon(points=[18, -15; 14, -25; 13, -34; 15, -42; 21, -49; 29, -51; 36,
20              -51; 46, -50; 36, -47; 28, -45; 22, -40; 19, -33; 17, -23; 18, -
21            15; 18, -15], style(color=0, fillColor=9)),
22      Polygon(points=[-9, -23; -9, -10; 18, -17; -9, -23], style(
23          color=42,
24          fillColor=42,
25          fillPattern=1)),
26      Line(points=[-41, -17; -9, -17], style(color=42, thickness=2)),
27      Line(points=[-17, -40; 15, -40], style(color=42, thickness=2)),
28      Polygon(points=[-17, -46; -17, -34; -40, -40; -17, -46], style(
29          color=42,
30          fillColor=42,
31          fillPattern=1))), Documentation(info="<HTML>
32<p>
33This package contains components to model <b>1-dimensional heat transfer</b>
34with lumped elements. This allows especially to model heat transfer in
35machines provided the parameters of the lumped elements, such as
36the heat capacity of a part, can be determined by measurements
37(due to the complex geometries and many materials used in machines,
38calculating the lumped element parameters from some basic analytic
39formulas is usually not possible).
40</p>
41<p>
42Example models how to use this library are given in subpackage <b>Examples</b>.<br>
43For a first simple example, see <b>Examples.TwoMasses</b> where two masses
44with different initial temperatures are getting in contact to each
45other and arriving after some time at a common temperature.<br>
46<b>Examples.ControlledTemperature</b> shows how to hold a temperature
47within desired limits by switching on and off an electric resistor.<br>
48A more realistic example is provided in <b>Examples.Motor</b> where the
49heating of an electrical motor is modelled, see the following screen shot
50of this example:
51</p>
52<img src=\"../Images/driveWithHeatTransfer.png\" ALT=\"driveWithHeatTransfer\">
53<p>
54The <b>filled</b> and <b>non-filled red squares</b> at the left and
55right side of a component represent <b>thermal ports</b> (connector HeatPort).
56Drawing a line between such squares means that they are thermally connected.
57The variables of a HeatPort connector are the temperature <b>T</b> at the port
58and the heat flow rate <b>Q_flow</b> flowing into the component (if Q_flow is positive,
59the heat flows into the element, otherwise it flows out of the element):
60</p>
61<pre>   Modelica.SIunits.Temperature  T  \"absolute temperature at port in Kelvin\";
62   Modelica.SIunits.HeatFlowRate Q_flow  \"flow rate at the port in Watt\";
63</pre>
64<p>
65Note, that all temperatures of this package, including initial conditions,
66are given in Kelvin. For convenience, in subpackages <b>HeatTransfer.Celsius</b>,
67 <b>HeatTransfer.Fahrenheit</b> and <b>HeatTransfer.Rankine</b> components are provided such that source and
68sensor information is available in degree Celsius, degree Fahrenheit, or degree Rankine,
69respectively. Additionally, in package <b>SIunits.Conversions</b> conversion
70functions between the units Kelvin and Celsius, Fahrenheit, Rankine are
71provided. These functions may be used in the following way:
72</p>
73<pre>  <b>import</b> SI=Modelica.SIunits;
74  <b>import</b> Modelica.SIunits.Conversions.*;
75     ...
76  <b>parameter</b> SI.Temperature T = from_degC(25);  // convert 25 degree Celsius to Kelvin
77</pre>
78
79<p>
80There are several other components available, such as AxialConduction (discretized PDE in
81axial direction), which have been temporarily removed from this library. The reason is that
82these components reference material properties, such as thermal conductivity, and currently
83the Modelica design group is discussing a general scheme to describe material properties.
84</p>
85<p>
86For technical details in the design of this library, see the following reference:<br>
87<b>Michael Tiller (2001)</b>: <a href=\"http://www.amazon.de\">
88Introduction to Physical Modeling with Modelica</a>.
89Kluwer Academic Publishers Boston.
90</p>
91<p>
92<b>Acknowledgements:</b><br>
93Several helpful remarks from the following persons are acknowledged:
94John Batteh, Ford Motors, Dearborn, U.S.A;
95<a href=\"http://www.haumer.at/\">Anton Haumer</a>, Technical Consulting & Electrical Engineering, Austria;
96Ludwig Marvan, VA TECH ELIN EBG Elektronik GmbH, Wien, Austria;
97Hans Olsson, Dynasim AB, Sweden;
98Hubertus Tummescheit, Lund Institute of Technology, Lund, Sweden.
99</p>
100<p><b>Copyright &copy; 2001-2006, Modelica Association, Michael Tiller and DLR.</b></p>
101<p><i>
102This Modelica package is free software; it can be redistributed and/or modified
103under the terms of the Modelica license, see the license conditions
104and the accompanying disclaimer in the documentation of package
105Modelica in file \"Modelica/package.mo\".
106</i></p>
107</HTML>
108", revisions="<html>
109<ul>
110<li><i>July 15, 2002</i>
111       by Michael Tiller, <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
112       and <a href=\"http://www.robotic.dlr.de/Nikolaus.Schuermann/\">Nikolaus Sch&uuml;rmann</a>:<br>
113       Implemented.
114</li>
115<li><i>June 13, 2005</i>
116       by <a href=\"http://www.haumer.at/\">Anton Haumer</a><br>
117       Refined placing of connectors (cosmetic).<br>
118       Refined all Examples; removed Examples.FrequencyInverter, introducing Examples.Motor<br>
119       Introduced temperature dependent correction (1 + alpha*(T - T_ref)) in Fixed/PrescribedHeatFlow<br>
120</li>
121</ul>
122</html>"));
123  package Examples
124    "Example models to demonstrate the usage of package Modelica.Thermal.HeatTransfer" 
125    extends Modelica.Icons.Library2;
126   
127    model TwoMasses "Simple conduction demo" 
128      extends Modelica.Icons.Example;
129      parameter SI.Temperature T_final_K(fixed=false) 
130        "Projected final temperature";
131      parameter NonSI.Temperature_degC T_final_degC(fixed=false) 
132        "Projected final temperature";
133      HeatTransfer.HeatCapacitor mass1(C=15, T(start=from_degC(100))) 
134        annotation (extent=[-100, 20; -40, 80]);
135      HeatTransfer.HeatCapacitor mass2(C=15, T(start=from_degC(0))) annotation (
136         extent=[40, 20; 100, 80]);
137      HeatTransfer.ThermalConductor conduction(G=10) annotation (extent=[-30, -
138            20; 30, 40]);
139      annotation (Documentation(info="<HTML>
140<p>
141This example demonstrates the thermal response of two masses connected by
142a conducting element. The two masses have the same heat capacity but different
143initial temperatures (T1=100 [degC], T2= 0 [degC]). The mass with the higher
144temperature will cool off while the mass with the lower temperature heats up.
145They will each asymptotically approach the calculated temperature <b>T_final_K</b>
146(<b>T_final_degC</b>) that results from dividing the total initial energy in the system by the sum
147of the heat capacities of each element.
148</p>
149<p>
150Simulate for 5 s and plot the variables<br>
151mass1.T, mass2.T, T_final_K or <br>
152Tsensor1.T, Tsensor2.T, T_final_degC
153</p>
154</HTML>
155"),     experiment(StopTime=5),
156        experimentSetupOutput);
157      HeatTransfer.Celsius.TemperatureSensor Tsensor1 annotation (extent=[-60,
158            -80; -20, -40]);
159      HeatTransfer.Celsius.TemperatureSensor Tsensor2 annotation (extent=[60, -
160            80; 20, -40]);
161    equation 
162      connect(mass1.port, conduction.port_a) annotation (points=[-70,20; -70,10;
163            -30,10],      style(color=42));
164      connect(conduction.port_b, mass2.port) annotation (points=[30,10; 70,10;
165            70,20],    style(color=42));
166      connect(mass1.port, Tsensor1.port) annotation (points=[-70,20; -70,-60;
167            -60,-60],    style(color=42));
168      connect(mass2.port, Tsensor2.port) annotation (points=[70, 20; 70, -60;
169            60, -60], style(color=42));
170    initial equation 
171      T_final_K = (mass1.port.T*mass1.C + mass2.port.T*mass2.C)/(mass1.C +
172        mass2.C);
173      T_final_degC = to_degC(T_final_K);
174    end TwoMasses;
175   
176    model ControlledTemperature "Control temperature of a resistor" 
177      extends Modelica.Icons.Example;
178      parameter NonSI.Temperature_degC TAmb=20 "Ambient Temperature";
179      parameter NonSI.Temperature_degC TDif=2 "Error in Temperature";
180      output NonSI.Temperature_degC TRes = to_degC(HeatingResistor1.heatPort.T) 
181        "Resulting Temperature";
182      annotation (Documentation(info="<HTML>
183<P>
184A constant voltage of 10 V is applied to a
185temperature dependent resistor of 10*(1+(T-20C)/(235+20C)) Ohms,
186whose losses v**2/r are dissipated via a
187thermal conductance of 0.1 W/K to ambient temperature 20 degree C.
188The resistor is assumed to have a thermal capacity of 1 J/K,
189having ambient temparature at the beginning of the experiment.
190The temperature of this heating resistor is held by an OnOff-controller
191at reference temperature within a given bandwith +/- 1 K
192by switching on and off the voltage source.
193The reference temperature starts at 25 degree C
194and rises between t = 2 and 8 seconds linear to 50 degree C.
195An approppriate simulating time would be 10 seconds.
196</P>
197</HTML>
198"), Diagram,
199        experiment(StopTime=10),
200        experimentSetupOutput);
201      Modelica.Electrical.Analog.Basic.Ground Ground1
202                                  annotation (extent=[-100, -100; -80, -80]);
203      Modelica.Electrical.Analog.Sources.ConstantVoltage ConstantVoltage1(V=10) 
204                                                            annotation (extent=
205            [-100, -60; -80, -40], rotation=-90);
206      HeatTransfer.HeatCapacitor HeatCapacitor1(C=1, T(start=from_degC(TAmb))) 
207        annotation (extent=[0, -60; 20, -80]);
208      Modelica.Electrical.Analog.Basic.HeatingResistor HeatingResistor1(
209        R_ref=10,
210        T_ref=from_degC(20),
211        alpha=1/(235 + 20)) annotation (extent=[-20, -60; -40, -40], rotation=-
212            90);
213      HeatTransfer.Celsius.FixedTemperature FixedTemperature1(T=TAmb) 
214        annotation (extent=[100, -60; 80, -40]);
215      HeatTransfer.Celsius.TemperatureSensor TemperatureSensor1 annotation (
216          extent=[0, -40; 20, -20], rotation=90);
217      HeatTransfer.ThermalConductor ThermalConductor1(G=0.1) annotation (extent=[40,
218            -60; 60,-40]);
219      Modelica.Electrical.Analog.Ideal.IdealOpeningSwitch IdealSwitch1
220            annotation (extent=[-70, -50; -50, -30]);
221      Modelica.Blocks.Sources.Ramp Ramp1(
222        height=25,
223        duration=6,
224        offset=25,
225        startTime=2) annotation (extent=[40,0; 20,20]);
226      Modelica.Blocks.Logical.OnOffController OnOffController1(bandwidth=TDif) 
227        annotation (extent=[0,-20; -20,0]);
228      Modelica.Blocks.Logical.Not Not1 annotation (extent=[-30,-20; -50,0]);
229    equation 
230      connect(ConstantVoltage1.n, HeatingResistor1.n) annotation (points=[-90,
231            -60; -30, -60], style(color=3));
232      connect(ConstantVoltage1.n, Ground1.p) annotation (points=[-90, -60; -90,
233              -80], style(color=3));
234      connect(HeatingResistor1.heatPort, ThermalConductor1.port_a) annotation (
235          points=[-20,-50; 40,-50],   style(color=42));
236      connect(ThermalConductor1.port_b, FixedTemperature1.port) annotation (
237          points=[60,-50; 80,-50],   style(color=42));
238      connect(HeatingResistor1.heatPort, TemperatureSensor1.port) annotation (
239          points=[-20, -50; 10, -50; 10, -40], style(color=42));
240      connect(HeatingResistor1.heatPort, HeatCapacitor1.port) annotation (
241          points=[-20, -50; 10, -50; 10, -60], style(color=42));
242      connect(ConstantVoltage1.p, IdealSwitch1.p) annotation (points=[-90, -40;
243              -70, -40], style(color=3));
244      connect(IdealSwitch1.n, HeatingResistor1.p) annotation (points=[-50, -40;
245              -30, -40], style(color=3));
246      connect(Ramp1.y, OnOffController1.reference) annotation (points=[19,10;
247            10,10; 10,-4; 2,-4], style(color=74, rgbcolor={0,0,127}));
248      connect(TemperatureSensor1.T, OnOffController1.u) annotation (points=[10,
249            -20; 10,-16; 2,-16], style(color=74, rgbcolor={0,0,127}));
250      connect(OnOffController1.y, Not1.u) annotation (points=[-21,-10; -28,-10],
251          style(color=5, rgbcolor={255,0,255}));
252      connect(Not1.y, IdealSwitch1.control) annotation (points=[-51,-10; -60,
253            -10; -60,-33], style(color=5, rgbcolor={255,0,255}));
254    end ControlledTemperature;
255   
256    model Motor "Second order thermal model of a motor" 
257      extends Modelica.Icons.Example;
258      parameter NonSI.Temperature_degC TAmb = 20 "Ambient temperature";
259      annotation (Documentation(info="<HTML>
260<p>
261This example contains a simple second order thermal model of a motor.
262The periodic power losses are described by table \"lossTable\":<br>
263<table>
264<tr><td>time</td><td>winding losses</td><td>core losses</td></tr>
265<tr><td>   0</td><td>           100</td><td>        500</td></tr>
266<tr><td> 360</td><td>           100</td><td>        500</td></tr>
267<tr><td> 360</td><td>          1000</td><td>        500</td></tr>
268<tr><td> 600</td><td>          1000</td><td>        500</td></tr>
269</table><br>
270Since constant speed is assumed, the core losses keep constant
271whereas the winding losses are low for 6 minutes (no-load) and high for 4 minutes (over load).
272<br>
273The winding losses are corrected by (1 + alpha*(T - T_ref)) because the winding's resistance is temperature dependent whereas the core losses are kept constant (alpha = 0).
274</p>
275<p>
276The power dissipation to the environment is approximated by heat flow through
277a thermal conductance between winding and core,
278partially storage of the heat in the winding's heat capacity
279as well as the core's heat capacity and finally by forced convection to the environment.<br>
280Since constant speed is assumed, the cinvective conductance keeps constant.<br>
281Using Modelica.Thermal.FluidHeatFlow it would be possible to model the coolant air flow, too
282(instead of simple dissipation to a constant ambient's temperature).
283</p>
284<p>
285Simulate for 7200 s; plot Twinding.T and Tcore.T.
286</p>
287</HTML>
288"),     experiment(StopTime=7200),
289        experimentSetupOutput,
290        Diagram);
291      Modelica.Blocks.Sources.CombiTimeTable lossTable(extrapolation=Modelica.
292            Blocks.Types.Extrapolation.Periodic, table=[0,100,500; 360,100,500;
293            360,1000,500; 600,1000,500]) 
294                                annotation (extent=[-50,60; -30,80], rotation=
295            -90);
296      HeatTransfer.PrescribedHeatFlow windingLosses(T_ref=from_degC(95), alpha=
297            3.03E-3)                         annotation (extent=[-90,0; -70,20],
298          rotation=-90);
299      HeatTransfer.HeatCapacitor winding(T(start=from_degC(TAmb)), C=2500) 
300                                            annotation (extent=[-90,-20; -70,
301            -40]);
302      HeatTransfer.Celsius.TemperatureSensor Twinding
303                                                     annotation (extent=[-70,
304            -60; -50,-40], rotation=-90);
305      HeatTransfer.ThermalConductor winding2core(G=10) 
306                                            annotation (extent=[-50,-20; -30,0]);
307      HeatTransfer.PrescribedHeatFlow coreLosses
308                                             annotation (extent=[-10,0; 10,20],
309          rotation=-90);
310      HeatTransfer.HeatCapacitor core(T(start=from_degC(TAmb)), C=25000) 
311                                            annotation (extent=[-10,-20; 10,-40]);
312      HeatTransfer.Celsius.TemperatureSensor Tcore   annotation (extent=[-30,
313            -60; -10,-40],
314                         rotation=-90);
315      Modelica.Blocks.Sources.Constant convectionConstant(k=25) 
316        annotation (extent=[30,20; 50,40], rotation=-90);
317      HeatTransfer.Convection convection annotation (extent=[30,-20; 50,0]);
318      HeatTransfer.Celsius.FixedTemperature environment(T=TAmb) 
319                                                              annotation (
320          extent=[70,-20; 90,0],    rotation=180);
321    equation 
322      connect(windingLosses.port, winding.port)  annotation (points=[-80,0; -80,
323            -20], style(color=42, rgbcolor={191,0,0}));
324      connect(coreLosses.port, core.port)  annotation (points=[6.12303e-016,0; 
325            6.12303e-016,-10; 0,-10; 0,-20],
326          style(color=42, rgbcolor={191,0,0}));
327      connect(winding.port, winding2core.port_a) 
328                                       annotation (points=[-80,-20; -80,-10;
329            -50,-10], style(color=42, rgbcolor={191,0,0}));
330      connect(winding2core.port_b, core.port) 
331                                    annotation (points=[-30,-10; 0,-10; 0,-20],
332          style(color=42, rgbcolor={191,0,0}));
333      connect(winding.port, Twinding.port)  annotation (points=[-80,-20; -80,
334            -10; -60,-10; -60,-40], style(color=42, rgbcolor={191,0,0}));
335      connect(core.port, Tcore.port)  annotation (points=[0,-20; 0,-10; -20,-10;
336            -20,-40],      style(color=42, rgbcolor={191,0,0}));
337      connect(winding2core.port_b, convection.solid) 
338                                          annotation (points=[-30,-10; 30,-10],
339          style(color=42, rgbcolor={191,0,0}));
340      connect(convection.fluid, environment.port) annotation (points=[50,-10; 
341            60,-10; 60,-10; 70,-10], style(color=42, rgbcolor={191,0,0}));
342      connect(convectionConstant.y, convection.Gc) 
343        annotation (points=[40,19; 40,0], style(color=74, rgbcolor={0,0,127}));
344      connect(lossTable.y[1], windingLosses.Q_flow) annotation (points=[-40,59;
345            -40,40; -80,40; -80,20], style(color=74, rgbcolor={0,0,127}));
346      connect(lossTable.y[2], coreLosses.Q_flow) annotation (points=[-40,59; 
347            -40,40; -6.12303e-016,40; -6.12303e-016,20],
348                                   style(color=74, rgbcolor={0,0,127}));
349    end Motor;
350    annotation (Icon(
351         Ellipse(extent=[-60,10; 40,-90], style(color=10, rgbcolor={135,135,135})),
352          Polygon(points=[-30,-12; -30,-68; 28,-40; -30,-12], style(
353            color=10,
354            rgbcolor={135,135,135},
355            fillColor=10,
356            rgbfillColor={135,135,135},
357            fillPattern=1))), Documentation(info="<html>
358 
359</html>"));
360  end Examples;
361 
362  package Interfaces "Connectors and partial models" 
363   
364    extends Modelica.Icons.Library2;
365   
366    partial connector HeatPort "Thermal port for 1-dim. heat transfer" 
367      SI.Temperature T "Port temperature";
368      flow SI.HeatFlowRate Q_flow
369        "Heat flow rate (positive if flowing from outside into the component)";
370      annotation (Documentation(info="<html>
371 
372</html>"));
373    end HeatPort;
374   
375    connector HeatPort_a
376      "Thermal port for 1-dim. heat transfer (filled rectangular icon)" 
377     
378      extends HeatPort;
379     
380      annotation(defaultComponentName = "port_a",
381        Documentation(info="<HTML>
382<p>This connector is used for 1-dimensional heat flow between components.
383The variables in the connector are:</p>
384<pre>   
385   T       Temperature in [Kelvin].
386   Q_flow  Heat flow rate in [Watt].
387</pre>
388<p>According to the Modelica sign convention, a <b>positive</b> heat flow
389rate <b>Q_flow</b> is considered to flow <b>into</b> a component. This
390convention has to be used whenever this connector is used in a model
391class.</p>
392<p>Note, that the two connector classes <b>HeatPort_a</b> and
393<b>HeatPort_b</b> are identical with the only exception of the different
394<b>icon layout</b>.</p></HTML>
395"),     Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=42, fillColor=
396                 42))),
397        Diagram(Rectangle(extent=[-50,50; 50,-50],   style(color=42,
398                fillColor=42)), Text(
399            extent=[-120,120; 100,60],
400            string="%name",
401            style(color=42))));
402    end HeatPort_a;
403   
404    connector HeatPort_b
405      "Thermal port for 1-dim. heat transfer (unfilled rectangular icon)" 
406     
407      extends HeatPort;
408     
409      annotation(defaultComponentName = "port_b",
410        Documentation(info="<HTML>
411<p>This connector is used for 1-dimensional heat flow between components.
412The variables in the connector are:</p>
413<pre>
414   T       Temperature in [Kelvin].
415   Q_flow  Heat flow rate in [Watt].
416</pre>
417<p>According to the Modelica sign convention, a <b>positive</b> heat flow
418rate <b>Q_flow</b> is considered to flow <b>into</b> a component. This
419convention has to be used whenever this connector is used in a model
420class.</p>
421<p>Note, that the two connector classes <b>HeatPort_a</b> and
422<b>HeatPort_b</b> are identical with the only exception of the different
423<b>icon layout</b>.</p></HTML>
424"),     Diagram(Rectangle(extent=[-50,50; 50,-50],    style(color=42,
425                fillColor=7)), Text(
426            extent=[-100,120; 120,60],
427            string="%name",
428            style(color=42))),
429        Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=42, fillColor=
430                 7))));
431    end HeatPort_b;
432   
433    partial model Element1D
434      "Partial heat transfer element with two HeatPort connectors that does not store energy" 
435     
436      SI.HeatFlowRate Q_flow "Heat flow rate from port_a -> port_b";
437      SI.TemperatureDifference dT "port_a.T - port_b.T";
438    public 
439      HeatPort_a port_a annotation (extent=[-110,-10; -90,10]);
440      HeatPort_b port_b annotation (extent=[90,-10; 110,10]);
441      annotation (Documentation(info="<HTML>
442<p>
443This partial model contains the basic connectors and variables to
444allow heat transfer models to be created that <b>do not store energy</b>,
445This model defines and includes equations for the temperature
446drop across the element, <b>dT</b>, and the heat flow rate
447through the element from port_a to port_b, <b>Q_flow</b>.
448</p>
449<p>
450By extending this model, it is possible to write simple
451constitutive equations for many types of heat transfer components.
452</p>
453</HTML>
454"), Icon,
455        Diagram);
456    equation 
457      dT = port_a.T - port_b.T;
458      port_a.Q_flow = Q_flow;
459      port_b.Q_flow = -Q_flow;
460    end Element1D;
461    annotation (Icon(
462              Rectangle(extent=[-60,10; 40,-90],   style(color=42,
463              fillColor=42))), Documentation(info="<html>
464 
465</html>"));
466  end Interfaces;
467 
468  model HeatCapacitor "Lumped thermal element storing heat" 
469    parameter SI.HeatCapacity C "Heat capacity of part (= cp*m)";
470    parameter Boolean steadyStateStart=false 
471      "true, if component shall start in steady state";
472    SI.Temperature T(start=from_degC(20)) "Temperature of part";
473    annotation (
474      Icon(
475        Text(extent=[-129, 121; 131, 70], string="%name"),
476        Polygon(points=[0,67; -20,63; -40,57; -52,43; -58,35; -68,25; -72,13;
477              -76,-1; -78,-15; -76,-31; -76,-43; -76,-53; -70,-65; -64,-73; -48,
478              -77; -30,-83; -18,-83; -2,-85; 8,-89; 22,-89; 32,-87; 42,-81; 54,
479              -75; 56,-73; 66,-61; 68,-53; 70,-51; 72,-35; 76,-21; 78,-13; 78,