Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

81 sup ctrl interfaces #82

Merged
merged 20 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
635b883
Add compressor speed supervisory control #81
FWuellhorst Aug 13, 2024
61e4174
Add supervisory control for thermostatic valve #81
FWuellhorst Aug 13, 2024
c1d457c
Move sup ctrl to control subsystem to theoretically enable Modelica i…
FWuellhorst Aug 13, 2024
6a80876
Update parameters to new version of AixLib #81
FWuellhorst Aug 14, 2024
c6fe7f8
rm unwanted CI file
FWuellhorst Aug 14, 2024
35d073a
Added switch for external control of three-way valve
MaxBerktoldRWTH Aug 27, 2024
bf82c74
add new sdf based on vclibpy updates
FWuellhorst Aug 30, 2024
46593e8
Set the default of the external control to false.
FWuellhorst Aug 30, 2024
09997fd
Use new data with correct vclibpy map and other scaling
FWuellhorst Aug 30, 2024
10f0ea5
revert test changes
FWuellhorst Sep 2, 2024
d6b7d9f
re-arrange graphics, use supervisory control block of three-way valve…
FWuellhorst Sep 2, 2024
285998c
add UFH transfer data
FWuellhorst Sep 2, 2024
1196a9d
Add user and buiMeaBus to supervisory control
FWuellhorst Sep 3, 2024
b91e857
change icons of electrical components
FWuellhorst Sep 3, 2024
f5dd565
add incElePro and control deviation for heating season
FWuellhorst Sep 3, 2024
fff783f
minor fixes and CI trigger
FWuellhorst Sep 10, 2024
c29c0cc
update reference results, only last point changed
FWuellhorst Sep 23, 2024
f064d62
CI message from ebc-aixlib-bot. Automatic push of CI with new regress…
FWuellhorst Sep 23, 2024
e2fead1
update translation statistics
FWuellhorst Sep 23, 2024
0095dbb
revert wrong change
FWuellhorst Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,15 @@ equation
-41.0824,118.857}},
color={0,0,0},
thickness=1));
connect(control.useProBus, userProfiles.useProBus) annotation (Line(
points={{16.82,198.37},{16.82,206},{-214,206},{-214,150.775},{-225.167,
150.775}},
color={0,127,0},
thickness=0.5));
connect(control.buiMeaBus, building.buiMeaBus) annotation (Line(
points={{62.04,198.37},{62.04,206},{-16,206},{-16,88},{39,88},{39,77.62}},
color={255,128,0},
thickness=0.5));
annotation (Icon(graphics,
coordinateSystem(preserveAspectRatio=false, extent={{-280,
-140},{280,200}})),
Expand Down
14 changes: 10 additions & 4 deletions BESMod/Systems/Control/BaseClasses/PartialControl.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ partial model PartialControl "Model for a partial HEMS control"
parameter Boolean use_openModelica=false
"=true to disable features which
are not available in open modelica" annotation(Dialog(tab="Advanced"));
Hydraulical.Interfaces.SystemControlBus sigBusHyd annotation (Placement(
BESMod.Systems.Hydraulical.Interfaces.SystemControlBus sigBusHyd annotation (Placement(
transformation(extent={{-94,-114},{-64,-88}}), iconTransformation(
extent={{-94,-114},{-64,-88}})));
Ventilation.Interfaces.SystemControlBus sigBusVen annotation (Placement(
BESMod.Systems.Ventilation.Interfaces.SystemControlBus sigBusVen annotation (Placement(
transformation(extent={{64,-114},{96,-86}}), iconTransformation(extent=
{{64,-114},{96,-86}})));
Interfaces.ControlOutputs outBusCtrl if not use_openModelica
BESMod.Systems.Interfaces.ControlOutputs outBusCtrl if not use_openModelica
annotation (Placement(transformation(
extent={{84,-16},{118,16}}), iconTransformation(extent={{84,-16},{118,
16}})));
Electrical.Interfaces.SystemControlBus sigBusEle annotation (Placement(
BESMod.Systems.Electrical.Interfaces.SystemControlBus sigBusEle annotation (Placement(
transformation(extent={{-116,-14},{-84,14}}), iconTransformation(extent=
{{-116,-14},{-84,14}})));
BESMod.Systems.Interfaces.UseProBus useProBus annotation (
Placement(transformation(extent={{-80,78},{-38,124}}),
iconTransformation(extent={{-74,88},{-48,114}})));
BESMod.Systems.Interfaces.BuiMeaBus buiMeaBus annotation (
Placement(transformation(extent={{36,82},{82,120}}), iconTransformation(
extent={{44,88},{72,114}})));
annotation (Icon(graphics,
coordinateSystem(preserveAspectRatio=false)), Diagram(graphics,
coordinateSystem(preserveAspectRatio=false)));
Expand Down
85 changes: 66 additions & 19 deletions BESMod/Systems/Demand/Building/TEASERThermalZone.mo
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ model TEASERThermalZone
parameter Boolean use_verboseEnergyBalance=true "=false to disable the integration of the verbose energy balance";
parameter Modelica.Units.SI.TemperatureDifference dTComfort=2
"Temperature difference to room set temperature at which the comfort is still acceptable. In DIN EN 15251, all temperatures below 22 °C - 2 K count as discomfort. Hence the default value. If your room set temperature is lower, consider using smaller values.";

parameter Boolean incElePro = false
"=false to not include electrical energy consumption in the electrical connectors";
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial
"Type of energy balance: dynamic (3 initialization options) or steady state"
annotation (Dialog(tab="Dynamics"));
Expand Down Expand Up @@ -76,7 +77,7 @@ model TEASERThermalZone
transformation(
extent={{-10,-10},{10,10}},
rotation=180,
origin={30,-110})));
origin={30,-150})));
BESMod.Utilities.KPIs.EnergyKPICalculator intKPICalVentGain[nZones](each final
use_inpCon=true) if use_ventilation and use_verboseEnergyBalance
annotation (Placement(transformation(
Expand Down Expand Up @@ -154,13 +155,8 @@ model TEASERThermalZone
Modelica.Blocks.Math.MultiSum multiSum[nZones](each final nu=3) if use_verboseEnergyBalance annotation (Placement(transformation(extent={{-9,-9},
{9,9}},
rotation=180,
origin={69,-129})));
origin={69,-149})));

BESMod.Utilities.Electrical.ZeroLoad zeroLoad annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=180,
origin={94,-96})));
Modelica.Blocks.Routing.RealPassThrough realPassThroughIntGains[nZones,3]
annotation (Placement(transformation(extent={{-100,0},{-80,20}})));
Modelica.Blocks.Routing.RealPassThrough realPassThroughTDry[nZones]
Expand All @@ -185,6 +181,27 @@ model TEASERThermalZone
TSetZone_nominal .+ dTComfort, each for_heating=true)
"Comfort calculator operative room temperature for cooling"
annotation (Placement(transformation(extent={{20,-70},{40,-50}})));
BESMod.Utilities.Electrical.RealToElecCon realToElecCon(use_souGen=false)
annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={98,-120})));
Modelica.Blocks.Math.Gain gain(final k=if incElePro then 1 else 0)
annotation (
Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={62,-120})));
Modelica.Blocks.Math.MultiSum multiSumEle(final k=fill(1, multiSumEle.nu),
final nu=2*nZones) annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={30,-120})));
BESMod.Utilities.KPIs.RoomControlCalculator roomControlCalculator[nZones](each
final for_heating=true, each final dTComBou=0)
annotation (Placement(transformation(extent={{50,-40},{70,-20}})));
equation

for i in 1:nZones loop
Expand All @@ -204,6 +221,13 @@ equation
index=-1,
extent={{-3,-6},{-3,-6}},
horizontalAlignment=TextAlignment.Right));
connect(thermalZone[i].QIntGains_flow[2], multiSumEle.u[2*i-1]) annotation (Line(
points={{-42.7,33.6},{-42.7,0},{-28,0},{-28,-68},{-6,-68},{-6,-134},{12,
-134},{12,-120},{20,-120}}, color={0,0,127}));
connect(thermalZone[i].QIntGains_flow[3], multiSumEle.u[2*i]) annotation (Line(
points={{-42.7,34.8},{-42.7,0},{-28,0},{-28,-68},{-6,-68},{-6,-134},{12,
-134},{12,-120},{20,-120}},
color={0,0,127}));
if use_ventilation then
connect(portVent_in[i], thermalZone[i].ports[1]) annotation (Line(points={{100,38},
{82,38},{82,10},{-2,10},{-2,22.08}}, color={0,127,
Expand Down Expand Up @@ -256,7 +280,7 @@ equation
{-41.8,-130}}, color={0,0,127}));
end if;
connect(intKPICal.KPI, outBusDem.QIntGain) annotation (Line(
points={{17.8,-110},{8,-110},{8,-2},{98,-2}},
points={{17.8,-150},{8,-150},{8,-2},{98,-2}},
color={135,135,135},
thickness=0.5), Text(
string="%second",
Expand Down Expand Up @@ -372,17 +396,12 @@ equation
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
connect(multiSum.y, intKPICal.u)
annotation (Line(points={{58.47,-129},{54,-129},{54,-110},{41.8,-110}},
annotation (Line(points={{58.47,-149},{58.47,-150},{41.8,-150}},
color={0,0,127}));
connect(multiSum.u, thermalZone.QIntGains_flow) annotation (Line(points={{78,-129},
{86,-129},{86,-110},{56,-110},{56,4},{-28,4},{-28,10},{-32,10},{-32,8},
{-42.7,8},{-42.7,33.6}},
connect(multiSum.u, thermalZone.QIntGains_flow) annotation (Line(points={{78,-149},
{78,-152},{86,-152},{86,-134},{-6,-134},{-6,-68},{-28,-68},{-28,0},{-42.7,
0},{-42.7,33.6}},
color={0,0,127}));
connect(zeroLoad.internalElectricalPin, internalElectricalPin) annotation (
Line(
points={{84,-96},{70,-96}},
color={0,0,0},
thickness=1));
connect(realPassThroughIntGains.y, thermalZone.intGains) annotation (Line(
points={{-79,10},{-50,10},{-50,4},{-31.6,4},{-31.6,17.76}}, color={0,0,
127}));
Expand All @@ -400,7 +419,8 @@ equation
extent={{6,3},{6,3}},
horizontalAlignment=TextAlignment.Left));
connect(comCalHeaOpe.TZone, calTOpe.y) annotation (Line(points={{18,-20},{-32,
-20},{-32,-16},{-81,-16},{-81,30}}, color={0,0,127}));
-20},{-32,-10},{-86,-10},{-86,30},{-81,30}},
color={0,0,127}));
connect(comCalCooOpe.TZone, calTOpe.y) annotation (Line(points={{18,-60},{10,
-60},{10,0},{2,0},{2,2},{0,2},{0,6},{-46,6},{-46,28},{-52,28},{-52,44},
{-88,44},{-88,30},{-81,30}}, color={0,0,127}));
Expand All @@ -424,6 +444,33 @@ equation
index=1,
extent={{6,3},{6,3}},
horizontalAlignment=TextAlignment.Left));
connect(gain.y,realToElecCon. PEleLoa) annotation (Line(points={{73,-120},{73,
-116},{86,-116}}, color={0,0,127}));
connect(multiSumEle.y, gain.u)
annotation (Line(points={{41.7,-120},{50,-120}}, color={0,0,127}));
connect(realToElecCon.internalElectricalPin, internalElectricalPin)
annotation (Line(
points={{108.2,-119.8},{114,-119.8},{114,-96},{70,-96}},
color={0,0,0},
thickness=1));

connect(roomControlCalculator.dTComSec, outBusDem.dTControlHea) annotation (
Line(points={{71,-30},{86,-30},{86,-16},{98,-16},{98,-2}}, color={0,0,127}),
Text(
string="%second",
index=1,
extent={{6,3},{6,3}},
horizontalAlignment=TextAlignment.Left));
connect(roomControlCalculator.TZone, thermalZone.TAir) annotation (Line(
points={{48,-30},{2,-30},{2,-20},{-32,-20},{-32,-10},{-54,-10},{-54,
76.8},{-42.7,76.8}}, color={0,0,127}));
connect(roomControlCalculator.TZoneSet, useProBus.TZoneSet) annotation (Line(
points={{48,-36},{42,-36},{42,102},{52,102},{52,101},{51,101}}, color={
0,0,127}), Text(
string="%second",
index=1,
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
annotation (Diagram(coordinateSystem(extent={{-100,-220},{100,100}})),
Documentation(info="<html>
<p>This model uses the reduced-order approach with the common TEASER output to model the building envelope. Relevant KPIs are calculated.</p>
Expand Down
12 changes: 4 additions & 8 deletions BESMod/Systems/Hydraulical/Components/UFH/PanelHeating.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,14 @@ model PanelHeating
parameter Modelica.Units.SI.Temperature T0=
Modelica.Units.Conversions.from_degC(20)
"Initial temperature, in degrees Celsius";
parameter Integer calcMethod=2 "Calculation method for convective heat transfer coefficient at surface" annotation (Dialog(group="Heat convection",
descriptionLabel=true), choices(
choice=1 "EN ISO 6946 Appendix A >>Flat Surfaces<<",
choice=2 "By Bernd Glueck",
choice=3 "Custom hCon (constant)",
radioButtons=true));

parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Bernd_Glueck "Calculation method for convective heat transfer coefficient" annotation (
Dialog(descriptionLabel=true),
Evaluate=true);
parameter Modelica.Units.SI.CoefficientOfHeatTransfer hCon_const=2.5
"Custom convective heat transfer coefficient" annotation (Dialog(
group="Heat convection",
descriptionLabel=true,
enable=if calcMethod == 3 then true else false));
enable=if calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Custom_hCon then true else false));

final parameter Modelica.Units.SI.Emissivity eps=floorHeatingType.eps
"Emissivity";
Expand Down
14 changes: 5 additions & 9 deletions BESMod/Systems/Hydraulical/Components/UFH/PanelHeatingSegment.mo
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,15 @@ parameter
parameter
AixLib.Fluid.HeatExchangers.ActiveWalls.BaseClasses.HeatCapacityPerArea cDown;

parameter Integer calcMethod=2 "Calculation method for convective heat transfer coefficient at surface"
annotation (Dialog(group="Heat convection",
descriptionLabel=true), choices(
choice=1 "EN ISO 6946 Appendix A >>Flat Surfaces<<",
choice=2 "By Bernd Glueck",
choice=3 "Custom hCon (constant)",
radioButtons=true));
parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Bernd_Glueck "Calculation method for convective heat transfer coefficient" annotation (
Dialog(descriptionLabel=true),
Evaluate=true);

parameter Modelica.Units.SI.CoefficientOfHeatTransfer hCon_const=2.5
"Constant heat transfer coefficient" annotation (Dialog(
group="Heat convection",
descriptionLabel=true,
enable=if calcMethod == 3 then true else false));
enable=if calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Custom_hCon then true else false));

Modelica.Fluid.Vessels.ClosedVolume vol(
redeclare package Medium = Medium,
Expand Down Expand Up @@ -65,7 +61,7 @@ parameter
final A=A_floor,
final calcMethod=calcMethod,
final hCon_const=hCon_const,
surfaceOrientation=if isFloor then 2 else 1) annotation (Placement(
surfaceOrientation=if isFloor then AixLib.ThermalZones.HighOrder.Components.Types.InsideSurfaceOrientation.floor else AixLib.ThermalZones.HighOrder.Components.Types.InsideSurfaceOrientation.vertical_wall) annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=270,
Expand Down
Loading