Skip to content

Commit

Permalink
Replace obsolete pump and valve models in example model #1171 "ci_upd…
Browse files Browse the repository at this point in the history
…ate_ref"
  • Loading branch information
LauraMaier committed Mar 23, 2022
1 parent 823eba6 commit 61b730c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 40 deletions.
83 changes: 43 additions & 40 deletions AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,16 @@ model StorageSolarCollector
{-30,34}})));
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent={{-60,14},
{-40,34}})));
AixLib.Obsolete.Year2021.Fluid.Movers.Pump pump(
ControlStrategy=1,
redeclare package Medium = Medium,
m_flow_small=1e-4) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=270,
origin={-8,70})));
AixLib.Fluid.Sources.Boundary_pT
boundary_p(nPorts=1, redeclare package Medium = Medium)
annotation(Placement(transformation(extent = {{-86, 70}, {-66, 90}})));
Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin={36,70})));
boundary_p( redeclare package Medium = Medium,
nPorts=1) annotation(Placement(transformation(extent={{86,74},
{66,94}})));
Modelica.Fluid.Pipes.DynamicPipe
pipe(
redeclare package Medium = Medium,
length=10,
diameter=0.05) annotation(Placement(transformation(extent={{-6,-10},
{14,10}})));
AixLib.Fluid.Sources.Boundary_ph
boundary_ph1(use_p_in = true, h = 42e3,
nPorts=1,
redeclare package Medium = Medium) annotation(Placement(transformation(extent={{-66,-26},
{-46,-6}})));
AixLib.Fluid.Sources.Boundary_pT
boundary_ph2(nPorts=1, redeclare package Medium = Medium)
annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin={-76,52})));
Expand All @@ -57,24 +45,27 @@ model StorageSolarCollector
Collector=AixLib.DataBase.SolarThermal.FlatCollector(),
A=20,
redeclare package Medium = Medium,
m_flow_nominal=0.01,
m_flow_nominal=0.04,
volPip=1)
annotation (Placement(transformation(extent={{24,-10},{44,10}})));
Modelica.Blocks.Sources.Pulse pulse(period = 3600, width = 1, amplitude = 60,
offset=101325) annotation(Placement(transformation(extent={{-96,-18},
{-76,2}})));
AixLib.Obsolete.Year2021.Fluid.Actuators.Valves.SimpleValve simpleValve(
Kvs=2,
Modelica.Blocks.Sources.Pulse pulse(period = 3600, width = 1,
amplitude=0.02,
offset=0) annotation(Placement(transformation(extent={{-96,-14},
{-76,6}})));
AixLib.Fluid.Actuators.Valves.TwoWayEqualPercentage valve(
redeclare package Medium = Medium,
m_flow_small=1e-4) annotation (Placement(transformation(
m_flow_nominal=solarThermal.m_flow_nominal,
dpValve_nominal=2000) annotation (Placement(transformation(
extent={{-10,9},{10,-9}},
rotation=90,
origin={69,42})));
AixLib.Fluid.Sensors.TemperatureTwoPort
temperatureSensor(redeclare package Medium = Medium,
m_flow_nominal=0.01) annotation(Placement(transformation(extent={{48,-10},
{68,10}})));
Modelica.Blocks.Continuous.LimPID PI(controllerType = Modelica.Blocks.Types.SimpleController.PI, k = 0.05, Ti = 60, yMax = 0.999, yMin = 0) annotation(Placement(transformation(extent = {{-6, 6}, {6, -6}}, rotation = 90, origin={90,14})));
Modelica.Blocks.Continuous.LimPID PI(controllerType = Modelica.Blocks.Types.SimpleController.PI,
k=0.005,
Ti=60, yMax = 0.999, yMin = 0) annotation(Placement(transformation(extent = {{-6, 6}, {6, -6}}, rotation = 90, origin={90,14})));
Modelica.Blocks.Sources.Constant const(k = 273.15 + 70) annotation(Placement(transformation(extent={{74,-10},
{80,-4}})));
Modelica.Blocks.Math.Add add(k2 = -1) annotation(Placement(transformation(extent = {{-4, -4}, {4, 4}}, rotation = 90, origin={88,30})));
Expand All @@ -89,32 +80,31 @@ model StorageSolarCollector
5; 72000,22.9,0; 75600,21.2,0; 79200,20.6,0; 82800,20.3,0],
offset={273.15,0.01})
annotation (Placement(transformation(extent={{10,32},{30,52}})));
AixLib.Fluid.Movers.FlowControlled_dp pump(redeclare package Medium = Medium,
m_flow_nominal=solarThermal.m_flow_nominal)
annotation (Placement(transformation(extent={{6,60},{-14,80}})));
Modelica.Blocks.Sources.Constant dpPumpInput(k=55000)
annotation (Placement(transformation(extent={{32,80},{12,100}})));
AixLib.Fluid.Sources.MassFlowSource_T boundary(
redeclare package Medium = Medium,
use_m_flow_in=true,
use_T_in=false,
T=283.15,
nPorts=1)
annotation (Placement(transformation(extent={{-68,-26},{-48,-6}})));
equation
connect(booleanExpression.y, pump.IsNight) annotation(Line(points={{25,70},{
2.2,70}}, color = {255, 0, 255}));
connect(hotSummerDay.y[2], solarThermal.Irradiation) annotation(Line(points={{31,42},
{31,10},{34,10}}, color = {0, 0, 127}));
connect(hotSummerDay.y[1], solarThermal.T_air) annotation(Line(points={{31,42},
{31,22},{28,22},{28,10}}, color = {0, 0, 127}));
connect(pulse.y, boundary_ph1.p_in) annotation(Line(points={{-75,-8},{-68,-8}}, color = {0, 0, 127}));
connect(simpleValve.port_b, pump.port_a) annotation(Line(points={{69,52},{68,
52},{68,80},{-8,80}}, color = {0, 127, 255}));
connect(solarThermal.port_b, temperatureSensor.port_a) annotation(Line(points={{44,0},{
48,0}}, color = {0, 127, 255}));
connect(solarThermal.port_a, pipe.port_b) annotation(Line(points={{24,0},{14,
0}}, color = {0, 127, 255}));
connect(temperatureSensor.port_b, simpleValve.port_a) annotation(Line(points={{68,0},{
68,32},{69,32}}, color = {0, 127, 255}));
connect(temperatureSensor.port_b, valve.port_a)
annotation (Line(points={{68,0},{68,32},{69,32}}, color={0,127,255}));
connect(const.y, PI.u_s) annotation(Line(points={{80.3,-7},{90,-7},{90,6.8}}, color = {0, 0, 127}));
connect(PI.y, add.u2) annotation(Line(points={{90,20.6},{90,25.2},{90.4,25.2}}, color = {0, 0, 127}));
connect(add.y, simpleValve.opening) annotation(Line(points={{88,34.4},{88,42},
{76.2,42}}, color = {0, 0, 127}));
connect(boundary_ph1.ports[1], pipe1.port_a) annotation (Line(
points={{-46,-16},{-40,-16}},
color={0,127,255}));
connect(boundary_p.ports[1], pump.port_a) annotation (Line(
points={{-66,80},{-36,80},{-8,80}},
color={0,127,255}));
connect(temperatureSensor.T, PI.u_m) annotation (Line(
points={{58,11},{58,14},{82.8,14}},
color={0,0,127}));
Expand All @@ -130,8 +120,21 @@ equation
Line(points={{-40,24},{-34,24},{-34,24.6},{-29.75,24.6}}, color={191,0,0}));
connect(pipe.port_a, bufferStorage.portHC1Out) annotation (Line(points={{-6,0},
{-6,26.6},{-9.875,26.6}}, color={0,127,255}));
connect(bufferStorage.portHC1In, pump.port_b) annotation (Line(points={{-9.75,
29.7},{-9.75,44.85},{-8,44.85},{-8,60}}, color={0,127,255}));
connect(valve.port_b, pump.port_a) annotation (Line(points={{69,52},{68,52},{
68,70},{6,70}}, color={0,127,255}));
connect(dpPumpInput.y, pump.dp_in)
annotation (Line(points={{11,90},{-4,90},{-4,82}}, color={0,0,127}));
connect(pump.port_a, boundary_p.ports[1]) annotation (Line(points={{6,70},{36,
70},{36,84},{66,84}}, color={0,127,255}));
connect(add.y, valve.y)
annotation (Line(points={{88,34.4},{88,42},{79.8,42}}, color={0,0,127}));
connect(pump.port_b, bufferStorage.portHC1In) annotation (Line(points={{-14,
70},{-16,70},{-16,46},{-6,46},{-6,29.7},{-9.75,29.7}}, color={0,127,
255}));
connect(boundary.ports[1], pipe1.port_a)
annotation (Line(points={{-48,-16},{-40,-16}}, color={0,127,255}));
connect(pulse.y, boundary.m_flow_in) annotation (Line(points={{-75,-4},{-72,
-4},{-72,-8},{-70,-8}}, color={0,0,127}));
annotation (experiment(Tolerance=1e-6, StopTime = 172800, Interval = 60),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Fluid/Storage/Examples/StorageSolarCollector.mos" "Simulate and plot"),
Documentation(info = "<html><h4>
Expand Down
1 change: 1 addition & 0 deletions bin/interact_CI/update_ref.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AixLib_Systems_HeatPumpSystems_Examples_HeatPumpSystem.txt
AixLib_Fluid_Storage_Examples_StorageSolarCollector.txt

0 comments on commit 61b730c

Please sign in to comment.