-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathSimpleRC_NoSignalExchangeBlocks.mo
More file actions
65 lines (65 loc) · 2.95 KB
/
SimpleRC_NoSignalExchangeBlocks.mo
File metadata and controls
65 lines (65 loc) · 2.95 KB
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
within ;
model SimpleRC_NoSignalExchangeBlocks
"A simple thermal R1C1 model with sinusoidal outside air temperature and heating input with no signal exchange blocks"
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor cap(C=1e6)
annotation (Placement(transformation(extent={{30,20},{50,40}})));
Modelica.Thermal.HeatTransfer.Components.ThermalResistor res(R=0.01)
annotation (Placement(transformation(extent={{0,10},{20,30}})));
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTZone
annotation (Placement(transformation(extent={{50,10},{70,30}})));
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature preTOut
annotation (Placement(transformation(extent={{-40,10},{-20,30}})));
Modelica.Blocks.Sources.Sine souTOut(
f=1/(3600*24),
offset=273.15 + 20,
amplitude=10)
annotation (Placement(transformation(extent={{-100,10},{-80,30}})));
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeat
annotation (Placement(transformation(extent={{20,-30},{40,-10}})));
Modelica.Blocks.Math.Gain eff(k=1/0.99)
annotation (Placement(transformation(extent={{20,-90},{40,-70}})));
Modelica.Blocks.Continuous.LimPID con(
controllerType=Modelica.Blocks.Types.SimpleController.P,
k=2000,
yMin=0,
yMax=100000)
annotation (Placement(transformation(extent={{-40,-30},{-20,-10}})));
Modelica.Blocks.Sources.Step set(
height=2,
offset=273.15 + 20,
startTime=3600*24)
annotation (Placement(transformation(extent={{-100,-30},{-80,-10}})));
equation
connect(res.port_b, cap.port)
annotation (Line(points={{20,20},{40,20}},
color={191,0,0}));
connect(cap.port, senTZone.port)
annotation (Line(points={{40,20},{50,20}},
color={191,0,0}));
connect(preTOut.port, res.port_a)
annotation (Line(points={{-20,20},{0,20}}, color={191,0,0}));
connect(souTOut.y, preTOut.T)
annotation (Line(points={{-79,20},{-42,20}},
color={0,0,127}));
connect(preHeat.port, cap.port)
annotation (Line(points={{40,-20},{40,20}}, color={191,0,0}));
connect(senTZone.T, con.u_m) annotation (Line(points={{71,20},{80,20},{80,-40},
{-30,-40},{-30,-32}}, color={0,0,127}));
connect(set.y, con.u_s)
annotation (Line(points={{-79,-20},{-42,-20}}, color={0,0,127}));
connect(con.y, preHeat.Q_flow)
annotation (Line(points={{-19,-20},{20,-20}}, color={0,0,127}));
connect(con.y, eff.u) annotation (Line(points={{-19,-20},{14,-20},{14,-80},{
18,-80}}, color={0,0,127}));
annotation (uses(Modelica(version="4.0.0"), IBPSA(version="4.0.0")),
Documentation(revisions="<html>
<ul>
<li>
October 24, 2025, by Ettore Zanetti:<br/>
Updated model to use Modelica 4.0 and Buildings 12.1.0.
This is for <a href=https://github.com/ibpsa/project1-boptest/issues/422>
BOPTEST issue #422</a>.
</li>
</ul>
</html>"));
end SimpleRC_NoSignalExchangeBlocks;