Date: Fri, 14 Oct 2022 10:58:52 +0200
Subject: [PATCH 33/48] =?UTF-8?q?[skip-ci]=20Change=20=C2=B4gain=C2=B4-blo?=
=?UTF-8?q?ck=20to=20=C2=B4product=C2=B4-Block=20with=20=C2=B4realExpressi?=
=?UTF-8?q?on=C2=B4-block=20to=20avoid=20warning=20concerning=20unit-incon?=
=?UTF-8?q?sistency?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For #1345
---
.../Fluid/Humidifiers/GenericHumidifier_u.mo | 185 ++++--------------
1 file changed, 40 insertions(+), 145 deletions(-)
diff --git a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
index d1589bf8f1..633bac7a13 100644
--- a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
+++ b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
@@ -49,15 +49,15 @@ model GenericHumidifier_u
annotation (Placement(transformation(extent={{-100,-104},{-80,-84}})));
Modelica.Blocks.Routing.RealPassThrough Tsteam if steamHumidifier
annotation (Placement(transformation(extent={{-60,-98},{-40,-78}})));
-
+ Modelica.Blocks.Sources.RealExpression realExpression(y = mWat_flow_nominal) annotation(
+ Placement(visible = true, transformation(origin = {-62, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+ Modelica.Blocks.Math.Product product annotation(
+ Placement(visible = true, transformation(origin = {-20, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
protected
Modelica.Blocks.Interfaces.RealInput Tsteam_intern;
Modelica.Blocks.Nonlinear.Limiter limiter(uMax=1, uMin=0)
annotation (Placement(transformation(extent={{-90,50},{-70,70}})));
- Modelica.Blocks.Math.Gain gai(final k=mWat_flow_nominal) "Gain"
- annotation (Placement(transformation(extent={{-58,50},{-38,70}})));
-
Modelica.Blocks.Math.Add add(k2=-1) if steamHumidifier
annotation (Placement(transformation(extent={{20,-60},{40,-40}})));
equation
@@ -66,16 +66,11 @@ equation
end if;
connect(Tsteam.y, Tsteam_intern);
- connect(gai.y, vol.mWat_flow) annotation (Line(
+ connect(product.y, vol.mWat_flow) annotation (Line(
points={{-37,60},{-30,60},{-30,-18},{-11,-18}},
color={0,0,127}));
-
- connect(gai.y, mWat_flow)
- annotation (Line(points={{-37,60},{110,60}}, color={0,0,127}));
connect(u, limiter.u)
annotation (Line(points={{-120,60},{-92,60}}, color={0,0,127}));
- connect(limiter.y, gai.u)
- annotation (Line(points={{-69,60},{-60,60}}, color={0,0,127}));
connect(prescribedHeatFlow.port, vol.heatPort) annotation (Line(points={{-20,-40},
{-20,-10},{-9,-10}}, color={191,0,0}));
@@ -105,142 +100,42 @@ equation
points={{-79,-94},{-72,-94},{-72,-88},{-62,-88}},
color={0,0,127},
pattern=LinePattern.Dash));
+ connect(limiter.y, product.u1) annotation(
+ Line(points = {{-68, 60}, {-48, 60}, {-48, 66}, {-32, 66}}, color = {0, 0, 127}));
+ connect(realExpression.y, product.u2) annotation(
+ Line(points = {{-50, 32}, {-40, 32}, {-40, 54}, {-32, 54}}, color = {0, 0, 127}));
+ connect(product.y, mWat_flow) annotation(
+ Line(points = {{-9, 60}, {110, 60}}, color = {0, 0, 127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
- -100},{100,100}}), graphics={
- Text(
- extent={{-52,-60},{58,-120}},
- textString="m=%m_flow_nominal",
- pattern=LinePattern.None,
- lineColor={0,0,127}),
- Rectangle(
- extent={{-100,61},{-70,58}},
- lineColor={0,0,255},
- pattern=LinePattern.None,
- fillColor={0,0,127},
- fillPattern=FillPattern.Solid),
- Text(
- extent={{-118,104},{-74,76}},
- lineColor={0,0,127},
- textString="u"),
- Rectangle(
- extent={{-100,5},{101,-5}},
- lineColor={0,0,255},
- pattern=LinePattern.None,
- fillColor={0,0,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-70,60},{70,-60}},
- lineColor={0,0,255},
- pattern=LinePattern.None,
- fillColor={95,95,95},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{42,42},{54,34},{54,34},{42,28},{42,30},{50,34},{50,34},{42,
- 40},{42,42}},
- lineColor={255,255,255},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{58,-54},{54,52}},
- lineColor={255,255,255},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{70,61},{100,58}},
- lineColor={0,0,255},
- pattern=LinePattern.None,
- fillColor={0,0,127},
- fillPattern=FillPattern.Solid),
- Text(
- extent={{32,98},{98,44}},
- lineColor={0,0,127},
- textString="mWat_flow"),
- Polygon(
- points={{42,10},{54,2},{54,2},{42,-4},{42,-2},{50,2},{50,2},{42,8},{
- 42,10}},
- lineColor={255,255,255},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{42,-26},{54,-34},{54,-34},{42,-40},{42,-38},{50,-34},{50,-34},
- {42,-28},{42,-26}},
- lineColor={255,255,255},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Text(extent={{30,130},{96,76}},
- lineColor={0,0,127},
- textString="powerEva",
- visible=steamHumidifier),
- Ellipse(visible=steamHumidifier,
- extent={{-14,44},{10,30}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{24,38},{34,32}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{26,30},{8,42}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{-28,12},{-4,-2}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{12,-2},{-6,10}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{10,6},{20,0}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{-12,-24},{12,-38}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{28,-38},{10,-26}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Ellipse(visible=steamHumidifier,
- extent={{26,-30},{36,-36}},
- lineColor={28,108,200},
- fillColor={255,255,255},
- fillPattern=FillPattern.Solid),
- Line(visible=not steamHumidifier,
- points={{28,40},{14,40}}, color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{-6,36},{-20,30}},color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{30,4},{16,6}}, color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{0,4},{-14,-2}}, color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{30,-32},{16,-30}}, color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{0,-34},{-14,-40}}, color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{-32,-24},{-42,-38}},color={28,
- 108,200},
- thickness=0.5),
- Line(visible=not steamHumidifier,points={{-32,10},{-42,-4}}, color={28,
- 108,200},
- thickness=0.5)}),
+ -100},{100,100}}), graphics={Text(lineColor = {0, 0, 127}, extent = {{-52, -60}, {58, -120}}, textString = "m=%m_flow_nominal"),
+ Rectangle(lineColor = {0, 0, 255}, fillColor = {0, 0, 127}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-100, 61}, {-70, 58}}),
+ Text(lineColor = {0, 0, 127}, extent = {{-118, 104}, {-74, 76}}, textString = "u"),
+ Rectangle(lineColor = {0, 0, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-100, 5}, {101, -5}}),
+ Rectangle(lineColor = {0, 0, 255}, fillColor = {95, 95, 95}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-70, 60}, {70, -60}}),
+ Polygon(lineColor = {255, 255, 255}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, points = {{42, 42}, {54, 34}, {54, 34}, {42, 28}, {42, 30}, {50, 34}, {50, 34}, {42, 40}, {42, 42}}),
+ Rectangle(lineColor = {255, 255, 255}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{58, -54}, {54, 52}}),
+ Rectangle(lineColor = {0, 0, 255}, fillColor = {0, 0, 127}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{70, 61}, {100, 58}}),
+ Text(lineColor = {0, 0, 127}, extent = {{32, 98}, {98, 44}}, textString = "mWat_flow"),
+ Polygon(lineColor = {255, 255, 255}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, points = {{42, 10}, {54, 2}, {54, 2}, {42, -4}, {42, -2}, {50, 2}, {50, 2}, {42, 8}, {42, 10}}),
+ Polygon(lineColor = {255, 255, 255}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, points = {{42, -26}, {54, -34}, {54, -34}, {42, -40}, {42, -38}, {50, -34}, {50, -34}, {42, -28}, {42, -26}}),
+ Text(lineColor = {0, 0, 127}, extent = {{30, 130}, {96, 76}}, textString = "powerEva"),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-14, 44}, {10, 30}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{24, 38}, {34, 32}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{26, 30}, {8, 42}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-28, 12}, {-4, -2}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{12, -2}, {-6, 10}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{10, 6}, {20, 0}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-12, -24}, {12, -38}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{28, -38}, {10, -26}}),
+ Ellipse(lineColor = {28, 108, 200}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{26, -30}, {36, -36}}),
+ Line(visible = false, points = {{28, 40}, {14, 40}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{-6, 36}, {-20, 30}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{30, 4}, {16, 6}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{0, 4}, {-14, -2}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{30, -32}, {16, -30}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{0, -34}, {-14, -40}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{-32, -24}, {-42, -38}}, color = {28, 108, 200}, thickness = 0.5),
+ Line(visible = false, points = {{-32, 10}, {-42, -4}}, color = {28, 108, 200}, thickness = 0.5)}),
defaultComponentName="hum",
Documentation(info="
Model for an air humidifier.
From 7119209871a4f3588d0cbedbc14a51711b2957da Mon Sep 17 00:00:00 2001
From: Martin Kremer
Date: Fri, 14 Oct 2022 11:03:48 +0200
Subject: [PATCH 34/48] [skip-ci] Changes initilization of massDynamics to
steady-state
For #1345
---
AixLib/Systems/ModularAHU/Examples/Heater.mo | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/AixLib/Systems/ModularAHU/Examples/Heater.mo b/AixLib/Systems/ModularAHU/Examples/Heater.mo
index 9c3496090c..1ba666d427 100644
--- a/AixLib/Systems/ModularAHU/Examples/Heater.mo
+++ b/AixLib/Systems/ModularAHU/Examples/Heater.mo
@@ -20,19 +20,17 @@ model Heater "Heating register"
PumpInterface(pump(redeclare
AixLib.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to4 per))),
redeclare package Medium2 = MediumWater,
- m1_flow_nominal=1,
- m2_flow_nominal=0.1,
redeclare package Medium1 = MediumAir,
- energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
+ T_amb=293.15,
dynamicHX(
- dp1_nominal=100,
- dp2_nominal=6000,
- dT_nom=20,
+
Q_nom=30000,
- redeclare AixLib.Fluid.MixingVolumes.MixingVolume vol1,
- redeclare AixLib.Fluid.MixingVolumes.MixingVolume vol2),
+ dT_nom=20,dp1_nominal=100,
+ dp2_nominal=6000),
+ energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
hydraulicModuleIcon="Admix",
- T_amb=293.15)
+ m1_flow_nominal=1,
+ m2_flow_nominal=0.1, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial)
annotation (Placement(transformation(extent={{-40,-46},{26,40}})));
Fluid.Sources.Boundary_pT boundaryWaterSource(
nPorts=1,
From 8ef7d67c76e12ffbbede71dfd12f234e99a1ffc1 Mon Sep 17 00:00:00 2001
From: Martin Kremer
Date: Fri, 14 Oct 2022 14:14:24 +0200
Subject: [PATCH 35/48] =?UTF-8?q?[skip-ci]=20Add=20boolean=20input=20for?=
=?UTF-8?q?=20=C2=B4onSet=C2=B4=20in=20pump-bus=20to=20avoid=20mismatch=20?=
=?UTF-8?q?in=20equations=20and=20variables?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For #1345
---
AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo | 4 ++++
AixLib/Systems/ModularAHU/Validation/AHU2_Heater.mo | 4 ++++
AixLib/Systems/ModularAHU/Validation/AHU2_Preheater.mo | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
index 4741ca78a8..dae31283f0 100644
--- a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
+++ b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
@@ -108,6 +108,8 @@ model AHU2_Cooler "Cooling register of ahu 2 in E.ON ERC testhall"
annotation (Placement(transformation(extent={{-90,34},{-78,46}})));
Modelica.Blocks.Sources.Constant const(k=-0.5)
annotation (Placement(transformation(extent={{-104,32},{-96,40}})));
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
+ Placement(visible = true, transformation(origin = {-80, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(toKelvin.Kelvin, boundaryWaterSource.T_in)
annotation (Line(points={{-57,-92},{-16,-92}}, color={0,0,127}));
@@ -158,6 +160,8 @@ equation
-72,40},{-72,36}}, color={0,0,127}));
connect(const.y, add.u2) annotation (Line(points={{-95.6,36},{-94,36},{-94,
36.4},{-91.2,36.4}}, color={0,0,127}));
+ connect(pumpOn.y, registerBus1.hydraulicBus.pumpBus.onSet) annotation(
+ Line(points = {{-68, -24}, {-38, -24}, {-38, 10}}, color = {255, 0, 255}));
annotation (Documentation(info="
This example compares the simulated behavior with measured data. The
input filter of the valve is deactivated because the measured actual
diff --git a/AixLib/Systems/ModularAHU/Validation/AHU2_Heater.mo b/AixLib/Systems/ModularAHU/Validation/AHU2_Heater.mo
index 0008745871..11e6431c0f 100644
--- a/AixLib/Systems/ModularAHU/Validation/AHU2_Heater.mo
+++ b/AixLib/Systems/ModularAHU/Validation/AHU2_Heater.mo
@@ -103,6 +103,8 @@ model AHU2_Heater "Heating register of ahu 2 in E.ON ERC testhall"
annotation (Placement(transformation(extent={{-90,34},{-78,46}})));
Modelica.Blocks.Sources.Constant const(k=1)
annotation (Placement(transformation(extent={{-104,32},{-96,40}})));
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
+ Placement(visible = true, transformation(origin = {-80, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(toKelvin.Celsius, combiTimeTable.y[2]) annotation (Line(points={{-80,-92},
{-106,-92},{-106,70},{-58,70},{-58,90},{-79,90}}, color={0,0,127}));
@@ -153,6 +155,8 @@ equation
-72,40},{-72,36}}, color={0,0,127}));
connect(const.y, add.u2) annotation (Line(points={{-95.6,36},{-94,36},{-94,
36.4},{-91.2,36.4}}, color={0,0,127}));
+ connect(pumpOn.y, registerBus1.hydraulicBus.pumpBus.onSet) annotation(
+ Line(points = {{-68, -24}, {-38, -24}, {-38, 10}}, color = {255, 0, 255}));
annotation (Documentation(info="
This example compares the simulated behavior with measured data. The
input filter of the valve is deactivated because the measured actual
diff --git a/AixLib/Systems/ModularAHU/Validation/AHU2_Preheater.mo b/AixLib/Systems/ModularAHU/Validation/AHU2_Preheater.mo
index b318f937e6..45717feb75 100644
--- a/AixLib/Systems/ModularAHU/Validation/AHU2_Preheater.mo
+++ b/AixLib/Systems/ModularAHU/Validation/AHU2_Preheater.mo
@@ -98,6 +98,8 @@ model AHU2_Preheater "Heating register of ahu 2 in E.ON ERC testhall"
BaseClasses.RegisterBus registerBus1
annotation (Placement(transformation(extent={{-48,0},{-28,20}})));
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
+ Placement(visible = true, transformation(origin = {-80, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(toKelvin.Kelvin, boundaryWaterSource.T_in)
annotation (Line(points={{-57,-92},{-16,-92}}, color={0,0,127}));
@@ -143,6 +145,8 @@ equation
connect(boundaryWaterSource.ports[1], registerModule.port_a2) annotation (
Line(points={{-20,-70},{-22,-70},{-22,0.461538},{-22,0.461538}}, color={0,
127,255}));
+ connect(pumpOn.y, registerBus1.hydraulicBus.pumpBus.onSet) annotation(
+ Line(points = {{-68, -24}, {-38, -24}, {-38, 10}}, color = {255, 0, 255}));
annotation (Documentation(info="
This example compares the simulated behavior with measured data. The
input filter of the valve is deactivated because the measured actual
From bbe22c8076dcc810a125528747e938308648b5c1 Mon Sep 17 00:00:00 2001
From: Martin Kremer
Date: Mon, 24 Oct 2022 15:40:05 +0200
Subject: [PATCH 36/48] Delete unneccessary constant definition, directly using
existing constant
---
.../BaseClasses/Functions/CollisionIntegral.mo | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/AixLib/Fluid/MassExchangers/MembraneBasedEnthalpyExchangers/BaseClasses/Functions/CollisionIntegral.mo b/AixLib/Fluid/MassExchangers/MembraneBasedEnthalpyExchangers/BaseClasses/Functions/CollisionIntegral.mo
index cb428de57c..b54bbe71d5 100644
--- a/AixLib/Fluid/MassExchangers/MembraneBasedEnthalpyExchangers/BaseClasses/Functions/CollisionIntegral.mo
+++ b/AixLib/Fluid/MassExchangers/MembraneBasedEnthalpyExchangers/BaseClasses/Functions/CollisionIntegral.mo
@@ -13,9 +13,10 @@ protected
Real eps12;
Real epsInternal;
- constant Real kB(unit="J/K") = Modelica.Constants.k "Stefan-Boltzmann-Constant";
- constant Real epsAir = 78.6 * kB "Lennard-Jones potential of air";
- constant Real epsSteam = 363 * kB "Lennard-Jones potential of steam";
+ constant Real epsAir = 78.6 * Modelica.Constants.k
+ "Lennard-Jones potential of air";
+ constant Real epsSteam = 363 * Modelica.Constants.k
+ "Lennard-Jones potential of steam";
algorithm
omegas :={2.662,2.476,2.318,2.184,2.066,1.966,1.877,1.789,1.729,1.667,1.612,1.562,
@@ -33,7 +34,7 @@ algorithm
eps12 :=(epsAir*epsSteam)^(1/2);
- epsInternal :=kB*T/eps12;
+ epsInternal :=Modelica.Constants.k*T/eps12;
Omega_D := AixLib.Utilities.Math.Functions.linearInterpolation(
x=epsInternal, y_1=interp);
From 9af25ffb7261aba0ad73531a0f750adb83b8c8b9 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Fri, 11 Nov 2022 12:06:22 +0100
Subject: [PATCH 37/48] Revert changes causing the regression test to fail.
Only apply scalar ports.
---
.../DistrictHeatingCooling/Pipes/DHCPipe.mo | 98 +++---
.../Pipes/Examples/DHCPipe.mo | 18 +-
.../Pipes/Examples/PlugFlowPipeEmbedded.mo | 3 +-
.../Pipes/Examples/PlugFlowPipeZeta.mo | 3 +-
.../Pipes/Examples/StaticPipe.mo | 3 +-
.../Pipes/PlugFlowPipeEmbedded.mo | 11 +-
.../Pipes/PlugFlowPipeZeta.mo | 33 +--
.../Pipes/StaticPipe.mo | 18 +-
.../BaseClasses/PlugFlowCore.mo | 279 ++++++++++++++++++
.../BaseClasses/package.order | 1 +
10 files changed, 390 insertions(+), 77 deletions(-)
create mode 100644 AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowCore.mo
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
index 9020ff1026..3da3ace663 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
@@ -1,6 +1,6 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model DHCPipe "Generic pipe model for DHC applications"
- extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
@@ -124,15 +124,12 @@ model DHCPipe "Generic pipe model for DHC applications"
"Heat transfer to or from surroundings (heat loss from pipe results in a positive heat flow)"
annotation (Placement(transformation(extent={{-10,90},{10,110}})));
- replaceable AixLib.Fluid.FixedResistances.PlugFlowPipe floPip(
+ replaceable AixLib.Fluid.FixedResistances.BaseClasses.PlugFlowCore pipCor(
redeclare final package Medium = Medium,
final dh=dh,
final v_nominal=v_nominal,
final length=length,
- final dIns=dIns,
- final kIns=kIns,
- final cPip=cPip,
- final rhoPip=rhoPip,
+ final C=C,
final R=R,
final m_flow_small=m_flow_small,
final m_flow_nominal=m_flow_nominal,
@@ -147,7 +144,27 @@ model DHCPipe "Generic pipe model for DHC applications"
final roughness=roughness,
final allowFlowReversal=allowFlowReversal,
final homotopyInitialization=homotopyInitialization,
- final linearized=linearized) constrainedby Interfaces.PartialTwoPort "Describing the pipe behavior" annotation (choices(
+ final linearized=linearized) constrainedby Interfaces.PartialTwoPort(
+ redeclare package Medium = Medium,
+ dh=dh,
+ v_nominal=v_nominal,
+ length=length,
+ C=C,
+ R=R,
+ m_flow_small=m_flow_small,
+ m_flow_nominal=m_flow_nominal,
+ T_start_in=T_start_in,
+ T_start_out=T_start_out,
+ m_flow_start=m_flow_start,
+ initDelay=initDelay,
+ from_dp=from_dp,
+ fac=if not use_zeta then fac else 1.0,
+ ReC=ReC,
+ thickness=thickness,
+ roughness=roughness,
+ allowFlowReversal=allowFlowReversal,
+ homotopyInitialization=homotopyInitialization,
+ linearized=linearized) "Describing the pipe behavior" annotation (choices(
choice(redeclare
AixLib.Fluid.DistrictHeatingCooling.Pipes.BaseClassesStatic.StaticCore
pipCor "Static core"), choice(redeclare
@@ -164,7 +181,7 @@ model DHCPipe "Generic pipe model for DHC applications"
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
- final nPorts=2,
+ final nPorts=nPorts + 1,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
@@ -203,26 +220,7 @@ model DHCPipe "Generic pipe model for DHC applications"
T0=283.15) if use_soil
annotation (Placement(transformation(extent={{-10,72},{10,92}})));
- FixedResistances.HydraulicResistance hydRes(
- diameter=dh,
- m_flow_nominal=m_flow_nominal,
- redeclare package Medium = Medium,
- zeta=sum_zetas,
- allowFlowReversal=allowFlowReversal,
- from_dp=from_dp,
- homotopyInitialization=homotopyInitialization,
- linearized=linearized,
- m_flow_start=m_flow_start) if use_zeta
- annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
- Modelica.Thermal.HeatTransfer.Components.ThermalCollector thePasThr(final m=1)
- if not use_soil "Thermal pass through if there is no soil activated"
- annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- rotation=180,
- origin={-16,54})));
- Interfaces.PassThroughMedium pasThrMed(redeclare package Medium = Medium)
- if not use_zeta
- annotation (Placement(transformation(extent={{-60,-30},{-40,-10}})));
+
protected
parameter Modelica.Units.SI.HeatCapacity CPip=length*((dh + 2*thickness)^2 -
dh^2)*Modelica.Constants.pi/4*cPip*rhoPip "Heat capacity of pipe wall";
@@ -257,22 +255,44 @@ protected
Modelica.Units.SI.Heat Q_gai(start=0.0, fixed=true)
"Integrated heat gain of the pipe";
-
+public
+ FixedResistances.HydraulicResistance hydRes(
+ diameter=dh,
+ m_flow_nominal=m_flow_nominal,
+ redeclare package Medium = Medium,
+ zeta=sum_zetas,
+ allowFlowReversal=allowFlowReversal,
+ from_dp=from_dp,
+ homotopyInitialization=homotopyInitialization,
+ linearized=linearized,
+ m_flow_start=m_flow_start) if use_zeta
+ annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
+ Modelica.Thermal.HeatTransfer.Components.ThermalCollector thePasThr(final m=1)
+ if not use_soil "Thermal pass through if there is no soil activated"
+ annotation (Placement(transformation(
+ extent={{-10,-10},{10,10}},
+ rotation=180,
+ origin={-16,54})));
+ Interfaces.PassThroughMedium pasThrMed(redeclare package Medium = Medium)
+ if not use_zeta
+ annotation (Placement(transformation(extent={{-60,-30},{-40,-10}})));
equation
//calculation of the flow velocity of water in the pipes
v_med = (4 * port_a.m_flow) / (Modelica.Constants.pi * rho_default * dh * dh);
//calculation of heat losses and heat gains of pipe
- der(Q_los) = min(0,floPip.heatPort.Q_flow);
- der(Q_gai) = max(0,floPip.heatPort.Q_flow);
+ der(Q_los) = min(0, pipCor.heatPort.Q_flow);
+ der(Q_gai) = max(0, pipCor.heatPort.Q_flow);
- connect(vol.ports[2], port_b)
- annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
+ for i in 1:nPorts loop
+ connect(vol.ports[i + 1], ports_b[i])
+ annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
+ end for;
- connect(floPip.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
- connect(floPip.heatPort, cylHeaTra1.port_a)
+ connect(pipCor.port_b, vol.ports[1])
+ annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
+ connect(pipCor.heatPort, cylHeaTra1.port_a)
annotation (Line(points={{0,10},{0,30}}, color={191,0,0},
pattern=LinePattern.Dash));
connect(cylHeaTra1.port_b, cylHeaTra2.port_a)
@@ -284,7 +304,7 @@ equation
connect(cylHeaTra3.port_b, heatPort)
annotation (Line(points={{0,90.8},{0,90.8},{0,100}}, color={191,0,0},
pattern=LinePattern.Dash));
- connect(floPip.heatPort, thePasThr.port_a[1]) annotation (Line(points={{0,10},
+ connect(pipCor.heatPort, thePasThr.port_a[1]) annotation (Line(points={{0,10},
{0,20},{-16,20},{-16,44}}, color={191,0,0},
pattern=LinePattern.Dash));
connect(thePasThr.port_b, heatPort) annotation (Line(points={{-16,64},{-16,94},
@@ -294,7 +314,7 @@ equation
points={{-100,0},{-80,0},{-80,20},{-60,20}},
color={0,127,255},
pattern=LinePattern.Dash));
- connect(hydRes.port_b,floPip. port_a) annotation (Line(
+ connect(hydRes.port_b, pipCor.port_a) annotation (Line(
points={{-40,20},{-20,20},{-20,0},{-10,0}},
color={0,127,255},
pattern=LinePattern.Dash));
@@ -304,7 +324,7 @@ equation
points={{-100,0},{-80,0},{-80,-20},{-60,-20}},
color={0,127,255},
pattern=LinePattern.Dash));
- connect(pasThrMed.port_b,floPip. port_a) annotation (Line(
+ connect(pasThrMed.port_b, pipCor.port_a) annotation (Line(
points={{-40,-20},{-20,-20},{-20,0},{-10,0}},
color={0,127,255},
pattern=LinePattern.Dash));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
index 66fd0221d6..93b829a206 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
@@ -15,9 +15,11 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
nPorts=1,
p(displayUnit="Pa") = 101325) "Pressure boundary condition"
annotation (Placement(transformation(extent={{72,40},{52,60}})));
- AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip(
+ AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ redeclare BaseClassesStatic.StaticCore pipCor "Static core",
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -67,6 +69,8 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip1(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -113,6 +117,8 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
redeclare package Medium = Medium,
use_soil=true,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -159,6 +165,8 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
redeclare package Medium = Medium,
sum_zetas=2.5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -195,7 +203,7 @@ equation
connect(Tin.y, sou.T_in)
annotation (Line(points={{-79,54},{-72,54}},
color={0,0,127}));
- connect(pip.port_b, senTemOut.port_a)
+ connect(pip.ports_b[1], senTemOut.port_a)
annotation (Line(points={{10,50},{20,50}},
color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
@@ -211,7 +219,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,20}}, color={191,0,0}));
connect(Tin1.y, sou1.T_in)
annotation (Line(points={{-79,14},{-72,14}}, color={0,0,127}));
- connect(pip1.port_b, senTemOut1.port_a)
+ connect(pip1.ports_b[1], senTemOut1.port_a)
annotation (Line(points={{10,10},{20,10}}, color={0,127,255}));
connect(senTemOut1.port_b, sin1.ports[1])
annotation (Line(points={{40,10},{52,10}}, color={0,127,255}));
@@ -223,7 +231,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,-22}}, color={191,0,0}));
connect(Tin2.y, sou2.T_in)
annotation (Line(points={{-79,-28},{-72,-28}}, color={0,0,127}));
- connect(pip2.port_b, senTemOut2.port_a)
+ connect(pip2.ports_b[1], senTemOut2.port_a)
annotation (Line(points={{10,-32},{20,-32}}, color={0,127,255}));
connect(senTemOut2.port_b, sin2.ports[1])
annotation (Line(points={{40,-32},{52,-32}}, color={0,127,255}));
@@ -235,7 +243,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,-60}}, color={191,0,0}));
connect(Tin3.y, sou3.T_in)
annotation (Line(points={{-79,-66},{-72,-66}}, color={0,0,127}));
- connect(pip3.port_b, senTemOut3.port_a)
+ connect(pip3.ports_b[1], senTemOut3.port_a)
annotation (Line(points={{10,-70},{20,-70}}, color={0,127,255}));
connect(senTemOut3.port_b, sin3.ports[1])
annotation (Line(points={{40,-70},{52,-70}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo
index a9e75adf96..abb939f6e8 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo
@@ -19,6 +19,7 @@ model PlugFlowPipeEmbedded "Simple example of PlugFlowPipeEmbedded"
pip(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -59,7 +60,7 @@ equation
color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
- connect(pip.port_b, senTemOut.port_a)
+ connect(pip.ports_b[1], senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo
index 6a3d0babab..581ef000c5 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo
@@ -17,6 +17,7 @@ model PlugFlowPipeZeta "Simple example of PlugFlowPipe"
annotation (Placement(transformation(extent={{82,-10},{62,10}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.PlugFlowPipeZeta pip(
redeclare package Medium = Medium,
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -56,7 +57,7 @@ equation
annotation (Line(points={{-20,70},{10,70},{10,10}}, color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
- connect(pip.port_b, senTemOut.port_a)
+ connect(pip.ports_b[1], senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo
index 2ba6eae122..e274ce4d09 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo
@@ -17,6 +17,7 @@ model StaticPipe "Simple example of StaticPipe"
annotation (Placement(transformation(extent={{82,-10},{62,10}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.StaticPipe pip(
redeclare package Medium = Medium,
+ nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -56,7 +57,7 @@ equation
annotation (Line(points={{-20,70},{10,70},{10,10}}, color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
- connect(pip.port_b, senTemOut.port_a)
+ connect(pip.ports_b[1], senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo
index a5d95414c5..51b9f7f8c4 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo
@@ -2,7 +2,7 @@
model PlugFlowPipeEmbedded
"Embedded pipe model using spatialDistribution for temperature delay"
- extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
"Type of energy balance: dynamic (3 initialization options) or steady state"
@@ -61,11 +61,11 @@ model PlugFlowPipeEmbedded
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));
- parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
+ parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
- parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
- T_start_in "Initialization temperature at pipe outlet"
+ parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
+ = T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
@@ -135,6 +135,7 @@ model PlugFlowPipeEmbedded
final R=R,
final fac=fac,
final sum_zetas=sum_zetas,
+ nPorts=nPorts,
final use_zeta=true)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
@@ -214,7 +215,7 @@ equation
annotation (Line(points={{0,90.8},{0,104}}, color={191,0,0}));
connect(port_a, plugFlowPipeZeta.port_a)
annotation (Line(points={{-100,0},{-10,0}}, color={0,127,255}));
- connect(plugFlowPipeZeta.port_b, port_b) annotation (Line(points={{10,0},{56,
+ connect(plugFlowPipeZeta.ports_b, ports_b) annotation (Line(points={{10,0},{56,
0},{56,0},{100,0}}, color={0,127,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo
index fe1fb3862d..534405568f 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo
@@ -1,7 +1,7 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model PlugFlowPipeZeta
"Pipe model using spatialDistribution for temperature delay and conditional HydraulicResistance"
- extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
@@ -56,11 +56,11 @@ model PlugFlowPipeZeta
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));
- parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
+ parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
- parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
- T_start_in "Initialization temperature at pipe outlet"
+ parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
+ = T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
@@ -95,15 +95,12 @@ model PlugFlowPipeZeta
"Heat transfer to or from surroundings (heat loss from pipe results in a positive heat flow)"
annotation (Placement(transformation(extent={{-10,90},{10,110}})));
- FixedResistances.PlugFlowPipe plugFlowPipe(
+ AixLib.Fluid.FixedResistances.BaseClasses.PlugFlowCore plugFlowCore(
redeclare final package Medium = Medium,
final dh=dh,
final v_nominal=v_nominal,
final length=length,
- final dIns=dIns,
- final kIns=kIns,
- final cPip=cPip,
- final rhoPip=rhoPip,
+ final C=C,
final R=R,
final m_flow_small=m_flow_small,
final m_flow_nominal=m_flow_nominal,
@@ -131,7 +128,7 @@ model PlugFlowPipeZeta
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
- final nPorts=2,
+ final nPorts=nPorts + 1,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
@@ -181,23 +178,25 @@ equation
//calculation of the flow velocity of medium in the pipes
v_med = (4 * port_a.m_flow) / (Modelica.Constants.pi * rho_default * dh * dh);
- connect(vol.ports[2], port_b)
- annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
+ for i in 1:nPorts loop
+ connect(vol.ports[i + 1], ports_b[i])
+ annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
- connect(plugFlowPipe.heatPort, heatPort)
+ end for;
+ connect(plugFlowCore.heatPort, heatPort)
annotation (Line(points={{0,10},{0,10},{0,100}}, color={191,0,0}));
- connect(plugFlowPipe.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
+ connect(plugFlowCore.port_b, vol.ports[1])
+ annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
if use_zeta then
- connect(hydraulicResistance.port_b, plugFlowPipe.port_a)
+ connect(hydraulicResistance.port_b, plugFlowCore.port_a)
annotation (Line(points={{-40,20},{-20,20},{-20,0},{-10,0}},
color={0,127,255}, pattern=LinePattern.Dash));
connect(hydraulicResistance.port_a, port_a)
annotation (Line(points={{-60,20},{-80,20},{-80,0},{-100,0}},
color={0,127,255}, pattern=LinePattern.Dash));
else
- connect(port_a, plugFlowPipe.port_a)
+ connect(port_a, plugFlowCore.port_a)
annotation (Line(points={{-100,0},{-80,0},{-80,-20},{-20,-20},{-20,0},{-10,0}},
color={0,127,255}));
end if;
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo
index 6d68d5339c..09ae7f1ff5 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo
@@ -1,7 +1,7 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model StaticPipe
"Static Pipe model using conditional HydraulicResistance"
- extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
@@ -56,11 +56,11 @@ model StaticPipe
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));
- parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
+ parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
- parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
- T_start_in "Initialization temperature at pipe outlet"
+ parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
+ = T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
@@ -129,7 +129,7 @@ model StaticPipe
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
- final nPorts=2,
+ final nPorts=nPorts + 1,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
@@ -179,14 +179,16 @@ equation
//calculation of the flow velocity of medium in the pipes
v_med = (4 * port_a.m_flow) / (Modelica.Constants.pi * rho_default * dh * dh);
- connect(vol.ports[2], port_b)
- annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
+ for i in 1:nPorts loop
+ connect(vol.ports[i + 1], ports_b[i])
+ annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
+ end for;
connect(staticCore.heatPort, heatPort)
annotation (Line(points={{0,10},{0,10},{0,100}}, color={191,0,0}));
connect(staticCore.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
+ annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
//Connect hydraulicResistance
if use_zeta then
connect(hydraulicResistance.port_b, staticCore.port_a)
diff --git a/AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowCore.mo b/AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowCore.mo
new file mode 100644
index 0000000000..93efbe6a03
--- /dev/null
+++ b/AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowCore.mo
@@ -0,0 +1,279 @@
+within AixLib.Fluid.FixedResistances.BaseClasses;
+model PlugFlowCore
+ "Pipe model using spatialDistribution for temperature delay with modified delay tracker"
+ extends AixLib.Fluid.Interfaces.PartialTwoPort;
+
+ constant Boolean homotopyInitialization = true "= true, use homotopy method"
+ annotation(HideResult=true);
+
+ parameter Modelica.Units.SI.Length dh
+ "Hydraulic diameter (assuming a round cross section area)";
+
+ parameter Modelica.Units.SI.Velocity v_nominal
+ "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"
+ annotation(Dialog(group="Nominal condition"));
+
+ parameter Modelica.Units.SI.Length length(min=0) "Pipe length";
+
+ parameter Modelica.Units.SI.MassFlowRate m_flow_nominal(min=0)
+ "Nominal mass flow rate" annotation (Dialog(group="Nominal condition"));
+
+ parameter Modelica.Units.SI.MassFlowRate m_flow_small(min=0) = 1E-4*abs(
+ m_flow_nominal) "Small mass flow rate for regularization of zero flow"
+ annotation (Dialog(tab="Advanced"));
+
+ parameter Modelica.Units.SI.Height roughness=2.5e-5
+ "Average height of surface asperities (default: smooth steel pipe)"
+ annotation (Dialog(group="Geometry"));
+
+ parameter Real R(unit="(m.K)/W")
+ "Thermal resistance per unit length from fluid to boundary temperature";
+
+ parameter Real C(unit="J/(K.m)")
+ "Thermal capacity per unit length of pipe";
+
+ parameter Real fac=1
+ "Factor to take into account flow resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal";
+
+
+ parameter Boolean from_dp=false
+ "= true, use m_flow = f(dp) else dp = f(m_flow)"
+ annotation (Evaluate=true, Dialog(tab="Advanced"));
+ parameter Modelica.Units.SI.Length thickness(min=0) "Pipe wall thickness";
+
+ parameter Modelica.Units.SI.Temperature T_start_in=Medium.T_default
+ "Initialization temperature at pipe inlet"
+ annotation (Dialog(tab="Initialization"));
+ parameter Modelica.Units.SI.Temperature T_start_out=Medium.T_default
+ "Initialization temperature at pipe outlet"
+ annotation (Dialog(tab="Initialization"));
+ parameter Boolean initDelay=false
+ "Initialize delay for a constant mass flow rate if true, otherwise start from 0"
+ annotation (Dialog(tab="Initialization"));
+ parameter Modelica.Units.SI.MassFlowRate m_flow_start=0
+ annotation (Dialog(tab="Initialization", enable=initDelay));
+
+ parameter Real ReC=4000
+ "Reynolds number where transition to turbulent starts";
+
+ parameter Boolean linearized = false
+ "= true, use linear relation between m_flow and dp for any flow rate"
+ annotation(Evaluate=true, Dialog(tab="Advanced"));
+
+ AixLib.Fluid.FixedResistances.HydraulicDiameter res(
+ redeclare final package Medium = Medium,
+ final dh=dh,
+ final m_flow_nominal=m_flow_nominal,
+ final from_dp=from_dp,
+ final length=length,
+ final roughness=roughness,
+ final fac=fac,
+ final ReC=ReC,
+ final v_nominal=v_nominal,
+ final allowFlowReversal=allowFlowReversal,
+ final show_T=false,
+ final homotopyInitialization=homotopyInitialization,
+ final linearized=linearized,
+ dp(nominal=fac*200*length))
+ "Pressure drop calculation for this pipe"
+ annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
+
+ AixLib.Fluid.FixedResistances.BaseClasses.PlugFlow del(
+ redeclare final package Medium = Medium,
+ final m_flow_small=m_flow_small,
+ final dh=dh,
+ final length=length,
+ final allowFlowReversal=allowFlowReversal,
+ final T_start_in=T_start_in,
+ final T_start_out=T_start_out)
+ "Model for temperature wave propagation"
+ annotation (Placement(transformation(extent={{20,-10},{40,10}})));
+
+ AixLib.Fluid.FixedResistances.BaseClasses.PlugFlowHeatLoss heaLos_a(
+ redeclare final package Medium = Medium,
+ final C=C,
+ final R=R,
+ final m_flow_small=m_flow_small,
+ final T_start=T_start_in,
+ final m_flow_nominal=m_flow_nominal,
+ final m_flow_start=m_flow_start,
+ final show_T=false,
+ final show_V_flow=false) "Heat loss for flow from port_b to port_a"
+ annotation (Placement(transformation(extent={{-60,-10},{-80,10}})));
+
+ AixLib.Fluid.FixedResistances.BaseClasses.PlugFlowHeatLoss heaLos_b(
+ redeclare final package Medium = Medium,
+ final C=C,
+ final R=R,
+ final m_flow_small=m_flow_small,
+ final T_start=T_start_out,
+ final m_flow_nominal=m_flow_nominal,
+ final m_flow_start=m_flow_start,
+ final show_T=false,
+ final show_V_flow=false) "Heat loss for flow from port_a to port_b"
+ annotation (Placement(transformation(extent={{60,-10},{80,10}})));
+ AixLib.Fluid.Sensors.MassFlowRate senMasFlo(
+ redeclare final package Medium = Medium) "Mass flow sensor"
+ annotation (Placement(transformation(extent={{-50,10},{-30,-10}})));
+ AixLib.Fluid.FixedResistances.BaseClasses.PlugFlowTransportDelay timDel(
+ final length=length,
+ final dh=dh,
+ final rho=rho_default,
+ final initDelay=initDelay,
+ final m_flow_nominal=m_flow_nominal,
+ final m_flow_start=m_flow_start) "Time delay"
+ annotation (Placement(transformation(extent={{-10,-50},{10,-30}})));
+ Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort
+ "Heat port to connect environment (positive heat flow for heat loss to surroundings)"
+ annotation (Placement(transformation(extent={{-10,90},{10,110}})));
+
+protected
+ parameter Modelica.Units.SI.Density rho_default=Medium.density_pTX(
+ p=Medium.p_default,
+ T=Medium.T_default,
+ X=Medium.X_default)
+ "Default density (e.g., rho_liquidWater = 995, rho_air = 1.2)"
+ annotation (Dialog(group="Advanced"));
+
+initial equation
+ assert(homotopyInitialization, "In " + getInstanceName() +
+ ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.",
+ level = AssertionLevel.warning);
+
+equation
+ connect(senMasFlo.m_flow, timDel.m_flow) annotation (Line(
+ points={{-40,-11},{-40,-40},{-12,-40}},
+ color={0,0,127},
+ smooth=Smooth.None));
+ connect(heaLos_a.heatPort, heatPort) annotation (Line(points={{-70,10},{-70,40},
+ {0,40},{0,100}}, color={191,0,0}));
+ connect(heaLos_b.heatPort, heatPort) annotation (Line(points={{70,10},{70,40},
+ {0,40},{0,100}}, color={191,0,0}));
+
+ connect(timDel.tauRev, heaLos_a.tau) annotation (Line(points={{11,-36},{50,-36},
+ {50,28},{-64,28},{-64,10}}, color={0,0,127}));
+ connect(timDel.tau, heaLos_b.tau) annotation (Line(points={{11,-44},{54,-44},
+ {54,28},{64,28},{64,10}}, color={0,0,127}));
+
+ connect(port_a, heaLos_a.port_b)
+ annotation (Line(points={{-100,0},{-80,0}}, color={0,127,255}));
+ connect(heaLos_a.port_a, senMasFlo.port_a)
+ annotation (Line(points={{-60,0},{-50,0}}, color={0,127,255}));
+ connect(heaLos_b.port_b, port_b)
+ annotation (Line(points={{80,0},{100,0}}, color={0,127,255}));
+ connect(del.port_a, res.port_b)
+ annotation (Line(points={{20,0},{0,0}}, color={0,127,255}));
+ connect(senMasFlo.port_b, res.port_a)
+ annotation (Line(points={{-30,0},{-20,0}}, color={0,127,255}));
+ connect(heaLos_b.port_a, del.port_b)
+ annotation (Line(points={{60,0},{40,0}}, color={0,127,255}));
+ annotation (
+ Line(points={{70,20},{72,20},{72,0},{100,0}}, color={0,127,255}),
+ Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
+ 100}})),
+ Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}),
+ graphics={
+ Rectangle(
+ extent={{-100,40},{100,-40}},
+ lineColor={0,0,0},
+ fillPattern=FillPattern.HorizontalCylinder,
+ fillColor={192,192,192}),
+ Rectangle(
+ extent={{-100,30},{100,-30}},
+ lineColor={0,0,0},
+ fillPattern=FillPattern.HorizontalCylinder,
+ fillColor={0,127,255}),
+ Rectangle(
+ extent={{-100,50},{100,40}},
+ lineColor={175,175,175},
+ fillColor={255,255,255},
+ fillPattern=FillPattern.Backward),
+ Rectangle(
+ extent={{-100,-40},{100,-50}},
+ lineColor={175,175,175},
+ fillColor={255,255,255},
+ fillPattern=FillPattern.Backward),
+ Polygon(
+ points={{0,100},{40,62},{20,62},{20,38},{-20,38},{-20,62},{-40,62},{0,
+ 100}},
+ lineColor={0,0,0},
+ fillColor={238,46,47},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-30,30},{28,-30}},
+ lineColor={0,0,0},
+ fillPattern=FillPattern.HorizontalCylinder,
+ fillColor={215,202,187})}),
+ Documentation(revisions="
+ - April 14, 2020, by Michael Wetter:
+ Changed homotopyInitialization
to a constant.
+ This is for AixLib,
+ #1341.
+
+ - October 20, 2017, by Michael Wetter:
+ Replaced model that lumps flow resistance and transport delays with
+ two separate models, as these are physically distinct processes.
+ This also avoids one more layer of models.
+ Revised variable names and documentation to follow guidelines.
+
+ - July 4, 2016 by Bram van der Heijde:
+ Introduce pipVol
.
+
+ - October 10, 2015 by Marcus Fuchs:
+ Copy Icon from KUL implementation and rename model. Replace
+ resistance and temperature delay by an adiabatic pipe.
+
+ - September, 2015 by Marcus Fuchs:
+ First implementation.
+
+
+",info="
+
+ Pipe with heat loss using the time delay based heat losses and plug
+ flow for the transport delay of the fluid.
+
+
+ Implementation
+
+
+ The spatialDistribution
operator is used for the
+ temperature wave propagation through the length of the pipe. This
+ operator is contained in BaseClasses.PlugFlow.
+
+
+ This model does not include thermal inertia of the pipe wall. The
+ wall inertia is implemented in PlugFlowPipe,
+ which uses this model.
+ The removal of the thermal inertia with a mixing volume can be
+ desirable in the case where mixing volumes are added manually at the
+ pipe junctions.
+
+
+ The model
+ PlugFlowHeatLoss implements a heat loss in design direction, but
+ leaves the enthalpy unchanged in opposite flow direction. Therefore
+ it is used in front of and behind the time delay.
+
+
+ References
+
+
+ Full details on the model implementation and experimental validation
+ can be found in:
+
+
+ van der Heijde, B., Fuchs, M., Ribas Tugores, C., Schweiger, G.,
+ Sartor, K., Basciotti, D., Müller, D., Nytsch-Geusen, C., Wetter, M.
+ and Helsen, L. (2017).
+ Dynamic equation-based thermo-hydraulic pipe model for district
+ heating and cooling systems.
+ Energy Conversion and Management, vol. 151, p. 158-169.
+ doi:
+ 10.1016/j.enconman.2017.08.072 .
+
+"));
+end PlugFlowCore;
diff --git a/AixLib/Fluid/FixedResistances/BaseClasses/package.order b/AixLib/Fluid/FixedResistances/BaseClasses/package.order
index 3aabb3011a..06493b07b5 100644
--- a/AixLib/Fluid/FixedResistances/BaseClasses/package.order
+++ b/AixLib/Fluid/FixedResistances/BaseClasses/package.order
@@ -2,3 +2,4 @@ PlugFlow
PlugFlowHeatLoss
PlugFlowPipe
PlugFlowTransportDelay
+PlugFlowCore
From 0514300c5cdd3dac5c7aa1de9a6226580ec4279f Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Fri, 11 Nov 2022 12:10:59 +0100
Subject: [PATCH 38/48] only apply scalars for real
---
.../DistrictHeatingCooling/Pipes/DHCPipe.mo | 12 +++++------
.../Pipes/Examples/DHCPipe.mo | 20 ++++++++-----------
.../Pipes/Examples/PlugFlowPipeEmbedded.mo | 3 +--
.../Pipes/Examples/PlugFlowPipeZeta.mo | 3 +--
.../Pipes/Examples/StaticPipe.mo | 3 +--
.../Pipes/PlugFlowPipeEmbedded.mo | 11 +++++-----
.../Pipes/PlugFlowPipeZeta.mo | 18 ++++++++---------
.../Pipes/StaticPipe.mo | 18 ++++++++---------
8 files changed, 37 insertions(+), 51 deletions(-)
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
index 3da3ace663..7b755b0697 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
@@ -1,6 +1,6 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model DHCPipe "Generic pipe model for DHC applications"
- extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
@@ -181,7 +181,7 @@ model DHCPipe "Generic pipe model for DHC applications"
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
- final nPorts=nPorts + 1,
+ final nPorts=2,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
@@ -284,14 +284,12 @@ equation
der(Q_los) = min(0, pipCor.heatPort.Q_flow);
der(Q_gai) = max(0, pipCor.heatPort.Q_flow);
- for i in 1:nPorts loop
- connect(vol.ports[i + 1], ports_b[i])
- annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
+ connect(vol.ports[2], port_b)
+ annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
- end for;
connect(pipCor.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
+ annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
connect(pipCor.heatPort, cylHeaTra1.port_a)
annotation (Line(points={{0,10},{0,30}}, color={191,0,0},
pattern=LinePattern.Dash));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
index 93b829a206..4ff557128e 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
@@ -15,11 +15,10 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
nPorts=1,
p(displayUnit="Pa") = 101325) "Pressure boundary condition"
annotation (Placement(transformation(extent={{72,40},{52,60}})));
- AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip(
+ AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare BaseClassesStatic.StaticCore pipCor "Static core",
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -66,11 +65,10 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
nPorts=1,
p(displayUnit="Pa") = 101325) "Pressure boundary condition"
annotation (Placement(transformation(extent={{72,0},{52,20}})));
- AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip1(
+ AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip1(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -113,12 +111,11 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
nPorts=1,
p(displayUnit="Pa") = 101325) "Pressure boundary condition"
annotation (Placement(transformation(extent={{72,-42},{52,-22}})));
- AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip2(
+ AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip2(
redeclare package Medium = Medium,
use_soil=true,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -161,12 +158,11 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
nPorts=1,
p(displayUnit="Pa") = 101325) "Pressure boundary condition"
annotation (Placement(transformation(extent={{72,-80},{52,-60}})));
- AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip3(
+ AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip3(
redeclare package Medium = Medium,
sum_zetas=2.5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -203,7 +199,7 @@ equation
connect(Tin.y, sou.T_in)
annotation (Line(points={{-79,54},{-72,54}},
color={0,0,127}));
- connect(pip.ports_b[1], senTemOut.port_a)
+ connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{10,50},{20,50}},
color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
@@ -219,7 +215,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,20}}, color={191,0,0}));
connect(Tin1.y, sou1.T_in)
annotation (Line(points={{-79,14},{-72,14}}, color={0,0,127}));
- connect(pip1.ports_b[1], senTemOut1.port_a)
+ connect(pip1.port_b, senTemOut1.port_a)
annotation (Line(points={{10,10},{20,10}}, color={0,127,255}));
connect(senTemOut1.port_b, sin1.ports[1])
annotation (Line(points={{40,10},{52,10}}, color={0,127,255}));
@@ -231,7 +227,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,-22}}, color={191,0,0}));
connect(Tin2.y, sou2.T_in)
annotation (Line(points={{-79,-28},{-72,-28}}, color={0,0,127}));
- connect(pip2.ports_b[1], senTemOut2.port_a)
+ connect(pip2.port_b, senTemOut2.port_a)
annotation (Line(points={{10,-32},{20,-32}}, color={0,127,255}));
connect(senTemOut2.port_b, sin2.ports[1])
annotation (Line(points={{40,-32},{52,-32}}, color={0,127,255}));
@@ -243,7 +239,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,-60}}, color={191,0,0}));
connect(Tin3.y, sou3.T_in)
annotation (Line(points={{-79,-66},{-72,-66}}, color={0,0,127}));
- connect(pip3.ports_b[1], senTemOut3.port_a)
+ connect(pip3.port_b, senTemOut3.port_a)
annotation (Line(points={{10,-70},{20,-70}}, color={0,127,255}));
connect(senTemOut3.port_b, sin3.ports[1])
annotation (Line(points={{40,-70},{52,-70}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo
index abb939f6e8..a9e75adf96 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeEmbedded.mo
@@ -19,7 +19,6 @@ model PlugFlowPipeEmbedded "Simple example of PlugFlowPipeEmbedded"
pip(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -60,7 +59,7 @@ equation
color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
- connect(pip.ports_b[1], senTemOut.port_a)
+ connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo
index 581ef000c5..6a3d0babab 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/PlugFlowPipeZeta.mo
@@ -17,7 +17,6 @@ model PlugFlowPipeZeta "Simple example of PlugFlowPipe"
annotation (Placement(transformation(extent={{82,-10},{62,10}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.PlugFlowPipeZeta pip(
redeclare package Medium = Medium,
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -57,7 +56,7 @@ equation
annotation (Line(points={{-20,70},{10,70},{10,10}}, color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
- connect(pip.ports_b[1], senTemOut.port_a)
+ connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo
index e274ce4d09..2ba6eae122 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/StaticPipe.mo
@@ -17,7 +17,6 @@ model StaticPipe "Simple example of StaticPipe"
annotation (Placement(transformation(extent={{82,-10},{62,10}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.StaticPipe pip(
redeclare package Medium = Medium,
- nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
@@ -57,7 +56,7 @@ equation
annotation (Line(points={{-20,70},{10,70},{10,10}}, color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
- connect(pip.ports_b[1], senTemOut.port_a)
+ connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo
index 51b9f7f8c4..a5d95414c5 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeEmbedded.mo
@@ -2,7 +2,7 @@
model PlugFlowPipeEmbedded
"Embedded pipe model using spatialDistribution for temperature delay"
- extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
"Type of energy balance: dynamic (3 initialization options) or steady state"
@@ -61,11 +61,11 @@ model PlugFlowPipeEmbedded
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));
- parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
+ parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
- parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
- = T_start_in "Initialization temperature at pipe outlet"
+ parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
+ T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
@@ -135,7 +135,6 @@ model PlugFlowPipeEmbedded
final R=R,
final fac=fac,
final sum_zetas=sum_zetas,
- nPorts=nPorts,
final use_zeta=true)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
@@ -215,7 +214,7 @@ equation
annotation (Line(points={{0,90.8},{0,104}}, color={191,0,0}));
connect(port_a, plugFlowPipeZeta.port_a)
annotation (Line(points={{-100,0},{-10,0}}, color={0,127,255}));
- connect(plugFlowPipeZeta.ports_b, ports_b) annotation (Line(points={{10,0},{56,
+ connect(plugFlowPipeZeta.port_b, port_b) annotation (Line(points={{10,0},{56,
0},{56,0},{100,0}}, color={0,127,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo
index 534405568f..b2398e1204 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/PlugFlowPipeZeta.mo
@@ -1,7 +1,7 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model PlugFlowPipeZeta
"Pipe model using spatialDistribution for temperature delay and conditional HydraulicResistance"
- extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
@@ -56,11 +56,11 @@ model PlugFlowPipeZeta
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));
- parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
+ parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
- parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
- = T_start_in "Initialization temperature at pipe outlet"
+ parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
+ T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
@@ -128,7 +128,7 @@ model PlugFlowPipeZeta
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
- final nPorts=nPorts + 1,
+ final nPorts=2,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
@@ -178,16 +178,14 @@ equation
//calculation of the flow velocity of medium in the pipes
v_med = (4 * port_a.m_flow) / (Modelica.Constants.pi * rho_default * dh * dh);
- for i in 1:nPorts loop
- connect(vol.ports[i + 1], ports_b[i])
- annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
+ connect(vol.ports[2], port_b)
+ annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
- end for;
connect(plugFlowCore.heatPort, heatPort)
annotation (Line(points={{0,10},{0,10},{0,100}}, color={191,0,0}));
connect(plugFlowCore.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
+ annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
if use_zeta then
connect(hydraulicResistance.port_b, plugFlowCore.port_a)
annotation (Line(points={{-40,20},{-20,20},{-20,0},{-10,0}},
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo
index 09ae7f1ff5..5986218d4d 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/StaticPipe.mo
@@ -1,7 +1,7 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model StaticPipe
"Static Pipe model using conditional HydraulicResistance"
- extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
+ extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
@@ -56,11 +56,11 @@ model StaticPipe
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));
- parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
+ parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
- parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
- = T_start_in "Initialization temperature at pipe outlet"
+ parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
+ T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
@@ -129,7 +129,7 @@ model StaticPipe
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
- final nPorts=nPorts + 1,
+ final nPorts=2,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
@@ -179,16 +179,14 @@ equation
//calculation of the flow velocity of medium in the pipes
v_med = (4 * port_a.m_flow) / (Modelica.Constants.pi * rho_default * dh * dh);
- for i in 1:nPorts loop
- connect(vol.ports[i + 1], ports_b[i])
- annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
+ connect(vol.ports[2], port_b)
+ annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
- end for;
connect(staticCore.heatPort, heatPort)
annotation (Line(points={{0,10},{0,10},{0,100}}, color={191,0,0}));
connect(staticCore.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
+ annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
//Connect hydraulicResistance
if use_zeta then
connect(hydraulicResistance.port_b, staticCore.port_a)
From a311c79ccc15269a666d4d7e8a5979752bc97e58 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Tue, 6 Dec 2022 13:02:04 +0100
Subject: [PATCH 39/48] chore: review from lma
---
.../PumpHeadControlled.mo | 24 ++++++++---------
.../PumpSpeedControlled.mo | 27 ++++++++++---------
...mialBased_Examples_PumpSpeedControlled.txt | 2 +-
...lBased_Examples_PumpSpeedControlledDpV.txt | 2 +-
AixLib/Systems/ModularAHU/Examples/Cooler.mo | 3 +--
AixLib/Systems/ModularAHU/Examples/Heater.mo | 4 +--
.../SolarGain/CorrectionGDoublePane.mo | 2 +-
.../SelfShadowing/SelfShadowingTestAbove.mo | 6 +++--
.../SelfShadowing/SelfShadowingTestBelow.mo | 6 +++--
.../SelfShadowing/SelfShadowingTestLeft.mo | 3 ++-
.../SelfShadowing/SelfShadowingTestRight.mo | 3 ++-
11 files changed, 44 insertions(+), 38 deletions(-)
diff --git a/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpHeadControlled.mo b/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpHeadControlled.mo
index 2e102b5526..9b9c895d48 100644
--- a/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpHeadControlled.mo
+++ b/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpHeadControlled.mo
@@ -221,23 +221,23 @@ equation
color={0,0,127},
smooth=Smooth.None));
- connect(pumpPower.y, pumpBus.PelMea) annotation (Line(points={{-79,76},{-66,76},{-66,93},{0.5975,93},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(pumpPower.y, pumpBus.PelMea) annotation (Line(points={{-79,76},{-66,
+ 76},{-66,93},{0.5975,93},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
- connect(pumpHead.y, pumpBus.dpMea) annotation (Line(points={{94,-10},{95,-10},{95,90},{0.5975,90},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(pumpHead.y, pumpBus.dpMea) annotation (Line(points={{94,-10},{95,-10},
+ {95,90},{0.5975,90},{0.5975,100.597}},color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
- connect(pumpEfficiency.y, pumpBus.efficiencyMea) annotation (Line(points={{-79,60},{-62,60},{-62,100.597},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(pumpEfficiency.y, pumpBus.efficiencyMea) annotation (Line(points={{-79,60},
+ {-62,60},{-62,100.597},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
- connect(onOff.u2, pumpBus.onSet) annotation (Line(points={{46,20},{38,20},{38,100.597},{0.5975,100.597}},
- color={255,0,255}), Text(
+ connect(onOff.u2, pumpBus.onSet) annotation (Line(points={{46,20},{38,20},{38,
+ 100.597},{0.5975,100.597}}, color={255,0,255}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
@@ -253,14 +253,14 @@ equation
index=1,
extent={{6,3},{6,3}}));
- connect(variableLimiter.u, pumpBus.dpSet) annotation (Line(points={{-12,20},{-19,20},{-19,100.597},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(variableLimiter.u, pumpBus.dpSet) annotation (Line(points={{-12,20},{
+ -19,20},{-19,100.597},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
- connect(realExpression.y, pumpBus.rpmMea) annotation (Line(points={{30,44},{30,100.597},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(realExpression.y, pumpBus.rpmMea) annotation (Line(points={{30,44},{
+ 30,100.597},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{-3,6},{-3,6}},
diff --git a/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpSpeedControlled.mo b/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpSpeedControlled.mo
index 252e71c25b..9b25e5cd14 100644
--- a/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpSpeedControlled.mo
+++ b/AixLib/Fluid/Movers/PumpsPolynomialBased/PumpSpeedControlled.mo
@@ -244,17 +244,18 @@ equation
color={0,0,127},
smooth=Smooth.None));
- connect(pumpPower.y, pumpBus.PelMea) annotation (Line(points={{-79,76},{-66,76},{-66,93},{0.5975,93},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(pumpPower.y, pumpBus.PelMea) annotation (Line(points={{-79,76},{-66,
+ 76},{-66,93},{0.5975,93},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
- connect(pumpEfficiency.y, pumpBus.efficiencyMea) annotation (Line(points={{-79,60},{-62,60},{-62,100.597},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(pumpEfficiency.y, pumpBus.efficiencyMea) annotation (Line(points={{-79,60},
+ {-62,60},{-62,100.597},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
- connect(onOffHead.u2, pumpBus.onSet) annotation (Line(points={{-8,-40},{-43,-40},{-43,-16},{69,-16},{69,100.597},{0.5975,100.597}},
+ connect(onOffHead.u2, pumpBus.onSet) annotation (Line(points={{-8,-40},{-43,
+ -40},{-43,-16},{69,-16},{69,100.597},{0.5975,100.597}},
color={255,0,255}),
Text(
string="%second",
@@ -264,24 +265,24 @@ equation
-48},{-8,-48}}, color={0,0,127}));
connect(deMultiplex2.y1[1], variableLimiter.limit1) annotation (Line(points={{
-26,26},{-23,26},{-23,28},{-12,28}}, color={0,0,127}));
- connect(variableLimiter.u, pumpBus.rpmSet) annotation (Line(points={{-12,20},{-20,20},{-20,38},{0.5975,38},{0.5975,100.597}},
- color={0,0,127}),
+ connect(variableLimiter.u, pumpBus.rpmSet) annotation (Line(points={{-12,20},
+ {-20,20},{-20,38},{0.5975,38},{0.5975,100.597}}, color={0,0,127}),
Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
connect(onOffHead.y, criticalDamping.u)
annotation (Line(points={{15,-40},{21,-40}}, color={0,0,127}));
- connect(pumpHead.y, pumpBus.dpMea) annotation (Line(points={{75,-40},{81,-40},{81,90},{0.5975,90},{0.5975,100.597}},
- color={0,0,127}), Text(
+ connect(pumpHead.y, pumpBus.dpMea) annotation (Line(points={{75,-40},{81,-40},
+ {81,90},{0.5975,90},{0.5975,100.597}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
connect(variableLimiter.y, onOffn.u1) annotation (Line(points={{11,20},{12,20},
{12,28},{17,28}}, color={0,0,127}));
- connect(onOffn.u2, pumpBus.onSet) annotation (Line(points={{17,20},{14,20},{14,49},{36,49},{36,100.597},{0.5975,100.597}},
- color={255,0,255}),
+ connect(onOffn.u2, pumpBus.onSet) annotation (Line(points={{17,20},{14,20},{
+ 14,49},{36,49},{36,100.597},{0.5975,100.597}}, color={255,0,255}),
Text(
string="%second",
index=3,
@@ -308,9 +309,9 @@ equation
connect(pressure_difference.y, idealSource.dp_in)
annotation (Line(points={{-50,-66},{-15,-66},{-15,-72}}, color={0,0,127}));
connect(idealSource.port_b, vol.ports[1])
- annotation (Line(points={{-11,-80},{31,-80}}, color={0,127,255}));
+ annotation (Line(points={{-11,-80},{32,-80}}, color={0,127,255}));
connect(vol.ports[2], port_b)
- annotation (Line(points={{35,-80},{100,-80},{100,0}}, color={0,127,255}));
+ annotation (Line(points={{34,-80},{100,-80},{100,0}}, color={0,127,255}));
annotation (
Diagram(coordinateSystem(
preserveAspectRatio=true,
diff --git a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt
index e7ec5c0cda..b1dccfc937 100644
--- a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt
+++ b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt
@@ -1,4 +1,4 @@
-last-generated=2022-10-14
+last-generated=2022-05-23
statistics-initialization=
{
"nonlinear": "1",
diff --git a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt
index f9a3ccf013..34bd4bf893 100644
--- a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt
+++ b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt
@@ -1,4 +1,4 @@
-last-generated=2022-10-14
+last-generated=2022-05-23
statistics-initialization=
{
"nonlinear": "1",
diff --git a/AixLib/Systems/ModularAHU/Examples/Cooler.mo b/AixLib/Systems/ModularAHU/Examples/Cooler.mo
index a0335fd1de..041619c466 100644
--- a/AixLib/Systems/ModularAHU/Examples/Cooler.mo
+++ b/AixLib/Systems/ModularAHU/Examples/Cooler.mo
@@ -7,7 +7,6 @@ model Cooler "Cooler register example"
annotation (choicesAllMatching=true);
RegisterModule registerModule(
-
redeclare HydraulicModules.ThrottlePump hydraulicModule(
parameterPipe=AixLib.DataBase.Pipes.Copper.Copper_35x1_5(),
parameterIso=AixLib.DataBase.Pipes.Insulation.Iso25pc(),
@@ -22,7 +21,6 @@ model Cooler "Cooler register example"
redeclare package Medium1 = MediumAir,
T_amb=293.15,T_start=297.15,
dynamicHX(
-
Q_nom=30000,
dT_nom=20,dp1_nominal=100,
dp2_nominal=6000),
@@ -31,6 +29,7 @@ model Cooler "Cooler register example"
m1_flow_nominal=1,
m2_flow_nominal=0.1, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial)
annotation (Placement(transformation(extent={{-40,-46},{26,40}})));
+
Fluid.Sources.Boundary_pT boundaryWaterSource(
p=300000,
nPorts=1,
diff --git a/AixLib/Systems/ModularAHU/Examples/Heater.mo b/AixLib/Systems/ModularAHU/Examples/Heater.mo
index 1ba666d427..f2262695c4 100644
--- a/AixLib/Systems/ModularAHU/Examples/Heater.mo
+++ b/AixLib/Systems/ModularAHU/Examples/Heater.mo
@@ -23,7 +23,6 @@ model Heater "Heating register"
redeclare package Medium1 = MediumAir,
T_amb=293.15,
dynamicHX(
-
Q_nom=30000,
dT_nom=20,dp1_nominal=100,
dp2_nominal=6000),
@@ -32,6 +31,7 @@ model Heater "Heating register"
m1_flow_nominal=1,
m2_flow_nominal=0.1, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial)
annotation (Placement(transformation(extent={{-40,-46},{26,40}})));
+
Fluid.Sources.Boundary_pT boundaryWaterSource(
nPorts=1,
redeclare package Medium = MediumWater,
@@ -96,7 +96,7 @@ equation
StopTime=3600,
__Dymola_fixedstepsize=1,
__Dymola_Algorithm="Dassl"),
- __Dymola_Commands(file(ensureSimulated=true) =
+ __Dymola_Commands(file(ensureSimulated=true)=
"Resources/Scripts/Dymola/Systems/ModularAHU/Examples/Heater.mos"
"Simulate and plot"));
end Heater;
diff --git a/AixLib/ThermalZones/ReducedOrder/SolarGain/CorrectionGDoublePane.mo b/AixLib/ThermalZones/ReducedOrder/SolarGain/CorrectionGDoublePane.mo
index 651d2e1f27..e8124a7049 100644
--- a/AixLib/ThermalZones/ReducedOrder/SolarGain/CorrectionGDoublePane.mo
+++ b/AixLib/ThermalZones/ReducedOrder/SolarGain/CorrectionGDoublePane.mo
@@ -139,4 +139,4 @@ equation
"),
__Dymola_LockedEditing="Model from IBPSA");
-end CorrectionGDoublePane;
\ No newline at end of file
+end CorrectionGDoublePane;
diff --git a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestAbove.mo b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestAbove.mo
index 20579ad1ad..b0401985dc 100644
--- a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestAbove.mo
+++ b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestAbove.mo
@@ -18,7 +18,8 @@ model SelfShadowingTestAbove
final til={1.5707963267949})
"Shadowing due to a projection above the window"
annotation (Placement(transformation(extent={{56,46},{88,74}})));
- AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=90)
+ AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=
+ 1.5707963267949)
"Incidence angle for the window"
annotation (Placement(transformation(extent={{-26,40},{-6,60}})));
Modelica.Blocks.Sources.Constant solAzi(k=0)
@@ -46,7 +47,8 @@ model SelfShadowingTestAbove
final til={1.5707963267949})
"Shadowing due to a projection above the window"
annotation (Placement(transformation(extent={{56,-32},{88,-4}})));
- AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng2(azi=0, til=90)
+ AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng2(azi=0, til=
+ 1.5707963267949)
"Incidence angle for the window"
annotation (Placement(transformation(extent={{-26,-38},{-6,-18}})));
Modelica.Blocks.Sources.Sine solAziSine(f=0.25, amplitude=2*Modelica.Constants.pi)
diff --git a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestBelow.mo b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestBelow.mo
index 9e37e46af2..0c84cd59f7 100644
--- a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestBelow.mo
+++ b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestBelow.mo
@@ -17,7 +17,8 @@ model SelfShadowingTestBelow
final dBel={0.01},
final bBel={1}) "Shadowing due to a projection below"
annotation (Placement(transformation(extent={{56,46},{88,74}})));
- AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=90)
+ AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=
+ 1.5707963267949)
"Incidence Angle for the window"
annotation (Placement(transformation(extent={{-26,40},{-6,60}})));
Modelica.Blocks.Sources.Constant solAzi(k=0)
@@ -41,7 +42,8 @@ model SelfShadowingTestBelow
final bBel={1},
final dBel={-0.2}) "Shadowing due to a balkony"
annotation (Placement(transformation(extent={{56,-40},{88,-12}})));
- AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng2(azi=0, til=90)
+ AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng2(azi=0, til=
+ 1.5707963267949)
"Incidence angle for the window"
annotation (Placement(transformation(extent={{-26,-46},{-6,-26}})));
Modelica.Blocks.Sources.Constant solAzi1(k=0)
diff --git a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestLeft.mo b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestLeft.mo
index 58493f8792..d63251fd42 100644
--- a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestLeft.mo
+++ b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestLeft.mo
@@ -18,7 +18,8 @@ model SelfShadowingTestLeft
final dLef={0.01})
"Shadowing due to a projection on the left-hand side of the window"
annotation (Placement(transformation(extent={{62,-4},{94,24}})));
- AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=90)
+ AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=
+ 1.5707963267949)
"Incidence angle for the window"
annotation (Placement(transformation(extent={{-10,-12},{10,8}})));
Modelica.Blocks.Sources.Constant alt(k=0.3490658504)
diff --git a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestRight.mo b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestRight.mo
index 5381f21ac6..a79c8f6e3c 100644
--- a/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestRight.mo
+++ b/AixLib/ThermalZones/ReducedOrder/Windows/Validation/SelfShadowing/SelfShadowingTestRight.mo
@@ -18,7 +18,8 @@ model SelfShadowingTestRight
final dAbo={0})
"Shadowing due to a projection on the right-hand side"
annotation (Placement(transformation(extent={{60,-4},{92,24}})));
- AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=90)
+ AixLib.ThermalZones.ReducedOrder.Windows.Validation.BaseClasses.IncidenceAngleVDI6007 incAng1(azi=0, til=
+ 1.5707963267949)
"Incidence Angle for the window"
annotation (Placement(transformation(extent={{-10,-12},{10,8}})));
Modelica.Blocks.Sources.Constant alt(k=0.3490658504)
From 39592155ff4e65ea39f930a9a450887875258899 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Tue, 6 Dec 2022 14:04:29 +0100
Subject: [PATCH 40/48] fix path and annotation
---
AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo b/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
index 7b755b0697..62680b42ff 100644
--- a/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
+++ b/AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
@@ -177,7 +177,7 @@ model DHCPipe "Generic pipe model for DHC applications"
// See also AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.TransportWaterAir
// for why mSenFac is 10 and not 1000, as this gives more reasonable
// temperature step response
- Fluid.MixingVolumes.MixingVolume vol(
+ AixLib.Fluid.MixingVolumes.MixingVolume vol(
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
final V=if rho_default > 500 then VEqu else VEqu/1000,
@@ -289,7 +289,7 @@ equation
color={0,127,255}));
connect(pipCor.port_b, vol.ports[1])
- annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
+ annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
connect(pipCor.heatPort, cylHeaTra1.port_a)
annotation (Line(points={{0,10},{0,30}}, color={191,0,0},
pattern=LinePattern.Dash));
From fe8dbd6fa5e5e06ae8b9dcda3615ec2e7252fb15 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Tue, 6 Dec 2022 14:25:38 +0100
Subject: [PATCH 41/48] Revert lines, add revisions
---
.../Fluid/Humidifiers/GenericHumidifier_u.mo | 21 +++++----
AixLib/Systems/HydraulicModules/Admix.mo | 12 ++++-
.../Systems/HydraulicModules/Example/Pump.mo | 47 ++++++++++++-------
.../HydraulicModules/Example/ThrottlePump.mo | 10 ++--
AixLib/Systems/HydraulicModules/Injection.mo | 15 +++---
.../HydraulicModules/Injection2WayValve.mo | 16 +++++--
.../ModularAHU/Validation/AHU2_Cooler.mo | 10 ++--
7 files changed, 86 insertions(+), 45 deletions(-)
diff --git a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
index 633bac7a13..d307485b6b 100644
--- a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
+++ b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
@@ -49,9 +49,9 @@ model GenericHumidifier_u
annotation (Placement(transformation(extent={{-100,-104},{-80,-84}})));
Modelica.Blocks.Routing.RealPassThrough Tsteam if steamHumidifier
annotation (Placement(transformation(extent={{-60,-98},{-40,-78}})));
- Modelica.Blocks.Sources.RealExpression realExpression(y = mWat_flow_nominal) annotation(
+ Modelica.Blocks.Sources.RealExpression realExpression(y = mWat_flow_nominal) annotation (
Placement(visible = true, transformation(origin = {-62, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
- Modelica.Blocks.Math.Product product annotation(
+ Modelica.Blocks.Math.Product product annotation (
Placement(visible = true, transformation(origin = {-20, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
protected
Modelica.Blocks.Interfaces.RealInput Tsteam_intern;
@@ -64,10 +64,10 @@ equation
if not steamHumidifier then
Tsteam_intern = 273.15;
end if;
-
+
connect(Tsteam.y, Tsteam_intern);
connect(product.y, vol.mWat_flow) annotation (Line(
- points={{-37,60},{-30,60},{-30,-18},{-11,-18}},
+ points={{-9,60},{-30,60},{-30,-18},{-11,-18}},
color={0,0,127}));
connect(u, limiter.u)
annotation (Line(points={{-120,60},{-92,60}}, color={0,0,127}));
@@ -100,11 +100,11 @@ equation
points={{-79,-94},{-72,-94},{-72,-88},{-62,-88}},
color={0,0,127},
pattern=LinePattern.Dash));
- connect(limiter.y, product.u1) annotation(
- Line(points = {{-68, 60}, {-48, 60}, {-48, 66}, {-32, 66}}, color = {0, 0, 127}));
- connect(realExpression.y, product.u2) annotation(
- Line(points = {{-50, 32}, {-40, 32}, {-40, 54}, {-32, 54}}, color = {0, 0, 127}));
- connect(product.y, mWat_flow) annotation(
+ connect(limiter.y, product.u1) annotation (
+ Line(points={{-69,60},{-48,60},{-48,66},{-32,66}}, color = {0, 0, 127}));
+ connect(realExpression.y, product.u2) annotation (
+ Line(points={{-51,32},{-40,32},{-40,54},{-32,54}}, color = {0, 0, 127}));
+ connect(product.y, mWat_flow) annotation (
Line(points = {{-9, 60}, {110, 60}}, color = {0, 0, 127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={Text(lineColor = {0, 0, 127}, extent = {{-52, -60}, {58, -120}}, textString = "m=%m_flow_nominal"),
@@ -165,6 +165,9 @@ Documentation(info="
",
revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
- October 22, 2019, by Alexander Kümpel:
First implementation.
diff --git a/AixLib/Systems/HydraulicModules/Admix.mo b/AixLib/Systems/HydraulicModules/Admix.mo
index dc12bee506..ab53e75227 100644
--- a/AixLib/Systems/HydraulicModules/Admix.mo
+++ b/AixLib/Systems/HydraulicModules/Admix.mo
@@ -152,7 +152,7 @@ equation
index=1,
extent={{6,3},{6,3}}));
connect(pipe5.port_a,junc456. ports[1])
- annotation (Line(points={{-50,-60},{-32.1333,-60}}, color={0,127,255}));
+ annotation (Line(points={{-50,-60},{-31.0667,-60}}, color={0,127,255}));
connect(pipe6.port_a,junc456. ports[2]) annotation (Line(points={{-30,-28},{
-30,-44},{-30,-60},{-30,-60}},
color={0,127,255}));
@@ -185,7 +185,7 @@ equation
connect(pipe1.port_b, valve.port_1)
annotation (Line(points={{-62,20},{-40,20}}, color={0,127,255}));
connect(pipe4.port_b, junc456.ports[3])
- annotation (Line(points={{24,-60},{-27.8667,-60}}, color={0,127,255}));
+ annotation (Line(points={{24,-60},{-28.9333,-60}}, color={0,127,255}));
connect(pipe5.port_b, senT_b2.port_a)
annotation (Line(points={{-66,-60},{-78,-60}}, color={0,127,255}));
connect(pipe2.port_b, PumpInterface.port_a) annotation (Line(points={{8,20},{
@@ -303,5 +303,13 @@ equation
First implementation
+", revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
+ - 2017-06 by Alexander Kümpel:
+ Implemented
+
+
"));
end Admix;
diff --git a/AixLib/Systems/HydraulicModules/Example/Pump.mo b/AixLib/Systems/HydraulicModules/Example/Pump.mo
index 84f292e385..79255acce5 100644
--- a/AixLib/Systems/HydraulicModules/Example/Pump.mo
+++ b/AixLib/Systems/HydraulicModules/Example/Pump.mo
@@ -54,33 +54,44 @@ model Pump "Test for unmixed pump circuit"
extent={{10,-10},{-10,10}},
rotation=-90,
origin={28,-50})));
- Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation (
Placement(visible = true, transformation(origin = {-86, -28}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
- connect(Unmixed.hydraulicBus, hydraulicBus) annotation(
- Line(points = {{-20, 10}, {-42, 10}}, color = {255, 204, 51}, thickness = 0.5),
- Text(string = "%second", index = 1, extent = {{6, 3}, {6, 3}}));
- connect(hydRes.port_b, Unmixed.port_a2) annotation(
- Line(points = {{20, 60}, {28, 60}, {28, 40}}, color = {0, 127, 255}));
- connect(hydRes.port_a, Unmixed.port_b1) annotation(
- Line(points = {{0, 60}, {-8, 60}, {-8, 40}}, color = {0, 127, 255}));
- connect(boundary.ports[1], Unmixed.port_a1) annotation(
- Line(points = {{-8, -40}, {-8, -20}}, color = {0, 127, 255}));
- connect(boundary1.ports[1], Unmixed.port_b2) annotation(
- Line(points = {{28, -40}, {28, -20}, {28, -20}}, color = {0, 127, 255}));
- connect(RPM_ramp.y, hydraulicBus.pumpBus.rpmSet) annotation(
- Line(points = {{-79, 10}, {-60, 10}, {-60, 10.05}, {-41.95, 10.05}}, color = {0, 0, 127}),
- Text(string = "%second", index = 1, extent = {{6, 3}, {6, 3}}, horizontalAlignment = TextAlignment.Left));
- connect(pumpOn.y, hydraulicBus.pumpBus.onSet) annotation(
- Line(points = {{-74, -28}, {-42, -28}, {-42, 10}}, color = {255, 0, 255}));
+ connect(Unmixed.hydraulicBus, hydraulicBus) annotation (Line(
+ points={{-20,10},{-42,10}},
+ color={255,204,51},
+ thickness=0.5), Text(
+ string="%second",
+ index=1,
+ extent={{6,3},{6,3}}));
+ connect(hydRes.port_b, Unmixed.port_a2)
+ annotation (Line(points={{20,60},{28,60},{28,40}}, color={0,127,255}));
+ connect(hydRes.port_a, Unmixed.port_b1)
+ annotation (Line(points={{0,60},{-8,60},{-8,40}}, color={0,127,255}));
+ connect(boundary.ports[1], Unmixed.port_a1)
+ annotation (Line(points={{-8,-40},{-8,-20}}, color={0,127,255}));
+ connect(boundary1.ports[1], Unmixed.port_b2)
+ annotation (Line(points={{28,-40},{28,-20},{28,-20}}, color={0,127,255}));
+ connect(RPM_ramp.y, hydraulicBus.pumpBus.rpmSet) annotation (Line(points={{
+ -79,10},{-60,10},{-60,10.05},{-41.95,10.05}}, color={0,0,127}), Text(
+ string="%second",
+ index=1,
+ extent={{6,3},{6,3}},
+ horizontalAlignment=TextAlignment.Left));
+ connect(pumpOn.y, hydraulicBus.pumpBus.onSet) annotation (
+ Line(points={{-75,-28},{-41.95,-28},{-41.95,10.05}},
+ color = {255, 0, 255}));
annotation (Placement(transformation(extent={{80,80},{100,100}})),
Icon(graphics,
coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{120,100}})), Diagram(
coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
100}})),
- experiment(StopTime=800,Interval = 5,Solver=dassl),
+ experiment(StopTime=800,Interval = 5),
Documentation(revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
- October 25, 2017, by Alexander Kümpel:
Transfer from ZUGABE to AixLib.
diff --git a/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo b/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
index 5626671dbf..7fc29d241d 100644
--- a/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
+++ b/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
@@ -53,7 +53,7 @@ model ThrottlePump "Test for unmixed throttle and pump circuit"
extent={{10,-10},{-10,10}},
rotation=-90,
origin={28,-50})));
- Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation (
Placement(visible = true, transformation(origin = {-86, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(ThrottlePump.hydraulicBus, hydraulicBus) annotation (Line(
@@ -82,8 +82,9 @@ equation
index=1,
extent={{6,3},{6,3}},
horizontalAlignment=TextAlignment.Left));
- connect(pumpOn.y, hydraulicBus.pumpBus.onSet) annotation(
- Line(points = {{-74, -30}, {-50, -30}, {-50, 10}}, color = {255, 0, 255}));
+ connect(pumpOn.y, hydraulicBus.pumpBus.onSet) annotation (
+ Line(points={{-75,-30},{-49.95,-30},{-49.95,10.05}},
+ color = {255, 0, 255}));
annotation (Icon(graphics,
coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{120,100}})), Diagram(
@@ -91,6 +92,9 @@ equation
100}})),
experiment(StopTime=600),
Documentation(revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
- October 25, 2017, by Alexander Kümpel:
Transfer from ZUGABE to AixLib.
diff --git a/AixLib/Systems/HydraulicModules/Injection.mo b/AixLib/Systems/HydraulicModules/Injection.mo
index 41bbb99d13..889cb91b2e 100644
--- a/AixLib/Systems/HydraulicModules/Injection.mo
+++ b/AixLib/Systems/HydraulicModules/Injection.mo
@@ -239,13 +239,13 @@ equation
connect(pipe8.heatPort, pipe9.heatPort)
annotation (Line(points={{-32,-20},{8,-20}}, color={191,0,0}));
connect(pipe2.port_a, junc15j.ports[1])
- annotation (Line(points={{-30,20},{-41.0667,20}},
+ annotation (Line(points={{-30,20},{-40.5333,20}},
color={0,127,255}));
connect(VFSen_injection.port_b, juncjp6.ports[1])
- annotation (Line(points={{8,20},{14.9333,20}},
+ annotation (Line(points={{8,20},{15.4667,20}},
color={0,127,255}));
connect(pipe6.port_a, junc3v6.ports[1])
- annotation (Line(points={{0,-60},{14.9333,-60}},
+ annotation (Line(points={{0,-60},{15.4667,-60}},
color={0,127,255}));
connect(juncjp6.ports[2], pipe3.port_a)
annotation (Line(points={{16,20},{24,20}}, color={0,127,255}));
@@ -302,13 +302,13 @@ equation
connect(pipe8.port_b, valve.port_3)
annotation (Line(points={{-40,-28},{-40,-52}}, color={0,127,255}));
connect(pipe9.port_b, juncjp6.ports[3]) annotation (Line(points={{16,-12},{16,
- 20},{17.0667,20}}, color={0,127,255}));
+ 20},{16.5333,20}}, color={0,127,255}));
connect(pipe9.port_a, junc3v6.ports[3]) annotation (Line(points={{16,-28},{16,
- -60},{17.0667,-60}}, color={0,127,255}));
+ -60},{16.5333,-60}}, color={0,127,255}));
connect(pipe4.port_b, senT_b1.port_a)
annotation (Line(points={{86,20},{88,20}}, color={0,127,255}));
connect(pipe8.port_a, junc15j.ports[3]) annotation (Line(points={{-40,-12},{
- -40,20},{-38.9333,20}}, color={0,127,255}));
+ -40,20},{-39.4667,20}}, color={0,127,255}));
connect(pipe9.heatPort, prescribedTemperature.port) annotation (Line(points={
{8,-20},{8,-34},{30,-34},{30,-20},{32,-20}}, color={191,0,0}));
annotation (
@@ -448,6 +448,9 @@ equation
", revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
- August 09, 2018, by Alexander Kümpel:
Extension from base PartioalHydraulicModuls
diff --git a/AixLib/Systems/HydraulicModules/Injection2WayValve.mo b/AixLib/Systems/HydraulicModules/Injection2WayValve.mo
index 9e3e581095..891238ddb8 100644
--- a/AixLib/Systems/HydraulicModules/Injection2WayValve.mo
+++ b/AixLib/Systems/HydraulicModules/Injection2WayValve.mo
@@ -168,12 +168,12 @@ equation
index=1,
extent={{6,3},{6,3}}));
connect(pipe5.port_a, junc3v6.ports[1])
- annotation (Line(points={{-4,-60},{4.4,-60}},
+ annotation (Line(points={{-4,-60},{5.2,-60}},
color={0,127,255}));
connect(valve.port_b, pipe6.port_a)
annotation (Line(points={{-50,-60},{-58,-60}}, color={0,127,255}));
connect(juncjp6.ports[1], pipe2.port_a)
- annotation (Line(points={{4.4,20},{16,20}}, color={0,127,255}));
+ annotation (Line(points={{5.2,20},{16,20}}, color={0,127,255}));
connect(senT_a1.port_b, pipe1.port_a)
annotation (Line(points={{-88,20},{-40,20}}, color={0,127,255}));
connect(pipe1.heatPort, prescribedTemperature.port) annotation (Line(points={{-32,
@@ -214,9 +214,9 @@ equation
connect(pipe4.port_b, junc3v6.ports[2])
annotation (Line(points={{44,-60},{6,-60}}, color={0,127,255}));
connect(pipe7.port_b, juncjp6.ports[3])
- annotation (Line(points={{6,-12},{6,20},{7.6,20}}, color={0,127,255}));
+ annotation (Line(points={{6,-12},{6,20},{6.8,20}}, color={0,127,255}));
connect(pipe7.port_a, junc3v6.ports[3])
- annotation (Line(points={{6,-28},{7.6,-28},{7.6,-60}}, color={0,127,255}));
+ annotation (Line(points={{6,-28},{6.8,-28},{6.8,-60}}, color={0,127,255}));
connect(pipe5.port_b, valve.port_a)
annotation (Line(points={{-20,-60},{-34,-60}}, color={0,127,255}));
connect(pipe6.port_b, senT_b2.port_a)
@@ -328,5 +328,13 @@ equation
First implementation
+", revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
+ - 2017-06 by Alexander Kümpel:
+ Implemented
+
+
"));
end Injection2WayValve;
diff --git a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
index dae31283f0..2166c6f65e 100644
--- a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
+++ b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
@@ -108,7 +108,7 @@ model AHU2_Cooler "Cooling register of ahu 2 in E.ON ERC testhall"
annotation (Placement(transformation(extent={{-90,34},{-78,46}})));
Modelica.Blocks.Sources.Constant const(k=-0.5)
annotation (Placement(transformation(extent={{-104,32},{-96,40}})));
- Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation (
Placement(visible = true, transformation(origin = {-80, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(toKelvin.Kelvin, boundaryWaterSource.T_in)
@@ -160,8 +160,9 @@ equation
-72,40},{-72,36}}, color={0,0,127}));
connect(const.y, add.u2) annotation (Line(points={{-95.6,36},{-94,36},{-94,
36.4},{-91.2,36.4}}, color={0,0,127}));
- connect(pumpOn.y, registerBus1.hydraulicBus.pumpBus.onSet) annotation(
- Line(points = {{-68, -24}, {-38, -24}, {-38, 10}}, color = {255, 0, 255}));
+ connect(pumpOn.y, registerBus1.hydraulicBus.pumpBus.onSet) annotation (
+ Line(points={{-69,-24},{-37.95,-24},{-37.95,10.05}},
+ color = {255, 0, 255}));
annotation (Documentation(info="
This example compares the simulated behavior with measured data. The
input filter of the valve is deactivated because the measured actual
@@ -169,6 +170,9 @@ equation
", revisions="
+ - December 06, 2022, by FG Modelica:
+ Fixes to increase compatability to OpenModelica #1378.
+
- November 4, 2019, by Alexander Kümpel:
First implementation.
From 34b4e87689a935d798584d7968a1305e9995cea9 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Mon, 16 Jan 2023 17:21:41 +0100
Subject: [PATCH 42/48] Update DeviceDrivers to 2.1.1 to avoid warnings
---
AixLib/package.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/AixLib/package.mo b/AixLib/package.mo
index 028803b6e9..db44fbca58 100644
--- a/AixLib/package.mo
+++ b/AixLib/package.mo
@@ -4,7 +4,7 @@ package AixLib
annotation (
uses(
SDF(version="0.4.2"),
- Modelica_DeviceDrivers(version="2.0.0"),
+ Modelica_DeviceDrivers(version="2.1.1"),
Modelica(version="4.0.0")),
version="1.3.2",
conversion(from(
From d36a99282a498943f283a2f1d810564b67a1b71c Mon Sep 17 00:00:00 2001
From: Larissa
Date: Tue, 24 Jan 2023 09:34:59 +0100
Subject: [PATCH 43/48] add replaceable to declaration of thermalZone record
#1424
---
.../ReducedOrder/ThermalZone/BaseClasses/PartialThermalZone.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/AixLib/ThermalZones/ReducedOrder/ThermalZone/BaseClasses/PartialThermalZone.mo b/AixLib/ThermalZones/ReducedOrder/ThermalZone/BaseClasses/PartialThermalZone.mo
index c85d86cf3b..45932ea888 100644
--- a/AixLib/ThermalZones/ReducedOrder/ThermalZone/BaseClasses/PartialThermalZone.mo
+++ b/AixLib/ThermalZones/ReducedOrder/ThermalZone/BaseClasses/PartialThermalZone.mo
@@ -2,7 +2,7 @@ within AixLib.ThermalZones.ReducedOrder.ThermalZone.BaseClasses;
partial model PartialThermalZone "Partial model for thermal zone models"
extends AixLib.Fluid.Interfaces.LumpedVolumeDeclarations;
- parameter DataBase.ThermalZones.ZoneBaseRecord zoneParam
+ replaceable parameter DataBase.ThermalZones.ZoneBaseRecord zoneParam
"Choose setup for this zone" annotation (choicesAllMatching=true);
parameter Integer nPorts=0
"Number of fluid ports"
From 1f815fc872e45e592fe7652e0f7bc8d64b22ed7c Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Wed, 8 Feb 2023 14:35:10 +0100
Subject: [PATCH 44/48] Add review
---
AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo | 4 ++--
...vers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt | 2 +-
...s_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt | 2 +-
AixLib/Systems/HydraulicModules/Example/Pump.mo | 2 +-
AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo | 2 +-
AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo | 3 +--
6 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
index d307485b6b..bca4c84a66 100644
--- a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
+++ b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
@@ -49,9 +49,9 @@ model GenericHumidifier_u
annotation (Placement(transformation(extent={{-100,-104},{-80,-84}})));
Modelica.Blocks.Routing.RealPassThrough Tsteam if steamHumidifier
annotation (Placement(transformation(extent={{-60,-98},{-40,-78}})));
- Modelica.Blocks.Sources.RealExpression realExpression(y = mWat_flow_nominal) annotation (
+ Modelica.Blocks.Sources.RealExpression realExpression(y = mWat_flow_nominal) annotation(
Placement(visible = true, transformation(origin = {-62, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
- Modelica.Blocks.Math.Product product annotation (
+ Modelica.Blocks.Math.Product product annotation(
Placement(visible = true, transformation(origin = {-20, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
protected
Modelica.Blocks.Interfaces.RealInput Tsteam_intern;
diff --git a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt
index b1dccfc937..e7ec5c0cda 100644
--- a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt
+++ b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlled.txt
@@ -1,4 +1,4 @@
-last-generated=2022-05-23
+last-generated=2022-10-14
statistics-initialization=
{
"nonlinear": "1",
diff --git a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt
index 34bd4bf893..f9a3ccf013 100644
--- a/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt
+++ b/AixLib/Resources/ReferenceResults/Dymola/AixLib_Fluid_Movers_PumpsPolynomialBased_Examples_PumpSpeedControlledDpV.txt
@@ -1,4 +1,4 @@
-last-generated=2022-05-23
+last-generated=2022-10-14
statistics-initialization=
{
"nonlinear": "1",
diff --git a/AixLib/Systems/HydraulicModules/Example/Pump.mo b/AixLib/Systems/HydraulicModules/Example/Pump.mo
index 79255acce5..ca85d813a3 100644
--- a/AixLib/Systems/HydraulicModules/Example/Pump.mo
+++ b/AixLib/Systems/HydraulicModules/Example/Pump.mo
@@ -54,7 +54,7 @@ model Pump "Test for unmixed pump circuit"
extent={{10,-10},{-10,10}},
rotation=-90,
origin={28,-50})));
- Modelica.Blocks.Sources.BooleanConstant pumpOn annotation (
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
Placement(visible = true, transformation(origin = {-86, -28}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(Unmixed.hydraulicBus, hydraulicBus) annotation (Line(
diff --git a/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo b/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
index 7fc29d241d..0cbd725968 100644
--- a/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
+++ b/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
@@ -53,7 +53,7 @@ model ThrottlePump "Test for unmixed throttle and pump circuit"
extent={{10,-10},{-10,10}},
rotation=-90,
origin={28,-50})));
- Modelica.Blocks.Sources.BooleanConstant pumpOn annotation (
+ Modelica.Blocks.Sources.BooleanConstant pumpOn annotation(
Placement(visible = true, transformation(origin = {-86, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(ThrottlePump.hydraulicBus, hydraulicBus) annotation (Line(
diff --git a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
index 2166c6f65e..a14c2c53b4 100644
--- a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
+++ b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
@@ -161,8 +161,7 @@ equation
connect(const.y, add.u2) annotation (Line(points={{-95.6,36},{-94,36},{-94,
36.4},{-91.2,36.4}}, color={0,0,127}));
connect(pumpOn.y, registerBus1.hydraulicBus.pumpBus.onSet) annotation (
- Line(points={{-69,-24},{-37.95,-24},{-37.95,10.05}},
- color = {255, 0, 255}));
+ Line(points={{-69,-24},{-37.95,-24},{-37.95,10.05}}, color = {255, 0, 255}));
annotation (Documentation(info="
This example compares the simulated behavior with measured data. The
input filter of the valve is deactivated because the measured actual
From fae8e8d7ee425909f2299852c3e6f779c96a68a5 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Wed, 8 Feb 2023 15:02:44 +0100
Subject: [PATCH 45/48] Adjust revision based on review
---
AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo | 4 ++--
AixLib/Systems/HydraulicModules/Admix.mo | 4 ++--
AixLib/Systems/HydraulicModules/Example/Pump.mo | 4 ++--
AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo | 4 ++--
AixLib/Systems/HydraulicModules/Injection.mo | 4 ++--
AixLib/Systems/HydraulicModules/Injection2WayValve.mo | 4 ++--
AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo | 4 ++--
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
index bca4c84a66..524f4f526f 100644
--- a/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
+++ b/AixLib/Fluid/Humidifiers/GenericHumidifier_u.mo
@@ -165,8 +165,8 @@ Documentation(info="
",
revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- October 22, 2019, by Alexander Kümpel:
First implementation.
diff --git a/AixLib/Systems/HydraulicModules/Admix.mo b/AixLib/Systems/HydraulicModules/Admix.mo
index ab53e75227..442ea2b9f4 100644
--- a/AixLib/Systems/HydraulicModules/Admix.mo
+++ b/AixLib/Systems/HydraulicModules/Admix.mo
@@ -304,8 +304,8 @@ equation
", revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- 2017-06 by Alexander Kümpel:
Implemented
diff --git a/AixLib/Systems/HydraulicModules/Example/Pump.mo b/AixLib/Systems/HydraulicModules/Example/Pump.mo
index ca85d813a3..dd4236d5ba 100644
--- a/AixLib/Systems/HydraulicModules/Example/Pump.mo
+++ b/AixLib/Systems/HydraulicModules/Example/Pump.mo
@@ -89,8 +89,8 @@ equation
100}})),
experiment(StopTime=800,Interval = 5),
Documentation(revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- October 25, 2017, by Alexander Kümpel:
Transfer from ZUGABE to AixLib.
diff --git a/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo b/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
index 0cbd725968..fc80aae3cc 100644
--- a/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
+++ b/AixLib/Systems/HydraulicModules/Example/ThrottlePump.mo
@@ -92,8 +92,8 @@ equation
100}})),
experiment(StopTime=600),
Documentation(revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- October 25, 2017, by Alexander Kümpel:
Transfer from ZUGABE to AixLib.
diff --git a/AixLib/Systems/HydraulicModules/Injection.mo b/AixLib/Systems/HydraulicModules/Injection.mo
index 889cb91b2e..837c3a46a1 100644
--- a/AixLib/Systems/HydraulicModules/Injection.mo
+++ b/AixLib/Systems/HydraulicModules/Injection.mo
@@ -448,8 +448,8 @@ equation
", revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- August 09, 2018, by Alexander Kümpel:
Extension from base PartioalHydraulicModuls
diff --git a/AixLib/Systems/HydraulicModules/Injection2WayValve.mo b/AixLib/Systems/HydraulicModules/Injection2WayValve.mo
index 891238ddb8..b1f57d9d97 100644
--- a/AixLib/Systems/HydraulicModules/Injection2WayValve.mo
+++ b/AixLib/Systems/HydraulicModules/Injection2WayValve.mo
@@ -329,8 +329,8 @@ equation
", revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- 2017-06 by Alexander Kümpel:
Implemented
diff --git a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
index a14c2c53b4..0d232726d0 100644
--- a/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
+++ b/AixLib/Systems/ModularAHU/Validation/AHU2_Cooler.mo
@@ -169,8 +169,8 @@ equation
", revisions="
- - December 06, 2022, by FG Modelica:
- Fixes to increase compatability to OpenModelica #1378.
+ - December 06, 2022, by EBC-Modelica group:
+ Fixes to increase compatability to OpenModelica #1378.
- November 4, 2019, by Alexander Kümpel:
First implementation.
From 9253a77e68661fdfb48c78a858386b0df73a5a48 Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Fri, 17 Feb 2023 08:24:58 +0100
Subject: [PATCH 46/48] fix typo and remove experiment setup as the model is
partial (should fix OM-tests) #1427
---
.../Validation/ASHRAE140/BaseClasses/PartialCase.mo | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo b/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo
index e5013bd712..b69adde545 100644
--- a/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo
+++ b/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo
@@ -49,7 +49,7 @@ partial model PartialCase "This is the base class from which the base cases will
Win_Area=Win_Area,
absInnerWallSurf=absInnerWallSurf)
"Room with south facing window"),
- choice(redeclare model Room = Rooms.ASHRAE140.EathWestFacingWindows (
+ choice(redeclare model Room = Rooms.ASHRAE140.EastWestFacingWindows (
wallTypes=wallTypes,
calcMethodIn=4,
Type_Win=windowParam,
@@ -223,8 +223,10 @@ equation
connect(ReferenceCoolingLoadOrTempMin.y[1], checkResultsAccordingToASHRAECoolingOrTempMin.lowerLimit) annotation (Line(points={{72.7,-77},{86,-77},{86,-83.5},{97.95,-83.5}}, color={0,0,127}));
connect(ReferenceCoolingLoadOrTempMin.y[2], checkResultsAccordingToASHRAECoolingOrTempMin.upperLimit) annotation (Line(points={{72.7,-77},{87,-77},{87,-80.5},{97.95,-80.5}}, color={0,0,127}));
connect(to_degCRoomConvTemp.y, FreeFloatRoomTemperature) annotation (Line(points={{102.5,36},{140,36}}, color={0,0,127}));
- connect(temperatureSensor.T, to_degCRoomConvTemp.u) annotation (Line(points={{84,36},{91,36}}, color={0,0,127}));
- connect(temperatureSensor1.T, to_degCRoomConvTemp1.u) annotation (Line(points={{84,18},{91,18}}, color={0,0,127}));
+ connect(temperatureSensor.T, to_degCRoomConvTemp.u) annotation (Line(points={{84.6,36},
+ {91,36}}, color={0,0,127}));
+ connect(temperatureSensor1.T, to_degCRoomConvTemp1.u) annotation (Line(points={{84.6,18},
+ {91,18}}, color={0,0,127}));
connect(to_degCRoomConvTemp1.y, FreeFloatRoomRadTemperature) annotation (Line(points={{102.5,18},{140,18}}, color={0,0,127}));
connect(Room.thermRoom, temperatureSensor.port) annotation (Line(points={{-2.92,35},{-2.92,44},{67,44},{67,36},{72,36}}, color={191,0,0}));
connect(Room.starRoom, temperatureSensor1.port) annotation (Line(points={{5.48,35},{5.48,42},{65,42},{65,18},{72,18}}, color={0,0,0}));
@@ -329,7 +331,6 @@ equation
extent={{-150,-110},{130,90}},
preserveAspectRatio=false,
grid={1,1})),
- experiment(Tolerance=1e-6, StopTime=31539600),
__Dymola_experimentSetupOutput(events=true),
Documentation(revisions="
- July 1, 2020, by Konstantina Xanthopoulou:
From c41865f1647cdecd27e30991459d0f67b8c9420c Mon Sep 17 00:00:00 2001
From: "fabian.wuellhorst"
Date: Fri, 17 Feb 2023 08:31:57 +0100
Subject: [PATCH 47/48] Fix bad indent in color annotation
---
.../HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo b/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo
index b69adde545..5228cbc821 100644
--- a/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo
+++ b/AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/BaseClasses/PartialCase.mo
@@ -224,9 +224,9 @@ equation
connect(ReferenceCoolingLoadOrTempMin.y[2], checkResultsAccordingToASHRAECoolingOrTempMin.upperLimit) annotation (Line(points={{72.7,-77},{87,-77},{87,-80.5},{97.95,-80.5}}, color={0,0,127}));
connect(to_degCRoomConvTemp.y, FreeFloatRoomTemperature) annotation (Line(points={{102.5,36},{140,36}}, color={0,0,127}));
connect(temperatureSensor.T, to_degCRoomConvTemp.u) annotation (Line(points={{84.6,36},
- {91,36}}, color={0,0,127}));
+ {91,36}}, color={0,0,127}));
connect(temperatureSensor1.T, to_degCRoomConvTemp1.u) annotation (Line(points={{84.6,18},
- {91,18}}, color={0,0,127}));
+ {91,18}}, color={0,0,127}));
connect(to_degCRoomConvTemp1.y, FreeFloatRoomRadTemperature) annotation (Line(points={{102.5,18},{140,18}}, color={0,0,127}));
connect(Room.thermRoom, temperatureSensor.port) annotation (Line(points={{-2.92,35},{-2.92,44},{67,44},{67,36},{72,36}}, color={191,0,0}));
connect(Room.starRoom, temperatureSensor1.port) annotation (Line(points={{5.48,35},{5.48,42},{65,42},{65,18},{72,18}}, color={0,0,0}));
From e6e6aa1d0438f624e5480dace095bb3d615d520d Mon Sep 17 00:00:00 2001
From: Laura Maier <38097212+LauraMaier@users.noreply.github.com>
Date: Mon, 27 Feb 2023 09:07:27 +0100
Subject: [PATCH 48/48] Update PUBLICATIONS.md
Add PV model
---
PUBLICATIONS.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/PUBLICATIONS.md b/PUBLICATIONS.md
index e1176e037b..6fef565218 100644
--- a/PUBLICATIONS.md
+++ b/PUBLICATIONS.md
@@ -6,6 +6,7 @@
1. [District Heating and Cooling](#dhc)
1. [Fast HVAC](#fasthvac)
1. [Building Automation Systems](#bas)
+1. [Photovoltaic System Model](#pv)
## Building Physics
@@ -76,3 +77,9 @@ Stinner, S., Schumacher, M., Finkbeiner, K., Streblow, R., & Müller, D. (2015).
#### Hardware-in-the-Loop-Simulation of a Building Energy and Control System to Investigate Circulating Pump Control Using Modelica
Schneider, G. F., Oppermann, J., Constantin, A., Streblow, R., & Müller, D. (2015). In: Proceedings of the International Modelica Conference, Versailles, France, September 21-23, pp. 225-233, DOI: [DOI: 10.3384/ecp15118225](http://dx.doi.org/10.3384/ecp15118225)
+
+## Photovoltaic System Model
+
+#### Open-source photovoltaic model for early building planning processes: Modeling, application and validation
+Maier, L.; Kratz, M.; Vering, C.; Mehrfeld, P.; Müller, D. (2022). In: Proceedings of the 17th International Building Performance Simulation Association (BS 2021),
+Bruges, Belgium, September 1-3 2021. DOI: [DOI: 10.18154/RWTH-2021-09356](http://dx.doi.org/10.18154/RWTH-2021-09356)