-
Notifications
You must be signed in to change notification settings - Fork 164
/
ParallelCooling.mo
214 lines (213 loc) · 8.19 KB
/
ParallelCooling.mo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
within Modelica.Thermal.FluidHeatFlow.Examples;
model ParallelCooling "Cooling circuit with parallel branches"
extends Modelica.Icons.Example;
parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium()
"Cooling medium" annotation (choicesAllMatching=true);
parameter SI.Temperature TAmb(displayUnit="degC")=293.15
"Ambient temperature";
output SI.TemperatureDifference dTSource1=
prescribedHeatFlow1.port.T-TAmb "Source1 over Ambient";
output SI.TemperatureDifference dTtoPipe1=prescribedHeatFlow1.port.T-pipe1.T_q
"Source1 over Coolant1";
output SI.TemperatureDifference dTCoolant1=pipe1.dT
"Coolant1's temperature increase";
output SI.TemperatureDifference dTSource2=
prescribedHeatFlow2.port.T-TAmb "Source2 over Ambient";
output SI.TemperatureDifference dTtoPipe2=prescribedHeatFlow2.port.T-pipe2.T_q
"Source2 over Coolant2";
output SI.TemperatureDifference dTCoolant2=pipe2.dT
"Coolant2's temperature increase";
output SI.TemperatureDifference dTmixedCoolant=ambient2.T_port-ambient1.T_port
"Mixed Coolant's temperature increase";
FluidHeatFlow.Sources.Ambient ambient1(
constantAmbientTemperature=TAmb,
medium=medium,
constantAmbientPressure=0)
annotation (Placement(transformation(extent={{-60,-10},{-80,10}})));
FluidHeatFlow.Sources.VolumeFlow pump(
medium=medium,
m=0,
T0=TAmb,
useVolumeFlowInput=true,
constantVolumeFlow=1)
annotation (Placement(transformation(extent={{-40,-10},{-20,10}})));
FluidHeatFlow.Components.Pipe pipe1(
medium=medium,
m=0.1,
T0=TAmb,
V_flowLaminar=0.1,
dpLaminar(displayUnit="Pa") = 0.1,
V_flowNominal=1,
dpNominal(displayUnit="Pa") = 1,
h_g=0,
T0fixed=true,
useHeatPort=true)
annotation (Placement(transformation(extent={{0,-20},{20,0}})));
FluidHeatFlow.Components.Pipe pipe2(
medium=medium,
m=0.1,
T0=TAmb,
V_flowLaminar=0.1,
dpLaminar(displayUnit="Pa") = 0.1,
V_flowNominal=1,
dpNominal(displayUnit="Pa") = 1,
h_g=0,
T0fixed=true,
useHeatPort=true)
annotation (Placement(transformation(extent={{0,20},{20,0}})));
FluidHeatFlow.Components.Pipe pipe3(
medium=medium,
m=0.1,
T0=TAmb,
V_flowLaminar=0.1,
dpLaminar(displayUnit="Pa") = 0.1,
V_flowNominal=1,
dpNominal(displayUnit="Pa") = 1,
h_g=0,
T0fixed=true,
useHeatPort=false)
annotation (Placement(transformation(extent={{40,-10},{60,10}})));
FluidHeatFlow.Sources.Ambient ambient2(
constantAmbientTemperature=TAmb,
medium=medium,
constantAmbientPressure=0)
annotation (Placement(transformation(extent={{80,-10},{100,10}})));
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heatCapacitor1(
C=0.1, T(start=TAmb, fixed=true))
annotation (Placement(transformation(
origin={40,-60},
extent={{-10,10},{10,-10}},
rotation=90)));
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow
prescribedHeatFlow1
annotation (Placement(transformation(
origin={-20,-60},
extent={{10,-10},{-10,10}},
rotation=180)));
Modelica.Thermal.HeatTransfer.Components.Convection convection1
annotation (Placement(transformation(
origin={10,-40},
extent={{10,10},{-10,-10}},
rotation=270)));
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heatCapacitor2(
C=0.1, T(start=TAmb, fixed=true))
annotation (Placement(transformation(
origin={38,60},
extent={{10,-10},{-10,10}},
rotation=270)));
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow
prescribedHeatFlow2
annotation (Placement(transformation(
origin={-20,60},
extent={{10,10},{-10,-10}},
rotation=180)));
Modelica.Thermal.HeatTransfer.Components.Convection convection2
annotation (Placement(transformation(
origin={10,40},
extent={{10,-10},{-10,10}},
rotation=90)));
Modelica.Blocks.Sources.Constant volumeFlow(k=1)
annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
Modelica.Blocks.Sources.Constant heatFlow1(k=5)
annotation (Placement(transformation(extent={{-60,-70},{-40,-50}})));
Modelica.Blocks.Sources.Constant heatFlow2(k=10)
annotation (Placement(transformation(extent={{-60,50},{-40,70}})));
Modelica.Blocks.Sources.Constant thermalConductance1(k=1)
annotation (Placement(transformation(extent={{-30,-50},{-10,-30}})));
Modelica.Blocks.Sources.Constant thermalConductance2(k=1)
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
equation
connect(ambient1.flowPort, pump.flowPort_a)
annotation (Line(points={{-60,0},{-40,0}}, color={255,0,0}));
connect(pump.flowPort_b, pipe1.flowPort_a)
annotation (Line(points={{-20,0},{-10,0},{-10,-10},{0,-10}}, color={255,
0,0}));
connect(pump.flowPort_b, pipe2.flowPort_a)
annotation (Line(points={{-20,0},{-10,0},{-10,10},{0,10}}, color={255,0,
0}));
connect(heatFlow2.y,prescribedHeatFlow2. Q_flow)
annotation (Line(points={{-39,60},{-30,60}}, color={0,0,255}));
connect(heatFlow1.y,prescribedHeatFlow1. Q_flow)
annotation (Line(points={{-39,-60},{-30,-60}}, color={0,0,255}));
connect(thermalConductance2.y, convection2.Gc)
annotation (Line(points={{-9,40},{0,40}}, color={0,0,127}));
connect(thermalConductance1.y, convection1.Gc)
annotation (Line(points={{-9,-40},{0,-40}}, color={0,0,127}));
connect(pipe1.heatPort,convection1. fluid) annotation (Line(points={{10,-20},{
10,-30}}, color={191,0,0}));
connect(convection2.fluid,pipe2. heatPort) annotation (Line(points={{10,
30},{10,20}}, color={191,0,0}));
connect(convection2.solid,prescribedHeatFlow2. port) annotation (Line(
points={{10,50},{10,60},{-10,60}}, color={191,0,0}));
connect(convection2.solid,heatCapacitor2. port) annotation (Line(points={{10,50},
{10,60},{28,60}}, color={191,0,0}));
connect(convection1.solid,prescribedHeatFlow1. port) annotation (Line(
points={{10,-50},{10,-60},{-10,-60}}, color={191,0,0}));
connect(convection1.solid,heatCapacitor1. port) annotation (Line(points={{10,-50},
{10,-60},{30,-60}}, color={191,0,0}));
connect(pipe2.flowPort_b,pipe3. flowPort_a) annotation (Line(points={{20,10},
{30,10},{30,0},{40,0}}, color={255,0,0}));
connect(pipe1.flowPort_b,pipe3. flowPort_a) annotation (Line(points={{20,-10},
{30,-10},{30,0},{40,0}}, color={255,0,0}));
connect(pipe3.flowPort_b,ambient2. flowPort)
annotation (Line(points={{60,0},{80,0}}, color={255,0,0}));
connect(volumeFlow.y, pump.volumeFlow) annotation (Line(
points={{-39,20},{-30,20},{-30,10}}, color={0,0,127}));
annotation (Documentation(info="<html>
<p>
2nd test example: ParallelCooling
</p>
Two prescribed heat sources dissipate their heat through thermal conductors to coolant flows. The coolant flow is taken from an ambient and driven by a pump with prescribed mass flow, then split into two coolant flows connected to the two heat sources, and afterwards merged. Splitting of coolant flows is determined by pressure drop characteristic of the two pipes.<br>
<strong>Results</strong>:<br>
<table>
<tr>
<td><strong>output</strong></td>
<td><strong>explanation</strong></td>
<td><strong>formula</strong></td>
<td><strong>actual steady-state value</strong></td>
</tr>
<tr>
<td>dTSource1</td>
<td>Source1 over Ambient</td>
<td>dTCoolant1 + dTtoPipe1</td>
<td>15 K</td>
</tr>
<tr>
<td>dTtoPipe1</td>
<td>Source1 over Coolant1</td>
<td>Losses1 / ThermalConductor1.G</td>
<td> 5 K</td>
</tr>
<tr>
<td>dTCoolant1</td>
<td>Coolant's temperature increase</td>
<td>Losses * cp * totalMassFlow/2</td>
<td>10 K</td>
</tr>
<tr>
<td>dTSource2</td>
<td>Source2 over Ambient</td>
<td>dTCoolant2 + dTtoPipe2</td>
<td>30 K</td>
</tr>
<tr>
<td>dTtoPipe2</td>
<td>Source2 over Coolant2</td>
<td>Losses2 / ThermalConductor2.G</td>
<td>10 K</td>
</tr>
<tr>
<td>dTCoolant2</td>
<td>Coolant's temperature increase</td>
<td>Losses * cp * totalMassFlow/2</td>
<td>20 K</td>
</tr>
<tr>
<td>dTmixedCoolant</td>
<td>mixed Coolant's temperature increase</td>
<td>(dTCoolant1+dTCoolant2)/2</td>
<td>15 K</td>
</tr>
</table>
</html>"), experiment(StopTime=1.0, Interval=0.001));
end ParallelCooling;