Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
i.elizarov
Fluid system CP and TD
Commits
126bbc75
Commit
126bbc75
authored
Jan 19, 2022
by
i.elizarov
Browse files
Implemented a PID controller for the pump
parent
f8fe1d8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
CoolingSystem/Devices/CoolingPlant.mo
View file @
126bbc75
...
...
@@ -12,41 +12,55 @@ model CoolingPlant "Model of the cooling plant"
redeclare
CoolingSystem
.
Data
.
PBMX201E102
per
,
energyDynamics
=
Modelica
.
Fluid
.
Types
.
Dynamics
.
FixedInitial
,
p_start
=
3e5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
6
,
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{
-
30
,
34
},
extent
=
{{-
10
,
10
},
{
10
,
-
10
}},
rotation
=
180
)));
IBPSA
.
Fluid
.
Sources
.
Boundary_pT
bou
(
redeclare
package
Medium
=
Medium
,
T
=
273.15
+
20
,
nPorts
=
1
,
p
=
3e5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
9
0
,
50
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
9
8
,
50
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
inner
Modelica
.
Fluid
.
System
system
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
90
,
90
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
IBPSA
.
Fluid
.
Actuators
.
Valves
.
ThreeWayEqualPercentageLinear
val
(
redeclare
package
Medium
=
Medium
,
CvData
=
IBPSA
.
Fluid
.
Types
.
CvTypes
.
Kv
,
Kv
=
12
,
energyDynamics
=
Modelica
.
Fluid
.
Types
.
Dynamics
.
FixedInitial
,
l
=
{
0.02e-3
,
0.2e-3
},
m_flow_nominal
=
1.125
,
p_start
=
3e5
,
portFlowDirection_1
=
Modelica
.
Fluid
.
Types
.
PortFlowDirection
.
Entering
,
portFlowDirection_2
=
Modelica
.
Fluid
.
Types
.
PortFlowDirection
.
Leaving
,
portFlowDirection_3
=
Modelica
.
Fluid
.
Types
.
PortFlowDirection
.
Leaving
,
riseTime
=
15
,
use_inputFilter
=
true
,
y_start
=
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
16
,
-
34
},
extent
=
{{-
10
,
10
},
{
10
,
-
10
}},
rotation
=
0
)));
IBPSA
.
Fluid
.
Actuators
.
Valves
.
ThreeWayEqualPercentageLinear
val
(
redeclare
package
Medium
=
Medium
,
CvData
=
IBPSA
.
Fluid
.
Types
.
CvTypes
.
Kv
,
Kv
=
12
,
energyDynamics
=
Modelica
.
Fluid
.
Types
.
Dynamics
.
FixedInitial
,
l
=
{
0.02e-3
,
0.2e-3
},
m_flow_nominal
=
1.125
,
m_flow_small
=
system
.
m_flow_small
,
p_start
=
3e5
,
portFlowDirection_1
=
Modelica
.
Fluid
.
Types
.
PortFlowDirection
.
Entering
,
portFlowDirection_2
=
Modelica
.
Fluid
.
Types
.
PortFlowDirection
.
Leaving
,
portFlowDirection_3
=
Modelica
.
Fluid
.
Types
.
PortFlowDirection
.
Leaving
,
riseTime
=
15
,
use_inputFilter
=
true
,
y_start
=
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
-
20
,
-
34
},
extent
=
{{-
10
,
10
},
{
10
,
-
10
}},
rotation
=
0
)));
IBPSA
.
Fluid
.
Sensors
.
VolumeFlowRate
volJun
(
redeclare
package
Medium
=
Medium
,
allowFlowReversal
=
false
,
m_flow_nominal
=
1.125
*
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
16
,
0
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
90
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{
-
20
,
0
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
90
)));
IBPSA
.
Fluid
.
Sensors
.
VolumeFlowRate
volDUT
(
redeclare
package
Medium
=
Medium
,
allowFlowReversal
=
false
,
m_flow_nominal
=
1.125
*
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
46
,
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{
10
,
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
IBPSA
.
Fluid
.
FixedResistances
.
PressureDrop
filter
(
redeclare
package
Medium
=
Medium
,
dp_nominal
=
0.07e5
,
m_flow_nominal
=
1.5854
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
28
,
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
64
,
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
IBPSA
.
Fluid
.
HeatExchangers
.
SensibleCooler_T
coo
(
redeclare
package
Medium
=
Medium
,
QMin_flow
=
-
Q_max
,
dp_nominal
=
7.94e3
,
energyDynamics
=
Modelica
.
Fluid
.
Types
.
Dynamics
.
FixedInitial
,
m_flow_nominal
=
4050
/
3600
,
tau
=
40
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
56
,
-
10
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
-
90
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
92
,
-
10
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
-
90
)));
Modelica
.
Blocks
.
Continuous
.
FirstOrder
firstOrder
(
T
=
287.61
,
y_start
=
273.15
+
20
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
92
,
8
},
extent
=
{{-
8
,
-
8
},
{
8
,
8
}},
rotation
=
0
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
112
,
8
},
extent
=
{{-
8
,
-
8
},
{
8
,
8
}},
rotation
=
0
)));
IBPSA
.
Fluid
.
Sensors
.
RelativePressure
senRelPre
(
redeclare
package
Medium
=
Medium
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
60
,
2
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
90
)));
IBPSA
.
Fluid
.
Sensors
.
TemperatureTwoPort
senTem_T2
(
redeclare
package
Medium
=
Medium
,
m_flow_nominal
=
1.125
*
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
40
,
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
IBPSA
.
Fluid
.
Sensors
.
TemperatureTwoPort
senTem_T1
(
redeclare
package
Medium
=
Medium
,
m_flow_nominal
=
1.125
*
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
40
,
-
34
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
equation
connect
(
val
.
port_3
,
volJun
.
port_a
)
annotation
(
Line
(
points
=
{{
16
,
-
24
},
{
16
,
-
10
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{
-
20
,
-
24
},
{
-
20
,
-
10
}},
color
=
{
0
,
127
,
255
}));
connect
(
pump
.
port_a
,
volJun
.
port_b
)
annotation
(
Line
(
points
=
{{
16
,
34
},
{
16
,
10
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{
-
20
,
34
},
{
-
20
,
10
}},
color
=
{
0
,
127
,
255
}));
connect
(
volDUT
.
port_b
,
pump
.
port_a
)
annotation
(
Line
(
points
=
{{
36
,
34
},
{
16
,
34
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{
0
,
34
},
{
-
20
,
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
pump
.
port_b
,
filter
.
port_a
)
annotation
(
Line
(
points
=
{{-
4
,
34
},
{-
18
,
34
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{-
4
0
,
34
},
{-
54
,
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
bou
.
ports
[
1
],
filter
.
port_b
)
annotation
(
Line
(
points
=
{{-
8
0
,
50
},
{-
38
,
50
},
{-
38
,
34
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{-
8
8
,
50
},
{-
74
,
50
},
{-
74
,
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
coo
.
port_a
,
filter
.
port_b
)
annotation
(
Line
(
points
=
{{-
56
,
0
},
{-
56
,
34
},
{-
38
,
34
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{-
92
,
0
},
{-
92
,
34
},
{-
74
,
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
coo
.
port_b
,
val
.
port_1
)
annotation
(
Line
(
points
=
{{-
56
,
-
20
},
{-
56
,
-
34
},
{
6
,
-
34
}},
color
=
{
0
,
127
,
255
}));
Line
(
points
=
{{-
92
,
-
20
},
{-
92
,
-
34
},
{
-
30
,
-
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
firstOrder
.
y
,
coo
.
TSet
)
annotation
(
Line
(
points
=
{{-
83.2
,
8
},
{-
48.2
,
8
},
{-
48.2
,
2
}},
color
=
{
0
,
0
,
127
}));
Line
(
points
=
{{-
103.2
,
8
},
{-
84.4
,
8
},
{-
84.4
,
2
}},
color
=
{
0
,
0
,
127
}));
connect
(
volDUT
.
port_a
,
senTem_T2
.
port_b
)
annotation
(
Line
(
points
=
{{
20
,
34
},
{
30
,
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
senTem_T2
.
port_a
,
senRelPre
.
port_b
)
annotation
(
Line
(
points
=
{{
50
,
34
},
{
60
,
34
},
{
60
,
12
}},
color
=
{
0
,
127
,
255
}));
connect
(
senTem_T1
.
port_b
,
senRelPre
.
port_a
)
annotation
(
Line
(
points
=
{{
50
,
-
34
},
{
60
,
-
34
},
{
60
,
-
8
}},
color
=
{
0
,
127
,
255
}));
connect
(
senTem_T1
.
port_a
,
val
.
port_2
)
annotation
(
Line
(
points
=
{{
30
,
-
34
},
{-
10
,
-
34
}},
color
=
{
0
,
127
,
255
}));
annotation
(
uses
(
Modelica
(
version
=
"3.2.3"
),
IBPSA
(
version
=
"3.0.0"
)),
Diagram
);
...
...
CoolingSystem/Devices/ThermalDemonstrator.mo
View file @
126bbc75
...
...
@@ -3,6 +3,9 @@ within CoolingSystem.Devices;
model ThermalDemonstrator "Thermohydraulic model of the thermal demonstrator"
replaceable package Medium = CoolingSystem.Media.ConstantPropertyLiquidNovec annotation(
Documentation(info = "
<html><head></head><body>
This model does not include thermal performance of the side panel
</body></html>
"));
parameter Real init_pos(min=0, max =1) = 0 "Initial position of all flow regulators";
parameter Real leakage(min=0) = 0.009 "Leakage through the regulating valves";
parameter Modelica.SIunits.MassFlowRate m_flow_plate = 0.0893455 "Nominal flow rate for the cooling plate";
parameter Modelica.SIunits.PressureDifference dp_plate = 1.32e5 "Pressure loss at the cooling plate";
parameter Modelica.SIunits.Volume V_plate = 0.0582e-3 "Volume of the liquid in the cooling plate";
...
...
@@ -16,32 +19,32 @@ model ThermalDemonstrator "Thermohydraulic model of the thermal demonstrator"
IBPSA.Fluid.HeatExchangers.HeaterCooler_u plate1_4(redeclare package Medium = Medium, Q_flow_nominal = Q_flow_plate, allowFlowReversal = true, dp_nominal = dp_plate, energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal = m_flow_plate, tau = V_plate * 1785.9 / m_flow_plate) annotation(
Placement(visible = true, transformation(origin = {60, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Fluid.Interfaces.FluidPort_a port_a(redeclare package Medium = Medium) annotation(
Placement(visible = true, transformation(origin = {0, 100}, extent = {{-10, -10}, {10, 10}}, rotation = 180), iconTransformation(origin = {0, 100}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Placement(visible = true, transformation(origin = {0, 100}, extent = {{-10, -10}, {10, 10}}, rotation = 180), iconTransformation(origin = {0,
-
100}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Interfaces.FluidPort_b port_b(redeclare package Medium = Medium) annotation(
Placement(visible = true, transformation(origin = {0, -100}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {0,
-98
}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Placement(visible = true, transformation(origin = {0, -100}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {0,
100
}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Interfaces.RealInput u(min = 0, max = 1) "Control input for cooling plates" annotation(
Placement(visible = true, transformation(origin = {-120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {
-
120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Placement(visible = true, transformation(origin = {-120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {120, 60}, extent = {{-20, -20}, {20, 20}}, rotation =
18
0)));
Modelica.Blocks.Interfaces.RealInput u1 annotation(
Placement(visible = true, transformation(origin = {120, 80}, extent = {{-20, -20}, {20, 20}}, rotation = 180), iconTransformation(origin = {120,
10
0}, extent = {{-20, -20}, {20, 20}}, rotation =
18
0)));
Placement(visible = true, transformation(origin = {120, 80}, extent = {{-20, -20}, {20, 20}}, rotation = 180), iconTransformation(origin = {
-
120,
9
0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Modelica.Fluid.Fittings.GenericResistances.VolumeFlowRate sidePanel1(redeclare package Medium = Medium, a = 7485597e8, allowFlowReversal = false, b = 1212001e3) annotation(
Placement(visible = true, transformation(origin = {30, -82}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Blocks.Interfaces.RealInput u2 annotation(
Placement(visible = true, transformation(origin = {120, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 180)));
Placement(visible = true, transformation(origin = {120, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 180)
, iconTransformation(origin = {-120, 42}, extent = {{-20, -20}, {20, 20}}, rotation = 0)
));
Modelica.Blocks.Interfaces.RealInput u3 annotation(
Placement(visible = true, transformation(origin = {120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 180)));
Placement(visible = true, transformation(origin = {120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 180)
, iconTransformation(origin = {-120, -8}, extent = {{-20, -20}, {20, 20}}, rotation = 0)
));
Modelica.Blocks.Interfaces.RealInput u4 annotation(
Placement(visible = true, transformation(origin = {120, -40}, extent = {{-20, -20}, {20, 20}}, rotation = 180)));
Placement(visible = true, transformation(origin = {120, -40}, extent = {{-20, -20}, {20, 20}}, rotation = 180)
, iconTransformation(origin = {-120, -56}, extent = {{-20, -20}, {20, 20}}, rotation = 0)
));
Modelica.Blocks.Interfaces.RealInput u5 annotation(
Placement(visible = true, transformation(origin = {120, -78}, extent = {{-20, -20}, {20, 20}}, rotation = 180)));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val1(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
0.009
, m_flow_nominal = 0.1, riseTime = 5) annotation(
Placement(visible = true, transformation(origin = {120, -78}, extent = {{-20, -20}, {20, 20}}, rotation = 180)
, iconTransformation(origin = {-120, -104},extent = {{-20, -20}, {20, 20}}, rotation = 0)
));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val1(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
leakage
, m_flow_nominal = 0.1, riseTime = 5
, y_start = init_pos
) annotation(
Placement(visible = true, transformation(origin = {-60, 32}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val2(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
0.009
, m_flow_nominal = 0.1, riseTime = 5) annotation(
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val2(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
leakage
, m_flow_nominal = 0.1, riseTime = 5
, y_start = init_pos
) annotation(
Placement(visible = true, transformation(origin = {-20, 32}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val3(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
0.009
, m_flow_nominal = 0.1, riseTime = 5) annotation(
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val3(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
leakage
, m_flow_nominal = 0.1, riseTime = 5
, y_start = init_pos
) annotation(
Placement(visible = true, transformation(origin = {20, 32}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val4(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
0.009
, m_flow_nominal = 0.1, riseTime = 5) annotation(
Placement(visible = true, transformation(origin = {60, 3
2
}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val5(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l = 0.009, m_flow_nominal = 0.1, riseTime = 5) annotation(
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val4(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l =
leakage
, m_flow_nominal = 0.1, riseTime = 5
, y_start = init_pos
) annotation(
Placement(visible = true, transformation(origin = {60, 3
0
}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
IBPSA.Fluid.Actuators.Valves.TwoWayLinear val5(redeclare package Medium = Medium, CvData = IBPSA.Fluid.Types.CvTypes.Kv, Kv = 6.3, l = 0.009, m_flow_nominal = 0.1, riseTime = 5
, y_start = init_pos
) annotation(
Placement(visible = true, transformation(origin = {30, -56}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
equation
connect(plate1_2.port_b, port_b) annotation(
...
...
@@ -69,9 +72,9 @@ equation
connect(plate1_3.port_a, val3.port_b) annotation(
Line(points = {{20, 10}, {20, 22}}, color = {0, 127, 255}));
connect(plate1_4.port_a, val4.port_b) annotation(
Line(points = {{60, 10}, {60, 2
2
}}, color = {0, 127, 255}));
Line(points = {{60, 10}, {60, 2
0
}}, color = {0, 127, 255}));
connect(val4.y, u4) annotation(
Line(points = {{72, 3
2
}, {76, 3
2
}, {76, -40}, {120, -40}}, color = {0, 0, 127}));
Line(points = {{72, 3
0
}, {76, 3
0
}, {76, -40}, {120, -40}}, color = {0, 0, 127}));
connect(val3.y, u3) annotation(
Line(points = {{32, 32}, {42, 32}, {42, 46}, {82, 46}, {82, 0}, {120, 0}}, color = {0, 0, 127}));
connect(val2.y, u2) annotation(
...
...
@@ -85,7 +88,7 @@ equation
connect(val3.port_a, port_a) annotation(
Line(points = {{20, 42}, {20, 66}, {0, 66}, {0, 100}}, color = {0, 127, 255}));
connect(val4.port_a, port_a) annotation(
Line(points = {{60, 4
2}, {58, 42
}, {
58
, 78}, {0, 78}, {0, 100}}, color = {0, 127, 255}));
Line(points = {{60, 4
0
}, {
60
, 78}, {0, 78}, {0, 100}}, color = {0, 127, 255}));
connect(sidePanel1.port_a, val5.port_b) annotation(
Line(points = {{30, -72}, {30, -66}}, color = {0, 127, 255}));
connect(val5.port_a, port_a) annotation(
...
...
@@ -94,7 +97,7 @@ equation
Line(points = {{42, -56}, {80, -56}, {80, -82}, {120, -82}, {120, -78}}, color = {0, 0, 127}));
annotation(
uses(IBPSA(version = "3.0.0"), Modelica(version = "3.2.3")),
Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Rectangle(origin = {0, 65}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Rectangle(origin = {0, 23}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Rectangle(origin = {0, -21}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Rectangle(origin = {0, -63}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Line(origin = {49.4832, 74.5866}, points = {{-15, 0}, {15, 0}}), Line(origin = {48.4832, 32.5866}, points = {{-14, 0}, {16, 0}}), Line(origin = {47.4832, -9.41341}, points = {{-13, 0}, {17, 0}}), Line(origin = {47.4832, -53.4134}, points = {{-13, 0}, {17, 0}}), Line(origin = {43.4832, 58.5866}, points = {{-9, 0}, {9, 0}}), Line(origin = {43.4832, 16.5866}, points = {{-9, 0}, {9, 0}}), Line(origin = {42.4832, -29.4134}, points = {{-8, 0}, {10, 0}}), Line(origin = {43.4832, -71.4134}, points = {{-9, 0}, {9, 0}}), Line(origin = {52.4832, -6.41341}, points = {{0, 65}, {0, -65}}), Line(origin = {64.4832, 10.5866}, points = {{0, 64}, {0, -64}}), Rectangle(origin = {-49, 0}, fillColor = {122, 122, 122}, fillPattern = FillPattern.Solid, extent = {{-5, 80}, {5, -80}}), Text(origin = {
-82
, 6
0
}, extent = {{-10, 10}, {10, -10}}, textString = "Q")}),
Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Rectangle(origin = {0, 65}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Rectangle(origin = {0, 23}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Rectangle(origin = {0, -21}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Rectangle(origin = {0, -63}, fillColor = {132, 132, 132}, fillPattern = FillPattern.Solid, extent = {{-34, 15}, {34, -15}}), Line(origin = {49.4832, 74.5866}, points = {{-15, 0}, {15, 0}}), Line(origin = {48.4832, 32.5866}, points = {{-14, 0}, {16, 0}}), Line(origin = {47.4832, -9.41341}, points = {{-13, 0}, {17, 0}}), Line(origin = {47.4832, -53.4134}, points = {{-13, 0}, {17, 0}}), Line(origin = {43.4832, 58.5866}, points = {{-9, 0}, {9, 0}}), Line(origin = {43.4832, 16.5866}, points = {{-9, 0}, {9, 0}}), Line(origin = {42.4832, -29.4134}, points = {{-8, 0}, {10, 0}}), Line(origin = {43.4832, -71.4134}, points = {{-9, 0}, {9, 0}}), Line(origin = {52.4832, -6.41341}, points = {{0, 65}, {0, -65}}), Line(origin = {64.4832, 10.5866}, points = {{0, 64}, {0, -64}}), Rectangle(origin = {-49, 0}, fillColor = {122, 122, 122}, fillPattern = FillPattern.Solid, extent = {{-5, 80}, {5, -80}}), Text(origin = {
84
, 6
2
}, extent = {{-10, 10}, {10, -10}}, textString = "Q")}),
Documentation(info = "
<html><head></head><body>
This model does not include thermal performance of the sice panel
</body></html>
"));
...
...
CoolingSystem/Experimental/ControlSystem.mo
View file @
126bbc75
...
...
@@ -4,47 +4,68 @@ model ControlSystem
extends
CoolingSystem
.
Devices
.
CoolingPlant
;
parameter
Modelica
.
SIunits
.
Time
startTime
=
100
;
parameter
Modelica
.
SIunits
.
Time
duration
=
30
;
parameter
Real
opening
(
min
=
0
,
max
=
1
)
=
0.8
;
parameter
Modelica
.
SIunits
.
Time
pause
=
20
;
CoolingSystem
.
Devices
.
Pipelines
pipelines1
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
86
,
-
2
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
CoolingSystem
.
Devices
.
ThermalDemonstrator
thermal_demonstrator1
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
130
,
-
2
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Constant
const1
(
k
=
1
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
218
,
-
32
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
Modelica
.
Blocks
.
Sources
.
Ramp
ramp
(
duration
=
250
,
height
=
-
1
,
offset
=
1
,
startTime
=
50
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
178
,
46
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
180
)));
Modelica
.
Blocks
.
Sources
.
Constant
const
(
k
=
1
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
90
,
50
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Constant
const2
(
k
=
273.15
-
40
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
130
,
10
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Constant
const3
(
k
=
0.5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
54
,
-
64
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Constant
const4
(
k
=
0.2
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
28
,
88
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Placement
(
visible
=
true
,
transformation
(
origin
=
{
90
,
-
28
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
CoolingSystem
.
Devices
.
ThermalDemonstrator
thermal_demonstrator1
(
leakage
=
0.05
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
180
,
-
12
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Constant
const3
(
k
=
1
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
50
,
-
70
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Ramp
op1
(
duration
=
duration
,
height
=
opening
,
startTime
=
100
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
128
,
48
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Ramp
op2
(
duration
=
duration
,
height
=
opening
,
startTime
=
op1
.
startTime
+
op1
.
duration
+
pause
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
128
,
18
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Ramp
op3
(
duration
=
duration
,
height
=
opening
,
startTime
=
op2
.
startTime
+
op2
.
duration
+
pause
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
128
,
-
14
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Ramp
op4
(
duration
=
duration
,
height
=
opening
,
startTime
=
op3
.
startTime
+
op3
.
duration
+
pause
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
128
,
-
48
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Ramp
op5
(
duration
=
duration
,
height
=
opening
,
startTime
=
op4
.
startTime
+
op4
.
duration
+
pause
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
128
,
-
80
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Continuous
.
FirstOrder
firstOrder2
(
T
=
60
,
y_start
=
0
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
236
,
30
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Step
step
(
startTime
=
op5
.
startTime
+
op5
.
duration
+
5
*
pause
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{
206
,
30
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Step
step1
(
height
=
-
60
,
offset
=
273.15
+
20
,
startTime
=
step
.
startTime
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
150
,
8
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
IBPSA
.
Controls
.
Continuous
.
LimPID
pumpPID
(
Ti
=
0.5e-3
,
controllerType
=
Modelica
.
Blocks
.
Types
.
SimpleController
.
PID
,
k
=
50e-06
,
strict
=
true
,
yMin
=
0.2
,
y_start
=
0.2
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
90
,
110
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
Modelica
.
Blocks
.
Sources
.
Constant
setPD
(
k
=
1.5e5
)
annotation
(
Placement
(
visible
=
true
,
transformation
(
origin
=
{-
134
,
110
},
extent
=
{{-
10
,
-
10
},
{
10
,
10
}},
rotation
=
0
)));
equation
connect
(
const4
.
y
,
pump
.
y
)
annotation
(
Line
(
points
=
{{-
16
,
88
},
{-
4
,
88
},
{-
4
,
48
},
{-
12
,
48
},
{-
12
,
16
},
{
6
,
16
},
{
6
,
22
}},
color
=
{
0
,
0
,
127
}));
connect
(
const3
.
y
,
val
.
y
)
annotation
(
Line
(
points
=
{{-
42
,
-
64
},
{
16
,
-
64
},
{
16
,
-
46
}},
color
=
{
0
,
0
,
127
}));
connect
(
const2
.
y
,
firstOrder
.
u
)
annotation
(
Line
(
points
=
{{-
118
,
10
},
{-
102
,
10
},
{-
102
,
8
}},
color
=
{
0
,
0
,
127
}));
connect
(
pipelines1
.
port_T1_a
,
val
.
port_2
)
annotation
(
Line
(
points
=
{{
76
,
-
7
},
{
40
,
-
7
},
{
40
,
-
34
},
{
26
,
-
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
volDUT
.
port_a
,
pipelines1
.
port_b
)
annotation
(
Line
(
points
=
{{
56
,
34
},
{
64
,
34
},
{
64
,
4
},
{
76
,
4
}},
color
=
{
0
,
127
,
255
}));
connect
(
pipelines1
.
port_T1_b
,
thermal_demonstrator1
.
port_a
)
annotation
(
Line
(
points
=
{{
96
,
-
6
},
{
106
,
-
6
},
{
106
,
14
},
{
132
,
14
},
{
132
,
8
},
{
130
,
8
}},
color
=
{
0
,
127
,
255
}));
connect
(
op1
.
y
,
thermal_demonstrator1
.
u1
)
annotation
(
Line
(
points
=
{{
139
,
48
},
{
159
,
48
},
{
159
,
-
2
},
{
167
,
-
2
}},
color
=
{
0
,
0
,
127
}));
connect
(
op2
.
y
,
thermal_demonstrator1
.
u2
)
annotation
(
Line
(
points
=
{{
139
,
18
},
{
155
,
18
},
{
155
,
-
8
},
{
167
,
-
8
}},
color
=
{
0
,
0
,
127
}));
connect
(
op3
.
y
,
thermal_demonstrator1
.
u3
)
annotation
(
Line
(
points
=
{{
139
,
-
14
},
{
155
,
-
14
},
{
155
,
-
12
},
{
167
,
-
12
}},
color
=
{
0
,
0
,
127
}));
connect
(
op4
.
y
,
thermal_demonstrator1
.
u4
)
annotation
(
Line
(
points
=
{{
139
,
-
48
},
{
153
,
-
48
},
{
153
,
-
18
},
{
167
,
-
18
}},
color
=
{
0
,
0
,
127
}));
connect
(
op5
.
y
,
thermal_demonstrator1
.
u5
)
annotation
(
Line
(
points
=
{{
139
,
-
80
},
{
157
,
-
80
},
{
157
,
-
22
},
{
167
,
-
22
}},
color
=
{
0
,
0
,
127
}));
connect
(
firstOrder2
.
y
,
thermal_demonstrator1
.
u
)
annotation
(
Line
(
points
=
{{
247
,
30
},
{
256
,
30
},
{
256
,
-
6
},
{
192
,
-
6
}},
color
=
{
0
,
0
,
127
}));
connect
(
step
.
y
,
firstOrder2
.
u
)
annotation
(
Line
(
points
=
{{
217
,
30
},
{
224
,
30
}},
color
=
{
0
,
0
,
127
}));
connect
(
pipelines1
.
port_T2_a
,
thermal_demonstrator1
.
port_b
)
annotation
(
Line
(
points
=
{{
96
,
4
},
{
102
,
4
},
{
102
,
-
28
},
{
130
,
-
28
},
{
130
,
-
12
}},
color
=
{
0
,
127
,
255
}));
connect
(
ramp
.
y
,
thermal_demonstrator1
.
u1
)
annotation
(
Line
(
points
=
{{
167
,
46
},
{
154
,
46
},
{
154
,
8
},
{
142
,
8
}},
color
=
{
0
,
0
,
127
}));
connect
(
const1
.
y
,
thermal_demonstrator1
.
u2
)
annotation
(
Line
(
points
=
{{
207
,
-
32
},
{
192
,
-
32
},
{
192
,
2
},
{
142
,
2
}},
color
=
{
0
,
0
,
127
}));
connect
(
thermal_demonstrator1
.
u3
,
const1
.
y
)
annotation
(
Line
(
points
=
{{
142
,
-
2
},
{
192
,
-
2
},
{
192
,
-
32
},
{
207
,
-
32
}},
color
=
{
0
,
0
,
127
}));
connect
(
thermal_demonstrator1
.
u4
,
const1
.
y
)
annotation
(
Line
(
points
=
{{
142
,
-
6
},
{
192
,
-
6
},
{
192
,
-
32
},
{
207
,
-
32
}},
color
=
{
0
,
0
,
127
}));
connect
(
thermal_demonstrator1
.
u5
,
const1
.
y
)
annotation
(
Line
(
points
=
{{
142
,
-
10
},
{
192
,
-
10
},
{
192
,
-
32
},
{
207
,
-
32
}},
color
=
{
0
,
0
,
127
}));
connect
(
const
.
y
,
thermal_demonstrator1
.
u
)
annotation
(
Line
(
points
=
{{
102
,
50
},
{
112
,
50
},
{
112
,
4
},
{
118
,
4
}},
color
=
{
0
,
0
,
127
}));
Line
(
points
=
{{
100
,
-
23
},
{
106
,
-
23
},
{
106
,
68
},
{
180
,
68
},
{
180
,
-
2
}},
color
=
{
0
,
127
,
255
}));
connect
(
thermal_demonstrator1
.
port_a
,
pipelines1
.
port_T1_b
)
annotation
(
Line
(
points
=
{{
180
,
-
22
},
{
180
,
-
108
},
{
106
,
-
108
},
{
106
,
-
33
},
{
100
,
-
33
}},
color
=
{
0
,
127
,
255
}));
connect
(
step1
.
y
,
firstOrder
.
u
)
annotation
(
Line
(
points
=
{{-
139
,
8
},
{-
86
,
8
}},
color
=
{
0
,
0
,
127
}));
connect
(
const3
.
y
,
val
.
y
)
annotation
(
Line
(
points
=
{{-
38
,
-
70
},
{-
20
,
-
70
},
{-
20
,
-
46
}},
color
=
{
0
,
0
,
127
}));
connect
(
pipelines1
.
port_b
,
senTem_T2
.
port_a
)
annotation
(
Line
(
points
=
{{
80
,
-
23
},
{
74
,
-
23
},
{
74
,
34
},
{
50
,
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
pipelines1
.
port_T1_a
,
senTem_T1
.
port_b
)
annotation
(
Line
(
points
=
{{
80
,
-
33
},
{
74
,
-
33
},
{
74
,
-
34
},
{
50
,
-
34
}},
color
=
{
0
,
127
,
255
}));
connect
(
pumpPID
.
y
,
pump
.
y
)
annotation
(
Line
(
points
=
{{-
78
,
110
},
{-
30
,
110
},
{-
30
,
46
}},
color
=
{
0
,
0
,
127
}));
connect
(
setPD
.
y
,
pumpPID
.
u_s
)
annotation
(
Line
(
points
=
{{-
122
,
110
},
{-
102
,
110
}},
color
=
{
0
,
0
,
127
}));
connect
(
pumpPID
.
u_m
,
senRelPre
.
p_rel
)
annotation
(
Line
(
points
=
{{-
90
,
98
},
{-
90
,
80
},
{-
42
,
80
},
{-
42
,
64
},
{
84
,
64
},
{
84
,
2
},
{
70
,
2
}},
color
=
{
0
,
0
,
127
}));
end
ControlSystem
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment