From 5af34bfadf29e2c393f1155887f0639ee7a0847f Mon Sep 17 00:00:00 2001 From: rsa Date: Thu, 10 Nov 2016 18:42:51 +0100 Subject: [PATCH 001/342] FVU and ExergyMeter added --- .../BaseClasses/SetPower.mo | 117 +++++ .../BaseClasses/package.mo | 4 + .../BaseClasses/package.order | 1 + AixLib/HVAC/FacadeVentilationUnit/Example.mo | 100 ++++ .../FacadeVentilationUnit/FVUController.mo | 337 +++++++++++++ .../FacadeVentilationUnit.mo | 442 ++++++++++++++++++ AixLib/HVAC/FacadeVentilationUnit/package.mo | 9 + .../HVAC/FacadeVentilationUnit/package.order | 4 + AixLib/HVAC/Meter/ExergyMeter/Example.mo | 263 +++++++++++ .../HVAC/Meter/ExergyMeter/FlowExergyMeter.mo | 127 +++++ .../HVAC/Meter/ExergyMeter/HeatExergyMeter.mo | 120 +++++ .../Meter/ExergyMeter/StoredExergyMeter.mo | 207 ++++++++ AixLib/HVAC/Meter/ExergyMeter/package.mo | 8 + AixLib/HVAC/Meter/ExergyMeter/package.order | 4 + 14 files changed, 1743 insertions(+) create mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order create mode 100644 AixLib/HVAC/FacadeVentilationUnit/Example.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/FVUController.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/package.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/package.order create mode 100644 AixLib/HVAC/Meter/ExergyMeter/Example.mo create mode 100644 AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo create mode 100644 AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo create mode 100644 AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo create mode 100644 AixLib/HVAC/Meter/ExergyMeter/package.mo create mode 100644 AixLib/HVAC/Meter/ExergyMeter/package.order diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo new file mode 100644 index 0000000000..321b1621d7 --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo @@ -0,0 +1,117 @@ +within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; +model SetPower + "This model defines a specific massflow rate based on the input power share" + + extends Modelica.Fluid.Interfaces.PartialTwoPort; + + parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.05 + "Nominal mass flow rate of fan"; + parameter Medium.AbsolutePressure p_start=Medium.p_default + "Start value of pressure"; + parameter Real noUnits=1 "Number of identical FVU units"; + parameter Modelica.SIunits.PressureDifference dp_nominal=500 + "Initial pressure difference"; + parameter Medium.Temperature T_start=Medium.T_default + "Start value of temperature"; + + Modelica.Blocks.Tables.CombiTable1D volumeFlow(table=[0,1; 10,25; 20,40; + 30,60; 40,90; 50,100; 60,140; 70,175; 80,200; 90,225; 100,260]) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-56}))); + Modelica.Blocks.Interfaces.RealInput powerShare( + min=0, + max=100, + nominal=60) "power share (percentage) for fan" + annotation (Placement(transformation( + origin={0,-100}, + extent={{-20,-20},{20,20}}, + rotation=90))); + + AixLib.Fluid.Movers.FlowControlled_m_flow fan( redeclare + package Medium = Medium, + addPowerToMedium=false, + m_flow_nominal=m_flow_nominal, + T_start=T_start, + m_flow(start=m_flow_nominal), + dp(start=dp_nominal), + dp_nominal=dp_nominal, + p_start=p_start, + riseTime=120, + nominalValuesDefineDefaultPressureCurve=true) + annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); + Modelica.Blocks.Math.Gain gain(k=1.2/3600*noUnits) + annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=90, + origin={0,-28}))); +equation + + connect(port_a, fan.port_a) + annotation (Line(points={{-100,0},{-56,0},{-10,0}}, color={0,127,255})); + connect(fan.port_b, port_b) + annotation (Line(points={{10,0},{56,0},{100,0}}, color={0,127,255})); + connect(powerShare, volumeFlow.u[1]) annotation (Line(points={{0,-100},{0, + -80},{-6.66134e-016,-80},{-6.66134e-016,-68}}, + color={0,0,127})); + connect(gain.u, volumeFlow.y[1]) annotation (Line(points={{-4.44089e-016, + -35.2},{-4.44089e-016,-46},{8.88178e-016,-46},{8.88178e-016,-45}}, + color={0,0,127})); + connect(gain.y, fan.m_flow_in) annotation (Line(points={{4.44089e-016, + -21.4},{4.44089e-016,-24},{-0.2,-24},{-0.2,-12}}, + color={0,0,127})); + annotation (choicesAllMatching=true, + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}})), + Icon(graphics={ + Ellipse( + extent={{-4,68},{4,0}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-4,0},{4,-68}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{0,4},{30,-4}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-30,4},{0,-4}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse(extent={{-30,68},{30,-68}}, lineColor={0,0,0}), + Line( + points={{8,54},{58,54}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{8,-44},{60,-44}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{-12,-20},{76,-20}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{0,8},{82,8}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{6,32},{76,32}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled})}), + Documentation(info=" +

Thsi model sets the mass flow rate of the air flow through a facade ventilation unit based on the input value, which is the power share set point of the fan.

+", revisions=" + +")); +end SetPower; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo new file mode 100644 index 0000000000..45d9419aa9 --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo @@ -0,0 +1,4 @@ +within AixLib.HVAC.FacadeVentilationUnit; +package BaseClasses + extends Modelica.Icons.BasesPackage; +end BaseClasses; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order new file mode 100644 index 0000000000..a512820164 --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order @@ -0,0 +1 @@ +SetPower diff --git a/AixLib/HVAC/FacadeVentilationUnit/Example.mo b/AixLib/HVAC/FacadeVentilationUnit/Example.mo new file mode 100644 index 0000000000..b4993b1dbf --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/Example.mo @@ -0,0 +1,100 @@ +within AixLib.HVAC.FacadeVentilationUnit; +model Example + import ExergyBasedControl; + extends Modelica.Icons.Example; + + package Medium1 = AixLib.Media.Air; + package Medium2 = AixLib.Media.Water; + + Modelica.Blocks.Sources.Constant roomTemperature(k=273.15 + 18) + annotation (Placement(transformation(extent={{-94,48},{-74,68}}))); + Modelica.Blocks.Sources.Sine outdoorTemperature( + freqHz=2/3600, + offset=273.15 + 10, + amplitude=20) + annotation (Placement(transformation(extent={{-94,8},{-74,28}}))); + Modelica.Blocks.Sources.Constant roomSetTemperature(k=273.15 + 22) + annotation (Placement(transformation(extent={{-94,-28},{-74,-8}}))); + Modelica.Blocks.Sources.Constant co2Concentration(k=800) + annotation (Placement(transformation(extent={{-94,-72},{-74,-52}}))); + AixLib.Fluid.Sources.Boundary_pT ambient_out( + redeclare package Medium = Medium1, + use_T_in=true, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation(extent={{6,-88},{26,-68}}))); + AixLib.Fluid.Sources.Boundary_pT ambient_in( + redeclare package Medium = Medium1, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation(extent={{4,-58},{24,-38}}))); + AixLib.Fluid.Sources.Boundary_pT heating_sink( + redeclare package Medium = Medium2, + p=100000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={26,30}))); + AixLib.Fluid.Sources.Boundary_pT cooling_sink( + redeclare package Medium = Medium2, + p=100000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={102,32}))); + AixLib.Fluid.Sources.Boundary_pT cooling_source( + redeclare package Medium = Medium2, + use_T_in=true, + p=140000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={126,31}))); + AixLib.Fluid.Sources.Boundary_pT heating_source( + redeclare package Medium = Medium2, + use_T_in=true, + p=140000) annotation (Placement(transformation( + extent={{-9,-10},{9,10}}, + rotation=270, + origin={54,31}))); + AixLib.Fluid.Sources.Boundary_pT room_in( + redeclare package Medium = Medium1, + use_T_in=false, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={170,-27}))); + AixLib.Fluid.Sources.Boundary_pT room_out( + redeclare package Medium = Medium1, + use_T_in=true, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={168,-66}))); + Modelica.Blocks.Sources.Constant heatSourceTemperature(k=273.15 + 30) + annotation (Placement(transformation(extent={{24,74},{44,94}}))); + Modelica.Blocks.Sources.Constant coldsourceTemperature(k=273.15 + 17) + annotation (Placement(transformation(extent={{84,74},{104,94}}))); + FacadeVentilationUnit facadeVentilationUnit + annotation (Placement(transformation(extent={{-42,-14},{-6,6}}))); + FacadeVentilationUnit facadeVentilationUnit1 + annotation (Placement(transformation(extent={{74,-44},{110,-24}}))); +equation + connect(heatSourceTemperature.y, heating_source.T_in) + annotation (Line(points={{45,84},{58,84},{58,41.8}}, color={0,0,127})); + connect(coldsourceTemperature.y, cooling_source.T_in) annotation (Line(points= + {{105,84},{105,84},{130,84},{130,43}}, color={0,0,127})); + connect(roomTemperature.y, room_out.T_in) annotation (Line(points={{-73,58},{-73, + 58},{198,58},{198,-70},{180,-70}}, color={0,0,127})); + connect(outdoorTemperature.y, ambient_out.T_in) annotation (Line(points={{-73,18}, + {-58,18},{-58,-74},{4,-74}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}})), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{200,100}})), + experiment(StopTime=3600), + Documentation(revisions=" + +", info=" +

This model shows the usage of the facade ventilation unit and its controller.

+"), + __Dymola_experimentSetupOutput); +end Example; diff --git a/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo b/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo new file mode 100644 index 0000000000..615fb94967 --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo @@ -0,0 +1,337 @@ +within AixLib.HVAC.FacadeVentilationUnit; +model FVUController + + parameter Real minimumSupTemp = 273.15+17 "Minimum supply air temperature"; + + parameter Real co2SetConcentration = 600 "Set point for CO2 concentration"; + + parameter Real maxSupFanPower = 60 "Maximum supply air fan power"; + + parameter Real maxExFanPower = 60 "Maximum exhaust air fan power"; + + parameter Real fullyOpen = 100 + "Percentage value representing fuly opened flap"; + + Modelica.Blocks.Interfaces.RealInput roomTemperature + annotation (Placement(transformation(extent={{-120,70},{-80,110}}))); + Modelica.Blocks.Interfaces.RealInput outdoorTemperature + annotation (Placement(transformation(extent={{-120,10},{-80,50}}))); + Modelica.Blocks.Interfaces.RealInput co2Concentration + annotation (Placement(transformation(extent={{-120,-110},{-80,-70}}))); + Modelica.Blocks.Interfaces.RealInput roomSetTemperature + annotation (Placement(transformation(extent={{-120,-50},{-80,-10}}))); + Modelica.Blocks.Logical.OnOffController roomToBeCooled(bandwidth=2) + annotation (Placement(transformation(extent={{-60,80},{-40,100}}))); + Modelica.Blocks.Logical.OnOffController roomToBeHeated(bandwidth=2) + annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); + Modelica.Blocks.Logical.OnOffController roomToBeVentilated(bandwidth=200) + annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); + Modelica.Blocks.Logical.OnOffController freeCoolingPossible(bandwidth=2) + annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); + Modelica.Blocks.Logical.OnOffController coldRecoveryPossible(bandwidth=2) + annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + Modelica.Blocks.Logical.OnOffController heatRecoveryPossible(bandwidth=2) + annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); + Modelica.Blocks.Sources.Constant co2SeetConcentrationSource(k= + co2SetConcentration) annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={-46,6}))); + Modelica.Blocks.Math.Add add(k1=-1) + annotation (Placement(transformation(extent={{-62,-52},{-50,-40}}))); + Modelica.Blocks.Math.Add add1(k1=-1) + annotation (Placement(transformation(extent={{-64,-102},{-52,-90}}))); + Modelica.Blocks.Sources.Constant setDeviationFreeCooling(k=-4) + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={-54,-24}))); + Modelica.Blocks.Sources.Constant setDeviationRecovery(k=0) annotation ( + Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={-62,-72}))); + Modelica.Blocks.Logical.Switch useCoolingValve + annotation (Placement(transformation(extent={{62,80},{74,92}}))); + Modelica.Blocks.Logical.And and1 + annotation (Placement(transformation(extent={{0,80},{14,94}}))); + Modelica.Blocks.Logical.And and2 + annotation (Placement(transformation(extent={{0,44},{14,58}}))); + Modelica.Blocks.Logical.Or climatizationNeeded + annotation (Placement(transformation(extent={{0,6},{14,20}}))); + Modelica.Blocks.Logical.And and3 + annotation (Placement(transformation(extent={{0,-34},{14,-20}}))); + Modelica.Blocks.Logical.Switch useHeatingValve + annotation (Placement(transformation(extent={{62,48},{74,60}}))); + Modelica.Blocks.Sources.Constant one(k=1) annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={8,70}))); + Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={6,34}))); + Modelica.Blocks.Logical.Or useExFan + annotation (Placement(transformation(extent={{60,0},{74,14}}))); + Modelica.Blocks.Logical.Switch switch3 + annotation (Placement(transformation(extent={{86,1},{98,13}}))); + Modelica.Blocks.Sources.Constant exhaustFan(k=maxExFanPower) + annotation (Placement(transformation(extent={{40,32},{52,44}}))); + Modelica.Blocks.Logical.Switch switch4 + annotation (Placement(transformation(extent={{114,-6},{126,6}}))); + Modelica.Blocks.Sources.Constant twoHours(k=2*3600) + annotation (Placement(transformation(extent={{100,86},{112,98}}))); + Modelica.Blocks.Logical.Timer timer + annotation (Placement(transformation(extent={{134,46},{148,60}}))); + Modelica.Blocks.Logical.Greater timePassed + annotation (Placement(transformation(extent={{162,52},{174,66}}))); + Modelica.Blocks.Logical.Not not1 + annotation (Placement(transformation(extent={{86,48},{96,58}}))); + Modelica.Blocks.Sources.Constant twentyMinutes(k=20*60) + annotation (Placement(transformation(extent={{100,66},{112,78}}))); + Modelica.Blocks.Logical.Greater timePassed1 + annotation (Placement(transformation(extent={{162,32},{174,46}}))); + Modelica.Blocks.Logical.Timer timer1 + annotation (Placement(transformation(extent={{134,26},{148,40}}))); + Modelica.Blocks.Logical.RSFlipFlop rSFlipFlop + annotation (Placement(transformation(extent={{105,40},{121,56}}))); + Modelica.Blocks.Interfaces.RealOutput exhaustFanPower + annotation (Placement(transformation(extent={{210,20},{230,40}}))); + Modelica.Blocks.Logical.Switch switch5 + annotation (Placement(transformation(extent={{28,-32},{40,-20}}))); + Modelica.Blocks.Interfaces.RealOutput coolingValveOpening + annotation (Placement(transformation(extent={{210,80},{230,100}}))); + Modelica.Blocks.Interfaces.RealOutput heatingValveOpening + annotation (Placement(transformation(extent={{210,50},{230,70}}))); + Modelica.Blocks.Logical.Switch switch1 + annotation (Placement(transformation(extent={{160,-33},{172,-21}}))); + Modelica.Blocks.Logical.Switch switch2 + annotation (Placement(transformation(extent={{116,-38},{128,-26}}))); + Modelica.Blocks.Sources.Constant supplyFan(k=maxSupFanPower) + annotation (Placement(transformation(extent={{84,-26},{96,-14}}))); + Modelica.Blocks.Interfaces.RealOutput supplyFanPower + annotation (Placement(transformation(extent={{210,-10},{230,10}}))); + Modelica.Blocks.Logical.Greater PexaLargerPsupa + annotation (Placement(transformation(extent={{138,-16},{150,-2}}))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression(y=if + exhaustFanPower > supplyFanPower + 0.1 or exhaustFanPower < + supplyFanPower - 0.1 then false else true) + annotation (Placement(transformation(extent={{120,-70},{140,-50}}))); + Modelica.Blocks.Logical.Switch switch6 + annotation (Placement(transformation(extent={{160,-66},{172,-54}}))); + Modelica.Blocks.Interfaces.RealOutput circulationFlapOpening + annotation (Placement(transformation(extent={{210,-40},{230,-20}}))); + Modelica.Blocks.Logical.Or or3 + annotation (Placement(transformation(extent={{28,-50},{42,-36}}))); + Modelica.Blocks.Logical.Switch useHRC + annotation (Placement(transformation(extent={{62,-49},{74,-37}}))); + Modelica.Blocks.Interfaces.RealOutput HRCFlapOpening + annotation (Placement(transformation(extent={{210,-70},{230,-50}}))); + Modelica.Blocks.Logical.Pre pre1 annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={164,22}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=5) + annotation (Placement(transformation(extent={{40,-86},{52,-74}}))); + Modelica.Blocks.Logical.Switch switch7 + annotation (Placement(transformation(extent={{64,-86},{76,-74}}))); + Modelica.Blocks.Interfaces.RealOutput freshAirFlapOpening + annotation (Placement(transformation(extent={{210,-100},{230,-80}}))); +equation + connect(outdoorTemperature, add.u1) annotation (Line(points={{-100,30},{ + -78,30},{-78,-42.4},{-63.2,-42.4}}, color={0,0,127})); + connect(roomTemperature, add.u2) annotation (Line(points={{-100,90},{-74, + 90},{-74,-40},{-68,-40},{-66,-40},{-66,-49.6},{-63.2,-49.6}}, + color={0,0,127})); + connect(outdoorTemperature, add1.u2) annotation (Line(points={{-100,30},{ + -88,30},{-78,30},{-78,-99.6},{-65.2,-99.6}}, color={0,0,127})); + connect(roomTemperature, add1.u1) annotation (Line(points={{-100,90},{-88, + 90},{-74,90},{-74,-92.4},{-65.2,-92.4}}, color={0,0,127})); + connect(add1.y, heatRecoveryPossible.u) + annotation (Line(points={{-51.4,-96},{-42,-96}}, color={0,0,127})); + connect(add.y, coldRecoveryPossible.u) annotation (Line(points={{-49.4, + -46},{-48,-46},{-48,-66},{-42,-66}}, color={0,0,127})); + connect(setDeviationFreeCooling.y, freeCoolingPossible.reference) + annotation (Line(points={{-47.4,-24},{-46,-24},{-42,-24}}, color={0,0, + 127})); + connect(setDeviationRecovery.y, coldRecoveryPossible.reference) + annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-54},{-42,-54}}, + color={0,0,127})); + connect(setDeviationRecovery.y, heatRecoveryPossible.reference) + annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-84},{-42,-84}}, + color={0,0,127})); + connect(roomToBeCooled.y, and1.u1) annotation (Line(points={{-39,90},{-28, + 90},{-28,87},{-1.4,87}}, color={255,0,255})); + connect(coldRecoveryPossible.y, and1.u2) annotation (Line(points={{-19, + -60},{-6,-60},{-6,81.4},{-1.4,81.4}}, color={255,0,255})); + connect(roomToBeCooled.y, useCoolingValve.u2) annotation (Line(points={{ + -39,90},{-28,90},{-28,100},{22,100},{22,86},{60.8,86}}, color={ + 255,0,255})); + connect(roomToBeCooled.y, and2.u1) annotation (Line(points={{-39,90},{-28, + 90},{-28,51},{-1.4,51}}, color={255,0,255})); + connect(freeCoolingPossible.y, and2.u2) annotation (Line(points={{-19,-30}, + {-12,-30},{-12,45.4},{-1.4,45.4}}, color={255,0,255})); + connect(roomToBeCooled.y, climatizationNeeded.u1) annotation (Line(points= + {{-39,90},{-28,90},{-28,13},{-1.4,13}}, color={255,0,255})); + connect(roomToBeHeated.y, climatizationNeeded.u2) annotation (Line(points= + {{-39,60},{-30,60},{-30,7.4},{-1.4,7.4}}, color={255,0,255})); + connect(heatRecoveryPossible.y, and3.u2) annotation (Line(points={{-19, + -90},{-1.4,-90},{-1.4,-32.6}}, color={255,0,255})); + connect(roomToBeHeated.y, and3.u1) annotation (Line(points={{-39,60},{-30, + 60},{-30,8},{-10,8},{-10,-27},{-1.4,-27}}, color={255,0,255})); + connect(roomToBeHeated.y, useHeatingValve.u2) annotation (Line(points={{ + -39,60},{26,60},{26,54},{60.8,54}}, color={255,0,255})); + connect(one.y, useHeatingValve.u1) annotation (Line(points={{14.6,70},{30,70}, + {30,58.8},{60.8,58.8}}, color={0,0,127})); + connect(zero.y, useHeatingValve.u3) annotation (Line(points={{12.6,34},{ + 34,34},{34,49.2},{60.8,49.2}}, color={0,0,127})); + connect(roomToBeVentilated.y, useExFan.u2) annotation (Line(points={{-39, + 30},{-20,30},{-20,24},{18,24},{18,1.4},{58.6,1.4}}, color={255,0, + 255})); + connect(useExFan.y, switch3.u2) annotation (Line(points={{74.7,7},{79.35, + 7},{84.8,7}}, color={255,0,255})); + connect(exhaustFan.y, switch3.u1) annotation (Line(points={{52.6,38},{76, + 38},{76,11.8},{84.8,11.8}}, color={0,0,127})); + connect(zero.y, switch3.u3) annotation (Line(points={{12.6,34},{24,34},{ + 34,34},{34,-6},{80,-6},{80,2.2},{84.8,2.2}}, color={0,0,127})); + connect(useExFan.y, not1.u) annotation (Line(points={{74.7,7},{80,7},{80, + 53},{85,53}}, color={255,0,255})); + connect(timePassed.y, timer1.u) annotation (Line(points={{174.6,59},{184, + 59},{184,46},{128,46},{128,33},{132.6,33}}, color={255,0,255})); + connect(not1.y, rSFlipFlop.S) annotation (Line(points={{96.5,53},{100,53}, + {100,52.8},{103.4,52.8}}, color={255,0,255})); + connect(rSFlipFlop.Q, timer.u) annotation (Line(points={{121.8,52.8},{ + 127.4,52.8},{127.4,53},{132.6,53}}, color={255,0,255})); + connect(switch4.y, exhaustFanPower) + annotation (Line(points={{126.6,0},{192,0},{192,30},{220,30}}, + color={0,0,127})); + connect(zero.y, useCoolingValve.u3) annotation (Line(points={{12.6,34},{ + 24,34},{34,34},{34,81.2},{60.8,81.2}}, color={0,0,127})); + connect(freeCoolingPossible.y, switch5.u2) annotation (Line(points={{-19, + -30},{-12,-30},{-12,-14},{22,-14},{22,-26},{26.8,-26}}, color={ + 255,0,255})); + connect(zero.y, switch5.u1) annotation (Line(points={{12.6,34},{34,34},{ + 34,-16},{24,-16},{24,-21.2},{26.8,-21.2}}, color={0,0,127})); + connect(one.y, switch5.u3) annotation (Line(points={{14.6,70},{30,70},{30,-12}, + {20,-12},{20,-30.8},{26.8,-30.8}}, color={0,0,127})); + connect(switch5.y, useCoolingValve.u1) annotation (Line(points={{40.6,-26}, + {56,-26},{56,90},{56,90.8},{60.8,90.8}}, color={0,0,127})); + connect(useCoolingValve.y, coolingValveOpening) annotation (Line(points={{74.6,86}, + {82,86},{82,104},{204,104},{204,90},{220,90}}, color={0, + 0,127})); + connect(useHeatingValve.y, heatingValveOpening) annotation (Line(points={{74.6,54}, + {78,54},{78,80},{200,80},{200,60},{220,60}}, color={0,0, + 127})); + connect(co2SeetConcentrationSource.y, roomToBeVentilated.u) annotation ( + Line(points={{-52.6,6},{-62,6},{-62,24}}, color={0,0,127})); + connect(co2Concentration, roomToBeVentilated.reference) annotation (Line( + points={{-100,-90},{-76,-90},{-76,36},{-62,36}}, color={0,0,127})); + connect(climatizationNeeded.y, switch2.u2) annotation (Line(points={{14.7, + 13},{52,13},{52,-32},{114.8,-32}}, color={255,0,255})); + connect(supplyFan.y, switch2.u1) annotation (Line(points={{96.6,-20},{110, + -20},{110,-27.2},{114.8,-27.2}}, color={0,0,127})); + connect(zero.y, switch2.u3) annotation (Line(points={{12.6,34},{34,34},{ + 34,-6},{80,-6},{80,-36.8},{114.8,-36.8}}, color={0,0,127})); + connect(switch2.y, switch1.u3) annotation (Line(points={{128.6,-32},{154, + -32},{154,-31.8},{158.8,-31.8}}, color={0,0,127})); + connect(switch1.y, supplyFanPower) annotation (Line(points={{172.6,-27},{ + 200,-27},{200,0},{220,0}}, color={0,0,127})); + connect(PexaLargerPsupa.y, switch1.u2) annotation (Line(points={{150.6,-9}, + {152,-9},{152,-27},{158.8,-27}}, color={255,0,255})); + connect(switch4.y, switch1.u1) annotation (Line(points={{126.6,0},{142,0}, + {156,0},{156,-22.2},{158.8,-22.2}}, color={0,0,127})); + connect(booleanExpression.y, switch6.u2) + annotation (Line(points={{141,-60},{158.8,-60}}, color={255,0,255})); + connect(switch6.y, circulationFlapOpening) + annotation (Line(points={{172.6,-60},{196,-60},{196,-30},{220,-30}}, + color={0,0,127})); + connect(and1.y, or3.u1) annotation (Line(points={{14.7,87},{20,87},{20, + -43},{26.6,-43}}, color={255,0,255})); + connect(and3.y, or3.u2) annotation (Line(points={{14.7,-27},{18,-27},{18, + -48.6},{26.6,-48.6}}, color={255,0,255})); + connect(or3.y, useHRC.u2) annotation (Line(points={{42.7,-43},{42.7,-43}, + {60.8,-43}},color={255,0,255})); + connect(one.y, useHRC.u1) annotation (Line(points={{14.6,70},{22,70},{30,70}, + {30,-12},{50,-12},{50,-38.2},{60.8,-38.2}}, color={0,0,127})); + connect(zero.y, useHRC.u3) annotation (Line(points={{12.6,34},{34,34},{34, + -6},{54,-6},{54,-47.8},{60.8,-47.8}}, color={0,0,127})); + connect(useHRC.y, HRCFlapOpening) annotation (Line(points={{74.6,-43},{74, + -43},{74,-44},{186,-44},{186,-60},{220,-60}}, + color={0,0,127})); + connect(add1.y, freeCoolingPossible.u) annotation (Line(points={{-51.4, + -96},{-46,-96},{-46,-36},{-42,-36}}, color={0,0,127})); + connect(timePassed1.y, pre1.u) annotation (Line(points={{174.6,39},{182,39},{182, + 22},{171.2,22}}, color={255,0,255})); + connect(pre1.y, rSFlipFlop.R) annotation (Line(points={{157.4,22},{100,22},{100, + 43.2},{103.4,43.2}}, color={255,0,255})); + connect(roomTemperature, roomToBeHeated.u) annotation (Line(points={{-100,90}, + {-74,90},{-74,54},{-62,54}}, color={0,0,127})); + connect(roomSetTemperature, roomToBeHeated.reference) annotation (Line( + points={{-100,-30},{-70,-30},{-70,66},{-62,66}}, color={0,0,127})); + connect(roomSetTemperature, roomToBeCooled.u) annotation (Line(points={{-100, + -30},{-70,-30},{-70,84},{-62,84}}, color={0,0,127})); + connect(roomTemperature, roomToBeCooled.reference) annotation (Line( + points={{-100,90},{-74,90},{-74,96},{-62,96}}, color={0,0,127})); + connect(switch4.y, PexaLargerPsupa.u1) annotation (Line(points={{126.6,0}, + {130,0},{130,-9},{136.8,-9}}, color={0,0,127})); + connect(switch2.y, PexaLargerPsupa.u2) annotation (Line(points={{128.6, + -32},{130,-32},{130,-14.6},{136.8,-14.6}}, color={0,0,127})); + connect(timer.y, timePassed.u1) annotation (Line(points={{148.7,53},{154, + 53},{154,59},{160.8,59}}, color={0,0,127})); + connect(twoHours.y, timePassed.u2) annotation (Line(points={{112.6,92},{ + 134,92},{156,92},{156,53.4},{160.8,53.4}}, color={0,0,127})); + connect(timer1.y, timePassed1.u1) annotation (Line(points={{148.7,33},{ + 154,33},{154,39},{160.8,39}}, color={0,0,127})); + connect(twentyMinutes.y, timePassed1.u2) annotation (Line(points={{112.6, + 72},{132,72},{150,72},{150,33.4},{160.8,33.4}}, color={0,0,127})); + connect(exhaustFan.y, switch4.u1) annotation (Line(points={{52.6,38},{76, + 38},{76,26},{90,26},{90,18},{106,18},{106,4.8},{112.8,4.8}}, + color={0,0,127})); + connect(timePassed.y, switch4.u2) annotation (Line(points={{174.6,59},{ + 184,59},{184,12},{108,12},{108,0},{112.8,0}}, color={255,0,255})); + connect(switch3.y, switch4.u3) annotation (Line(points={{98.6,7},{104,7}, + {104,-4.8},{112.8,-4.8}}, color={0,0,127})); + connect(and2.y, useExFan.u1) annotation (Line(points={{14.7,51},{24,51},{ + 24,7},{58.6,7}}, color={255,0,255})); + connect(greaterThreshold.y,switch7. u2) annotation (Line(points={{52.6, + -80},{58,-80},{62.8,-80}}, color={255,0,255})); + connect(switch7.y, freshAirFlapOpening) annotation (Line(points={{76.6, + -80},{180,-80},{180,-90},{220,-90}}, color={0,0,127})); + connect(switch4.y, greaterThreshold.u) annotation (Line(points={{126.6,0}, + {174,0},{182,0},{182,-68},{78,-68},{78,-60},{32,-60},{32,-80},{ + 38.8,-80}}, color={0,0,127})); + connect(one.y, switch6.u3) annotation (Line(points={{14.6,70},{22,70},{30,70}, + {30,-12},{50,-12},{50,-56},{50,-58},{80,-58},{80,-64.8},{158.8,-64.8}}, + color={0,0,127})); + connect(zero.y, switch6.u1) annotation (Line(points={{12.6,34},{34,34},{ + 34,-6},{80,-6},{80,-48},{146,-48},{146,-55.2},{158.8,-55.2}}, + color={0,0,127})); + connect(one.y, switch7.u1) annotation (Line(points={{14.6,70},{30,70},{30,-12}, + {16,-12},{16,-70},{58,-70},{58,-75.2},{62.8,-75.2}}, color={0,0,127})); + connect(zero.y, switch7.u3) annotation (Line(points={{12.6,34},{34,34},{34,-6}, + {54,-6},{54,-84.8},{62.8,-84.8}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ + -100,-100},{220,100}}), graphics={Rectangle( + extent={{-100,100},{220,-100}}, + lineColor={28,108,200}, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid), Text( + extent={{-58,40},{184,-34}}, + lineColor={0,0,0}, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid, + textString="FVU Controller")}), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ + 220,100}})), + Documentation(revisions=" + +", info=" +

This model is the controller of the facade ventilation unit.

+

Level of Development

+

+")); +end FVUController; diff --git a/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo b/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo new file mode 100644 index 0000000000..bab433836a --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo @@ -0,0 +1,442 @@ +within AixLib.HVAC.FacadeVentilationUnit; +model FacadeVentilationUnit + "Facade Ventilation Unit (FVU) equipped with a recuperator" + import ExergyBasedControl; + + parameter + ExergyBasedControl.Components.FVU_Physical_Final.Records.FVUBaseRecord + FVUParam= + ExergyBasedControl.Components.FVU_Physical_Final.Records.FVUERCRecord(); + + parameter Modelica.SIunits.ThermodynamicTemperature T_start=273.15 + 20 + "Initial temperature in unit"; + + replaceable package Water = + Modelica.Media.Water.ConstantPropertyLiquidWater + "Water Model in the system"; + replaceable package Air = AixLib.Media.Air "Air Model in the system"; + +protected + parameter Real valveRiseTime = 200; + +public + BaseClasses.SetPower fanExhaustAir( + redeclare package Medium = Air, + allowFlowReversal=true, + noUnits=FVUParam.noUnits, + m_flow_nominal=FVUParam.m2_flow_nominal_heater, + T_start=T_start, + p_start=FVUParam.p_default + res.dp_nominal) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-118,26}))); + BaseClasses.SetPower fanSupplyAir( + redeclare package Medium = Air, + noUnits=FVUParam.noUnits, + m_flow_nominal=FVUParam.m2_flow_nominal_heater, + p_start=FVUParam.p_default + FVUParam.dp2_nominal_heater + FVUParam.dp2_nominal_cooler) + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={62,26}))); + Modelica.Fluid.Sensors.Temperature T_ExhaustAir(redeclare package Medium = + Air) + annotation (Placement(transformation(extent={{174,-58},{190,-46}}))); + AixLib.Fluid.HeatExchangers.ConstantEffectiveness heater( + redeclare package Medium2 = Air, + redeclare package Medium1 = Water, + m1_flow_nominal=FVUParam.m1_flow_nominal_heater, + m2_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_heater, + dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_heater) + annotation (Placement(transformation(extent={{116,22},{96,42}}))); + Modelica.Fluid.Interfaces.FluidPort_b OutgoingExhaustAir(redeclare package + Medium = Air) + "Fluid connector b (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{-170,16},{-150,36}}))); + Modelica.Fluid.Interfaces.FluidPort_a FreshAir(redeclare package Medium = Air) + "Fluid connector a (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{-168,-78},{-148,-58}}))); + Modelica.Fluid.Interfaces.FluidPort_a ExhaustAir(redeclare package Medium = + Air) + "Fluid connector a (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{192,-78},{212,-58}}))); + Modelica.Fluid.Interfaces.FluidPort_b SupplyAir(redeclare package Medium = + Air) + "Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)" + annotation (Placement(transformation(extent={{192,16},{212,36}}))); + AixLib.Fluid.HeatExchangers.ConstantEffectiveness cooler( + redeclare package Medium2 = Air, + redeclare package Medium1 = Water, + dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_cooler, + dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_cooler, + m1_flow_nominal=FVUParam.m1_flow_nominal_cooler, + m2_flow_nominal=FVUParam.m2_flow_nominal_cooler) + annotation (Placement(transformation(extent={{182,22},{162,42}}))); + Modelica.Blocks.Interfaces.RealInput fanExhaustAirPower + "Real Input to control the revolving speed of the exhaust air fan" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={-150,100}), iconTransformation( + extent={{-17,-17},{17,17}}, + rotation=270, + origin={-147,97}))); + Modelica.Blocks.Interfaces.RealInput fanSupplyAirPower + "Real Input to control the revolving speed of the supply air fan" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={50,100}), iconTransformation( + extent={{-16,-16},{16,16}}, + rotation=270, + origin={54,96}))); + Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium + = Water) + "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{82,90},{102,110}}))); + Modelica.Fluid.Interfaces.FluidPort_a Heater_Flow(redeclare package Medium = + Water) + "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{112,90},{132,110}}))); + Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium + = Water) + "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{152,90},{172,110}}))); + Modelica.Fluid.Interfaces.FluidPort_a Cooler_Flow(redeclare package Medium = + Water) + "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{182,90},{202,110}}))); + Modelica.Fluid.Sensors.Temperature T_FreshAir(redeclare package Medium = Air) + annotation (Placement(transformation(extent={{-8,-6},{8,6}}, + rotation=180, + origin={-140,-82}))); + Modelica.Fluid.Sensors.Temperature T_OutgoingExhaustAir(redeclare package + Medium = Air) + annotation (Placement(transformation(extent={{-8,-6},{8,6}}, + rotation=0, + origin={-134,44}))); + Modelica.Fluid.Sensors.Temperature T_SupplyAir(redeclare package Medium = Air) + annotation (Placement(transformation(extent={{-8,-6},{8,6}}, + rotation=180, + origin={188,2}))); + Modelica.Fluid.Sensors.Temperature T_AfterHeatRecovery(redeclare package + Medium = Air) + annotation (Placement(transformation(extent={{-28,-10},{-12,2}}))); + + Modelica.Blocks.Interfaces.RealInput heatRecoveryFlapOpening + "Real Input to control the revolving speed of the exhaust air fan" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={-100,100}), iconTransformation( + extent={{-17,-17},{17,17}}, + rotation=270, + origin={-97,97}))); + Modelica.Blocks.Interfaces.RealInput flapCircularAirOpening + "Real Input to control the revolving speed of the supply air fan" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={0,100}), iconTransformation( + extent={{-17,-17},{17,17}}, + rotation=270, + origin={3,97}))); + Modelica.Blocks.Math.Add add1( + k1=-1) + annotation (Placement(transformation(extent={{-65,47},{-55,57}}))); + Modelica.Blocks.Sources.RealExpression realExpression1( + y=1) + annotation (Placement(transformation(extent={{-6.5,-8},{6.5,8}}, + rotation=180, + origin={-59.5,30}))); + Modelica.Fluid.Sensors.Temperature T_Mix(redeclare package Medium = Air) + annotation (Placement(transformation(extent={{32,42},{48,54}}))); + Modelica.Fluid.Sensors.Temperature T_AfterFan(redeclare package Medium = + Air) annotation (Placement(transformation(extent={{70,42},{86,54}}))); + inner Modelica.Fluid.System system + annotation (Placement(transformation(extent={{180,-100},{200,-80}}))); + AixLib.Fluid.FixedResistances.FixedResistanceDpM res(m_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp_nominal=100, redeclare package Medium = + Air) + annotation (Placement(transformation(extent={{-5,-5},{5,5}}, + rotation=180, + origin={-141,26}))); + Modelica.Blocks.Interfaces.RealOutput SupplyTemperature annotation (Placement( + transformation( + extent={{-14,-14},{14,14}}, + rotation=270, + origin={22,-106}), iconTransformation( + extent={{-13,-13},{13,13}}, + rotation=270, + origin={19,-105}))); + Modelica.Blocks.Interfaces.RealOutput MixTemperature annotation (Placement( + transformation( + extent={{-15,-15},{15,15}}, + rotation=270, + origin={-10,-107}), iconTransformation( + extent={{-14,-13.5},{14,13.5}}, + rotation=270, + origin={-11.5,-106}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapCirculationAir( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=20) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={30,-16}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapBypass( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=90) annotation (Placement(transformation( + extent={{-9,-9},{9,9}}, + rotation=0, + origin={-27,36}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapHeatRecovery( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=90) annotation (Placement(transformation( + extent={{-9,-9},{9,9}}, + rotation=0, + origin={-82,-68}))); + Modelica.Fluid.Sensors.Temperature T_beforeCooler(redeclare package Medium = + Air) annotation (Placement(transformation( + extent={{-8,-6},{8,6}}, + rotation=180, + origin={129,0}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapFreshAir( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=20) annotation (Placement(transformation( + extent={{-9,-9},{9,9}}, + rotation=0, + origin={-112,-68}))); + AixLib.Fluid.HeatExchangers.ConstantEffectiveness recuperator(redeclare + package Medium1 = + Air, redeclare package Medium2 = + Air, + eps=0.6, + m1_flow_nominal=FVUParam.m2_flow_nominal_heater, + m2_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp1_nominal=FVUParam.dp2_nominal_heater, + dp2_nominal=FVUParam.dp2_nominal_heater) + annotation (Placement(transformation(extent={{-44,-42},{-24,-22}}))); + Modelica.Fluid.Vessels.ClosedVolume volume( + nPorts=5, + use_portsData=false, + V=0.01, redeclare package Medium = + Air, + T_start=T_start) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={18,14}))); + AixLib.Fluid.FixedResistances.FixedResistanceDpM res1( + m_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp_nominal=100, redeclare package Medium = + Air) + annotation (Placement(transformation(extent={{-5,-5},{5,5}}, + rotation=180, + origin={-61,-68}))); + Modelica.Blocks.Interfaces.RealInput flapFreshAirOpening + "Actuator position (0: closed, 100: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={-50,100}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening heatingValve( + m_flow_nominal=0.05, + redeclare package Medium = Water, + dpValve_nominal=200) annotation (Placement(transformation( + extent={{-9,9},{9,-9}}, + rotation=90, + origin={122,60}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening coolingValve( + m_flow_nominal=0.05, + redeclare package Medium = Water, + dpValve_nominal=200) annotation (Placement(transformation( + extent={{-9,9},{9,-9}}, + rotation=90, + origin={192,58}))); + Modelica.Blocks.Interfaces.RealInput heatingValveOpening + "Actuator position (0: closed, 100: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={142,100}))); + Modelica.Blocks.Interfaces.RealInput coolingValveOpening + "Actuator position (0: closed, 100: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={212,100}))); +equation + + connect(cooler.port_b2, SupplyAir) annotation (Line( + points={{182,26},{202,26}}, + color={0,127,255}, + smooth=Smooth.None, + thickness=1)); + connect(T_ExhaustAir.port, ExhaustAir) annotation (Line( + points={{182,-58},{182,-68},{202,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_FreshAir.port, FreshAir) annotation (Line( + points={{-140,-76},{-140,-68},{-158,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_OutgoingExhaustAir.port, fanExhaustAir.port_b) annotation (Line( + points={{-134,38},{-134,26},{-128,26}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(cooler.port_b2, T_SupplyAir.port) annotation (Line( + points={{182,26},{188,26},{188,8}}, + color={0,127,255}, + smooth=Smooth.None)); + + connect(add1.u2, realExpression1.y) annotation (Line( + points={{-66,49},{-70,49},{-70,30},{-66.65,30}}, + color={0,0,127}, + smooth=Smooth.None)); + + connect(T_Mix.port, fanSupplyAir.port_a) + annotation (Line(points={{40,42},{40,26},{52,26}}, color={0,127,255})); + connect(OutgoingExhaustAir, res.port_b) + annotation (Line(points={{-160,26},{-146,26}}, color={0,127,255}, + thickness=1)); + connect(fanExhaustAir.port_b, res.port_a) annotation (Line( + points={{-128,26},{-136,26}}, + color={0,127,255}, + thickness=1)); + connect(FreshAir, FreshAir) annotation (Line( + points={{-158,-68},{-158,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_SupplyAir.T, SupplyTemperature); + connect(T_Mix.T, MixTemperature); + connect(T_AfterFan.port, fanSupplyAir.port_b) annotation (Line( + points={{78,42},{78,26},{72,26}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(add1.y, flapBypass.y) annotation (Line( + points={{-54.5,52},{-27,52},{-27,46.8}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(ExhaustAir, ExhaustAir) annotation (Line( + points={{202,-68},{202,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_beforeCooler.port,heater. port_b2) annotation (Line( + points={{129,6},{130,6},{130,26},{116,26}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(flapFreshAir.port_b, flapHeatRecovery.port_a) + annotation (Line(points={{-103,-68},{-91,-68}}, color={0,127,255})); + connect(FreshAir, flapFreshAir.port_a) + annotation (Line(points={{-158,-68},{-121,-68}}, color={0,127,255})); + connect(flapFreshAir.port_b, flapBypass.port_a) annotation (Line(points={{-103, + -68},{-100,-68},{-100,36},{-36,36}}, color={0,127,255})); + connect(fanSupplyAir.port_b, heater.port_a2) + annotation (Line(points={{72,26},{84,26},{96,26}}, color={0,127,255})); + connect(ExhaustAir, recuperator.port_a2) annotation (Line(points={{202,-68},{104, + -68},{-4,-68},{-4,-38},{-24,-38}}, color={0,127,255})); + connect(recuperator.port_b2, fanExhaustAir.port_a) annotation (Line(points={{-44,-38}, + {-44,-38},{-90,-38},{-90,26},{-108,26}}, color={0,127, + 255})); + connect(recuperator.port_b1, volume.ports[1]) annotation (Line(points={{-24,-26}, + {-6,-26},{-6,24},{21.2,24}}, + color={0,127,255})); + connect(flapBypass.port_b, volume.ports[2]) + annotation (Line(points={{-18,36},{19.6,36},{19.6,24}}, + color={0,127,255})); + connect(flapCirculationAir.port_b, volume.ports[3]) annotation (Line(points={{30,-6}, + {30,-6},{30,24},{18,24}}, color={0,127,255})); + connect(fanSupplyAir.port_a, volume.ports[4]) + annotation (Line(points={{52,26},{16.4,26},{16.4,24}}, + color={0,127,255})); + connect(T_AfterHeatRecovery.port, recuperator.port_b1) annotation (Line( + points={{-20,-10},{-20,-26},{-24,-26}}, color={0,127,255})); + connect(heater.port_b2,cooler. port_a2) annotation (Line(points={{116,26},{ + 140,26},{162,26}}, color={0,127,255})); + connect(flapHeatRecovery.port_b, res1.port_a) + annotation (Line(points={{-73,-68},{-56,-68}}, color={0,127,255})); + connect(res1.port_b, recuperator.port_a1) annotation (Line(points={{-66,-68}, + {-50,-68},{-50,-26},{-44,-26}}, color={0,127,255})); + connect(heater.port_a1, heatingValve.port_a) annotation (Line(points={{116, + 38},{122,38},{122,51}}, color={0,127,255})); + connect(heatingValve.port_b, Heater_Flow) annotation (Line(points={{122,69}, + {122,84.5},{122,100}}, color={0,127,255})); + connect(Cooler_Return, cooler.port_b1) annotation (Line(points={{162,100},{ + 162,38},{162,38}}, color={0,127,255})); + connect(cooler.port_a1, coolingValve.port_a) annotation (Line(points={{182,38}, + {192,38},{192,49}}, color={0,127,255})); + connect(coolingValve.port_b, Cooler_Flow) annotation (Line(points={{192,67},{ + 192,74},{192,100}}, color={0,127,255})); + connect(Heater_Return, heater.port_b1) annotation (Line(points={{92,100},{94, + 100},{94,38},{96,38}}, color={0,127,255})); + connect(heatRecoveryFlapOpening, add1.u1) + annotation (Line(points={{-100,100},{-100,55},{-66,55}}, color={0,0,127})); + connect(fanExhaustAirPower, fanExhaustAir.powerShare) annotation (Line(points= + {{-150,100},{-150,100},{-150,70},{-150,64},{-118,64},{-118,36}}, color= + {0,0,127})); + connect(flapFreshAirOpening, flapFreshAir.y) annotation (Line(points={{-50,100}, + {-50,100},{-50,76},{-50,68},{-104,68},{-104,-32},{-112,-32},{-112,-57.2}}, + color={0,0,127})); + connect(heatRecoveryFlapOpening, flapHeatRecovery.y) annotation (Line(points={ + {-100,100},{-100,55},{-82,55},{-82,-57.2}}, color={0,0,127})); + connect(fanSupplyAirPower, fanSupplyAir.powerShare) annotation (Line(points={{ + 50,100},{50,100},{50,68},{50,62},{62,62},{62,36}}, color={0,0,127})); + connect(heatingValveOpening, heatingValve.y) + annotation (Line(points={{142,100},{142,60},{132.8,60}}, color={0,0,127})); + connect(coolingValveOpening, coolingValve.y) annotation (Line(points={{212,100}, + {212,100},{212,62},{212,58},{202.8,58}}, color={0,0,127})); + connect(flapCircularAirOpening, flapCirculationAir.y) annotation (Line(points= + {{0,100},{0,100},{0,18},{0,-16},{18,-16}}, color={0,0,127})); + connect(ExhaustAir, flapCirculationAir.port_a) annotation (Line(points={{202,-68}, + {114,-68},{30,-68},{30,-26}}, color={0,127,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160, + -100},{200,100}})), + Icon(coordinateSystem(extent={{-160,-100},{200,100}}, preserveAspectRatio=false), + graphics={Rectangle( + extent={{-160,100},{200,-100}}, + lineColor={0,0,255}, + fillPattern=FillPattern.Solid, + fillColor={0,0,255}), Text( + extent={{-120,56},{168,-52}}, + lineColor={255,0,0}, + fillColor={0,0,255}, + fillPattern=FillPattern.Solid, + textString="FVU", + textStyle={TextStyle.Bold})}), + experiment(StopTime=86400, Interval=1), + __Dymola_experimentSetupOutput, + Documentation(info=" +

overview

+

This is a model for Facade Ventilation Unit (FVU), which can be used for heating, cooling and ventilation purposes.

+


Level of Development

+

+


Operation Modes of FVU:

+

The fresh air sucked in by the fan may flow through the heat recovery unit or through the bypass flap or through both of them. Depending on the operation mode, the fresh air cools down or heats up in the cooler or the heater to reach the desired supply temperature before it flows into the room. The air sucked out of the room may flow through the circulation air flap or heat recovery unit or both of them. The heater and the cooler are supported by the hot and cold water curcuis, respectively.

+


FVU Components:

+

Supply- and Exhaust fans:

+

The supply- and exhaust fans are modelled based on a table that gets an input signal in percent and gives a mass flow rate according to the data defined in the table. However, in order to achieve a high level of acoustic comfort, the power share input signal is limited to max. 50%.

+

Circulation Air flap:

+

In case of heating or cooling mode, it is checked if the mass flow rate through the supply fan is higher than the mass flow rate through the exhaust fan, and if so, circulation air operation gets activated. In this mode, the circulation air flap gets a signal from FVU-Controller, which means calculating a corresponding flap opening. The input signal Circ is defined as below:

+

+

Recuperator, Heat Recovery and Bypass flap:

+

In order to preheat or precool the fresh air before flowing through the heater/cooler a recuperator is located between the fresh and exhaust air. In case of heating or cooling mode and when the free heating or free cooling are not activated (RH_free and RC_free = false), fresh air flows completely through the bypass flap. However at any time a maximum value from FVU-Controller is selected as an input signal for heat recovery flap. According to this input Signal it will be calculated how much volume flow rate flows through the bypass flap at any time. The Recuperator is so modelled that the efficiency of recuperator based on manufacturer data is readed as a function of volume flow rate. By defining the maximum heat power exchanged between the fresh and exhaust air in counter current flow recuperators, the heat power can be calculated at any time. here the recuperator is shown schematic:

+

+

Heat Power of recuperator is calculated as below:

+

+", revisions=" + +")); +end FacadeVentilationUnit; diff --git a/AixLib/HVAC/FacadeVentilationUnit/package.mo b/AixLib/HVAC/FacadeVentilationUnit/package.mo new file mode 100644 index 0000000000..046c971027 --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/package.mo @@ -0,0 +1,9 @@ +within AixLib.HVAC; +package FacadeVentilationUnit + + +annotation (Documentation(info=" +

This package contains models for facade ventilation unit.

+", revisions=" +")); +end FacadeVentilationUnit; diff --git a/AixLib/HVAC/FacadeVentilationUnit/package.order b/AixLib/HVAC/FacadeVentilationUnit/package.order new file mode 100644 index 0000000000..764d449774 --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/package.order @@ -0,0 +1,4 @@ +BaseClasses +FacadeVentilationUnit +FVUController +Example diff --git a/AixLib/HVAC/Meter/ExergyMeter/Example.mo b/AixLib/HVAC/Meter/ExergyMeter/Example.mo new file mode 100644 index 0000000000..1f242f365c --- /dev/null +++ b/AixLib/HVAC/Meter/ExergyMeter/Example.mo @@ -0,0 +1,263 @@ +within AixLib.HVAC.Meter.ExergyMeter; +model Example + + extends Modelica.Icons.Example; + + parameter Modelica.SIunits.Temperature T_start=323.15 + "Start reference temperature of medium"; + + parameter Integer n = 10 "Number of layers"; + + parameter Real mass = 1000 "Mass of one layer"; + + package Medium = AixLib.Media.Water "Medium in the sensor" + annotation (choicesAllMatching=true); + + Modelica.Blocks.Sources.Sine pulse( + each amplitude=1000, + each freqHz=1/3600, + each offset=3000) + annotation (Placement(transformation(extent={{-10,-20},{10,0}}))); + StoredExergyMeter exergyStorageMeterMedium( + redeclare package Medium = Medium, + T_ref_start=T_ref.k, + T_start=T_start, + exergyContent_start=1.70904e+08, + n=n, + mass=mass) + annotation (Placement(transformation(extent={{-44,-40},{-24,-20}}))); + Modelica.Blocks.Sources.Constant T_ref(k=273.15) + annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); + Modelica.Blocks.Sources.Constant p_ref(k=101300) + annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); + Modelica.Blocks.Sources.Constant X_ref[1](k={1}) + annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); + inner Modelica.Fluid.System system + annotation (Placement(transformation(extent={{80,-100},{100,-80}}))); + HeatExergyMeter exHeatSec + annotation (Placement(transformation(extent={{74,5},{94,25}}))); + AixLib.Fluid.Movers.FlowControlled_m_flow pumpPrim( + addPowerToMedium=false, + nominalValuesDefineDefaultPressureCurve=true, + redeclare package Medium = Medium, + T_start=T_start, + m_flow_nominal=0.5, + m_flow_small=0.001) + annotation (Placement(transformation(extent={{-64,76},{-44,96}}))); + AixLib.Fluid.Storage.Storage + bufferStorageHeatingcoils(layer_HE(T_start=T_start), layer(T_start=T_start), + redeclare package Medium = Medium, + lambda_ins=0.075, + s_ins=0.2, + alpha_in=100, + alpha_out=10, + k_HE=300, + h=1.5, + V_HE=0.02, + A_HE=7, + n=10, + d=2) annotation (Placement(transformation(extent={{26,54},{-2,88}}))); + AixLib.Fluid.FixedResistances.StaticPipe pipePrim( + D=0.1, + redeclare package Medium = Medium, + m_flow_small=0.001) annotation (Placement(transformation( + extent={{-7,-7.5},{7,7.5}}, + rotation=180, + origin={-53,56.5}))); + FlowExergyMeter exPrimIn(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-36,76},{-14,96}}))); + FlowExergyMeter exPrimOut(redeclare package Medium = Medium) annotation ( + Placement(transformation( + extent={{-11,10},{11,-10}}, + rotation=180, + origin={-25,57}))); + Modelica.Fluid.Vessels.ClosedVolume heater(redeclare package Medium = Medium, + nPorts=2, + use_HeatTransfer=true, + use_portsData=false, + V(displayUnit="l") = 0.05, + T_start=T_start) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-84,70}))); + AixLib.Fluid.Movers.FlowControlled_m_flow pumpSec( + addPowerToMedium=false, + nominalValuesDefineDefaultPressureCurve=true, + redeclare package Medium = Medium, + T_start=T_start, + m_flow_nominal=0.5, + m_flow_small=0.001) + annotation (Placement(transformation(extent={{60,72},{80,92}}))); + AixLib.Fluid.FixedResistances.StaticPipe pipeSec( + D=0.1, + redeclare package Medium = Medium, + m_flow_small=0.001) annotation (Placement(transformation( + extent={{-8,-7.5},{8,7.5}}, + rotation=180, + origin={66,54.5}))); + Modelica.Fluid.Vessels.ClosedVolume consumer( + redeclare package Medium = Medium, + use_HeatTransfer=true, + V(displayUnit="l") = 0.05, + use_portsData=false, + nPorts=2, + T_start=T_start) annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=270, + origin={94,70}))); + FlowExergyMeter exSecOut(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{34,72},{56,92}}))); + FlowExergyMeter exSecIn(redeclare package Medium = Medium) annotation ( + Placement(transformation( + extent={{-11,10},{11,-10}}, + rotation=180, + origin={41,54}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow consumerHeatFlow + annotation (Placement(transformation(extent={{48,14},{68,34}}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaterHeatFlow + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-28,24}))); + Modelica.Blocks.Math.Gain gain(k=-1) + annotation (Placement(transformation(extent={{28,18},{40,30}}))); + HeatExergyMeter exHeatPrim annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=180, + origin={-68,15}))); + Modelica.Blocks.Sources.RealExpression storageTemperatures[n](y= + bufferStorageHeatingcoils.layer[:].heatPort.T) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={2,-58}))); + Modelica.Blocks.Sources.Constant pumpMassFlow(k=0.5) + annotation (Placement(transformation(extent={{-100,88},{-88,100}}))); + AixLib.Fluid.Sources.Boundary_pT expansionVesselSec( + redeclare package Medium = Medium, + nPorts=1, + p=110000) annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=270, + origin={58,94}))); + AixLib.Fluid.Sources.Boundary_pT expansionVesselPrim( + redeclare package Medium = Medium, + nPorts=1, + p=110000) annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=270, + origin={-70,94}))); +equation + connect(T_ref.y, exergyStorageMeterMedium.T_ref) annotation (Line(points={{-79,-10}, + {-72,-10},{-72,-23},{-44,-23}}, + color={0,0,127})); + connect(p_ref.y, exergyStorageMeterMedium.p_ref) annotation (Line(points={{-79,-50}, + {-76,-50},{-76,-30},{-44,-30}},color={0,0,127})); + connect(X_ref.y, exergyStorageMeterMedium.X_ref) annotation (Line(points={{-79,-90}, + {-54,-90},{-54,-37},{-44,-37}}, color={0,0,127})); + connect(p_ref.y, exergyStorageMeterMedium.p) annotation (Line(points={{-79,-50}, + {-74,-50},{-39,-50},{-39,-41}}, color={0,0,127})); + connect(X_ref.y, exergyStorageMeterMedium.X) annotation (Line(points={{-79,-90}, + {-80,-90},{-29,-90},{-29,-41}},color={0,0,127})); + + connect(pumpPrim.port_b, exPrimIn.port_a) + annotation (Line(points={{-44,86},{-40,86},{-36,86}}, color={0,127,255})); + connect(exPrimIn.port_b, bufferStorageHeatingcoils.port_a_heatGenerator) + annotation (Line(points={{-16,86},{0.24,86},{0.24,85.96}}, color={0,127,255})); + connect(bufferStorageHeatingcoils.port_b_heatGenerator, exPrimOut.port_a) + annotation (Line(points={{0.24,57.4},{-5.88,57.4},{-5.88,57},{-16,57}}, + color={0,127,255})); + connect(exPrimOut.port_b, pipePrim.port_a) annotation (Line(points={{-36,57}, + {-46,57},{-46,56.5}},color={0,127,255})); + connect(pipePrim.port_b, heater.ports[1]) annotation (Line(points={{-60,56.5}, + {-72,56.5},{-72,68},{-74,68}}, color={0,127,255})); + connect(heater.ports[2], pumpPrim.port_a) annotation (Line(points={{-74,72},{-70, + 72},{-70,86},{-64,86}}, color={0,127,255})); + connect(bufferStorageHeatingcoils.port_b_consumer, exSecOut.port_a) + annotation (Line(points={{12,88},{12,92},{28,92},{28,82},{34,82}}, color={0, + 127,255})); + connect(exSecOut.port_b, pumpSec.port_a) + annotation (Line(points={{54,82},{54,82},{60,82}}, color={0,127,255})); + connect(exSecIn.port_a, pipeSec.port_b) + annotation (Line(points={{50,54},{58,54},{58,54.5}}, color={0,127,255})); + connect(exSecIn.port_b, bufferStorageHeatingcoils.port_a_consumer) + annotation (Line(points={{30,54},{28,54},{28,46},{12,46},{12,54}}, color={0, + 127,255})); + connect(pipeSec.port_a, consumer.ports[1]) annotation (Line(points={{74,54.5}, + {80,54.5},{80,68},{84,68}}, color={0,127,255})); + connect(pumpSec.port_b, consumer.ports[2]) annotation (Line(points={{80,82},{82, + 82},{82,72},{84,72}}, color={0,127,255})); + connect(consumerHeatFlow.Q_flow, gain.y) + annotation (Line(points={{48,24},{40.6,24}}, color={0,0,127})); + connect(pulse.y, gain.u) annotation (Line(points={{11,-10},{20,-10},{20,24},{26.8, + 24}}, color={0,0,127})); + connect(pulse.y, heaterHeatFlow.Q_flow) annotation (Line(points={{11,-10},{20, + -10},{20,24},{-18,24}}, color={0,0,127})); + connect(consumerHeatFlow.port, exHeatSec.port_a) annotation (Line(points={{68, + 24},{71,24},{71,24.2},{74,24.2}}, color={191,0,0})); + connect(exHeatSec.port_b, consumer.heatPort) + annotation (Line(points={{94,24.2},{94,60}}, color={191,0,0})); + connect(heaterHeatFlow.port, exHeatPrim.port_a) annotation (Line(points={{-38, + 24},{-48,24},{-48,24.2},{-58,24.2}}, color={191,0,0})); + connect(exHeatPrim.port_b, heater.heatPort) + annotation (Line(points={{-78,24.2},{-84,24},{-84,60}}, color={191,0,0})); + connect(T_ref.y, exHeatPrim.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,15},{-58,15}}, color={0,0,127})); + connect(T_ref.y, exHeatSec.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,15},{74,15}}, color={0,0,127})); + connect(storageTemperatures.y, exergyStorageMeterMedium.T) + annotation (Line(points={{-9,-58},{-34,-58},{-34,-40}}, color={0,0,127})); + connect(T_ref.y, exPrimOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, + {-50,-10},{-50,38},{-35,38},{-35,47}}, color={0,0,127})); + connect(T_ref.y, exPrimIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,38},{-40,38},{-40,66},{-34,66},{-17,66},{-17,76}}, color={0,0,127})); + connect(T_ref.y, exSecIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,38},{31,38},{31,44}},color={0,0,127})); + connect(T_ref.y, exSecOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, + {-50,-10},{-50,38},{56,38},{56,62},{53,62},{53,72}}, color={0,0,127})); + connect(p_ref.y, exPrimOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,-30},{-52,-30},{-52,40},{-26,40},{-26,47}}, color={0,0,127})); + connect(p_ref.y, exPrimIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,-30},{-52,-30},{-52,40},{-42,40},{-42,68},{-26,68},{-26,76}}, + color={0,0,127})); + connect(p_ref.y, exSecOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,40},{-42,40},{-42,68},{-8,68},{-8,96},{30,96},{30,64},{44,64},{44, + 72}}, color={0,0,127})); + connect(p_ref.y, exSecIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,40},{-42,40},{-42,68},{-8,68},{-8,40},{40,40},{40,44}},color={0,0, + 127})); + connect(X_ref.y, exSecIn.X_ref) annotation (Line(points={{-79,-90},{-50,-90}, + {44,-90},{44,34},{49,34},{49,44}},color={0,0,127})); + connect(X_ref.y, exSecOut.X_ref) annotation (Line(points={{-79,-90},{-18,-90}, + {44,-90},{44,34},{54,34},{54,62},{35,62},{35,72}}, color={0,0,127})); + connect(X_ref.y, exPrimOut.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, + {-54,42},{-17,42},{-17,47}}, color={0,0,127})); + connect(X_ref.y, exPrimIn.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, + {-54,44},{-35,44},{-35,76}}, color={0,0,127})); + connect(pumpMassFlow.y, pumpPrim.m_flow_in) annotation (Line(points={{-87.4, + 94},{-76,94},{-76,100},{-54.2,100},{-54.2,98}}, + color={0,0,127})); + connect(pumpMassFlow.y, pumpSec.m_flow_in) annotation (Line(points={{-87.4,94}, + {-76,94},{-76,100},{69.8,100},{69.8,94}}, color={0,0,127})); + connect(expansionVesselSec.ports[1], pumpSec.port_a) annotation (Line(points= + {{58,90},{58,82},{58,82},{58,82},{60,82},{60,82}}, color={0,127,255})); + connect(expansionVesselPrim.ports[1], pumpPrim.port_a) + annotation (Line(points={{-70,90},{-70,86},{-64,86}}, color={0,127,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment(StopTime=1000, Interval=10), + __Dymola_experimentSetupOutput, + __Dymola_experimentFlags( + Advanced(GenerateVariableDependencies=false, OutputModelicaCode=false), + Evaluate=false, + OutputCPUtime=true, + OutputFlatModelica=false), + Documentation(info=" +

This model shows the usage of all three ExergyMeters.

+", revisions=" + +")); +end Example; diff --git a/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo new file mode 100644 index 0000000000..65e8fcf1a9 --- /dev/null +++ b/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo @@ -0,0 +1,127 @@ +within AixLib.HVAC.Meter.ExergyMeter; +model FlowExergyMeter + + extends AixLib.Fluid.Interfaces.PartialTwoPort; + extends Modelica.Icons.RotationalSensor; + + Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) + "Reference composition" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={-90,-100}))); + Modelica.Fluid.Sources.Boundary_pT referenceEnvironment( + redeclare replaceable package Medium = Medium, + use_p_in=true, + nPorts=2, + use_T_in=true, + use_X_in=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-56}))); + Modelica.Fluid.Sensors.MassFlowRate massFlowRate(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy(redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{70,0},{50,20}}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy(redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); +public + Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", + final quantity="ThermodynamicTemperature", min=0) "Reference temperature" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={90,-100}))); + Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) + "Reference pressure" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-100}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy_ref(redeclare + package Medium = Medium) + annotation (Placement(transformation(extent={{-12,-62},{-32,-42}}))); + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy_ref(redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{18,-64},{38,-42}}))); + Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", + final unit="W") "Exergy content of the medium flow" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,110}))); + Modelica.Blocks.Math.Add enthalpyDifference(k1=-1) + annotation (Placement(transformation(extent={{-36,20},{-16,40}}))); + Modelica.Blocks.Math.Add entropyDifference(k1=-1) + annotation (Placement(transformation(extent={{-36,46},{-16,66}}))); + Modelica.Blocks.Math.Product productWithReferenceTemperature + annotation (Placement(transformation(extent={{0,40},{20,60}}))); + Modelica.Blocks.Math.Add specificExergy(k1=-1) + annotation (Placement(transformation(extent={{40,40},{60,60}}))); + Modelica.Blocks.Math.Product exergyFlowRate + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=180, + origin={50,80}))); +equation + connect(specificEnthalpy_ref.port, referenceEnvironment.ports[1]) + annotation (Line(points={{-22,-62},{-22,-66},{2,-66}}, + color={0,127,255})); + connect(referenceEnvironment.ports[2], specificEntropy_ref.port) + annotation (Line(points={{-2,-66},{28,-66},{28,-64}}, + color={0,127,255})); + connect(massFlowRate.port_b,specificEntropy. port) + annotation (Line(points={{10,0},{60,0}}, color={0,127,255})); + connect(specificEnthalpy.h_out, enthalpyDifference.u2) annotation (Line( + points={{-49,10},{-46,10},{-46,24},{-38,24}}, color={0,0,127})); + connect(specificEnthalpy_ref.h_out, enthalpyDifference.u1) annotation (Line( + points={{-33,-52},{-44,-52},{-44,-24},{-44,36},{-38,36}},color={0,0,127})); + connect(T_ref, productWithReferenceTemperature.u2) annotation (Line(points={{90,-100}, + {90,-100},{90,-34},{20,-34},{20,34},{-8,34},{-8,44},{-2,44}}, + color={0,0,127})); + connect(enthalpyDifference.y, specificExergy.u2) annotation (Line(points={{-15,30}, + {32,30},{32,44},{38,44}}, color={0,0,127})); + connect(port_a, specificEnthalpy.port) + annotation (Line(points={{-100,0},{-80,0},{-60,0}}, color={0,127,255})); + connect(specificEntropy.port, port_b) + annotation (Line(points={{60,0},{80,0},{100,0}}, color={0,127,255})); + connect(specificEntropy_ref.s, entropyDifference.u1) annotation (Line(points={{39,-53}, + {39,-53},{44,-53},{44,-27},{-86,-27},{-86,62},{-38,62}}, + color={0,0,127})); + connect(productWithReferenceTemperature.y, specificExergy.u1) + annotation (Line(points={{21,50},{22,50},{22,50},{24,50},{32,50},{32,56}, + {38,56}}, color={0,0,127})); + connect(massFlowRate.m_flow, exergyFlowRate.u2) annotation (Line(points={{0,-11}, + {0,-26},{74,-26},{74,86},{62,86}}, color={0,0,127})); + connect(exergyFlowRate.y, exergy_flow) + annotation (Line(points={{39,80},{0,80},{0,110}}, color={0,0,127})); + connect(specificEntropy.s, entropyDifference.u2) annotation (Line(points={{49,10}, + {32,10},{32,-18},{-78,-18},{-78,50},{-38,50}}, color={0,0,127})); + connect(entropyDifference.y, productWithReferenceTemperature.u1) + annotation (Line(points={{-15,56},{-2,56}}, color={0,0,127})); + connect(specificExergy.y, exergyFlowRate.u1) annotation (Line(points={{61,50}, + {68,50},{68,74},{62,74}}, color={0,0,127})); + connect(X_ref, referenceEnvironment.X_in) annotation (Line(points={{-90,-100}, + {-90,-100},{-90,-78},{-90,-38},{-4,-38},{-4,-44}}, + color={0,0,127})); + connect(p_ref, referenceEnvironment.p_in) annotation (Line(points={{0,-100},{0, + -70},{48,-70},{48,-36},{8,-36},{8,-40},{8,-44}}, + color={0,0,127})); + connect(T_ref, referenceEnvironment.T_in) annotation (Line(points={{90,-100},{ + 90,-100},{90,-86},{90,-34},{4,-34},{4,-44}}, + color={0,0,127})); + connect(specificEnthalpy.port, massFlowRate.port_a) + annotation (Line(points={{-60,0},{-36,0},{-10,0}}, color={0,127,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Documentation(info=" +

The model calculates the exergy content of a medium flow consisting of multiple substances. The reference environment is variable. The underlying equation is

+

\"dE/dt=dm/dt*(h-h_ref-T_ref*(s-s_ref))\"/

+

with \"dE/dt\"/: exergy flow rate, \"dm/dt\"/: mass flow rate, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

+

The reference environment is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The sensor is ideal, i.e., it does not influence the fluid.

+

Level of Development

+

+", revisions=" + +"), + Icon(coordinateSystem(extent={{-100,-100},{120,100}}))); +end FlowExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo new file mode 100644 index 0000000000..b03dd0f9bf --- /dev/null +++ b/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo @@ -0,0 +1,120 @@ +within AixLib.HVAC.Meter.ExergyMeter; +model HeatExergyMeter + + extends Modelica.Icons.RotationalSensor; + + parameter Boolean useConvectiveHeatFlow = true + "Set to 'true' in order to connect the meter to a convective heat port"; + parameter Boolean useRadiativeHeatFlow = false + "Set to 'true' in order to connect the meter to a radiative heat port"; + parameter Boolean solarRadiation = false + "Set to 'true' in order to connect the meter to a solar radiation port" annotation(Dialog(enable = if useRadiativeHeatFlow then true else false)); + parameter Modelica.SIunits.ThermodynamicTemperature sunTemperature = 6000 + "Temperature assumption for the solar radiation"; + Modelica.Blocks.Math.Add add(k2=-1) + annotation (Placement(transformation(extent={{20,-10},{40,10}}))); + Modelica.Blocks.Sources.Constant const(k=1) + annotation (Placement(transformation(extent={{-12,0},{0,12}}))); + Modelica.Blocks.Math.Division division + annotation (Placement(transformation(extent={{-20,-40},{0,-20}}))); + Modelica.Blocks.Math.Product product + annotation (Placement(transformation(extent={{60,20},{80,40}}))); + Modelica.Blocks.Nonlinear.Limiter limiter(uMax=400, uMin=1) + annotation (Placement(transformation(extent={{-66,-56},{-54,-44}}))); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{-110,82},{-90,102}}))); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{90,82},{110,102}}))); + Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{-10,82},{10,102}}))); + Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{-94,58},{-74,78}}))); + AixLib.HVAC.Interfaces.RadPort radPort_a if + useRadiativeHeatFlow + annotation (Placement(transformation(extent={{-110,-90},{-90,-70}}))); + AixLib.HVAC.Interfaces.RadPort radPort_b if + useRadiativeHeatFlow + annotation (Placement(transformation(extent={{90,-90},{110,-70}}))); + Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor1 if useRadiativeHeatFlow + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={0,-74}))); + Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor1 if + useRadiativeHeatFlow + annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); +public + Modelica.Blocks.Interfaces.RealInput T_ref( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature", + min=0) "Reference temperature" annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-100,0}))); + Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", + final unit="W") "Exergy content of the medium flow" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-110}))); +equation + connect(const.y, add.u1) annotation (Line( + points={{0.6,6},{18,6}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(division.y, add.u2) annotation (Line( + points={{1,-30},{6,-30},{6,-6},{18,-6}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(add.y, product.u2) annotation (Line( + points={{41,0},{52,0},{52,24},{58,24}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(limiter.y, division.u2) annotation (Line( + points={{-53.4,-50},{-40,-50},{-40,-36},{-22,-36}}, + color={0,0,127}, + smooth=Smooth.None)); + + if useConvectiveHeatFlow then + connect(temperatureSensor.T, limiter.u); + connect(heatFlowSensor.Q_flow, product.u1); + connect(port_a, heatFlowSensor.port_a); + connect(heatFlowSensor.port_b, port_b); + connect(port_a, temperatureSensor.port); + + end if; + + if useRadiativeHeatFlow then + + if solarRadiation then + limiter.u = sunTemperature; + else + connect(temperatureSensor1.T, limiter.u); + end if; + + connect(heatFlowSensor1.Q_flow, product.u1); + connect(temperatureSensor1.port, radPort_a); + connect(heatFlowSensor1.port_a, radPort_a); + connect(heatFlowSensor1.port_b, radPort_b); + end if; + + connect(T_ref, division.u1) annotation (Line(points={{-100,0},{-40,0},{-40,-24}, + {-22,-24}}, color={0,0,127})); + connect(product.y, exergy_flow) annotation (Line(points={{81,30},{86,30},{86,-92}, + {20,-92},{0,-92},{0,-110}}, color={0,0,127})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Icon(coordinateSystem( + preserveAspectRatio=false, extent={{-100,-100},{100,100}})), + Documentation(info=" +

The model calculates the exergy flow rate of a radiaitive or convective heat flux. The reference environment (subscript \"_ref\"/) is variable. The basic equation is

+

\"dE/dt=dQ/dt*(1-T_ref/T)\"/

+

with \"dE/dt\"/: exergy flow rate, \"dQ/dt\"/: heat flow rate, \"T\"/: temperature

+

Level of Development

+

+", revisions=" + +")); +end HeatExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo new file mode 100644 index 0000000000..978aa67101 --- /dev/null +++ b/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo @@ -0,0 +1,207 @@ +within AixLib.HVAC.Meter.ExergyMeter; +model StoredExergyMeter + + extends Modelica.Icons.RotationalSensor; + + replaceable package Medium = Modelica.Media.Interfaces.PartialMedium + "Medium in the sensor" annotation (choicesAllMatching=true); + + parameter Integer n=1 "Number of identical volumes"; + + parameter Modelica.SIunits.Mass mass=100 "mass of each layer"; + parameter Modelica.SIunits.Temperature T_start=323.15 + "Start reference temperature of medium" + annotation (Dialog(tab="Initialisation")); + parameter Modelica.SIunits.Temperature T_ref_start=273.15 + "Start reference temperature" annotation (Dialog(tab="Initialisation")); + parameter Modelica.SIunits.Energy exergyContent_start = 1e+05 + "Start exergy content" annotation (Dialog(tab="Initialisation")); + + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy[n](redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{70,0},{50,20}}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy[n](redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); +public + Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", + final quantity="ThermodynamicTemperature", min=0) "Reference temperature for EXERGY calculations in K. + It must be distinguished between the the reference temperature used for exergy calculations and the reference + for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" + annotation (Placement(transformation(extent={{-120,50},{-80,90}}))); + Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) + "Reference pressure" + annotation (Placement(transformation(extent={{-120,-20},{-80,20}}), + iconTransformation(extent={{-120,-20},{-80,20}}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy1[n](redeclare + package Medium = Medium) + annotation (Placement(transformation(extent={{-10,60},{-30,40}}))); + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy1[n](redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{10,60},{30,40}}))); + Modelica.Blocks.Interfaces.RealOutput ExergyChangeRate(final quantity="Power", + final unit="W") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={106,-62}))); + Modelica.Fluid.Sources.Boundary_pT referenceEnvironment[n]( + redeclare package Medium = Medium, + each use_p_in=true, + each nPorts=2, + each use_T_in=true, + each use_X_in=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,80}))); + Modelica.Fluid.Sources.Boundary_pT boundary[n]( + redeclare package Medium = Medium, + each use_p_in=true, + each use_T_in=true, + each nPorts=2, + each use_X_in=true) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,0}))); +public + Modelica.Blocks.Interfaces.RealInput T[n]( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature", + min=0) "Reference temperature for EXERGY calculations in K. + It must be distinguished between the the reference temperature used for exergy calculations and the reference + for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-112}), iconTransformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-100}))); + Modelica.Blocks.Interfaces.RealInput p( + final quantity="Pressure", + final unit="Pa", + displayUnit="bar", + min=0) "Reference pressure" annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={-50,-110}))); + Modelica.Blocks.Math.Sum sum1(nin=n) + annotation (Placement(transformation(extent={{-60,-60},{-40,-40}}))); + Modelica.Blocks.Math.Gain gain(k=mass) + annotation (Placement(transformation(extent={{-26,-57},{-12,-43}}))); + Modelica.Blocks.Math.Add add[n](each k1=-1) + annotation (Placement(transformation(extent={{-46,33},{-60,47}}))); + Modelica.Blocks.Math.Add add1[n](each k1=-1) + annotation (Placement(transformation(extent={{46,33},{60,47}}))); + Modelica.Blocks.Math.Sum sum2(nin=n) + annotation (Placement(transformation(extent={{64,-42},{44,-22}}))); + Modelica.Blocks.Math.Add add2(each k1=-1) + annotation (Placement(transformation(extent={{38,-69},{52,-55}}))); + Modelica.Blocks.Continuous.Derivative derivative( + x_start=exergyContent_start, + initType=Modelica.Blocks.Types.Init.InitialState, + T=10) + annotation (Placement(transformation(extent={{64,-72},{84,-52}}))); + Modelica.Blocks.Interfaces.RealOutput exergyContent( + start=exergyContent_start, + final quantity="Energy", + final unit="J") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={106,-32}))); + Modelica.Blocks.Math.Product product + annotation (Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=270, + origin={14,-46}))); + Modelica.Blocks.Math.Gain gain1( + k=mass) + annotation (Placement(transformation(extent={{-7,-7},{7,7}}, + rotation=180, + origin={27,-32}))); + Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) + "Reference composition" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=0, + origin={-100,-70}))); + Modelica.Blocks.Interfaces.RealInput X[Medium.nX]( + final quantity="MassFraction", + final unit="1", + min=0, + max=1) "Reference composition" annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={50,-110}))); +equation + + for i in 1:n loop + connect(p, boundary[i].p_in) annotation (Line(points={{-50,-110},{-50,-72},{ + -8,-72},{-8,-12}}, color={0,0,127})); + connect(T_ref, referenceEnvironment[i].T_in) annotation (Line(points={{-100,70}, + {-76,70},{-76,96},{4,96},{4,92}}, color={0,0,127})); + connect(p_ref, referenceEnvironment[i].p_in) annotation (Line(points={{-100,0}, + {-78,0},{-78,98},{8,98},{8,92}}, color={0,0,127})); + connect(X, boundary[i].X_in) annotation (Line(points={{50,-110},{50,-80},{2,-80}, + {2,-20},{4,-20},{4,-12}}, color={0,0,127})); + connect(X_ref, referenceEnvironment[i].X_in) annotation (Line(points={{-100,-70}, + {-72,-70},{-72,92},{-4,92}}, color={0,0,127})); + + end for; + + connect(specificEnthalpy[:].port, boundary[:].ports[1]) annotation (Line( + points={{-60,0},{-40,0},{-20,0},{-20,20},{-4,20},{-2,20},{-2,10}}, + color={0,127,255})); + connect(specificEntropy[:].port, boundary[:].ports[2]) annotation (Line( + points={{60,0},{40,0},{20,0},{20,20},{2,20},{2,10}}, color={0,127,255})); + connect(specificEnthalpy1.h_out, add.u1) annotation (Line(points={{-31,50},{-38, + 50},{-38,44.2},{-44.6,44.2}}, color={0,0,127})); + connect(specificEnthalpy.h_out, add.u2) annotation (Line(points={{-49,10},{-40, + 10},{-40,35.8},{-44.6,35.8}}, color={0,0,127})); + connect(add.y, sum1.u) annotation (Line(points={{-60.7,40},{-60.7,40},{-74,40}, + {-74,-50},{-62,-50}},color={0,0,127})); + connect(sum1.y, gain.u) annotation (Line(points={{-39,-50},{-34,-50},{-27.4,-50}}, + color={0,0,127})); + connect(specificEntropy1.s, add1.u1) annotation (Line(points={{31,50},{36,50}, + {36,44.2},{44.6,44.2}}, color={0,0,127})); + connect(specificEntropy.s, add1.u2) annotation (Line(points={{49,10},{40,10},{ + 40,35.8},{44.6,35.8}}, color={0,0,127})); + connect(add1.y, sum2.u) annotation (Line(points={{60.7,40},{60.7,40},{84,40},{ + 84,-32},{66,-32}}, + color={0,0,127})); + connect(derivative.y, ExergyChangeRate) + annotation (Line(points={{85,-62},{106,-62}}, color={0,0,127})); + connect(specificEnthalpy1[:].port, referenceEnvironment[:].ports[1]) + annotation (Line(points={{-20,60},{-20,70},{2,70}}, color={0,127,255})); + connect(specificEntropy1[:].port, referenceEnvironment[:].ports[2]) + annotation (Line(points={{20,60},{20,70},{-2,70}},color={0,127,255})); + connect(sum2.y, gain1.u) annotation (Line(points={{43,-32},{40,-32},{35.4,-32}}, + color={0,0,127})); + connect(gain1.y, product.u1) annotation (Line(points={{19.3,-32},{14,-32},{14, + -38.8},{17.6,-38.8}}, color={0,0,127})); + connect(T_ref, product.u2) annotation (Line(points={{-100,70},{-76,70},{-76,-28}, + {10.4,-28},{10.4,-38.8}}, color={0,0,127})); + connect(derivative.u, add2.y) + annotation (Line(points={{62,-62},{52.7,-62}}, color={0,0,127})); + connect(gain.y, add2.u2) annotation (Line(points={{-11.3,-50},{4,-50},{4,-66.2}, + {36.6,-66.2}}, color={0,0,127})); + connect(product.y, add2.u1) annotation (Line(points={{14,-52.6},{14,-57.8},{36.6, + -57.8}}, color={0,0,127})); + connect(add2.y, exergyContent) annotation (Line(points={{52.7,-62},{58,-62},{58, + -44},{90,-44},{90,-32},{106,-32}}, color={0,0,127})); + connect(T, boundary.T_in) annotation (Line(points={{0,-112},{0,-112},{0, + -28},{0,-22},{-4,-22},{-4,-12}}, + color={0,0,127})); + + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Documentation(info=" +

The model calculates the exergy content and its rate of change of a stratefied storage (i. e. with multiple layers) filled with a medium consisting of multiple substances. The reference environment is variable. The basic equation is

+

\"E=m*(h-h_ref-T_ref*(s-s_ref))\"/

+

with \"E\"/: exergy content, \"m\"/: mass, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

+

The reference environment (subscript \"_ref\"/) is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The rate of change of the exergy content is calculated using the approximate derivative block from MSL.

+

Level of Development

+

+", revisions=" + +")); +end StoredExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/package.mo b/AixLib/HVAC/Meter/ExergyMeter/package.mo new file mode 100644 index 0000000000..6311e76e29 --- /dev/null +++ b/AixLib/HVAC/Meter/ExergyMeter/package.mo @@ -0,0 +1,8 @@ +within AixLib.HVAC.Meter; +package ExergyMeter + + +annotation (Documentation(info=" +

This package contains models to perform an exergy analysis.

+")); +end ExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/package.order b/AixLib/HVAC/Meter/ExergyMeter/package.order new file mode 100644 index 0000000000..a70e257a03 --- /dev/null +++ b/AixLib/HVAC/Meter/ExergyMeter/package.order @@ -0,0 +1,4 @@ +FlowExergyMeter +StoredExergyMeter +HeatExergyMeter +Example From 83166dcb2e5423891a04cadb52a8082199489d24 Mon Sep 17 00:00:00 2001 From: rsa Date: Thu, 10 Nov 2016 19:02:29 +0100 Subject: [PATCH 002/342] PackageOrder modified --- AixLib/HVAC/package.order | 1 + 1 file changed, 1 insertion(+) diff --git a/AixLib/HVAC/package.order b/AixLib/HVAC/package.order index afdcdb68b4..d0514bcef7 100644 --- a/AixLib/HVAC/package.order +++ b/AixLib/HVAC/package.order @@ -1,5 +1,6 @@ BaseParameters Ductwork +FacadeVentilationUnit Fan HeatExchanger HumidifierAndDehumidifier From ad7a7939f33cda3f51eb5beaaabd17f8b8a01f42 Mon Sep 17 00:00:00 2001 From: rsa Date: Thu, 10 Nov 2016 19:07:36 +0100 Subject: [PATCH 003/342] PackageOrder modified --- AixLib/HVAC/Meter/package.order | 1 + 1 file changed, 1 insertion(+) diff --git a/AixLib/HVAC/Meter/package.order b/AixLib/HVAC/Meter/package.order index 944f6dae7a..5c9a184caf 100644 --- a/AixLib/HVAC/Meter/package.order +++ b/AixLib/HVAC/Meter/package.order @@ -1,2 +1,3 @@ EEnergyMeter TEnergyMeter +ExergyMeter From 2413cd07ea9fdee295529e71817fd2fdbca4b0bf Mon Sep 17 00:00:00 2001 From: rsa Date: Fri, 11 Nov 2016 09:25:55 +0100 Subject: [PATCH 004/342] FVU deleted --- AixLib/HVAC/FacadeVentilationUnit/package.mo | 9 --------- AixLib/HVAC/package.order | 1 - 2 files changed, 10 deletions(-) delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/package.mo diff --git a/AixLib/HVAC/FacadeVentilationUnit/package.mo b/AixLib/HVAC/FacadeVentilationUnit/package.mo deleted file mode 100644 index 046c971027..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/package.mo +++ /dev/null @@ -1,9 +0,0 @@ -within AixLib.HVAC; -package FacadeVentilationUnit - - -annotation (Documentation(info=" -

This package contains models for facade ventilation unit.

-", revisions=" -")); -end FacadeVentilationUnit; diff --git a/AixLib/HVAC/package.order b/AixLib/HVAC/package.order index d0514bcef7..afdcdb68b4 100644 --- a/AixLib/HVAC/package.order +++ b/AixLib/HVAC/package.order @@ -1,6 +1,5 @@ BaseParameters Ductwork -FacadeVentilationUnit Fan HeatExchanger HumidifierAndDehumidifier From 625412a00f62641144c2b86be5a6b65e444ffd42 Mon Sep 17 00:00:00 2001 From: rsa Date: Fri, 11 Nov 2016 09:34:35 +0100 Subject: [PATCH 005/342] Exerymeter deleted --- AixLib/HVAC/Meter/ExergyMeter/package.mo | 8 -------- AixLib/HVAC/Meter/package.mo | 2 +- AixLib/HVAC/Meter/package.order | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/package.mo diff --git a/AixLib/HVAC/Meter/ExergyMeter/package.mo b/AixLib/HVAC/Meter/ExergyMeter/package.mo deleted file mode 100644 index 6311e76e29..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/package.mo +++ /dev/null @@ -1,8 +0,0 @@ -within AixLib.HVAC.Meter; -package ExergyMeter - - -annotation (Documentation(info=" -

This package contains models to perform an exergy analysis.

-")); -end ExergyMeter; diff --git a/AixLib/HVAC/Meter/package.mo b/AixLib/HVAC/Meter/package.mo index db18685331..069c58dce1 100644 --- a/AixLib/HVAC/Meter/package.mo +++ b/AixLib/HVAC/Meter/package.mo @@ -1,5 +1,5 @@ within AixLib.HVAC; -package Meter +package Meter extends Modelica.Icons.Package; end Meter; diff --git a/AixLib/HVAC/Meter/package.order b/AixLib/HVAC/Meter/package.order index 5c9a184caf..944f6dae7a 100644 --- a/AixLib/HVAC/Meter/package.order +++ b/AixLib/HVAC/Meter/package.order @@ -1,3 +1,2 @@ EEnergyMeter TEnergyMeter -ExergyMeter From 55c31ebe356de3b607845f5284ca1a48e3a91adf Mon Sep 17 00:00:00 2001 From: MBaranskiEBC Date: Fri, 3 Mar 2017 14:55:56 +0100 Subject: [PATCH 006/342] Delete FacadeVentilationUnit from package HVAC --- AixLib/HVAC/FacadeVentilationUnit/package.mo | 9 --------- AixLib/HVAC/package.order | 1 - 2 files changed, 10 deletions(-) delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/package.mo diff --git a/AixLib/HVAC/FacadeVentilationUnit/package.mo b/AixLib/HVAC/FacadeVentilationUnit/package.mo deleted file mode 100644 index 046c971027..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/package.mo +++ /dev/null @@ -1,9 +0,0 @@ -within AixLib.HVAC; -package FacadeVentilationUnit - - -annotation (Documentation(info=" -

This package contains models for facade ventilation unit.

-", revisions=" -")); -end FacadeVentilationUnit; diff --git a/AixLib/HVAC/package.order b/AixLib/HVAC/package.order index d0514bcef7..afdcdb68b4 100644 --- a/AixLib/HVAC/package.order +++ b/AixLib/HVAC/package.order @@ -1,6 +1,5 @@ BaseParameters Ductwork -FacadeVentilationUnit Fan HeatExchanger HumidifierAndDehumidifier From c482fa04e0393fd2eff514b9c4df2b35377ff3dc Mon Sep 17 00:00:00 2001 From: MBaranskiEBC Date: Fri, 3 Mar 2017 14:58:47 +0100 Subject: [PATCH 007/342] * Add FacadeVentilationUnit to package Airflow: - improve the info windows - correct the Example.mo - add missing records - rename input connectors --- .../BaseClasses/FVUBaseRecord.mo | 89 ++++ .../BaseClasses/FVURecord.mo | 62 +++ .../BaseClasses/SetPower.mo | 117 +++++ .../BaseClasses/package.mo | 4 + .../BaseClasses/package.order | 3 + .../Airflow/FacadeVentilationUnit/Example.mo | 149 ++++++ .../FacadeVentilationUnit/FVUController.mo | 359 +++++++++++++++ .../FacadeVentilationUnit.mo | 426 ++++++++++++++++++ .../Airflow/FacadeVentilationUnit/package.mo | 9 + .../FacadeVentilationUnit/package.order | 4 + AixLib/Airflow/package.order | 1 + .../BaseClasses/FVUBaseRecord.mo | 89 ++++ .../BaseClasses/FVURecord.mo | 62 +++ 13 files changed, 1374 insertions(+) create mode 100644 AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVURecord.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/BaseClasses/SetPower.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.order create mode 100644 AixLib/Airflow/FacadeVentilationUnit/Example.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/FVUController.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/package.mo create mode 100644 AixLib/Airflow/FacadeVentilationUnit/package.order create mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo create mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo diff --git a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo new file mode 100644 index 0000000000..a6eca9fc95 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo @@ -0,0 +1,89 @@ +within AixLib.Airflow.FacadeVentilationUnit.BaseClasses; +record FVUBaseRecord + "Base record for the facade ventilation unit model" + extends Modelica.Icons.Record; + + parameter Real noUnits=1 "Number of identical FVUs"; + parameter Modelica.SIunits.ThermalConductance UA_heater=120 + "Thermal conductance of heater at nominal flow, used to compute heat capacity"; + parameter Modelica.SIunits.ThermalConductance UA_cooler=65 + "Thermal conductance of cooler at nominal flow, used to compute heat capacity"; + parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_heater=0.1 + "Nominal mass flow rate on water side of heater"; + parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_heater=0.1 + "Nominal mass flow rate on air side of heater"; + parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_cooler=0.1 + "Nominal mass flow rate on water side of cooler"; + parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_cooler=0.1 + "Nominal mass flow rate on air side of cooler"; + parameter Modelica.SIunits.Pressure dp1_nominal_heater=1000 + "Nominal pressure loss on water side of heater"; + parameter Modelica.SIunits.Pressure dp2_nominal_heater=100 + "Nominal pressure loss on air side of heater"; + parameter Modelica.SIunits.Pressure dp1_nominal_cooler=1000 + "Nominal pressure loss on water side of cooler"; + parameter Modelica.SIunits.Pressure dp2_nominal_cooler=100 + "Nominal pressure loss on air side of cooler"; + parameter Modelica.SIunits.Pressure p_default=101300 + "Default static pressure at outlet"; + + annotation (Documentation(info=" +

Overview

+

This is the base definition is zone records used in AixLib.Building.LowOrder.ThermalZone. All necessary parameters are defined here. Most values should be overwritten for a specific building, some are default values that might be appropriate in most cases. However, fell free to overwrite them in your own records.

+

Level of Development

+

\"stars:

+

Concept

+

Remark: The design heating power Q_N of the building is the sum of net design power according to transmission and ventilation losses at a given outdoor temperature and an additional re-heating power for early morning heat up after night set-back. Net design power can be simulated with constant boundary conditions (e. g.: no internal or external gains, Touside=-12 degC, ACH=0.5). The additional re-heating power is computed by a factor [f_RH]=W/m2 and the heated zone floor area.

+

The factor f_RH in W/m2 can be chosen form the following table:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

1 K

2 K

3 K

re-heat time

light

medium

heavy

1 h

11

22

45

2 h

6

11

22

3 h

4

9

16

4 h

2

7

13

+

References

+

Base data definition for record to be used in model AixLib.Building.LowOrder.ThermalZone

+ ", + revisions=" +
    +
  • June, 2015 by Moitz Lauster: +
    Added new parameters to use further calculation cores.
  • +
  • February 4, 2014 by Ole Odendahl:
    Added new parameters for the setup of the ACH. It is now possible to assign different values to the ACH for each zone based on this record.
  • +
  • January 27, 2014 by Ole Odendahl:
    Added new parameter withAHU to choose whether the zone is connected to a central air handling unit. Default false
  • +
  • March, 2012  by Peter Matthes:
    Implemented
  • +
  • November, 2012  by Moritz Lauster:
    Restored links
  • +
+")); + +end FVUBaseRecord; diff --git a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVURecord.mo b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVURecord.mo new file mode 100644 index 0000000000..540a248954 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVURecord.mo @@ -0,0 +1,62 @@ +within AixLib.Airflow.FacadeVentilationUnit.BaseClasses; +record FVURecord + extends Modelica.Icons.Record; + extends FVUBaseRecord; + annotation(Documentation(info = " +

Overview

+

This is the base definition is zone records used in AixLib.Building.LowOrder.ThermalZone. All necessary parameters are defined here. Most values should be overwritten for a specific building, some are default values that might be appropriate in most cases. However, fell free to overwrite them in your own records.

+

Level of Development

+

\"stars:

+

Concept

+

Remark: The design heating power Q_N of the building is the sum of net design power according to transmission and ventilation losses at a given outdoor temperature and an additional re-heating power for early morning heat up after night set-back. Net design power can be simulated with constant boundary conditions (e. g.: no internal or external gains, Touside=-12 degC, ACH=0.5). The additional re-heating power is computed by a factor [f_RH]=W/m2 and the heated zone floor area.

+

The factor f_RH in W/m2 can be chosen form the following table:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

1 K

2 K

3 K

re-heat time

light

medium

heavy

1 h

11

22

45

2 h

6

11

22

3 h

4

9

16

4 h

2

7

13

+

References

+

Base data definition for record to be used in model AixLib.Building.LowOrder.ThermalZone

+ ", revisions=" +
    +
  • June, 2015 by Moitz Lauster: +
    Added new parameters to use further calculation cores.
  • +
  • February 4, 2014 by Ole Odendahl:
    Added new parameters for the setup of the ACH. It is now possible to assign different values to the ACH for each zone based on this record.
  • +
  • January 27, 2014 by Ole Odendahl:
    Added new parameter withAHU to choose whether the zone is connected to a central air handling unit. Default false
  • +
  • March, 2012  by Peter Matthes:
    Implemented
  • +
  • November, 2012  by Moritz Lauster:
    Restored links
  • +
+")); +end FVURecord; diff --git a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/SetPower.mo b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/SetPower.mo new file mode 100644 index 0000000000..a788fa5e61 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/SetPower.mo @@ -0,0 +1,117 @@ +within AixLib.Airflow.FacadeVentilationUnit.BaseClasses; +model SetPower + "This model defines a specific massflow rate based on the input power share" + + extends Modelica.Fluid.Interfaces.PartialTwoPort; + + parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.05 + "Nominal mass flow rate of fan"; + parameter Medium.AbsolutePressure p_start=Medium.p_default + "Start value of pressure"; + parameter Real noUnits=1 "Number of identical FVU units"; + parameter Modelica.SIunits.PressureDifference dp_nominal=500 + "Initial pressure difference"; + parameter Medium.Temperature T_start=Medium.T_default + "Start value of temperature"; + + Modelica.Blocks.Tables.CombiTable1D volumeFlow(table=[0,1; 10,25; 20,40; + 30,60; 40,90; 50,100; 60,140; 70,175; 80,200; 90,225; 100,260]) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-56}))); + Modelica.Blocks.Interfaces.RealInput powerShare( + min=0, + max=100, + nominal=60) "power share (percentage) for fan" + annotation (Placement(transformation( + origin={0,-100}, + extent={{-20,-20},{20,20}}, + rotation=90))); + + AixLib.Fluid.Movers.FlowControlled_m_flow fan( redeclare + package Medium = Medium, + addPowerToMedium=false, + m_flow_nominal=m_flow_nominal, + T_start=T_start, + m_flow(start=m_flow_nominal), + dp(start=dp_nominal), + dp_nominal=dp_nominal, + p_start=p_start, + riseTime=120, + nominalValuesDefineDefaultPressureCurve=true) + annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); + Modelica.Blocks.Math.Gain gain(k=1.2/3600*noUnits) + annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=90, + origin={0,-28}))); +equation + + connect(port_a, fan.port_a) + annotation (Line(points={{-100,0},{-56,0},{-10,0}}, color={0,127,255})); + connect(fan.port_b, port_b) + annotation (Line(points={{10,0},{56,0},{100,0}}, color={0,127,255})); + connect(powerShare, volumeFlow.u[1]) annotation (Line(points={{0,-100},{0, + -80},{-6.66134e-016,-80},{-6.66134e-016,-68}}, + color={0,0,127})); + connect(gain.u, volumeFlow.y[1]) annotation (Line(points={{-4.44089e-016, + -35.2},{-4.44089e-016,-46},{8.88178e-016,-46},{8.88178e-016,-45}}, + color={0,0,127})); + connect(gain.y, fan.m_flow_in) annotation (Line(points={{4.44089e-016, + -21.4},{4.44089e-016,-24},{-0.2,-24},{-0.2,-12}}, + color={0,0,127})); + annotation (choicesAllMatching=true, + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}})), + Icon(graphics={ + Ellipse( + extent={{-4,68},{4,0}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-4,0},{4,-68}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{0,4},{30,-4}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-30,4},{0,-4}}, + lineColor={0,0,0}, + fillColor={135,135,135}, + fillPattern=FillPattern.Solid), + Ellipse(extent={{-30,68},{30,-68}}, lineColor={0,0,0}), + Line( + points={{8,54},{58,54}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{8,-44},{60,-44}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{-12,-20},{76,-20}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{0,8},{82,8}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled}), + Line( + points={{6,32},{76,32}}, + color={170,213,255}, + arrow={Arrow.None,Arrow.Filled})}), + Documentation(info=" +

Thsi model sets the mass flow rate of the air flow through a facade ventilation unit based on the input value, which is the power share set point of the fan.

+", revisions=" +
    +
  • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
    Input changed from revolving speed to power.
  • +
  • August 20, 2008  by Peter Matthes:
    Implemented.
  • +
+")); +end SetPower; diff --git a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.mo b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.mo new file mode 100644 index 0000000000..0ff2004bd2 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.mo @@ -0,0 +1,4 @@ +within AixLib.Airflow.FacadeVentilationUnit; +package BaseClasses + extends Modelica.Icons.BasesPackage; +end BaseClasses; diff --git a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.order b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.order new file mode 100644 index 0000000000..7235c371c7 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.order @@ -0,0 +1,3 @@ +SetPower +FVUBaseRecord +FVURecord diff --git a/AixLib/Airflow/FacadeVentilationUnit/Example.mo b/AixLib/Airflow/FacadeVentilationUnit/Example.mo new file mode 100644 index 0000000000..031a03e6ae --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/Example.mo @@ -0,0 +1,149 @@ +within AixLib.Airflow.FacadeVentilationUnit; +model Example + import AixLib; + extends Modelica.Icons.Example; + + package Medium1 = AixLib.Media.Air; + package Medium2 = AixLib.Media.Water; + + AixLib.HVAC.FacadeVentilationUnit.FVUController + FVUController + annotation (Placement(transformation(extent={{-46,-30},{-6,10}}))); + Modelica.Blocks.Sources.Constant roomTemperature(k=273.15 + 20) + annotation (Placement(transformation(extent={{-94,48},{-74,68}}))); + Modelica.Blocks.Sources.Constant roomSetTemperature(k=273.15 + 22) + annotation (Placement(transformation(extent={{-94,-28},{-74,-8}}))); + Modelica.Blocks.Sources.Constant co2Concentration(k=1000) + annotation (Placement(transformation(extent={{-94,-72},{-74,-52}}))); + AixLib.HVAC.FacadeVentilationUnit.FacadeVentilationUnit + FVU(redeclare package Air = + Medium1, redeclare package Water = Medium2) + annotation (Placement(transformation(extent={{70,-56},{106,-36}}))); + AixLib.Fluid.Sources.Boundary_pT ambient_out( + nPorts=1, + redeclare package Medium = Medium1, + use_T_in=true, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation(extent={{6,-84},{26,-64}}))); + AixLib.Fluid.Sources.Boundary_pT ambient_in( + nPorts=1, + redeclare package Medium = Medium1, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation(extent={{4,-53},{24,-33}}))); + AixLib.Fluid.Sources.Boundary_pT heating_sink( + redeclare package Medium = Medium2, + nPorts=1, + p=100000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={26,30}))); + AixLib.Fluid.Sources.Boundary_pT cooling_sink( + redeclare package Medium = Medium2, + nPorts=1, + p=100000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={102,32}))); + AixLib.Fluid.Sources.Boundary_pT cooling_source( + redeclare package Medium = Medium2, + use_T_in=true, + nPorts=1, + p=140000) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={126,31}))); + AixLib.Fluid.Sources.Boundary_pT heating_source( + redeclare package Medium = Medium2, + use_T_in=true, + nPorts=1, + p=140000) annotation (Placement(transformation( + extent={{-9,-10},{9,10}}, + rotation=270, + origin={54,31}))); + AixLib.Fluid.Sources.Boundary_pT room_in( + redeclare package Medium = Medium1, + use_T_in=false, + nPorts=1, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={170,-27}))); + AixLib.Fluid.Sources.Boundary_pT room_out( + nPorts=1, + redeclare package Medium = Medium1, + use_T_in=true, + p(displayUnit="Pa") = 101300) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={168,-66}))); + Modelica.Blocks.Sources.Constant roomTemperature1(k=273.15 + 30) + annotation (Placement(transformation(extent={{24,74},{44,94}}))); + Modelica.Blocks.Sources.Constant roomTemperature2(k=273.15 + 17) + annotation (Placement(transformation(extent={{84,74},{104,94}}))); + Modelica.Blocks.Sources.Sine outdoorTemperature(amplitude=5, freqHz=1/86400, + offset=273.15 + 10) + annotation (Placement(transformation(extent={{-94,14},{-74,34}}))); + AixLib.Fluid.Sensors.TemperatureTwoPort + supplyAirTemperature(redeclare package + Medium = Medium1, + m_flow_nominal=0.1) + annotation (Placement(transformation(extent={{120,-54},{140,-34}}))); +equation + connect(roomTemperature.y, FVUController.roomTemperature) annotation (Line( + points={{-73,58},{-54,58},{-54,8},{-46,8}}, color={0,0,127})); + connect(roomSetTemperature.y, FVUController.roomSetTemperature) annotation ( + Line(points={{-73,-18},{-46,-18},{-46,-16}}, color={0,0,127})); + connect(co2Concentration.y, FVUController.co2Concentration) annotation (Line( + points={{-73,-62},{-56,-62},{-56,-28},{-46,-28}}, color={0,0,127})); + connect(FVU.ExhaustAir,room_out. ports[1]) annotation (Line( + points={{106.2,-52.8},{148,-52.8},{148,-66},{158,-66}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(heating_sink.ports[1],FVU. Heater_Return) annotation (Line(points={{26,20}, + {26,-6},{95.2,-6},{95.2,-36}}, color={0,127,255})); + connect(cooling_source.ports[1],FVU. Cooler_Flow) annotation (Line(points={{126,21}, + {126,-26},{105.2,-26},{105.2,-36}}, color={0,127,255})); + connect(roomTemperature1.y, heating_source.T_in) + annotation (Line(points={{45,84},{58,84},{58,41.8}}, color={0,0,127})); + connect(roomTemperature2.y, cooling_source.T_in) annotation (Line(points={{105,84}, + {105,84},{130,84},{130,43}}, color={0,0,127})); + connect(roomTemperature.y, room_out.T_in) annotation (Line(points={{-73,58},{-73, + 58},{198,58},{198,-70},{180,-70}}, color={0,0,127})); + connect(FVU.Cooler_Return, cooling_sink.ports[1]) + annotation (Line(points={{102.2,-36},{102,-36},{102,22}}, + color={0,127,255})); + connect(heating_source.ports[1], FVU.Heater_Flow) annotation (Line(points={{54,22}, + {54,22},{54,10},{98.2,10},{98.2,-36}}, color={0,127,255})); + connect(ambient_in.ports[1], FVU.OutgoingExhaustAir) annotation (Line(points={{24,-43}, + {42,-43},{42,-43.4},{70,-43.4}}, color={0,127,255})); + connect(ambient_out.ports[1], FVU.FreshAir) annotation (Line(points={{26,-74}, + {26,-70},{42,-70},{42,-52.8},{70.2,-52.8}}, color={0,127,255})); + connect(FVUController.coolingValveOpening, FVU.coolingValveOpening) + annotation (Line(points={{-6,8},{44,8},{107.2,8},{107.2,-36}}, color={0,0,127})); + connect(FVUController.heatingValveOpening, FVU.heatingValveOpening) + annotation (Line(points={{-6,2},{40,2},{100.2,2},{100.2,-36}}, color={0,0,127})); + connect(FVUController.fanExhaustAirPower, FVU.fanExhaustAirPower) annotation ( + Line(points={{-6,-4},{26,-4},{71.3,-4},{71.3,-36.3}}, color={0,0,127})); + connect(FVUController.fanSupplyAirPower, FVU.fanSupplyAirPower) annotation ( + Line(points={{-6,-10},{91.4,-10},{91.4,-36.4}}, color={0,0,127})); + connect(FVUController.circulationdamperOpening, FVU.damperCircularAirOpening) + annotation (Line(points={{-6,-16},{86.3,-16},{86.3,-36.3}}, color={0,0,127})); + connect(FVUController.HRCDamperOpening, FVU.HRCDamperOpening) annotation ( + Line(points={{-6,-22},{18,-22},{76.3,-22},{76.3,-36.3}}, color={0,0,127})); + connect(FVUController.freshAirDamperOpening, FVU.damperFreshAirOpening) + annotation (Line(points={{-6,-28},{81,-28},{81,-36}}, color={0,0,127})); + connect(outdoorTemperature.y, FVUController.outdoorTemperature) annotation ( + Line(points={{-73,24},{-62,24},{-62,-4},{-46,-4}}, color={0,0,127})); + connect(outdoorTemperature.y, ambient_out.T_in) annotation (Line(points={{-73, + 24},{-62,24},{-62,-70},{4,-70}}, color={0,0,127})); + connect(FVU.SupplyAir, supplyAirTemperature.port_a) annotation (Line(points={ + {106.2,-43.4},{106.2,-44},{120,-44}}, color={0,127,255})); + connect(supplyAirTemperature.port_b, room_in.ports[1]) annotation (Line( + points={{140,-44},{148,-44},{148,-27},{160,-27}}, color={0,127,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}})), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{200,100}})), + experiment(StopTime=10000)); +end Example; diff --git a/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo b/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo new file mode 100644 index 0000000000..3f9fd6ccab --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo @@ -0,0 +1,359 @@ +within AixLib.Airflow.FacadeVentilationUnit; +model FVUController + + parameter Real minimumSupTemp = 273.15+17 "Minimum supply air temperature"; + + parameter Real co2SetConcentration = 600 "Set point for CO2 concentration"; + + parameter Real maxSupFanPower = 60 "Maximum supply air fan power"; + + parameter Real maxExFanPower = 60 "Maximum exhaust air fan power"; + + parameter Real fullyOpen = 100 + "Percentage value representing fuly opened flap"; + + parameter Real deltaTemp = 100 + "Added to the set temperature in cooling mode"; + + Modelica.Blocks.Interfaces.RealInput roomTemperature + annotation (Placement(transformation(extent={{-120,70},{-80,110}}))); + Modelica.Blocks.Interfaces.RealInput outdoorTemperature + annotation (Placement(transformation(extent={{-120,10},{-80,50}}))); + Modelica.Blocks.Interfaces.RealInput co2Concentration + annotation (Placement(transformation(extent={{-120,-110},{-80,-70}}))); + Modelica.Blocks.Interfaces.RealInput roomSetTemperature + annotation (Placement(transformation(extent={{-120,-50},{-80,-10}}))); + Modelica.Blocks.Logical.OnOffController roomToBeCooled(bandwidth=2) + annotation (Placement(transformation(extent={{-60,80},{-40,100}}))); + Modelica.Blocks.Logical.OnOffController roomToBeHeated(bandwidth=2) + annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); + Modelica.Blocks.Logical.OnOffController roomToBeVentilated(bandwidth=200) + annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); + Modelica.Blocks.Logical.OnOffController freeCoolingPossible(bandwidth=2) + annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); + Modelica.Blocks.Logical.OnOffController coldRecoveryPossible(bandwidth=2) + annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + Modelica.Blocks.Logical.OnOffController heatRecoveryPossible(bandwidth=2) + annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); + Modelica.Blocks.Sources.Constant co2SeetConcentrationSource(k= + co2SetConcentration) annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={-46,6}))); + Modelica.Blocks.Math.Add add(k1=-1) + annotation (Placement(transformation(extent={{-62,-52},{-50,-40}}))); + Modelica.Blocks.Math.Add add1(k1=-1) + annotation (Placement(transformation(extent={{-64,-102},{-52,-90}}))); + Modelica.Blocks.Sources.Constant setDeviationFreeCooling(k=-4) + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={-54,-24}))); + Modelica.Blocks.Sources.Constant setDeviationRecovery(k=0) annotation ( + Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={-62,-72}))); + Modelica.Blocks.Logical.Switch useCoolingValve + annotation (Placement(transformation(extent={{62,80},{74,92}}))); + Modelica.Blocks.Logical.And and1 + annotation (Placement(transformation(extent={{0,80},{14,94}}))); + Modelica.Blocks.Logical.And and2 + annotation (Placement(transformation(extent={{0,44},{14,58}}))); + Modelica.Blocks.Logical.Or climatizationNeeded + annotation (Placement(transformation(extent={{0,6},{14,20}}))); + Modelica.Blocks.Logical.And and3 + annotation (Placement(transformation(extent={{0,-34},{14,-20}}))); + Modelica.Blocks.Logical.Switch useHeatingValve + annotation (Placement(transformation(extent={{62,48},{74,60}}))); + Modelica.Blocks.Sources.Constant one(k=1) annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={8,70}))); + Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=0, + origin={6,34}))); + Modelica.Blocks.Logical.Or useExFan + annotation (Placement(transformation(extent={{60,0},{74,14}}))); + Modelica.Blocks.Logical.Switch switch3 + annotation (Placement(transformation(extent={{86,1},{98,13}}))); + Modelica.Blocks.Sources.Constant exhaustFan(k=maxExFanPower) + annotation (Placement(transformation(extent={{40,32},{52,44}}))); + Modelica.Blocks.Logical.Switch switch4 + annotation (Placement(transformation(extent={{114,-6},{126,6}}))); + Modelica.Blocks.Sources.Constant twoHours(k=2*3600) + annotation (Placement(transformation(extent={{100,86},{112,98}}))); + Modelica.Blocks.Logical.Timer timer + annotation (Placement(transformation(extent={{134,46},{148,60}}))); + Modelica.Blocks.Logical.Greater timePassed + annotation (Placement(transformation(extent={{162,52},{174,66}}))); + Modelica.Blocks.Logical.Not not1 + annotation (Placement(transformation(extent={{86,48},{96,58}}))); + Modelica.Blocks.Sources.Constant twentyMinutes(k=20*60) + annotation (Placement(transformation(extent={{100,66},{112,78}}))); + Modelica.Blocks.Logical.Greater timePassed1 + annotation (Placement(transformation(extent={{162,32},{174,46}}))); + Modelica.Blocks.Logical.Timer timer1 + annotation (Placement(transformation(extent={{134,26},{148,40}}))); + Modelica.Blocks.Logical.RSFlipFlop rSFlipFlop + annotation (Placement(transformation(extent={{105,40},{121,56}}))); + Modelica.Blocks.Interfaces.RealOutput fanExhaustAirPower + annotation (Placement(transformation(extent={{210,20},{230,40}}))); + Modelica.Blocks.Logical.Switch switch5 + annotation (Placement(transformation(extent={{28,-32},{40,-20}}))); + Modelica.Blocks.Interfaces.RealOutput coolingValveOpening + annotation (Placement(transformation(extent={{210,80},{230,100}}))); + Modelica.Blocks.Interfaces.RealOutput heatingValveOpening + annotation (Placement(transformation(extent={{210,50},{230,70}}))); + Modelica.Blocks.Logical.Switch switch1 + annotation (Placement(transformation(extent={{160,-33},{172,-21}}))); + Modelica.Blocks.Logical.Switch switch2 + annotation (Placement(transformation(extent={{116,-38},{128,-26}}))); + Modelica.Blocks.Sources.Constant supplyFan(k=maxSupFanPower) + annotation (Placement(transformation(extent={{84,-26},{96,-14}}))); + Modelica.Blocks.Interfaces.RealOutput fanSupplyAirPower + annotation (Placement(transformation(extent={{210,-10},{230,10}}))); + Modelica.Blocks.Logical.Greater PexaLargerPsupa + annotation (Placement(transformation(extent={{138,-16},{150,-2}}))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression(y=if + fanExhaustAirPower > fanSupplyAirPower + 0.1 or fanExhaustAirPower < + fanSupplyAirPower - 0.1 then false else true) + annotation (Placement(transformation(extent={{120,-70},{140,-50}}))); + Modelica.Blocks.Logical.Switch switch6 + annotation (Placement(transformation(extent={{160,-66},{172,-54}}))); + Modelica.Blocks.Interfaces.RealOutput circulationdamperOpening + annotation (Placement(transformation(extent={{210,-40},{230,-20}}))); + Modelica.Blocks.Logical.Or or3 + annotation (Placement(transformation(extent={{28,-50},{42,-36}}))); + Modelica.Blocks.Logical.Switch useHRC + annotation (Placement(transformation(extent={{62,-49},{74,-37}}))); + Modelica.Blocks.Interfaces.RealOutput HRCDamperOpening + annotation (Placement(transformation(extent={{210,-70},{230,-50}}))); + Modelica.Blocks.Logical.Pre pre1 annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={164,22}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=5) + annotation (Placement(transformation(extent={{40,-86},{52,-74}}))); + Modelica.Blocks.Logical.Switch switch7 + annotation (Placement(transformation(extent={{64,-86},{76,-74}}))); + Modelica.Blocks.Interfaces.RealOutput freshAirDamperOpening + annotation (Placement(transformation(extent={{210,-100},{230,-80}}))); + Modelica.Blocks.Sources.Constant delta(k=deltaTemp) annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={-86,54}))); + Modelica.Blocks.Math.Add add2 + annotation (Placement(transformation(extent={{-92,64},{-80,76}}))); +equation + connect(outdoorTemperature, add.u1) annotation (Line(points={{-100,30},{ + -78,30},{-78,-42.4},{-63.2,-42.4}}, color={0,0,127})); + connect(roomTemperature, add.u2) annotation (Line(points={{-100,90},{-74, + 90},{-74,-40},{-68,-40},{-66,-40},{-66,-49.6},{-63.2,-49.6}}, + color={0,0,127})); + connect(outdoorTemperature, add1.u2) annotation (Line(points={{-100,30},{ + -88,30},{-78,30},{-78,-99.6},{-65.2,-99.6}}, color={0,0,127})); + connect(roomTemperature, add1.u1) annotation (Line(points={{-100,90},{-88, + 90},{-74,90},{-74,-92.4},{-65.2,-92.4}}, color={0,0,127})); + connect(add1.y, heatRecoveryPossible.u) + annotation (Line(points={{-51.4,-96},{-42,-96}}, color={0,0,127})); + connect(add.y, coldRecoveryPossible.u) annotation (Line(points={{-49.4, + -46},{-48,-46},{-48,-66},{-42,-66}}, color={0,0,127})); + connect(setDeviationFreeCooling.y, freeCoolingPossible.reference) + annotation (Line(points={{-47.4,-24},{-46,-24},{-42,-24}}, color={0,0, + 127})); + connect(setDeviationRecovery.y, coldRecoveryPossible.reference) + annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-54},{-42,-54}}, + color={0,0,127})); + connect(setDeviationRecovery.y, heatRecoveryPossible.reference) + annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-84},{-42,-84}}, + color={0,0,127})); + connect(roomToBeCooled.y, and1.u1) annotation (Line(points={{-39,90},{-28, + 90},{-28,87},{-1.4,87}}, color={255,0,255})); + connect(coldRecoveryPossible.y, and1.u2) annotation (Line(points={{-19, + -60},{-6,-60},{-6,81.4},{-1.4,81.4}}, color={255,0,255})); + connect(roomToBeCooled.y, useCoolingValve.u2) annotation (Line(points={{ + -39,90},{-28,90},{-28,100},{22,100},{22,86},{60.8,86}}, color={ + 255,0,255})); + connect(roomToBeCooled.y, and2.u1) annotation (Line(points={{-39,90},{-28, + 90},{-28,51},{-1.4,51}}, color={255,0,255})); + connect(freeCoolingPossible.y, and2.u2) annotation (Line(points={{-19,-30}, + {-12,-30},{-12,45.4},{-1.4,45.4}}, color={255,0,255})); + connect(roomToBeCooled.y, climatizationNeeded.u1) annotation (Line(points= + {{-39,90},{-28,90},{-28,13},{-1.4,13}}, color={255,0,255})); + connect(roomToBeHeated.y, climatizationNeeded.u2) annotation (Line(points= + {{-39,60},{-30,60},{-30,7.4},{-1.4,7.4}}, color={255,0,255})); + connect(heatRecoveryPossible.y, and3.u2) annotation (Line(points={{-19, + -90},{-1.4,-90},{-1.4,-32.6}}, color={255,0,255})); + connect(roomToBeHeated.y, and3.u1) annotation (Line(points={{-39,60},{-30, + 60},{-30,8},{-10,8},{-10,-27},{-1.4,-27}}, color={255,0,255})); + connect(roomToBeHeated.y, useHeatingValve.u2) annotation (Line(points={{ + -39,60},{26,60},{26,54},{60.8,54}}, color={255,0,255})); + connect(one.y, useHeatingValve.u1) annotation (Line(points={{14.6,70},{30,70}, + {30,58.8},{60.8,58.8}}, color={0,0,127})); + connect(zero.y, useHeatingValve.u3) annotation (Line(points={{12.6,34},{ + 34,34},{34,49.2},{60.8,49.2}}, color={0,0,127})); + connect(roomToBeVentilated.y, useExFan.u2) annotation (Line(points={{-39, + 30},{-20,30},{-20,24},{18,24},{18,1.4},{58.6,1.4}}, color={255,0, + 255})); + connect(useExFan.y, switch3.u2) annotation (Line(points={{74.7,7},{79.35, + 7},{84.8,7}}, color={255,0,255})); + connect(exhaustFan.y, switch3.u1) annotation (Line(points={{52.6,38},{76, + 38},{76,11.8},{84.8,11.8}}, color={0,0,127})); + connect(zero.y, switch3.u3) annotation (Line(points={{12.6,34},{24,34},{ + 34,34},{34,-6},{80,-6},{80,2.2},{84.8,2.2}}, color={0,0,127})); + connect(useExFan.y, not1.u) annotation (Line(points={{74.7,7},{80,7},{80, + 53},{85,53}}, color={255,0,255})); + connect(timePassed.y, timer1.u) annotation (Line(points={{174.6,59},{184, + 59},{184,46},{128,46},{128,33},{132.6,33}}, color={255,0,255})); + connect(not1.y, rSFlipFlop.S) annotation (Line(points={{96.5,53},{100,53}, + {100,52.8},{103.4,52.8}}, color={255,0,255})); + connect(rSFlipFlop.Q, timer.u) annotation (Line(points={{121.8,52.8},{ + 127.4,52.8},{127.4,53},{132.6,53}}, color={255,0,255})); + connect(switch4.y, fanExhaustAirPower) annotation (Line(points={{126.6,0},{ + 192,0},{192,30},{220,30}}, color={0,0,127})); + connect(zero.y, useCoolingValve.u3) annotation (Line(points={{12.6,34},{ + 24,34},{34,34},{34,81.2},{60.8,81.2}}, color={0,0,127})); + connect(freeCoolingPossible.y, switch5.u2) annotation (Line(points={{-19, + -30},{-12,-30},{-12,-14},{22,-14},{22,-26},{26.8,-26}}, color={ + 255,0,255})); + connect(zero.y, switch5.u1) annotation (Line(points={{12.6,34},{34,34},{ + 34,-16},{24,-16},{24,-21.2},{26.8,-21.2}}, color={0,0,127})); + connect(one.y, switch5.u3) annotation (Line(points={{14.6,70},{30,70},{30,-12}, + {20,-12},{20,-30.8},{26.8,-30.8}}, color={0,0,127})); + connect(switch5.y, useCoolingValve.u1) annotation (Line(points={{40.6,-26}, + {56,-26},{56,90},{56,90.8},{60.8,90.8}}, color={0,0,127})); + connect(useCoolingValve.y, coolingValveOpening) annotation (Line(points={{74.6,86}, + {82,86},{82,104},{204,104},{204,90},{220,90}}, color={0, + 0,127})); + connect(useHeatingValve.y, heatingValveOpening) annotation (Line(points={{74.6,54}, + {78,54},{78,80},{200,80},{200,60},{220,60}}, color={0,0, + 127})); + connect(co2SeetConcentrationSource.y, roomToBeVentilated.u) annotation ( + Line(points={{-52.6,6},{-62,6},{-62,24}}, color={0,0,127})); + connect(co2Concentration, roomToBeVentilated.reference) annotation (Line( + points={{-100,-90},{-76,-90},{-76,36},{-62,36}}, color={0,0,127})); + connect(climatizationNeeded.y, switch2.u2) annotation (Line(points={{14.7, + 13},{52,13},{52,-32},{114.8,-32}}, color={255,0,255})); + connect(supplyFan.y, switch2.u1) annotation (Line(points={{96.6,-20},{110, + -20},{110,-27.2},{114.8,-27.2}}, color={0,0,127})); + connect(zero.y, switch2.u3) annotation (Line(points={{12.6,34},{34,34},{ + 34,-6},{80,-6},{80,-36.8},{114.8,-36.8}}, color={0,0,127})); + connect(switch2.y, switch1.u3) annotation (Line(points={{128.6,-32},{154, + -32},{154,-31.8},{158.8,-31.8}}, color={0,0,127})); + connect(switch1.y, fanSupplyAirPower) annotation (Line(points={{172.6,-27},{ + 200,-27},{200,0},{220,0}}, color={0,0,127})); + connect(PexaLargerPsupa.y, switch1.u2) annotation (Line(points={{150.6,-9}, + {152,-9},{152,-27},{158.8,-27}}, color={255,0,255})); + connect(switch4.y, switch1.u1) annotation (Line(points={{126.6,0},{142,0}, + {156,0},{156,-22.2},{158.8,-22.2}}, color={0,0,127})); + connect(booleanExpression.y, switch6.u2) + annotation (Line(points={{141,-60},{158.8,-60}}, color={255,0,255})); + connect(switch6.y, circulationdamperOpening) annotation (Line(points={{172.6, + -60},{196,-60},{196,-30},{220,-30}}, color={0,0,127})); + connect(and1.y, or3.u1) annotation (Line(points={{14.7,87},{20,87},{20, + -43},{26.6,-43}}, color={255,0,255})); + connect(and3.y, or3.u2) annotation (Line(points={{14.7,-27},{18,-27},{18, + -48.6},{26.6,-48.6}}, color={255,0,255})); + connect(or3.y, useHRC.u2) annotation (Line(points={{42.7,-43},{42.7,-43}, + {60.8,-43}},color={255,0,255})); + connect(one.y, useHRC.u1) annotation (Line(points={{14.6,70},{22,70},{30,70}, + {30,-12},{50,-12},{50,-38.2},{60.8,-38.2}}, color={0,0,127})); + connect(zero.y, useHRC.u3) annotation (Line(points={{12.6,34},{34,34},{34, + -6},{54,-6},{54,-47.8},{60.8,-47.8}}, color={0,0,127})); + connect(useHRC.y, HRCDamperOpening) annotation (Line(points={{74.6,-43},{74,-43}, + {74,-44},{186,-44},{186,-60},{220,-60}}, color={0,0,127})); + connect(add1.y, freeCoolingPossible.u) annotation (Line(points={{-51.4, + -96},{-46,-96},{-46,-36},{-42,-36}}, color={0,0,127})); + connect(timePassed1.y, pre1.u) annotation (Line(points={{174.6,39},{182,39},{182, + 22},{171.2,22}}, color={255,0,255})); + connect(pre1.y, rSFlipFlop.R) annotation (Line(points={{157.4,22},{100,22},{100, + 43.2},{103.4,43.2}}, color={255,0,255})); + connect(roomTemperature, roomToBeHeated.u) annotation (Line(points={{-100,90}, + {-74,90},{-74,54},{-62,54}}, color={0,0,127})); + connect(roomSetTemperature, roomToBeHeated.reference) annotation (Line( + points={{-100,-30},{-70,-30},{-70,66},{-62,66}}, color={0,0,127})); + connect(roomTemperature, roomToBeCooled.reference) annotation (Line( + points={{-100,90},{-74,90},{-74,96},{-62,96}}, color={0,0,127})); + connect(switch4.y, PexaLargerPsupa.u1) annotation (Line(points={{126.6,0}, + {130,0},{130,-9},{136.8,-9}}, color={0,0,127})); + connect(switch2.y, PexaLargerPsupa.u2) annotation (Line(points={{128.6, + -32},{130,-32},{130,-14.6},{136.8,-14.6}}, color={0,0,127})); + connect(timer.y, timePassed.u1) annotation (Line(points={{148.7,53},{154, + 53},{154,59},{160.8,59}}, color={0,0,127})); + connect(twoHours.y, timePassed.u2) annotation (Line(points={{112.6,92},{ + 134,92},{156,92},{156,53.4},{160.8,53.4}}, color={0,0,127})); + connect(timer1.y, timePassed1.u1) annotation (Line(points={{148.7,33},{ + 154,33},{154,39},{160.8,39}}, color={0,0,127})); + connect(twentyMinutes.y, timePassed1.u2) annotation (Line(points={{112.6, + 72},{132,72},{150,72},{150,33.4},{160.8,33.4}}, color={0,0,127})); + connect(exhaustFan.y, switch4.u1) annotation (Line(points={{52.6,38},{76, + 38},{76,26},{90,26},{90,18},{106,18},{106,4.8},{112.8,4.8}}, + color={0,0,127})); + connect(timePassed.y, switch4.u2) annotation (Line(points={{174.6,59},{ + 184,59},{184,12},{108,12},{108,0},{112.8,0}}, color={255,0,255})); + connect(switch3.y, switch4.u3) annotation (Line(points={{98.6,7},{104,7}, + {104,-4.8},{112.8,-4.8}}, color={0,0,127})); + connect(and2.y, useExFan.u1) annotation (Line(points={{14.7,51},{24,51},{ + 24,7},{58.6,7}}, color={255,0,255})); + connect(greaterThreshold.y,switch7. u2) annotation (Line(points={{52.6, + -80},{58,-80},{62.8,-80}}, color={255,0,255})); + connect(switch7.y, freshAirDamperOpening) annotation (Line(points={{76.6,-80}, + {180,-80},{180,-90},{220,-90}}, color={0,0,127})); + connect(switch4.y, greaterThreshold.u) annotation (Line(points={{126.6,0}, + {174,0},{182,0},{182,-68},{78,-68},{78,-60},{32,-60},{32,-80},{ + 38.8,-80}}, color={0,0,127})); + connect(one.y, switch6.u3) annotation (Line(points={{14.6,70},{22,70},{30,70}, + {30,-12},{50,-12},{50,-56},{50,-58},{80,-58},{80,-64.8},{158.8,-64.8}}, + color={0,0,127})); + connect(zero.y, switch6.u1) annotation (Line(points={{12.6,34},{34,34},{ + 34,-6},{80,-6},{80,-48},{146,-48},{146,-55.2},{158.8,-55.2}}, + color={0,0,127})); + connect(one.y, switch7.u1) annotation (Line(points={{14.6,70},{30,70},{30,-12}, + {16,-12},{16,-70},{58,-70},{58,-75.2},{62.8,-75.2}}, color={0,0,127})); + connect(zero.y, switch7.u3) annotation (Line(points={{12.6,34},{34,34},{34,-6}, + {54,-6},{54,-84.8},{62.8,-84.8}}, color={0,0,127})); + connect(delta.y, add2.u2) annotation (Line(points={{-92.6,54},{-96,54},{-96, + 66.4},{-93.2,66.4}}, color={0,0,127})); + connect(roomSetTemperature, add2.u1) annotation (Line(points={{-100,-30},{-70, + -30},{-70,80},{-96,80},{-96,73.6},{-93.2,73.6}}, color={0,0,127})); + connect(add2.y, roomToBeCooled.u) annotation (Line(points={{-79.4,70},{-72,70}, + {-66,70},{-66,84},{-62,84}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ + -100,-100},{220,100}}), graphics={Rectangle( + extent={{-100,100},{220,-100}}, + lineColor={28,108,200}, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid), Text( + extent={{-58,40},{184,-34}}, + lineColor={0,0,0}, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid, + textString="FVU Controller")}), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ + 220,100}})), + Documentation(revisions=" +
    +
  • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
    Implemented.
  • +
+", info=" +

This model is the controller of the facade ventilation unit.

+

Level of Development

+

+


It makes use of six two-point controllers that determine

+

- Heating

+

- Cooling

+

- Ventilation

+

demand and indicate if

+

- Free cooling

+

- Heat recovery

+

- Cold recovery

+

is possible.

+

As these are decentralized controllers and as the fresh air temperature is measured inside the unit, we require an additional measurement mode. This mode is activated every two hours if there is no ventilation demand and the unit consequently circulates air. In order to measure the correct fresh air temperature, the circulation damper is closed for twenty minutes. Furthermore, the exhaust air fan is switched on and the fresh air damper is opened. This allows ambient air to flow inside the unit.

+

The temperature set point in cooling mode is increased by adding the value "deltaTemp" to the set point in heating mode.

+")); +end FVUController; diff --git a/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo b/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo new file mode 100644 index 0000000000..23d1d3b499 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo @@ -0,0 +1,426 @@ +within AixLib.Airflow.FacadeVentilationUnit; +model FacadeVentilationUnit + "Facade Ventilation Unit (FVU) equipped with a recuperator" + + parameter AixLib.Airflow.FacadeVentilationUnit.BaseClasses.FVUBaseRecord FVUParam= + BaseClasses.FVUBaseRecord(); + + parameter Modelica.SIunits.ThermodynamicTemperature T_start=273.15 + 20 + "Initial temperature in unit"; + + replaceable package Water = + Modelica.Media.Water.ConstantPropertyLiquidWater + "Water Model in the system"; + replaceable package Air = AixLib.Media.Air "Air Model in the system"; + +protected + parameter Real valveRiseTime = 200; + +public + BaseClasses.SetPower fanExhaustAir( + redeclare package Medium = Air, + allowFlowReversal=true, + noUnits=FVUParam.noUnits, + m_flow_nominal=FVUParam.m2_flow_nominal_heater, + T_start=T_start, + p_start=FVUParam.p_default + res.dp_nominal) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-118,26}))); + BaseClasses.SetPower fanSupplyAir( + redeclare package Medium = Air, + noUnits=FVUParam.noUnits, + m_flow_nominal=FVUParam.m2_flow_nominal_heater, + p_start=FVUParam.p_default + FVUParam.dp2_nominal_heater + FVUParam.dp2_nominal_cooler) + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={62,26}))); + Modelica.Fluid.Sensors.Temperature T_ExhaustAir(redeclare package Medium = + Air) + annotation (Placement(transformation(extent={{174,-58},{190,-46}}))); + AixLib.Fluid.HeatExchangers.ConstantEffectiveness heater( + redeclare package Medium2 = Air, + redeclare package Medium1 = Water, + m1_flow_nominal=FVUParam.m1_flow_nominal_heater, + m2_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_heater, + dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_heater) + annotation (Placement(transformation(extent={{116,22},{96,42}}))); + Modelica.Fluid.Interfaces.FluidPort_b OutgoingExhaustAir(redeclare package + Medium = Air) + "Fluid connector b (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{-170,16},{-150,36}}))); + Modelica.Fluid.Interfaces.FluidPort_a FreshAir(redeclare package Medium = Air) + "Fluid connector a (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{-168,-78},{-148,-58}}))); + Modelica.Fluid.Interfaces.FluidPort_a ExhaustAir(redeclare package Medium = + Air) + "Fluid connector a (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{192,-78},{212,-58}}))); + Modelica.Fluid.Interfaces.FluidPort_b SupplyAir(redeclare package Medium = + Air) + "Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)" + annotation (Placement(transformation(extent={{192,16},{212,36}}))); + AixLib.Fluid.HeatExchangers.ConstantEffectiveness cooler( + redeclare package Medium2 = Air, + redeclare package Medium1 = Water, + dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_cooler, + dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_cooler, + m1_flow_nominal=FVUParam.m1_flow_nominal_cooler, + m2_flow_nominal=FVUParam.m2_flow_nominal_cooler) + annotation (Placement(transformation(extent={{182,22},{162,42}}))); + Modelica.Blocks.Interfaces.RealInput fanExhaustAirPower + "Real Input to control the revolving speed of the exhaust air fan" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={-150,100}), iconTransformation( + extent={{-17,-17},{17,17}}, + rotation=270, + origin={-147,97}))); + Modelica.Blocks.Interfaces.RealInput fanSupplyAirPower + "Real Input to control the revolving speed of the supply air fan" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={50,100}), iconTransformation( + extent={{-16,-16},{16,16}}, + rotation=270, + origin={54,96}))); + Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium + = Water) + "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{82,90},{102,110}}))); + Modelica.Fluid.Interfaces.FluidPort_a Heater_Flow(redeclare package Medium = + Water) + "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{112,90},{132,110}}))); + Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium + = Water) + "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{152,90},{172,110}}))); + Modelica.Fluid.Interfaces.FluidPort_a Cooler_Flow(redeclare package Medium = + Water) + "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{182,90},{202,110}}))); + Modelica.Fluid.Sensors.Temperature T_FreshAir(redeclare package Medium = Air) + annotation (Placement(transformation(extent={{-8,-6},{8,6}}, + rotation=180, + origin={-140,-82}))); + Modelica.Fluid.Sensors.Temperature T_OutgoingExhaustAir(redeclare package + Medium = Air) + annotation (Placement(transformation(extent={{-8,-6},{8,6}}, + rotation=0, + origin={-134,44}))); + Modelica.Fluid.Sensors.Temperature T_SupplyAir(redeclare package Medium = Air) + annotation (Placement(transformation(extent={{-8,-6},{8,6}}, + rotation=180, + origin={188,2}))); + Modelica.Fluid.Sensors.Temperature T_AfterHeatRecovery(redeclare package + Medium = Air) + annotation (Placement(transformation(extent={{-28,-10},{-12,2}}))); + + Modelica.Blocks.Interfaces.RealInput HRCDamperOpening + "Actuator position (0: closed, 1: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={-100,100}), iconTransformation( + extent={{-17,-17},{17,17}}, + rotation=270, + origin={-97,97}))); + Modelica.Blocks.Interfaces.RealInput damperCircularAirOpening + "Actuator position (0: closed, 1: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={0,100}), iconTransformation( + extent={{-17,-17},{17,17}}, + rotation=270, + origin={3,97}))); + Modelica.Blocks.Math.Add add1( + k1=-1) + annotation (Placement(transformation(extent={{-65,47},{-55,57}}))); + Modelica.Blocks.Sources.RealExpression realExpression1( + y=1) + annotation (Placement(transformation(extent={{-6.5,-8},{6.5,8}}, + rotation=180, + origin={-59.5,30}))); + Modelica.Fluid.Sensors.Temperature T_Mix(redeclare package Medium = Air) + annotation (Placement(transformation(extent={{32,42},{48,54}}))); + Modelica.Fluid.Sensors.Temperature T_AfterFan(redeclare package Medium = + Air) annotation (Placement(transformation(extent={{70,42},{86,54}}))); + inner Modelica.Fluid.System system + annotation (Placement(transformation(extent={{180,-100},{200,-80}}))); + AixLib.Fluid.FixedResistances.FixedResistanceDpM res(m_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp_nominal=100, redeclare package Medium = + Air) + annotation (Placement(transformation(extent={{-5,-5},{5,5}}, + rotation=180, + origin={-141,26}))); + Modelica.Blocks.Interfaces.RealOutput SupplyTemperature annotation (Placement( + transformation( + extent={{-14,-14},{14,14}}, + rotation=270, + origin={22,-106}), iconTransformation( + extent={{-13,-13},{13,13}}, + rotation=270, + origin={19,-105}))); + Modelica.Blocks.Interfaces.RealOutput MixTemperature annotation (Placement( + transformation( + extent={{-15,-15},{15,15}}, + rotation=270, + origin={-10,-107}), iconTransformation( + extent={{-14,-13.5},{14,13.5}}, + rotation=270, + origin={-11.5,-106}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening damperCirculationAir( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=20) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={30,-16}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening damperBypass( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=90) annotation (Placement(transformation( + extent={{-9,-9},{9,9}}, + rotation=0, + origin={-27,36}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening damperHeatRecovery( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=90) annotation (Placement(transformation( + extent={{-9,-9},{9,9}}, + rotation=0, + origin={-82,-68}))); + Modelica.Fluid.Sensors.Temperature T_beforeCooler(redeclare package Medium = + Air) annotation (Placement(transformation( + extent={{-8,-6},{8,6}}, + rotation=180, + origin={129,0}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening damperFreshAir( + m_flow_nominal=0.05, + dpValve_nominal=500, + redeclare package Medium = Air, + riseTime=20) annotation (Placement(transformation( + extent={{-9,-9},{9,9}}, + rotation=0, + origin={-112,-68}))); + AixLib.Fluid.HeatExchangers.ConstantEffectiveness recuperator(redeclare + package Medium1 = + Air, redeclare package Medium2 = + Air, + eps=0.6, + m1_flow_nominal=FVUParam.m2_flow_nominal_heater, + m2_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp1_nominal=FVUParam.dp2_nominal_heater, + dp2_nominal=FVUParam.dp2_nominal_heater) + annotation (Placement(transformation(extent={{-44,-42},{-24,-22}}))); + Modelica.Fluid.Vessels.ClosedVolume volume( + nPorts=4, + use_portsData=false, + V=0.01, redeclare package Medium = + Air, + T_start=T_start) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={18,14}))); + AixLib.Fluid.FixedResistances.FixedResistanceDpM res1( + m_flow_nominal=FVUParam.m2_flow_nominal_heater, + dp_nominal=100, redeclare package Medium = + Air) + annotation (Placement(transformation(extent={{-5,-5},{5,5}}, + rotation=180, + origin={-61,-68}))); + Modelica.Blocks.Interfaces.RealInput damperFreshAirOpening + "Actuator position (0: closed, 1: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={-50,100}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening heatingValve( + m_flow_nominal=0.05, + redeclare package Medium = Water, + dpValve_nominal=200) annotation (Placement(transformation( + extent={{-9,9},{9,-9}}, + rotation=90, + origin={122,60}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening coolingValve( + m_flow_nominal=0.05, + redeclare package Medium = Water, + dpValve_nominal=200) annotation (Placement(transformation( + extent={{-9,9},{9,-9}}, + rotation=90, + origin={192,58}))); + Modelica.Blocks.Interfaces.RealInput heatingValveOpening + "Actuator position (0: closed, 100: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={142,100}))); + Modelica.Blocks.Interfaces.RealInput coolingValveOpening + "Actuator position (0: closed, 100: open)" annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=270, + origin={212,100}))); +equation + + connect(cooler.port_b2, SupplyAir) annotation (Line( + points={{182,26},{202,26}}, + color={0,127,255}, + smooth=Smooth.None, + thickness=1)); + connect(T_ExhaustAir.port, ExhaustAir) annotation (Line( + points={{182,-58},{182,-68},{202,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_FreshAir.port, FreshAir) annotation (Line( + points={{-140,-76},{-140,-68},{-158,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_OutgoingExhaustAir.port, fanExhaustAir.port_b) annotation (Line( + points={{-134,38},{-134,26},{-128,26}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(cooler.port_b2, T_SupplyAir.port) annotation (Line( + points={{182,26},{188,26},{188,8}}, + color={0,127,255}, + smooth=Smooth.None)); + + connect(add1.u2, realExpression1.y) annotation (Line( + points={{-66,49},{-70,49},{-70,30},{-66.65,30}}, + color={0,0,127}, + smooth=Smooth.None)); + + connect(T_Mix.port, fanSupplyAir.port_a) + annotation (Line(points={{40,42},{40,26},{52,26}}, color={0,127,255})); + connect(OutgoingExhaustAir, res.port_b) + annotation (Line(points={{-160,26},{-146,26}}, color={0,127,255}, + thickness=1)); + connect(fanExhaustAir.port_b, res.port_a) annotation (Line( + points={{-128,26},{-136,26}}, + color={0,127,255}, + thickness=1)); + connect(FreshAir, FreshAir) annotation (Line( + points={{-158,-68},{-158,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_SupplyAir.T, SupplyTemperature); + connect(T_Mix.T, MixTemperature); + connect(T_AfterFan.port, fanSupplyAir.port_b) annotation (Line( + points={{78,42},{78,26},{72,26}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(add1.y, damperBypass.y) annotation (Line( + points={{-54.5,52},{-27,52},{-27,46.8}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(ExhaustAir, ExhaustAir) annotation (Line( + points={{202,-68},{202,-68}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(T_beforeCooler.port,heater. port_b2) annotation (Line( + points={{129,6},{130,6},{130,26},{116,26}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(damperFreshAir.port_b, damperHeatRecovery.port_a) + annotation (Line(points={{-103,-68},{-91,-68}}, color={0,127,255})); + connect(FreshAir, damperFreshAir.port_a) + annotation (Line(points={{-158,-68},{-121,-68}}, color={0,127,255})); + connect(damperFreshAir.port_b, damperBypass.port_a) annotation (Line(points={{ + -103,-68},{-100,-68},{-100,36},{-36,36}}, color={0,127,255})); + connect(fanSupplyAir.port_b, heater.port_a2) + annotation (Line(points={{72,26},{84,26},{96,26}}, color={0,127,255})); + connect(ExhaustAir, recuperator.port_a2) annotation (Line(points={{202,-68},{104, + -68},{-4,-68},{-4,-38},{-24,-38}}, color={0,127,255})); + connect(recuperator.port_b2, fanExhaustAir.port_a) annotation (Line(points={{-44,-38}, + {-44,-38},{-90,-38},{-90,26},{-108,26}}, color={0,127, + 255})); + connect(recuperator.port_b1, volume.ports[1]) annotation (Line(points={{-24,-26}, + {-6,-26},{-6,24},{21,24}}, color={0,127,255})); + connect(damperBypass.port_b, volume.ports[2]) annotation (Line(points={{-18,36}, + {19,36},{19,24}}, color={0,127,255})); + connect(damperCirculationAir.port_b, volume.ports[3]) annotation (Line(points={{30,-6}, + {30,-6},{30,24},{17,24}}, color={0,127,255})); + connect(fanSupplyAir.port_a, volume.ports[4]) + annotation (Line(points={{52,26},{15,26},{15,24}}, color={0,127,255})); + connect(T_AfterHeatRecovery.port, recuperator.port_b1) annotation (Line( + points={{-20,-10},{-20,-26},{-24,-26}}, color={0,127,255})); + connect(heater.port_b2,cooler. port_a2) annotation (Line(points={{116,26},{ + 140,26},{162,26}}, color={0,127,255})); + connect(damperHeatRecovery.port_b, res1.port_a) + annotation (Line(points={{-73,-68},{-56,-68}}, color={0,127,255})); + connect(res1.port_b, recuperator.port_a1) annotation (Line(points={{-66,-68}, + {-50,-68},{-50,-26},{-44,-26}}, color={0,127,255})); + connect(heater.port_a1, heatingValve.port_a) annotation (Line(points={{116, + 38},{122,38},{122,51}}, color={0,127,255})); + connect(heatingValve.port_b, Heater_Flow) annotation (Line(points={{122,69}, + {122,84.5},{122,100}}, color={0,127,255})); + connect(Cooler_Return, cooler.port_b1) annotation (Line(points={{162,100},{ + 162,38},{162,38}}, color={0,127,255})); + connect(cooler.port_a1, coolingValve.port_a) annotation (Line(points={{182,38}, + {192,38},{192,49}}, color={0,127,255})); + connect(coolingValve.port_b, Cooler_Flow) annotation (Line(points={{192,67},{ + 192,74},{192,100}}, color={0,127,255})); + connect(Heater_Return, heater.port_b1) annotation (Line(points={{92,100},{94, + 100},{94,38},{96,38}}, color={0,127,255})); + connect(HRCDamperOpening, add1.u1) + annotation (Line(points={{-100,100},{-100,55},{-66,55}}, color={0,0,127})); + connect(fanExhaustAirPower, fanExhaustAir.powerShare) annotation (Line(points= + {{-150,100},{-150,100},{-150,70},{-150,64},{-118,64},{-118,36}}, color= + {0,0,127})); + connect(damperFreshAirOpening, damperFreshAir.y) annotation (Line(points={{-50, + 100},{-50,100},{-50,76},{-50,68},{-104,68},{-104,-32},{-112,-32},{-112, + -57.2}}, color={0,0,127})); + connect(HRCDamperOpening, damperHeatRecovery.y) annotation (Line(points={{-100, + 100},{-100,55},{-82,55},{-82,-57.2}}, color={0,0,127})); + connect(fanSupplyAirPower, fanSupplyAir.powerShare) annotation (Line(points={{ + 50,100},{50,100},{50,68},{50,62},{62,62},{62,36}}, color={0,0,127})); + connect(heatingValveOpening, heatingValve.y) + annotation (Line(points={{142,100},{142,60},{132.8,60}}, color={0,0,127})); + connect(coolingValveOpening, coolingValve.y) annotation (Line(points={{212,100}, + {212,100},{212,62},{212,58},{202.8,58}}, color={0,0,127})); + connect(damperCircularAirOpening, damperCirculationAir.y) annotation (Line( + points={{0,100},{0,100},{0,18},{0,-16},{18,-16}}, color={0,0,127})); + connect(ExhaustAir, damperCirculationAir.port_a) annotation (Line(points={{202, + -68},{114,-68},{30,-68},{30,-26}}, color={0,127,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160, + -100},{200,100}})), + Icon(coordinateSystem(extent={{-160,-100},{200,100}}, preserveAspectRatio=false), + graphics={Rectangle( + extent={{-160,100},{200,-100}}, + lineColor={0,0,255}, + fillPattern=FillPattern.Solid, + fillColor={0,0,255}), Text( + extent={{-120,56},{168,-52}}, + lineColor={255,0,0}, + fillColor={0,0,255}, + fillPattern=FillPattern.Solid, + textString="FVU", + textStyle={TextStyle.Bold})}), + experiment(StopTime=86400, Interval=1), + __Dymola_experimentSetupOutput, + Documentation(info=" +

Overview

+

This is a model for Facade Ventilation Unit (FVU), which can be used for heating, cooling and ventilation purposes. It is equipped with two speed-controlled fans, a recuperator and two air-water heat exchangers.

+


Level of Development

+

+


Operation Modes of FVU:

+

The portion of fresh air flowing through the recuperator is controlled by means of a bypass damper. The portion of extract air that is recirculated and mixed with the fresh air stream is controlled by means of a circulation damper. The mixed air stream is either heated or cooled in the air-water heat exchangers. The water flow in these heat exchangers is controlled by two-way-valves.

+

Actuators

+

All actuators receive normailized signals (0-1). The supply- and exhaust air fans are table-based. An input signal in % is transformed into a mass-flow set point for a flow-controlled mover. If the exhaust air fan is not in operation, the entire air flow should be recirculated. Thus, the circulation damper should be fully opened. In that case, the fresh air flap should be closed so that no fresh air can enter the unit. The exhaust air fan has a minimum mass flow rate of 1 m³/h to make the model more stable.

+", revisions=" +
    +
  • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
    Implemented.
  • +
+")); +end FacadeVentilationUnit; diff --git a/AixLib/Airflow/FacadeVentilationUnit/package.mo b/AixLib/Airflow/FacadeVentilationUnit/package.mo new file mode 100644 index 0000000000..80dca66e12 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/package.mo @@ -0,0 +1,9 @@ +within AixLib.Airflow; +package FacadeVentilationUnit "Package for decentralized air handling unit" + + +annotation (Documentation(info=" +

This package contains models for facade ventilation unit.

+", revisions=" +")); +end FacadeVentilationUnit; diff --git a/AixLib/Airflow/FacadeVentilationUnit/package.order b/AixLib/Airflow/FacadeVentilationUnit/package.order new file mode 100644 index 0000000000..764d449774 --- /dev/null +++ b/AixLib/Airflow/FacadeVentilationUnit/package.order @@ -0,0 +1,4 @@ +BaseClasses +FacadeVentilationUnit +FVUController +Example diff --git a/AixLib/Airflow/package.order b/AixLib/Airflow/package.order index 77b471b761..0a465173f0 100644 --- a/AixLib/Airflow/package.order +++ b/AixLib/Airflow/package.order @@ -1,2 +1,3 @@ Multizone AirHandlingUnit +FacadeVentilationUnit diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo new file mode 100644 index 0000000000..4862d75d8c --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo @@ -0,0 +1,89 @@ +within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; +record FVUBaseRecord + "Base record for the facade ventilation unit model" + extends Modelica.Icons.Record; + + parameter Real noUnits=1 "Number of identical FVUs"; + parameter Modelica.SIunits.ThermalConductance UA_heater=120 + "Thermal conductance of heater at nominal flow, used to compute heat capacity"; + parameter Modelica.SIunits.ThermalConductance UA_cooler=65 + "Thermal conductance of cooler at nominal flow, used to compute heat capacity"; + parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_heater=0.1 + "Nominal mass flow rate on water side of heater"; + parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_heater=0.1 + "Nominal mass flow rate on air side of heater"; + parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_cooler=0.1 + "Nominal mass flow rate on water side of cooler"; + parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_cooler=0.1 + "Nominal mass flow rate on air side of cooler"; + parameter Modelica.SIunits.Pressure dp1_nominal_heater=1000 + "Nominal pressure loss on water side of heater"; + parameter Modelica.SIunits.Pressure dp2_nominal_heater=100 + "Nominal pressure loss on air side of heater"; + parameter Modelica.SIunits.Pressure dp1_nominal_cooler=1000 + "Nominal pressure loss on water side of cooler"; + parameter Modelica.SIunits.Pressure dp2_nominal_cooler=100 + "Nominal pressure loss on air side of cooler"; + parameter Modelica.SIunits.Pressure p_default=101300 + "Default static pressure at outlet"; + + annotation (Documentation(info=" +

Overview

+

This is the base definition is zone records used in AixLib.Building.LowOrder.ThermalZone. All necessary parameters are defined here. Most values should be overwritten for a specific building, some are default values that might be appropriate in most cases. However, fell free to overwrite them in your own records.

+

Level of Development

+

\"stars:

+

Concept

+

Remark: The design heating power Q_N of the building is the sum of net design power according to transmission and ventilation losses at a given outdoor temperature and an additional re-heating power for early morning heat up after night set-back. Net design power can be simulated with constant boundary conditions (e. g.: no internal or external gains, Touside=-12 degC, ACH=0.5). The additional re-heating power is computed by a factor [f_RH]=W/m2 and the heated zone floor area.

+

The factor f_RH in W/m2 can be chosen form the following table:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

1 K

2 K

3 K

re-heat time

light

medium

heavy

1 h

11

22

45

2 h

6

11

22

3 h

4

9

16

4 h

2

7

13

+

References

+

Base data definition for record to be used in model AixLib.Building.LowOrder.ThermalZone

+ ", + revisions=" +
    +
  • June, 2015 by Moitz Lauster: +
    Added new parameters to use further calculation cores.
  • +
  • February 4, 2014 by Ole Odendahl:
    Added new parameters for the setup of the ACH. It is now possible to assign different values to the ACH for each zone based on this record.
  • +
  • January 27, 2014 by Ole Odendahl:
    Added new parameter withAHU to choose whether the zone is connected to a central air handling unit. Default false
  • +
  • March, 2012  by Peter Matthes:
    Implemented
  • +
  • November, 2012  by Moritz Lauster:
    Restored links
  • +
+")); + +end FVUBaseRecord; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo new file mode 100644 index 0000000000..842fb7776e --- /dev/null +++ b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo @@ -0,0 +1,62 @@ +within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; +record FVURecord + extends Modelica.Icons.Record; + extends FVUBaseRecord; + annotation(Documentation(info = " +

Overview

+

This is the base definition is zone records used in AixLib.Building.LowOrder.ThermalZone. All necessary parameters are defined here. Most values should be overwritten for a specific building, some are default values that might be appropriate in most cases. However, fell free to overwrite them in your own records.

+

Level of Development

+

\"stars:

+

Concept

+

Remark: The design heating power Q_N of the building is the sum of net design power according to transmission and ventilation losses at a given outdoor temperature and an additional re-heating power for early morning heat up after night set-back. Net design power can be simulated with constant boundary conditions (e. g.: no internal or external gains, Touside=-12 degC, ACH=0.5). The additional re-heating power is computed by a factor [f_RH]=W/m2 and the heated zone floor area.

+

The factor f_RH in W/m2 can be chosen form the following table:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

1 K

2 K

3 K

re-heat time

light

medium

heavy

1 h

11

22

45

2 h

6

11

22

3 h

4

9

16

4 h

2

7

13

+

References

+

Base data definition for record to be used in model AixLib.Building.LowOrder.ThermalZone

+ ", revisions=" +
    +
  • June, 2015 by Moitz Lauster: +
    Added new parameters to use further calculation cores.
  • +
  • February 4, 2014 by Ole Odendahl:
    Added new parameters for the setup of the ACH. It is now possible to assign different values to the ACH for each zone based on this record.
  • +
  • January 27, 2014 by Ole Odendahl:
    Added new parameter withAHU to choose whether the zone is connected to a central air handling unit. Default false
  • +
  • March, 2012  by Peter Matthes:
    Implemented
  • +
  • November, 2012  by Moritz Lauster:
    Restored links
  • +
+")); +end FVURecord; From b98718ab086551dc63cee90d39b800a0c3171c68 Mon Sep 17 00:00:00 2001 From: MBaranskiEBC Date: Fri, 3 Mar 2017 15:09:36 +0100 Subject: [PATCH 008/342] * Improve FacadeVentilationUnit.mo: - Add reference to info window --- .../FacadeVentilationUnit/FacadeVentilationUnit.mo | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo b/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo index 23d1d3b499..4d00d77b84 100644 --- a/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo +++ b/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo @@ -89,16 +89,16 @@ public extent={{-16,-16},{16,16}}, rotation=270, origin={54,96}))); - Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium - = Water) + Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium = + Water) "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" annotation (Placement(transformation(extent={{82,90},{102,110}}))); Modelica.Fluid.Interfaces.FluidPort_a Heater_Flow(redeclare package Medium = Water) "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" annotation (Placement(transformation(extent={{112,90},{132,110}}))); - Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium - = Water) + Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium = + Water) "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" annotation (Placement(transformation(extent={{152,90},{172,110}}))); Modelica.Fluid.Interfaces.FluidPort_a Cooler_Flow(redeclare package Medium = @@ -418,6 +418,8 @@ equation

The portion of fresh air flowing through the recuperator is controlled by means of a bypass damper. The portion of extract air that is recirculated and mixed with the fresh air stream is controlled by means of a circulation damper. The mixed air stream is either heated or cooled in the air-water heat exchangers. The water flow in these heat exchangers is controlled by two-way-valves.

Actuators

All actuators receive normailized signals (0-1). The supply- and exhaust air fans are table-based. An input signal in % is transformed into a mass-flow set point for a flow-controlled mover. If the exhaust air fan is not in operation, the entire air flow should be recirculated. Thus, the circulation damper should be fully opened. In that case, the fresh air flap should be closed so that no fresh air can enter the unit. The exhaust air fan has a minimum mass flow rate of 1 m³/h to make the model more stable.

+


References

+

Baranski, M., Sangi, R., Fütterer, J., Müller, D. (2016). An Algorithm for Stepwise Exergy-based Model Predictive Control of Building HVAC Supply Chains. 29th international conference on Efficiency, Cost, Optimisation, Simulation and Environmental Impact of Energy Systems.

", revisions="
  • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
    Implemented.
  • From 4eb86c8fd5e07d7eb32309efae42e6bcbccdcb0a Mon Sep 17 00:00:00 2001 From: rsa Date: Thu, 16 Mar 2017 17:57:39 +0100 Subject: [PATCH 009/342] ExergyMeter package replaced. --- AixLib/Utilities/Sensors/EEnergyMeter.mo | 6 +- .../Utilities/Sensors/ExergyMeter/Example.mo | 263 ++++++++++++++++++ .../Sensors/ExergyMeter/FlowExergyMeter.mo | 127 +++++++++ .../Sensors/ExergyMeter/HeatExergyMeter.mo | 120 ++++++++ .../Sensors/ExergyMeter/StoredExergyMeter.mo | 207 ++++++++++++++ .../Utilities/Sensors/ExergyMeter/package.mo | 8 + .../Sensors/ExergyMeter/package.order | 4 + AixLib/Utilities/Sensors/TEnergyMeter.mo | 2 +- AixLib/Utilities/Sensors/package.order | 1 + 9 files changed, 734 insertions(+), 4 deletions(-) create mode 100644 AixLib/Utilities/Sensors/ExergyMeter/Example.mo create mode 100644 AixLib/Utilities/Sensors/ExergyMeter/FlowExergyMeter.mo create mode 100644 AixLib/Utilities/Sensors/ExergyMeter/HeatExergyMeter.mo create mode 100644 AixLib/Utilities/Sensors/ExergyMeter/StoredExergyMeter.mo create mode 100644 AixLib/Utilities/Sensors/ExergyMeter/package.mo create mode 100644 AixLib/Utilities/Sensors/ExergyMeter/package.order diff --git a/AixLib/Utilities/Sensors/EEnergyMeter.mo b/AixLib/Utilities/Sensors/EEnergyMeter.mo index 5c72cdf741..abd711e2ed 100644 --- a/AixLib/Utilities/Sensors/EEnergyMeter.mo +++ b/AixLib/Utilities/Sensors/EEnergyMeter.mo @@ -8,9 +8,9 @@ model EEnergyMeter equation der(q_joule) = p; q_kwh = Modelica.SIunits.Conversions.to_kWh(q_joule); - annotation( Icon(graphics={ Rectangle(extent= {{-40, 66}, {46, -62}}, lineColor= {0, 0, 255}, fillColor= {95, 95, 95}, - fillPattern= FillPattern.Solid), Rectangle(extent= {{-20, 38}, {30, 12}}, lineColor= {0, 0, 255}, fillColor= {255, 255, 255}, - fillPattern= FillPattern.Solid), Line(points= {{4, 24}, {4, 14}, {4, 16}}, color= {0, 0, 0}), Line(points= {{14, 24}, {14, 14}, {14, 16}}, color= {0, 0, 0}), Line(points= {{24, 24}, {24, 14}, {24, 16}}, color= {0, 0, 0}), Line(points= {{-6, 24}, {-6, 14}, {-6, 16}}, color= {0, 0, 0}), Line(points= {{-14, 24}, {-14, 14}, {-14, 16}}, color= {0, 0, 0}), Line(points= {{-16, 30}, {28, 30}, {26, 30}}, color= {0, 0, 0}, thickness= 0.5), Line(points= {{0, 30}, {10, 30}, {10, 30}}, color= {255, 0, 0}, thickness= 0.5), Text(extent= {{-12, 24}, {-4, 14}}, lineColor= {0, 0, 0}, textString= "1"), Text(extent= {{16, 24}, {24, 14}}, lineColor= {0, 0, 0}, textString= "1"), Text(extent= {{6, 24}, {14, 14}}, lineColor= {0, 0, 0}, textString= "1"), Text(extent= {{-4, 24}, {4, 14}}, lineColor= {0, 0, 0}, textString= "1")}), Documentation(info = " + annotation (Icon(graphics={ Rectangle(extent = {{-40, 66}, {46, -62}}, lineColor = {0, 0, 255}, fillColor = {95, 95, 95}, + fillPattern = FillPattern.Solid), Rectangle(extent = {{-20, 38}, {30, 12}}, lineColor = {0, 0, 255}, fillColor = {255, 255, 255}, + fillPattern = FillPattern.Solid), Line(points = {{4, 24}, {4, 14}, {4, 16}}, color = {0, 0, 0}), Line(points = {{14, 24}, {14, 14}, {14, 16}}, color = {0, 0, 0}), Line(points = {{24, 24}, {24, 14}, {24, 16}}, color = {0, 0, 0}), Line(points = {{-6, 24}, {-6, 14}, {-6, 16}}, color = {0, 0, 0}), Line(points = {{-14, 24}, {-14, 14}, {-14, 16}}, color = {0, 0, 0}), Line(points = {{-16, 30}, {28, 30}, {26, 30}}, color = {0, 0, 0}, thickness = 0.5), Line(points = {{0, 30}, {10, 30}, {10, 30}}, color = {255, 0, 0}, thickness = 0.5), Text(extent = {{-12, 24}, {-4, 14}}, lineColor = {0, 0, 0}, textString = "1"), Text(extent = {{16, 24}, {24, 14}}, lineColor = {0, 0, 0}, textString = "1"), Text(extent = {{6, 24}, {14, 14}}, lineColor = {0, 0, 0}, textString = "1"), Text(extent = {{-4, 24}, {4, 14}}, lineColor = {0, 0, 0}, textString = "1")}), Documentation(info = "

    Overview

    Model of an electric meter (integration over time of the electric power). diff --git a/AixLib/Utilities/Sensors/ExergyMeter/Example.mo b/AixLib/Utilities/Sensors/ExergyMeter/Example.mo new file mode 100644 index 0000000000..95f0df811b --- /dev/null +++ b/AixLib/Utilities/Sensors/ExergyMeter/Example.mo @@ -0,0 +1,263 @@ +within AixLib.Utilities.Sensors.ExergyMeter; +model Example + + extends Modelica.Icons.Example; + + parameter Modelica.SIunits.Temperature T_start=323.15 + "Start reference temperature of medium"; + + parameter Integer n = 10 "Number of layers"; + + parameter Real mass = 1000 "Mass of one layer"; + + package Medium = AixLib.Media.Water "Medium in the sensor" + annotation (choicesAllMatching=true); + + Modelica.Blocks.Sources.Sine pulse( + each amplitude=1000, + each freqHz=1/3600, + each offset=3000) + annotation (Placement(transformation(extent={{-10,-20},{10,0}}))); + StoredExergyMeter exergyStorageMeterMedium( + redeclare package Medium = Medium, + T_ref_start=T_ref.k, + T_start=T_start, + exergyContent_start=1.70904e+08, + n=n, + mass=mass) + annotation (Placement(transformation(extent={{-44,-40},{-24,-20}}))); + Modelica.Blocks.Sources.Constant T_ref(k=273.15) + annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); + Modelica.Blocks.Sources.Constant p_ref(k=101300) + annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); + Modelica.Blocks.Sources.Constant X_ref[1](k={1}) + annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); + inner Modelica.Fluid.System system + annotation (Placement(transformation(extent={{80,-100},{100,-80}}))); + HeatExergyMeter exHeatSec + annotation (Placement(transformation(extent={{74,5},{94,25}}))); + AixLib.Fluid.Movers.FlowControlled_m_flow pumpPrim( + addPowerToMedium=false, + nominalValuesDefineDefaultPressureCurve=true, + redeclare package Medium = Medium, + T_start=T_start, + m_flow_nominal=0.5, + m_flow_small=0.001) + annotation (Placement(transformation(extent={{-64,76},{-44,96}}))); + AixLib.Fluid.Storage.Storage + bufferStorageHeatingcoils(layer_HE(T_start=T_start), layer(T_start=T_start), + redeclare package Medium = Medium, + lambda_ins=0.075, + s_ins=0.2, + alpha_in=100, + alpha_out=10, + k_HE=300, + h=1.5, + V_HE=0.02, + A_HE=7, + n=10, + d=2) annotation (Placement(transformation(extent={{26,54},{-2,88}}))); + AixLib.Fluid.FixedResistances.StaticPipe pipePrim( + D=0.1, + redeclare package Medium = Medium, + m_flow_small=0.001) annotation (Placement(transformation( + extent={{-7,-7.5},{7,7.5}}, + rotation=180, + origin={-53,56.5}))); + FlowExergyMeter exPrimIn(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-36,76},{-14,96}}))); + FlowExergyMeter exPrimOut(redeclare package Medium = Medium) annotation ( + Placement(transformation( + extent={{-11,10},{11,-10}}, + rotation=180, + origin={-25,57}))); + Modelica.Fluid.Vessels.ClosedVolume heater(redeclare package Medium = Medium, + nPorts=2, + use_HeatTransfer=true, + use_portsData=false, + V(displayUnit="l") = 0.05, + T_start=T_start) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-84,70}))); + AixLib.Fluid.Movers.FlowControlled_m_flow pumpSec( + addPowerToMedium=false, + nominalValuesDefineDefaultPressureCurve=true, + redeclare package Medium = Medium, + T_start=T_start, + m_flow_nominal=0.5, + m_flow_small=0.001) + annotation (Placement(transformation(extent={{60,72},{80,92}}))); + AixLib.Fluid.FixedResistances.StaticPipe pipeSec( + D=0.1, + redeclare package Medium = Medium, + m_flow_small=0.001) annotation (Placement(transformation( + extent={{-8,-7.5},{8,7.5}}, + rotation=180, + origin={66,54.5}))); + Modelica.Fluid.Vessels.ClosedVolume consumer( + redeclare package Medium = Medium, + use_HeatTransfer=true, + V(displayUnit="l") = 0.05, + use_portsData=false, + nPorts=2, + T_start=T_start) annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=270, + origin={94,70}))); + FlowExergyMeter exSecOut(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{34,72},{56,92}}))); + FlowExergyMeter exSecIn(redeclare package Medium = Medium) annotation ( + Placement(transformation( + extent={{-11,10},{11,-10}}, + rotation=180, + origin={41,54}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow consumerHeatFlow + annotation (Placement(transformation(extent={{48,14},{68,34}}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaterHeatFlow + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-28,24}))); + Modelica.Blocks.Math.Gain gain(k=-1) + annotation (Placement(transformation(extent={{28,18},{40,30}}))); + HeatExergyMeter exHeatPrim annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=180, + origin={-68,15}))); + Modelica.Blocks.Sources.RealExpression storageTemperatures[n](y= + bufferStorageHeatingcoils.layer[:].heatPort.T) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={2,-58}))); + Modelica.Blocks.Sources.Constant pumpMassFlow(k=0.5) + annotation (Placement(transformation(extent={{-100,88},{-88,100}}))); + AixLib.Fluid.Sources.Boundary_pT expansionVesselSec( + redeclare package Medium = Medium, + nPorts=1, + p=110000) annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=270, + origin={58,94}))); + AixLib.Fluid.Sources.Boundary_pT expansionVesselPrim( + redeclare package Medium = Medium, + nPorts=1, + p=110000) annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=270, + origin={-70,94}))); +equation + connect(T_ref.y, exergyStorageMeterMedium.T_ref) annotation (Line(points={{-79,-10}, + {-72,-10},{-72,-23},{-44,-23}}, + color={0,0,127})); + connect(p_ref.y, exergyStorageMeterMedium.p_ref) annotation (Line(points={{-79,-50}, + {-76,-50},{-76,-30},{-44,-30}},color={0,0,127})); + connect(X_ref.y, exergyStorageMeterMedium.X_ref) annotation (Line(points={{-79,-90}, + {-54,-90},{-54,-37},{-44,-37}}, color={0,0,127})); + connect(p_ref.y, exergyStorageMeterMedium.p) annotation (Line(points={{-79,-50}, + {-74,-50},{-39,-50},{-39,-41}}, color={0,0,127})); + connect(X_ref.y, exergyStorageMeterMedium.X) annotation (Line(points={{-79,-90}, + {-80,-90},{-29,-90},{-29,-41}},color={0,0,127})); + + connect(pumpPrim.port_b, exPrimIn.port_a) + annotation (Line(points={{-44,86},{-40,86},{-36,86}}, color={0,127,255})); + connect(exPrimIn.port_b, bufferStorageHeatingcoils.port_a_heatGenerator) + annotation (Line(points={{-16,86},{0.24,86},{0.24,85.96}}, color={0,127,255})); + connect(bufferStorageHeatingcoils.port_b_heatGenerator, exPrimOut.port_a) + annotation (Line(points={{0.24,57.4},{-5.88,57.4},{-5.88,57},{-16,57}}, + color={0,127,255})); + connect(exPrimOut.port_b, pipePrim.port_a) annotation (Line(points={{-36,57}, + {-46,57},{-46,56.5}},color={0,127,255})); + connect(pipePrim.port_b, heater.ports[1]) annotation (Line(points={{-60,56.5}, + {-72,56.5},{-72,68},{-74,68}}, color={0,127,255})); + connect(heater.ports[2], pumpPrim.port_a) annotation (Line(points={{-74,72},{-70, + 72},{-70,86},{-64,86}}, color={0,127,255})); + connect(bufferStorageHeatingcoils.port_b_consumer, exSecOut.port_a) + annotation (Line(points={{12,88},{12,92},{28,92},{28,82},{34,82}}, color={0, + 127,255})); + connect(exSecOut.port_b, pumpSec.port_a) + annotation (Line(points={{54,82},{54,82},{60,82}}, color={0,127,255})); + connect(exSecIn.port_a, pipeSec.port_b) + annotation (Line(points={{50,54},{58,54},{58,54.5}}, color={0,127,255})); + connect(exSecIn.port_b, bufferStorageHeatingcoils.port_a_consumer) + annotation (Line(points={{30,54},{28,54},{28,46},{12,46},{12,54}}, color={0, + 127,255})); + connect(pipeSec.port_a, consumer.ports[1]) annotation (Line(points={{74,54.5}, + {80,54.5},{80,68},{84,68}}, color={0,127,255})); + connect(pumpSec.port_b, consumer.ports[2]) annotation (Line(points={{80,82},{82, + 82},{82,72},{84,72}}, color={0,127,255})); + connect(consumerHeatFlow.Q_flow, gain.y) + annotation (Line(points={{48,24},{40.6,24}}, color={0,0,127})); + connect(pulse.y, gain.u) annotation (Line(points={{11,-10},{20,-10},{20,24},{26.8, + 24}}, color={0,0,127})); + connect(pulse.y, heaterHeatFlow.Q_flow) annotation (Line(points={{11,-10},{20, + -10},{20,24},{-18,24}}, color={0,0,127})); + connect(consumerHeatFlow.port, exHeatSec.port_a) annotation (Line(points={{68, + 24},{71,24},{71,24.2},{74,24.2}}, color={191,0,0})); + connect(exHeatSec.port_b, consumer.heatPort) + annotation (Line(points={{94,24.2},{94,60}}, color={191,0,0})); + connect(heaterHeatFlow.port, exHeatPrim.port_a) annotation (Line(points={{-38, + 24},{-48,24},{-48,24.2},{-58,24.2}}, color={191,0,0})); + connect(exHeatPrim.port_b, heater.heatPort) + annotation (Line(points={{-78,24.2},{-84,24},{-84,60}}, color={191,0,0})); + connect(T_ref.y, exHeatPrim.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,15},{-58,15}}, color={0,0,127})); + connect(T_ref.y, exHeatSec.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,15},{74,15}}, color={0,0,127})); + connect(storageTemperatures.y, exergyStorageMeterMedium.T) + annotation (Line(points={{-9,-58},{-34,-58},{-34,-40}}, color={0,0,127})); + connect(T_ref.y, exPrimOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, + {-50,-10},{-50,38},{-35,38},{-35,47}}, color={0,0,127})); + connect(T_ref.y, exPrimIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,38},{-40,38},{-40,66},{-34,66},{-17,66},{-17,76}}, color={0,0,127})); + connect(T_ref.y, exSecIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, + {-50,38},{31,38},{31,44}},color={0,0,127})); + connect(T_ref.y, exSecOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, + {-50,-10},{-50,38},{56,38},{56,62},{53,62},{53,72}}, color={0,0,127})); + connect(p_ref.y, exPrimOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,-30},{-52,-30},{-52,40},{-26,40},{-26,47}}, color={0,0,127})); + connect(p_ref.y, exPrimIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,-30},{-52,-30},{-52,40},{-42,40},{-42,68},{-26,68},{-26,76}}, + color={0,0,127})); + connect(p_ref.y, exSecOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,40},{-42,40},{-42,68},{-8,68},{-8,96},{30,96},{30,64},{44,64},{44, + 72}}, color={0,0,127})); + connect(p_ref.y, exSecIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, + {-76,40},{-42,40},{-42,68},{-8,68},{-8,40},{40,40},{40,44}},color={0,0, + 127})); + connect(X_ref.y, exSecIn.X_ref) annotation (Line(points={{-79,-90},{-50,-90}, + {44,-90},{44,34},{49,34},{49,44}},color={0,0,127})); + connect(X_ref.y, exSecOut.X_ref) annotation (Line(points={{-79,-90},{-18,-90}, + {44,-90},{44,34},{54,34},{54,62},{35,62},{35,72}}, color={0,0,127})); + connect(X_ref.y, exPrimOut.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, + {-54,42},{-17,42},{-17,47}}, color={0,0,127})); + connect(X_ref.y, exPrimIn.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, + {-54,44},{-35,44},{-35,76}}, color={0,0,127})); + connect(pumpMassFlow.y, pumpPrim.m_flow_in) annotation (Line(points={{-87.4, + 94},{-76,94},{-76,100},{-54.2,100},{-54.2,98}}, + color={0,0,127})); + connect(pumpMassFlow.y, pumpSec.m_flow_in) annotation (Line(points={{-87.4,94}, + {-76,94},{-76,100},{69.8,100},{69.8,94}}, color={0,0,127})); + connect(expansionVesselSec.ports[1], pumpSec.port_a) annotation (Line(points= + {{58,90},{58,82},{58,82},{58,82},{60,82},{60,82}}, color={0,127,255})); + connect(expansionVesselPrim.ports[1], pumpPrim.port_a) + annotation (Line(points={{-70,90},{-70,86},{-64,86}}, color={0,127,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment(StopTime=1000, Interval=10), + __Dymola_experimentSetupOutput, + __Dymola_experimentFlags( + Advanced(GenerateVariableDependencies=false, OutputModelicaCode=false), + Evaluate=false, + OutputCPUtime=true, + OutputFlatModelica=false), + Documentation(info=" +

    This model shows the usage of all three ExergyMeters.

    +", revisions=" +
      +
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • +
    +")); +end Example; diff --git a/AixLib/Utilities/Sensors/ExergyMeter/FlowExergyMeter.mo b/AixLib/Utilities/Sensors/ExergyMeter/FlowExergyMeter.mo new file mode 100644 index 0000000000..dcb584a4d0 --- /dev/null +++ b/AixLib/Utilities/Sensors/ExergyMeter/FlowExergyMeter.mo @@ -0,0 +1,127 @@ +within AixLib.Utilities.Sensors.ExergyMeter; +model FlowExergyMeter + + extends AixLib.Fluid.Interfaces.PartialTwoPort; + extends Modelica.Icons.RotationalSensor; + + Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) + "Reference composition" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={-90,-100}))); + Modelica.Fluid.Sources.Boundary_pT referenceEnvironment( + redeclare replaceable package Medium = Medium, + use_p_in=true, + nPorts=2, + use_T_in=true, + use_X_in=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-56}))); + Modelica.Fluid.Sensors.MassFlowRate massFlowRate(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy(redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{70,0},{50,20}}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy(redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); +public + Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", + final quantity="ThermodynamicTemperature", min=0) "Reference temperature" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={90,-100}))); + Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) + "Reference pressure" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-100}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy_ref(redeclare + package Medium = Medium) + annotation (Placement(transformation(extent={{-12,-62},{-32,-42}}))); + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy_ref(redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{18,-64},{38,-42}}))); + Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", + final unit="W") "Exergy content of the medium flow" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,110}))); + Modelica.Blocks.Math.Add enthalpyDifference(k1=-1) + annotation (Placement(transformation(extent={{-36,20},{-16,40}}))); + Modelica.Blocks.Math.Add entropyDifference(k1=-1) + annotation (Placement(transformation(extent={{-36,46},{-16,66}}))); + Modelica.Blocks.Math.Product productWithReferenceTemperature + annotation (Placement(transformation(extent={{0,40},{20,60}}))); + Modelica.Blocks.Math.Add specificExergy(k1=-1) + annotation (Placement(transformation(extent={{40,40},{60,60}}))); + Modelica.Blocks.Math.Product exergyFlowRate + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=180, + origin={50,80}))); +equation + connect(specificEnthalpy_ref.port, referenceEnvironment.ports[1]) + annotation (Line(points={{-22,-62},{-22,-66},{2,-66}}, + color={0,127,255})); + connect(referenceEnvironment.ports[2], specificEntropy_ref.port) + annotation (Line(points={{-2,-66},{28,-66},{28,-64}}, + color={0,127,255})); + connect(massFlowRate.port_b,specificEntropy. port) + annotation (Line(points={{10,0},{60,0}}, color={0,127,255})); + connect(specificEnthalpy.h_out, enthalpyDifference.u2) annotation (Line( + points={{-49,10},{-46,10},{-46,24},{-38,24}}, color={0,0,127})); + connect(specificEnthalpy_ref.h_out, enthalpyDifference.u1) annotation (Line( + points={{-33,-52},{-44,-52},{-44,-24},{-44,36},{-38,36}},color={0,0,127})); + connect(T_ref, productWithReferenceTemperature.u2) annotation (Line(points={{90,-100}, + {90,-100},{90,-34},{20,-34},{20,34},{-8,34},{-8,44},{-2,44}}, + color={0,0,127})); + connect(enthalpyDifference.y, specificExergy.u2) annotation (Line(points={{-15,30}, + {32,30},{32,44},{38,44}}, color={0,0,127})); + connect(port_a, specificEnthalpy.port) + annotation (Line(points={{-100,0},{-80,0},{-60,0}}, color={0,127,255})); + connect(specificEntropy.port, port_b) + annotation (Line(points={{60,0},{80,0},{100,0}}, color={0,127,255})); + connect(specificEntropy_ref.s, entropyDifference.u1) annotation (Line(points={{39,-53}, + {39,-53},{44,-53},{44,-27},{-86,-27},{-86,62},{-38,62}}, + color={0,0,127})); + connect(productWithReferenceTemperature.y, specificExergy.u1) + annotation (Line(points={{21,50},{22,50},{22,50},{24,50},{32,50},{32,56}, + {38,56}}, color={0,0,127})); + connect(massFlowRate.m_flow, exergyFlowRate.u2) annotation (Line(points={{0,-11}, + {0,-26},{74,-26},{74,86},{62,86}}, color={0,0,127})); + connect(exergyFlowRate.y, exergy_flow) + annotation (Line(points={{39,80},{0,80},{0,110}}, color={0,0,127})); + connect(specificEntropy.s, entropyDifference.u2) annotation (Line(points={{49,10}, + {32,10},{32,-18},{-78,-18},{-78,50},{-38,50}}, color={0,0,127})); + connect(entropyDifference.y, productWithReferenceTemperature.u1) + annotation (Line(points={{-15,56},{-2,56}}, color={0,0,127})); + connect(specificExergy.y, exergyFlowRate.u1) annotation (Line(points={{61,50}, + {68,50},{68,74},{62,74}}, color={0,0,127})); + connect(X_ref, referenceEnvironment.X_in) annotation (Line(points={{-90,-100}, + {-90,-100},{-90,-78},{-90,-38},{-4,-38},{-4,-44}}, + color={0,0,127})); + connect(p_ref, referenceEnvironment.p_in) annotation (Line(points={{0,-100},{0, + -70},{48,-70},{48,-36},{8,-36},{8,-40},{8,-44}}, + color={0,0,127})); + connect(T_ref, referenceEnvironment.T_in) annotation (Line(points={{90,-100},{ + 90,-100},{90,-86},{90,-34},{4,-34},{4,-44}}, + color={0,0,127})); + connect(specificEnthalpy.port, massFlowRate.port_a) + annotation (Line(points={{-60,0},{-36,0},{-10,0}}, color={0,127,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Documentation(info=" +

    The model calculates the exergy content of a medium flow consisting of multiple substances. The reference environment is variable. The underlying equation is

    +

    \"dE/dt=dm/dt*(h-h_ref-T_ref*(s-s_ref))\"/

    +

    with \"dE/dt\"/: exergy flow rate, \"dm/dt\"/: mass flow rate, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

    +

    The reference environment is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The sensor is ideal, i.e., it does not influence the fluid.

    +

    Level of Development

    +

    +", revisions=" +
      +
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • +
    +"), + Icon(coordinateSystem(extent={{-100,-100},{120,100}}))); +end FlowExergyMeter; diff --git a/AixLib/Utilities/Sensors/ExergyMeter/HeatExergyMeter.mo b/AixLib/Utilities/Sensors/ExergyMeter/HeatExergyMeter.mo new file mode 100644 index 0000000000..e3edd945fb --- /dev/null +++ b/AixLib/Utilities/Sensors/ExergyMeter/HeatExergyMeter.mo @@ -0,0 +1,120 @@ +within AixLib.Utilities.Sensors.ExergyMeter; +model HeatExergyMeter + + extends Modelica.Icons.RotationalSensor; + + parameter Boolean useConvectiveHeatFlow = true + "Set to 'true' in order to connect the meter to a convective heat port"; + parameter Boolean useRadiativeHeatFlow = false + "Set to 'true' in order to connect the meter to a radiative heat port"; + parameter Boolean solarRadiation = false + "Set to 'true' in order to connect the meter to a solar radiation port" annotation(Dialog(enable = if useRadiativeHeatFlow then true else false)); + parameter Modelica.SIunits.ThermodynamicTemperature sunTemperature = 6000 + "Temperature assumption for the solar radiation"; + Modelica.Blocks.Math.Add add(k2=-1) + annotation (Placement(transformation(extent={{20,-10},{40,10}}))); + Modelica.Blocks.Sources.Constant const(k=1) + annotation (Placement(transformation(extent={{-12,0},{0,12}}))); + Modelica.Blocks.Math.Division division + annotation (Placement(transformation(extent={{-20,-40},{0,-20}}))); + Modelica.Blocks.Math.Product product + annotation (Placement(transformation(extent={{60,20},{80,40}}))); + Modelica.Blocks.Nonlinear.Limiter limiter(uMax=400, uMin=1) + annotation (Placement(transformation(extent={{-66,-56},{-54,-44}}))); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{-110,82},{-90,102}}))); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{90,82},{110,102}}))); + Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{-10,82},{10,102}}))); + Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor if useConvectiveHeatFlow + annotation (Placement(transformation(extent={{-94,58},{-74,78}}))); + AixLib.HVAC.Interfaces.RadPort radPort_a if + useRadiativeHeatFlow + annotation (Placement(transformation(extent={{-110,-90},{-90,-70}}))); + AixLib.HVAC.Interfaces.RadPort radPort_b if + useRadiativeHeatFlow + annotation (Placement(transformation(extent={{90,-90},{110,-70}}))); + Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor1 if useRadiativeHeatFlow + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={0,-74}))); + Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor1 if + useRadiativeHeatFlow + annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); +public + Modelica.Blocks.Interfaces.RealInput T_ref( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature", + min=0) "Reference temperature" annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-100,0}))); + Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", + final unit="W") "Exergy content of the medium flow" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-110}))); +equation + connect(const.y, add.u1) annotation (Line( + points={{0.6,6},{18,6}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(division.y, add.u2) annotation (Line( + points={{1,-30},{6,-30},{6,-6},{18,-6}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(add.y, product.u2) annotation (Line( + points={{41,0},{52,0},{52,24},{58,24}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(limiter.y, division.u2) annotation (Line( + points={{-53.4,-50},{-40,-50},{-40,-36},{-22,-36}}, + color={0,0,127}, + smooth=Smooth.None)); + + if useConvectiveHeatFlow then + connect(temperatureSensor.T, limiter.u); + connect(heatFlowSensor.Q_flow, product.u1); + connect(port_a, heatFlowSensor.port_a); + connect(heatFlowSensor.port_b, port_b); + connect(port_a, temperatureSensor.port); + + end if; + + if useRadiativeHeatFlow then + + if solarRadiation then + limiter.u = sunTemperature; + else + connect(temperatureSensor1.T, limiter.u); + end if; + + connect(heatFlowSensor1.Q_flow, product.u1); + connect(temperatureSensor1.port, radPort_a); + connect(heatFlowSensor1.port_a, radPort_a); + connect(heatFlowSensor1.port_b, radPort_b); + end if; + + connect(T_ref, division.u1) annotation (Line(points={{-100,0},{-40,0},{-40,-24}, + {-22,-24}}, color={0,0,127})); + connect(product.y, exergy_flow) annotation (Line(points={{81,30},{86,30},{86,-92}, + {20,-92},{0,-92},{0,-110}}, color={0,0,127})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Icon(coordinateSystem( + preserveAspectRatio=false, extent={{-100,-100},{100,100}})), + Documentation(info=" +

    The model calculates the exergy flow rate of a radiaitive or convective heat flux. The reference environment (subscript \"_ref\"/) is variable. The basic equation is

    +

    \"dE/dt=dQ/dt*(1-T_ref/T)\"/

    +

    with \"dE/dt\"/: exergy flow rate, \"dQ/dt\"/: heat flow rate, \"T\"/: temperature

    +

    Level of Development

    +

    +", revisions=" +
      +
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • +
    +")); +end HeatExergyMeter; diff --git a/AixLib/Utilities/Sensors/ExergyMeter/StoredExergyMeter.mo b/AixLib/Utilities/Sensors/ExergyMeter/StoredExergyMeter.mo new file mode 100644 index 0000000000..ba3b28b139 --- /dev/null +++ b/AixLib/Utilities/Sensors/ExergyMeter/StoredExergyMeter.mo @@ -0,0 +1,207 @@ +within AixLib.Utilities.Sensors.ExergyMeter; +model StoredExergyMeter + + extends Modelica.Icons.RotationalSensor; + + replaceable package Medium = Modelica.Media.Interfaces.PartialMedium + "Medium in the sensor" annotation (choicesAllMatching=true); + + parameter Integer n=1 "Number of identical volumes"; + + parameter Modelica.SIunits.Mass mass=100 "mass of each layer"; + parameter Modelica.SIunits.Temperature T_start=323.15 + "Start reference temperature of medium" + annotation (Dialog(tab="Initialisation")); + parameter Modelica.SIunits.Temperature T_ref_start=273.15 + "Start reference temperature" annotation (Dialog(tab="Initialisation")); + parameter Modelica.SIunits.Energy exergyContent_start = 1e+05 + "Start exergy content" annotation (Dialog(tab="Initialisation")); + + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy[n](redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{70,0},{50,20}}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy[n](redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); +public + Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", + final quantity="ThermodynamicTemperature", min=0) "Reference temperature for EXERGY calculations in K. + It must be distinguished between the the reference temperature used for exergy calculations and the reference + for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" + annotation (Placement(transformation(extent={{-120,50},{-80,90}}))); + Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) + "Reference pressure" + annotation (Placement(transformation(extent={{-120,-20},{-80,20}}), + iconTransformation(extent={{-120,-20},{-80,20}}))); + Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy1[n](redeclare + package Medium = Medium) + annotation (Placement(transformation(extent={{-10,60},{-30,40}}))); + Modelica.Fluid.Sensors.SpecificEntropy specificEntropy1[n](redeclare package + Medium = Medium) + annotation (Placement(transformation(extent={{10,60},{30,40}}))); + Modelica.Blocks.Interfaces.RealOutput ExergyChangeRate(final quantity="Power", + final unit="W") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={106,-62}))); + Modelica.Fluid.Sources.Boundary_pT referenceEnvironment[n]( + redeclare package Medium = Medium, + each use_p_in=true, + each nPorts=2, + each use_T_in=true, + each use_X_in=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,80}))); + Modelica.Fluid.Sources.Boundary_pT boundary[n]( + redeclare package Medium = Medium, + each use_p_in=true, + each use_T_in=true, + each nPorts=2, + each use_X_in=true) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,0}))); +public + Modelica.Blocks.Interfaces.RealInput T[n]( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature", + min=0) "Reference temperature for EXERGY calculations in K. + It must be distinguished between the the reference temperature used for exergy calculations and the reference + for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-112}), iconTransformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-100}))); + Modelica.Blocks.Interfaces.RealInput p( + final quantity="Pressure", + final unit="Pa", + displayUnit="bar", + min=0) "Reference pressure" annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={-50,-110}))); + Modelica.Blocks.Math.Sum sum1(nin=n) + annotation (Placement(transformation(extent={{-60,-60},{-40,-40}}))); + Modelica.Blocks.Math.Gain gain(k=mass) + annotation (Placement(transformation(extent={{-26,-57},{-12,-43}}))); + Modelica.Blocks.Math.Add add[n](each k1=-1) + annotation (Placement(transformation(extent={{-46,33},{-60,47}}))); + Modelica.Blocks.Math.Add add1[n](each k1=-1) + annotation (Placement(transformation(extent={{46,33},{60,47}}))); + Modelica.Blocks.Math.Sum sum2(nin=n) + annotation (Placement(transformation(extent={{64,-42},{44,-22}}))); + Modelica.Blocks.Math.Add add2(each k1=-1) + annotation (Placement(transformation(extent={{38,-69},{52,-55}}))); + Modelica.Blocks.Continuous.Derivative derivative( + x_start=exergyContent_start, + initType=Modelica.Blocks.Types.Init.InitialState, + T=10) + annotation (Placement(transformation(extent={{64,-72},{84,-52}}))); + Modelica.Blocks.Interfaces.RealOutput exergyContent( + start=exergyContent_start, + final quantity="Energy", + final unit="J") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={106,-32}))); + Modelica.Blocks.Math.Product product + annotation (Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=270, + origin={14,-46}))); + Modelica.Blocks.Math.Gain gain1( + k=mass) + annotation (Placement(transformation(extent={{-7,-7},{7,7}}, + rotation=180, + origin={27,-32}))); + Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) + "Reference composition" + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, + rotation=0, + origin={-100,-70}))); + Modelica.Blocks.Interfaces.RealInput X[Medium.nX]( + final quantity="MassFraction", + final unit="1", + min=0, + max=1) "Reference composition" annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={50,-110}))); +equation + + for i in 1:n loop + connect(p, boundary[i].p_in) annotation (Line(points={{-50,-110},{-50,-72},{ + -8,-72},{-8,-12}}, color={0,0,127})); + connect(T_ref, referenceEnvironment[i].T_in) annotation (Line(points={{-100,70}, + {-76,70},{-76,96},{4,96},{4,92}}, color={0,0,127})); + connect(p_ref, referenceEnvironment[i].p_in) annotation (Line(points={{-100,0}, + {-78,0},{-78,98},{8,98},{8,92}}, color={0,0,127})); + connect(X, boundary[i].X_in) annotation (Line(points={{50,-110},{50,-80},{2,-80}, + {2,-20},{4,-20},{4,-12}}, color={0,0,127})); + connect(X_ref, referenceEnvironment[i].X_in) annotation (Line(points={{-100,-70}, + {-72,-70},{-72,92},{-4,92}}, color={0,0,127})); + + end for; + + connect(specificEnthalpy[:].port, boundary[:].ports[1]) annotation (Line( + points={{-60,0},{-40,0},{-20,0},{-20,20},{-4,20},{-2,20},{-2,10}}, + color={0,127,255})); + connect(specificEntropy[:].port, boundary[:].ports[2]) annotation (Line( + points={{60,0},{40,0},{20,0},{20,20},{2,20},{2,10}}, color={0,127,255})); + connect(specificEnthalpy1.h_out, add.u1) annotation (Line(points={{-31,50},{-38, + 50},{-38,44.2},{-44.6,44.2}}, color={0,0,127})); + connect(specificEnthalpy.h_out, add.u2) annotation (Line(points={{-49,10},{-40, + 10},{-40,35.8},{-44.6,35.8}}, color={0,0,127})); + connect(add.y, sum1.u) annotation (Line(points={{-60.7,40},{-60.7,40},{-74,40}, + {-74,-50},{-62,-50}},color={0,0,127})); + connect(sum1.y, gain.u) annotation (Line(points={{-39,-50},{-34,-50},{-27.4,-50}}, + color={0,0,127})); + connect(specificEntropy1.s, add1.u1) annotation (Line(points={{31,50},{36,50}, + {36,44.2},{44.6,44.2}}, color={0,0,127})); + connect(specificEntropy.s, add1.u2) annotation (Line(points={{49,10},{40,10},{ + 40,35.8},{44.6,35.8}}, color={0,0,127})); + connect(add1.y, sum2.u) annotation (Line(points={{60.7,40},{60.7,40},{84,40},{ + 84,-32},{66,-32}}, + color={0,0,127})); + connect(derivative.y, ExergyChangeRate) + annotation (Line(points={{85,-62},{106,-62}}, color={0,0,127})); + connect(specificEnthalpy1[:].port, referenceEnvironment[:].ports[1]) + annotation (Line(points={{-20,60},{-20,70},{2,70}}, color={0,127,255})); + connect(specificEntropy1[:].port, referenceEnvironment[:].ports[2]) + annotation (Line(points={{20,60},{20,70},{-2,70}},color={0,127,255})); + connect(sum2.y, gain1.u) annotation (Line(points={{43,-32},{40,-32},{35.4,-32}}, + color={0,0,127})); + connect(gain1.y, product.u1) annotation (Line(points={{19.3,-32},{14,-32},{14, + -38.8},{17.6,-38.8}}, color={0,0,127})); + connect(T_ref, product.u2) annotation (Line(points={{-100,70},{-76,70},{-76,-28}, + {10.4,-28},{10.4,-38.8}}, color={0,0,127})); + connect(derivative.u, add2.y) + annotation (Line(points={{62,-62},{52.7,-62}}, color={0,0,127})); + connect(gain.y, add2.u2) annotation (Line(points={{-11.3,-50},{4,-50},{4,-66.2}, + {36.6,-66.2}}, color={0,0,127})); + connect(product.y, add2.u1) annotation (Line(points={{14,-52.6},{14,-57.8},{36.6, + -57.8}}, color={0,0,127})); + connect(add2.y, exergyContent) annotation (Line(points={{52.7,-62},{58,-62},{58, + -44},{90,-44},{90,-32},{106,-32}}, color={0,0,127})); + connect(T, boundary.T_in) annotation (Line(points={{0,-112},{0,-112},{0, + -28},{0,-22},{-4,-22},{-4,-12}}, + color={0,0,127})); + + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Documentation(info=" +

    The model calculates the exergy content and its rate of change of a stratefied storage (i. e. with multiple layers) filled with a medium consisting of multiple substances. The reference environment is variable. The basic equation is

    +

    \"E=m*(h-h_ref-T_ref*(s-s_ref))\"/

    +

    with \"E\"/: exergy content, \"m\"/: mass, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

    +

    The reference environment (subscript \"_ref\"/) is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The rate of change of the exergy content is calculated using the approximate derivative block from MSL.

    +

    Level of Development

    +

    +", revisions=" +
      +
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • +
    +")); +end StoredExergyMeter; diff --git a/AixLib/Utilities/Sensors/ExergyMeter/package.mo b/AixLib/Utilities/Sensors/ExergyMeter/package.mo new file mode 100644 index 0000000000..e4ed7dbad7 --- /dev/null +++ b/AixLib/Utilities/Sensors/ExergyMeter/package.mo @@ -0,0 +1,8 @@ +within AixLib.Utilities.Sensors; +package ExergyMeter + + +annotation (Documentation(info=" +

    This package contains models to perform an exergy analysis.

    +")); +end ExergyMeter; diff --git a/AixLib/Utilities/Sensors/ExergyMeter/package.order b/AixLib/Utilities/Sensors/ExergyMeter/package.order new file mode 100644 index 0000000000..a70e257a03 --- /dev/null +++ b/AixLib/Utilities/Sensors/ExergyMeter/package.order @@ -0,0 +1,4 @@ +FlowExergyMeter +StoredExergyMeter +HeatExergyMeter +Example diff --git a/AixLib/Utilities/Sensors/TEnergyMeter.mo b/AixLib/Utilities/Sensors/TEnergyMeter.mo index 4bca42bdb0..70780abe95 100644 --- a/AixLib/Utilities/Sensors/TEnergyMeter.mo +++ b/AixLib/Utilities/Sensors/TEnergyMeter.mo @@ -3,7 +3,7 @@ within AixLib.Utilities.Sensors; model TEnergyMeter "measures thermal power (heat flow)" extends EEnergyMeter; - annotation( Documentation(info = " + annotation (Documentation(info = "

    Overview

    Model that meters the thermal power (heat flow)

    Level of Development

    diff --git a/AixLib/Utilities/Sensors/package.order b/AixLib/Utilities/Sensors/package.order index 944f6dae7a..5c9a184caf 100644 --- a/AixLib/Utilities/Sensors/package.order +++ b/AixLib/Utilities/Sensors/package.order @@ -1,2 +1,3 @@ EEnergyMeter TEnergyMeter +ExergyMeter From 3593fbb9082bbc8008dc31145e3bbaf23b47b2bc Mon Sep 17 00:00:00 2001 From: rsa Date: Thu, 16 Mar 2017 17:59:47 +0100 Subject: [PATCH 010/342] Address modified. --- .../FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo | 3 +-- AixLib/Airflow/FacadeVentilationUnit/Example.mo | 4 ++-- AixLib/Airflow/FacadeVentilationUnit/FVUController.mo | 3 +-- .../FacadeVentilationUnit/FacadeVentilationUnit.mo | 8 ++++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo index a6eca9fc95..388e52f2bd 100644 --- a/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo +++ b/AixLib/Airflow/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo @@ -1,6 +1,5 @@ within AixLib.Airflow.FacadeVentilationUnit.BaseClasses; -record FVUBaseRecord - "Base record for the facade ventilation unit model" +record FVUBaseRecord "Base record for the facade ventilation unit model" extends Modelica.Icons.Record; parameter Real noUnits=1 "Number of identical FVUs"; diff --git a/AixLib/Airflow/FacadeVentilationUnit/Example.mo b/AixLib/Airflow/FacadeVentilationUnit/Example.mo index 031a03e6ae..43ef52564e 100644 --- a/AixLib/Airflow/FacadeVentilationUnit/Example.mo +++ b/AixLib/Airflow/FacadeVentilationUnit/Example.mo @@ -6,7 +6,7 @@ model Example package Medium1 = AixLib.Media.Air; package Medium2 = AixLib.Media.Water; - AixLib.HVAC.FacadeVentilationUnit.FVUController + AixLib.Airflow.FacadeVentilationUnit.FVUController FVUController annotation (Placement(transformation(extent={{-46,-30},{-6,10}}))); Modelica.Blocks.Sources.Constant roomTemperature(k=273.15 + 20) @@ -15,7 +15,7 @@ model Example annotation (Placement(transformation(extent={{-94,-28},{-74,-8}}))); Modelica.Blocks.Sources.Constant co2Concentration(k=1000) annotation (Placement(transformation(extent={{-94,-72},{-74,-52}}))); - AixLib.HVAC.FacadeVentilationUnit.FacadeVentilationUnit + AixLib.Airflow.FacadeVentilationUnit.FacadeVentilationUnit FVU(redeclare package Air = Medium1, redeclare package Water = Medium2) annotation (Placement(transformation(extent={{70,-56},{106,-36}}))); diff --git a/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo b/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo index 3f9fd6ccab..08e4c03028 100644 --- a/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo +++ b/AixLib/Airflow/FacadeVentilationUnit/FVUController.mo @@ -12,8 +12,7 @@ model FVUController parameter Real fullyOpen = 100 "Percentage value representing fuly opened flap"; - parameter Real deltaTemp = 100 - "Added to the set temperature in cooling mode"; + parameter Real deltaTemp = 100 "Added to the set temperature in cooling mode"; Modelica.Blocks.Interfaces.RealInput roomTemperature annotation (Placement(transformation(extent={{-120,70},{-80,110}}))); diff --git a/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo b/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo index 4d00d77b84..7907861a65 100644 --- a/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo +++ b/AixLib/Airflow/FacadeVentilationUnit/FacadeVentilationUnit.mo @@ -89,16 +89,16 @@ public extent={{-16,-16},{16,16}}, rotation=270, origin={54,96}))); - Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium = - Water) + Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium + = Water) "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" annotation (Placement(transformation(extent={{82,90},{102,110}}))); Modelica.Fluid.Interfaces.FluidPort_a Heater_Flow(redeclare package Medium = Water) "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" annotation (Placement(transformation(extent={{112,90},{132,110}}))); - Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium = - Water) + Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium + = Water) "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" annotation (Placement(transformation(extent={{152,90},{172,110}}))); Modelica.Fluid.Interfaces.FluidPort_a Cooler_Flow(redeclare package Medium = From 8ba322ded31c4f3e508c4ac358bf5181886110b4 Mon Sep 17 00:00:00 2001 From: TobiasBlacha Date: Tue, 25 Apr 2017 12:45:59 +0200 Subject: [PATCH 011/342] #335 Pipe model, Example and required records integrated into the AixLib --- AixLib/DataBase/Pipes/Isolation/Iso0pc.mo | 24 ++ AixLib/DataBase/Pipes/Isolation/Iso100pc.mo | 23 ++ AixLib/DataBase/Pipes/Isolation/Iso50pc.mo | 23 ++ AixLib/DataBase/Pipes/Isolation/package.mo | 5 + AixLib/DataBase/Pipes/Isolation/package.order | 3 + .../Pipes/IsolationBaseDataDefinition.mo | 30 ++ .../Pipes/PE_X/DIN_16893_SDR11_d25.mo | 32 ++ .../Pipes/PE_X/DIN_16893_SDR11_d32.mo | 32 ++ .../Pipes/PE_X/DIN_16893_SDR11_d40.mo | 32 ++ .../Pipes/PE_X/DIN_16893_SDR11_d50.mo | 32 ++ AixLib/DataBase/Pipes/PE_X/package.mo | 5 + AixLib/DataBase/Pipes/PE_X/package.order | 4 + .../FixedResistances/DPEAgg_ambientLoss.mo | 339 ++++++++++++++++++ .../Examples/DPEAgg_ambientLoss.mo | 101 ++++++ 14 files changed, 685 insertions(+) create mode 100644 AixLib/DataBase/Pipes/Isolation/Iso0pc.mo create mode 100644 AixLib/DataBase/Pipes/Isolation/Iso100pc.mo create mode 100644 AixLib/DataBase/Pipes/Isolation/Iso50pc.mo create mode 100644 AixLib/DataBase/Pipes/Isolation/package.mo create mode 100644 AixLib/DataBase/Pipes/Isolation/package.order create mode 100644 AixLib/DataBase/Pipes/IsolationBaseDataDefinition.mo create mode 100644 AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d25.mo create mode 100644 AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d32.mo create mode 100644 AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d40.mo create mode 100644 AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d50.mo create mode 100644 AixLib/DataBase/Pipes/PE_X/package.mo create mode 100644 AixLib/DataBase/Pipes/PE_X/package.order create mode 100644 AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo create mode 100644 AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo diff --git a/AixLib/DataBase/Pipes/Isolation/Iso0pc.mo b/AixLib/DataBase/Pipes/Isolation/Iso0pc.mo new file mode 100644 index 0000000000..666923f45b --- /dev/null +++ b/AixLib/DataBase/Pipes/Isolation/Iso0pc.mo @@ -0,0 +1,24 @@ +within AixLib.DataBase.Pipes.Isolation; +record Iso0pc "Coating, no insulation" + extends DataBase.Pipes.IsolationBaseDataDefinition( + factor=0.04, + d=1000, + lambda=0.5, + c=1600); + // Constant chemical Values assumed + // would yield ~1mm coating for a DN25 pipe + + annotation (Documentation(info=" +

    Overview

    +

    0% isolation.

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +", + revisions=" +

      +
    • July 9, 2013  by Ole Odendahl:
      Added documentation and formatted appropriately
    • +

    +")); +end Iso0pc; diff --git a/AixLib/DataBase/Pipes/Isolation/Iso100pc.mo b/AixLib/DataBase/Pipes/Isolation/Iso100pc.mo new file mode 100644 index 0000000000..505c1ec364 --- /dev/null +++ b/AixLib/DataBase/Pipes/Isolation/Iso100pc.mo @@ -0,0 +1,23 @@ +within AixLib.DataBase.Pipes.Isolation; +record Iso100pc "100% Isolation (thickness isolation = 1 x d_o)" + extends DataBase.Pipes.IsolationBaseDataDefinition( + factor=1, + d=30, + lambda=0.04, + c=1400); + // Constant chemical Values assumed + + annotation (Documentation(info=" +

    Overview

    +

    100% isolation. Calculated according to: thickness isolation = 1 x d_o

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +", + revisions=" +

      +
    • July 9, 2013  by Ole Odendahl:
      Added documentation and formatted appropriately
    • +

    +")); +end Iso100pc; diff --git a/AixLib/DataBase/Pipes/Isolation/Iso50pc.mo b/AixLib/DataBase/Pipes/Isolation/Iso50pc.mo new file mode 100644 index 0000000000..617f5d4076 --- /dev/null +++ b/AixLib/DataBase/Pipes/Isolation/Iso50pc.mo @@ -0,0 +1,23 @@ +within AixLib.DataBase.Pipes.Isolation; +record Iso50pc "50% Isolation (thickness isolation = 0.5 x d_o)" + extends DataBase.Pipes.IsolationBaseDataDefinition( + factor=0.5, + d=30, + lambda=0.04, + c=1400); + // Constant chemical Values assumed + + annotation (Documentation(info=" +

    Overview

    +

    50% isolation. Calculated according to: thickness isolation = 0.5 x d_o

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +", + revisions=" +

      +
    • July 9, 2013  by Ole Odendahl:
      Added documentation and formatted appropriately
    • +

    +")); +end Iso50pc; diff --git a/AixLib/DataBase/Pipes/Isolation/package.mo b/AixLib/DataBase/Pipes/Isolation/package.mo new file mode 100644 index 0000000000..b332d80e32 --- /dev/null +++ b/AixLib/DataBase/Pipes/Isolation/package.mo @@ -0,0 +1,5 @@ +within AixLib.DataBase.Pipes; +package Isolation + extends Modelica.Icons.Package; + +end Isolation; diff --git a/AixLib/DataBase/Pipes/Isolation/package.order b/AixLib/DataBase/Pipes/Isolation/package.order new file mode 100644 index 0000000000..0710db8167 --- /dev/null +++ b/AixLib/DataBase/Pipes/Isolation/package.order @@ -0,0 +1,3 @@ +Iso100pc +Iso50pc +Iso0pc diff --git a/AixLib/DataBase/Pipes/IsolationBaseDataDefinition.mo b/AixLib/DataBase/Pipes/IsolationBaseDataDefinition.mo new file mode 100644 index 0000000000..97a91a57b0 --- /dev/null +++ b/AixLib/DataBase/Pipes/IsolationBaseDataDefinition.mo @@ -0,0 +1,30 @@ +within AixLib.DataBase.Pipes; +record IsolationBaseDataDefinition + "Definition of Parameter Values for isolation records" + extends Modelica.Icons.Record; + import SI = Modelica.SIunits; + + // Constant chemical Values assumed + parameter Real factor + "Isolation thickness factor (e.g. thickness_iso = 1 x d_o)"; + parameter SI.Density d "Density of pipe material"; + parameter SI.ThermalConductivity lambda + "Thermal Conductivity of pipe material"; + parameter SI.SpecificHeatCapacity c "Heat capacity of pipe material"; + + annotation (Documentation(info=" +

    Overview

    +

    +Base data definition for isolation record +

    +

    Level of Development

    +

    +

    References

    +

    Base data definition for record used with HVAC.Components.Pipes.DynamicPipeEBC1

    +", + revisions=" +

      +
    • July 9, 2013  by Ole Odendahl:
      Added documentation and formatted appropriately
    • +

    +")); +end IsolationBaseDataDefinition; diff --git a/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d25.mo b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d25.mo new file mode 100644 index 0000000000..02f37678a2 --- /dev/null +++ b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d25.mo @@ -0,0 +1,32 @@ +within AixLib.DataBase.Pipes.PE_X; +record DIN_16893_SDR11_d25 "PE-X Pipe, d_o=25mm, SDR11" +extends DataBase.Pipes.PipeBaseDataDefinition( + d_i=0.0204, + d_o=0.025, + d=940, + lambda=0.38, + c=2300); + +annotation (Documentation(info=" +

    Overview

    +

    Record for PE-X pipe.

    +

    Concept

    +

    The pipe dimensions are according to standard DIN 16893.

    +

    SDR is the diameter to wall thickness ratio.

    +

    d is the diameter in mm.

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +

    Source:

    +

      +
    • DIN 16983:2000-09
    • +

    +", + revisions=" +

      +
    • January 29, 2014  by Ana Constantin:
      Added to HVAC, formated and upgraded to current version of Dymola/Modelica
    • +
    • March 13, 2012  by Tim Comanns (supervisor: Ana Constantin):
      Implemented.
    • +

    +")); +end DIN_16893_SDR11_d25; diff --git a/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d32.mo b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d32.mo new file mode 100644 index 0000000000..b20c98a8fc --- /dev/null +++ b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d32.mo @@ -0,0 +1,32 @@ +within AixLib.DataBase.Pipes.PE_X; +record DIN_16893_SDR11_d32 "PE-X Pipe, d_o=32mm, SDR11" + extends DataBase.Pipes.PipeBaseDataDefinition( + d_i=0.0262, + d_o=0.032, + d=940, + lambda=0.38, + c=2300); + + annotation (Documentation(info=" +

    Overview

    +

    Record for PE-X pipe.

    +

    Concept

    +

    The pipe dimensions are according to standard DIN 16893.

    +

    SDR is the diameter to wall thickness ratio.

    +

    d is the diameter in mm.

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +

    Source:

    +

      +
    • DIN 16983:2000-09
    • +

    +", + revisions=" +

      +
    • January 29, 2014  by Ana Constantin:
      Added to HVAC, formated and upgraded to current version of Dymola/Modelica
    • +
    • March 13, 2012  by Tim Comanns (supervisor: Ana Constantin):
      Implemented.
    • +

    +")); +end DIN_16893_SDR11_d32; diff --git a/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d40.mo b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d40.mo new file mode 100644 index 0000000000..a94bc6e738 --- /dev/null +++ b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d40.mo @@ -0,0 +1,32 @@ +within AixLib.DataBase.Pipes.PE_X; +record DIN_16893_SDR11_d40 "PE-X Pipe, d_o=40mm, SDR11" + extends DataBase.Pipes.PipeBaseDataDefinition( + d_i=0.0326, + d_o=0.04, + d=940, + lambda=0.38, + c=2300); + + annotation (Documentation(info=" +

    Overview

    +

    Record for PE-X pipe.

    +

    Concept

    +

    The pipe dimensions are according to standard DIN 16893.

    +

    SDR is the diameter to wall thickness ratio.

    +

    d is the diameter in mm.

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +

    Source:

    +

      +
    • DIN 16983:2000-09
    • +

    +", + revisions=" +

      +
    • January 29, 2014  by Ana Constantin:
      Added to HVAC, formated and upgraded to current version of Dymola/Modelica
    • +
    • March 13, 2012  by Tim Comanns (supervisor: Ana Constantin):
      Implemented.
    • +

    +")); +end DIN_16893_SDR11_d40; diff --git a/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d50.mo b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d50.mo new file mode 100644 index 0000000000..cbe3708557 --- /dev/null +++ b/AixLib/DataBase/Pipes/PE_X/DIN_16893_SDR11_d50.mo @@ -0,0 +1,32 @@ +within AixLib.DataBase.Pipes.PE_X; +record DIN_16893_SDR11_d50 "PE-X Pipe, d_o=50mm, SDR11" + extends DataBase.Pipes.PipeBaseDataDefinition( + d_i=0.0408, + d_o=0.05, + d=940, + lambda=0.38, + c=2300); + + annotation (Documentation(info=" +

    Overview

    +

    Record for PE-X pipe.

    +

    Concept

    +

    The pipe dimensions are according to standard DIN 16893.

    +

    SDR is the diameter to wall thickness ratio.

    +

    d is the diameter in mm.

    +

    Level of Development

    +

    +

    References

    +

    Record is used with HVAC.Components.Pipes.DynamicPipeEBC1

    +

    Source:

    +

      +
    • DIN 16983:2000-09
    • +

    +", + revisions=" +

      +
    • January 29, 2014  by Ana Constantin:
      Added to HVAC, formated and upgraded to current version of Dymola/Modelica
    • +
    • March 13, 2012  by Tim Comanns (supervisor: Ana Constantin):
      Implemented.
    • +

    +")); +end DIN_16893_SDR11_d50; diff --git a/AixLib/DataBase/Pipes/PE_X/package.mo b/AixLib/DataBase/Pipes/PE_X/package.mo new file mode 100644 index 0000000000..e4a785ee7b --- /dev/null +++ b/AixLib/DataBase/Pipes/PE_X/package.mo @@ -0,0 +1,5 @@ +within AixLib.DataBase.Pipes; +package PE_X "PE-X (Crosslinked polyethylene) pipes" + extends Modelica.Icons.Package; + +end PE_X; diff --git a/AixLib/DataBase/Pipes/PE_X/package.order b/AixLib/DataBase/Pipes/PE_X/package.order new file mode 100644 index 0000000000..4cde343b75 --- /dev/null +++ b/AixLib/DataBase/Pipes/PE_X/package.order @@ -0,0 +1,4 @@ +DIN_16893_SDR11_d25 +DIN_16893_SDR11_d32 +DIN_16893_SDR11_d40 +DIN_16893_SDR11_d50 diff --git a/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo b/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo new file mode 100644 index 0000000000..276007b483 --- /dev/null +++ b/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo @@ -0,0 +1,339 @@ +within AixLib.Fluid.FixedResistances; +model DPEAgg_ambientLoss + "Discretized DynamicPipeEBC1 with heat loss to ambient" + + + import Modelica.Fluid.Types.ModelStructure; + + outer Modelica.Fluid.System system "System wide properties"; + + // Parameters Tab "General" + replaceable package Medium = + Modelica.Media.Water.ConstantPropertyLiquidWater constrainedby + Modelica.Media.Interfaces.PartialMedium "Medium in the component" + annotation (choicesAllMatching = true); + + parameter Real nParallel = 1 "Number of identical parallel pipes" annotation(Dialog(group = "Geometry")); + parameter Modelica.SIunits.Length length=1 "Length" + annotation(Dialog(group = "Geometry")); + parameter Boolean isCircular = true + "=true if cross sectional area is circular" annotation(Dialog(group = "Geometry")); + parameter Modelica.SIunits.Diameter diameter=parameterPipe.d_i "Diameter of circular pipe" + annotation(Dialog(group = "Geometry"), enable = isCircular); + parameter Modelica.SIunits.Area crossArea=Modelica.Constants.pi* + diameter*diameter/4 "Inner cross section area" annotation(Dialog(group = "Geometry")); + parameter Modelica.SIunits.Length perimeter=Modelica.Constants.pi* + diameter "Inner perimeter" annotation(Dialog(group = "Geometry")); + parameter Modelica.SIunits.Height roughness=2.5e-5 + "Average height of surface asperities (default: smooth steel pipe)" annotation(Dialog(group = "Geometry")); + + parameter Modelica.SIunits.Length height_ab=0 + "Height(port_b)-Height(port_a)" annotation(Dialog(group = "Static head")); + + replaceable model FlowModel = + Modelica.Fluid.Pipes.BaseClasses.FlowModels.DetailedPipeFlow + constrainedby + Modelica.Fluid.Pipes.BaseClasses.FlowModels.PartialStaggeredFlowModel + "Wall friction, gravity, momentum flow" + annotation(Dialog(group="Pressure loss"), choicesAllMatching=true); + + // Parameter Tab "Assumptions" + parameter Boolean allowFlowReversal = system.allowFlowReversal + "= true to allow flow reversal, false restricts to design direction (port_a -> port_b)" + annotation(Dialog(tab="Assumptions"), Evaluate=true); + + parameter Modelica.Fluid.Types.Dynamics energyDynamics = system.energyDynamics + "Formulation of energy balances" annotation(Dialog(tab="Assumptions", group = "Dynamics")); + parameter Modelica.Fluid.Types.Dynamics massDynamics = system.massDynamics + "Formulation of mass balances" annotation(Dialog(tab="Assumptions", group = "Dynamics")); + parameter Modelica.Fluid.Types.Dynamics momentumDynamics = system.momentumDynamics + "Formulation of momentum balances" annotation(Dialog(tab="Assumptions", group = "Dynamics")); + + //Parameter Tab "HeatTransfer" + parameter Boolean use_HeatTransferConvective = true + "= true to use the convective HeatTransfer model" annotation(Dialog(tab="Heat transfer")); + replaceable model HeatTransferConvective = + Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.ConstantFlowHeatTransfer (alpha0 = alpha_i) + constrainedby + Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.PartialFlowHeatTransfer + "Wall heat transfer" + annotation (Dialog(tab="Heat transfer",enable=use_HeatTransfer),choicesAllMatching=true); + parameter Modelica.SIunits.CoefficientOfHeatTransfer alpha_i=1000 + "Heat tranfer coefficient from fluid to pipe wall"; + parameter AixLib.DataBase.Pipes.PipeBaseDataDefinition parameterPipe= + AixLib.DataBase.Pipes.Copper.Copper_6x1() "Pipe type" + annotation (choicesAllMatching=true, Dialog(tab="Heat transfer")); + parameter Boolean withInsulation = false + "= true to use a pipe with insulation" annotation(Dialog(tab="Heat transfer")); + parameter AixLib.DataBase.Pipes.IsolationBaseDataDefinition + parameterIso= + AixLib.DataBase.Pipes.Isolation.Iso0pc() "Isolation Type" + annotation (choicesAllMatching=true, Dialog(tab="Heat transfer")); + parameter Boolean Heat_Loss_To_Ambient = false + "= true to internally simulate heat loss to ambient by convection and radiation" annotation(Dialog(tab="Heat transfer")); + parameter Modelica.SIunits.CoefficientOfHeatTransfer alpha=8 + "Heat transfer coefficient to ambient" annotation (Dialog(tab="Heat transfer", enable = Heat_Loss_To_Ambient)); + Utilities.HeatTransfer.CylindricHeatTransfer PipeWall[nNodes]( + rho=fill(parameterPipe.d, nNodes), + c=fill(parameterPipe.c, nNodes), + d_out=fill(parameterPipe.d_o, nNodes), + d_in=fill(parameterPipe.d_i, nNodes), + length=fill(length/nNodes, nNodes), + lambda=fill(parameterPipe.lambda, nNodes), + T0=fill(T_start, nNodes)) + annotation (Placement(transformation(extent={{-20,-30},{0,-10}}))); + + Utilities.HeatTransfer.CylindricHeatTransfer Insulation[nNodes]( + c=fill(parameterIso.c, nNodes), + d_out=fill(parameterPipe.d_o*parameterIso.factor*2 + parameterPipe.d_o, + nNodes), + d_in=fill(parameterPipe.d_o, nNodes), + length=fill(length/nNodes, nNodes), + lambda=fill(parameterIso.lambda, nNodes), + T0=fill(T_start, nNodes), + rho=fill(parameterIso.d, nNodes)) if withInsulation + annotation (Placement(transformation(extent={{-20,-8},{0,12}}))); + + Modelica.Fluid.Pipes.DynamicPipe pipe( + redeclare package Medium = Medium, + nParallel=nParallel, + length=length, + isCircular=isCircular, + diameter=diameter, + crossArea=crossArea, + perimeter=perimeter, + roughness=roughness, + height_ab=height_ab, + redeclare model FlowModel = FlowModel, + use_HeatTransfer=true, + allowFlowReversal=allowFlowReversal, + energyDynamics=energyDynamics, + massDynamics=massDynamics, + p_a_start=p_a_start, + p_b_start=p_b_start, + use_T_start=use_T_start, + T_start=T_start, + h_start=h_start, + X_start=X_start, + C_start=C_start, + momentumDynamics=momentumDynamics, + m_flow_start=m_flow_start, + nNodes=nNodes, + modelStructure=modelStructure, + useLumpedPressure=useLumpedPressure, + useInnerPortProperties=useInnerPortProperties, + redeclare model HeatTransfer = + Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.ConstantFlowHeatTransfer + (alpha0=alpha_i)) + annotation (Placement(transformation(extent={{-20,-46},{0,-26}}))); + Modelica.Fluid.Interfaces.FluidPort_b port_b(redeclare package Medium = + Medium) + "Fluid connector b (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{94,-46},{114,-26}}), + iconTransformation(extent={{94,-10},{114,10}}))); + Modelica.Fluid.Interfaces.FluidPort_a port_a(redeclare package Medium = + Medium) + "Fluid connector a (positive design flow direction is from port_a to port_b)" + annotation (Placement(transformation(extent={{-114,-46},{-94,-26}}), + iconTransformation(extent={{-114,-10},{-94,10}}))); + // Parameter Tab "Initialisation" + parameter Medium.AbsolutePressure p_a_start=system.p_start + "Start value of pressure at port a" + annotation(Dialog(tab = "Initialization")); + parameter Medium.AbsolutePressure p_b_start=p_a_start + "Start value of pressure at port b" + annotation(Dialog(tab = "Initialization")); + parameter Boolean use_T_start=true "Use T_start if true, otherwise h_start" + annotation(Evaluate=true, Dialog(tab = "Initialization")); + + parameter Medium.Temperature T_start=if use_T_start then system.T_start else + Medium.temperature_phX( + (p_a_start + p_b_start)/2, + h_start, + X_start) "Start value of temperature" + annotation(Evaluate=true, Dialog(tab = "Initialization", enable = use_T_start)); + parameter Medium.SpecificEnthalpy h_start=if use_T_start then + Medium.specificEnthalpy_pTX( + (p_a_start + p_b_start)/2, + T_start, + X_start) else Medium.h_default "Start value of specific enthalpy" + annotation(Evaluate=true, Dialog(tab = "Initialization", enable = not use_T_start)); + parameter Medium.MassFraction X_start[Medium.nX]=Medium.X_default + "Start value of mass fractions m_i/m" + annotation (Dialog(tab="Initialization", enable=Medium.nXi > 0)); + parameter Medium.ExtraProperty C_start[Medium.nC]( + quantity=Medium.extraPropertiesNames)=fill(0, Medium.nC) + "Start value of trace substances" + annotation (Dialog(tab="Initialization", enable=Medium.nC > 0)); + parameter Medium.MassFlowRate m_flow_start = system.m_flow_start + "Start value for mass flow rate" + annotation(Evaluate=true, Dialog(tab = "Initialization")); + + // Parameter Tab "Advanced" + parameter Integer nNodes(min=2)=2 "Number of discrete flow volumes" + annotation(Dialog(tab="Advanced"),Evaluate=true); + + parameter Modelica.Fluid.Types.ModelStructure modelStructure=Modelica.Fluid.Types.ModelStructure.av_vb + "Determines whether flow or volume models are present at the ports" + annotation(Dialog(tab="Advanced"), Evaluate=true); + + parameter Boolean useLumpedPressure=false + "=true to lump pressure states together" + annotation(Dialog(tab="Advanced"),Evaluate=true); + parameter Boolean useInnerPortProperties=false + "=true to take port properties for flow models from internal control volumes" + annotation(Dialog(tab="Advanced"),Evaluate=true); + +protected + Modelica.Fluid.Interfaces.HeatPorts_a heatPorts[nNodes] + annotation (Placement(transformation(extent={{26,38},{66,46}}), + iconTransformation(extent={{-46,20},{40,38}}))); +public + AixLib.Utilities.HeatTransfer.HeatConv heatConv[nNodes](alpha=fill(alpha, + nNodes), A=Modelica.Constants.pi*PipeWall.d_out*length/nNodes) if + Heat_Loss_To_Ambient and not withInsulation + "Convection from pipe wall" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={32,26}))); + AixLib.Utilities.HeatTransfer.HeatConv heatConv_withInsulation[nNodes](alpha= + fill(alpha, nNodes), A=Modelica.Constants.pi*Insulation.d_out*length/ + nNodes) if (Heat_Loss_To_Ambient and withInsulation) + "Convection from insulation" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={58,26}))); + AixLib.Utilities.HeatTransfer.HeatToStar twoStar_RadEx[nNodes](eps=fill(eps, + nNodes), A=Modelica.Constants.pi*PipeWall.d_out*length/nNodes) if + Heat_Loss_To_Ambient and not withInsulation + "Radiation" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-50,28}))); +parameter Modelica.SIunits.Emissivity eps = 0.8 "Emissivity" + annotation (Dialog(tab="Heat transfer", enable = Heat_Loss_To_Ambient)); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort_outside annotation (Placement(transformation(extent={{34,72}, + {54,92}}), + iconTransformation(extent={{6,46},{26,66}}))); + + Modelica.Thermal.HeatTransfer.Components.ThermalCollector thermalCollector(m=nNodes) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=180, + origin={44,58}))); + + AixLib.Utilities.Interfaces.Star Star if Heat_Loss_To_Ambient and not withInsulation + annotation (Placement(transformation(extent={{-62,74},{-42,94}}), + iconTransformation(extent={{-24,46},{-4,66}}))); + Modelica.Thermal.HeatTransfer.Components.ThermalCollector thermalCollector_Star(m=nNodes) if + Heat_Loss_To_Ambient and not withInsulation annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=180, + origin={-52,58}))); +protected + Modelica.Fluid.Interfaces.HeatPorts_a heatPorts_Star[nNodes] if Heat_Loss_To_Ambient and not withInsulation + annotation (Placement(transformation(extent={{-70,38},{-30,46}}), + iconTransformation(extent={{-46,20},{40,38}}))); + /*Modelica.Blocks.Math.Sum sum1(nin=n) + annotation (Placement(transformation(extent={{-20,-100},{0,-80}}))); + Modelica.Blocks.Interfaces.RealOutput StoredEnergy + annotation (Placement( + transformation(extent={{6,-100},{26,-80}}), iconTransformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={90,-24}))); + Modelica.Blocks.Interfaces.RealOutput Temperature + annotation (Placement( + transformation(extent={{10,-74},{30,-54}}), iconTransformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={90,24}))); + */ +equation + // check if the diameters of the pipe and pipe wall are compatible + assert(diameter == parameterPipe.d_i, "The diameter of the pipe wall is not consistent with the diameter given for the pipe", AssertionLevel.error); + /*Temperature=mediums[1].T+mediums[2].T/2; + + for i in 1:n loop + der(Us[i])= sum1.u[i]; + end for; + */ + connect(pipe.port_b, port_b) annotation (Line( + points={{0,-36},{104,-36}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(pipe.port_a, port_a) annotation (Line( + points={{-20,-36},{-104,-36}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(pipe.heatPorts,PipeWall.port_a); + connect(heatPorts, thermalCollector.port_a); + connect(heatPort_outside, thermalCollector.port_b); + + //Connect pipe wall or insulation to the outside + if (withInsulation and Heat_Loss_To_Ambient) then + connect(PipeWall.port_b,Insulation.port_a); + connect(Insulation.port_b, heatConv_withInsulation.port_b); + connect( heatConv_withInsulation.port_a, heatPorts); + elseif withInsulation then + connect(PipeWall.port_b,Insulation.port_a); + connect(Insulation.port_b, heatPorts); + elseif Heat_Loss_To_Ambient then + connect(PipeWall.port_b, heatConv.port_b); + connect( heatConv.port_a, heatPorts); + connect( heatConv.port_b, twoStar_RadEx.Therm); + connect( twoStar_RadEx.Star, heatPorts_Star); + connect( heatPorts_Star, thermalCollector_Star.port_a); + connect( thermalCollector_Star.port_b, Star); + + else + connect(PipeWall.port_b, heatPorts); + end if; + + /*connect(sum1.y,StoredEnergy) annotation (Line( + points={{1,-90},{16,-90}}, + color={0,0,127}, + smooth=Smooth.None)); + */ + annotation ( Icon(graphics={ + Rectangle( + extent={{-100,40},{100,-40}}, + lineColor={0,0,0}, + fillColor={0,0,255}, + fillPattern=FillPattern.HorizontalCylinder), + Ellipse( + extent={{-76,14},{-56,-10}}, + lineColor={0,0,0}, + fillPattern=FillPattern.HorizontalCylinder, + fillColor={0,0,0}), + Ellipse( + extent={{56,14},{76,-10}}, + lineColor={0,0,0}, + fillPattern=FillPattern.HorizontalCylinder, + fillColor={0,0,0}), + Text( + extent={{-40,14},{40,-12}}, + lineColor={0,0,0}, + fillPattern=FillPattern.HorizontalCylinder, + fillColor={0,0,0}, + textString="%nNodes")}), + Documentation(info=" +

    Overview

    +

    Dynamic Pipe with pipe wall and insulation wall which allows discretisation of pipe wall and pipe insulation.This model considers heat loss through radiation and convection. It is useful when pipe is not embedded in wall.

    +

    Level of Development

    +

    +

    Concept

    +

    Developed by using the DynamicPipeEBCAggregated model from the EBC HVAC library. The model already includes heat-transfer by convection and by radiation. Instead of modeling these phenomena outside the pipe, an ambient temperature can be prescribed at the heat-port and the star of the pipe, so the loss to ambient will be calculated within the pipe model. The purpose is to clean up bigger models and to simplify modeling systems with pipes outside building-walls.

    +

    Differently from DPE_ambientLoss for each discretisation of the pipe, there is a connector to the corresponding element of the discretized pipe wall. Each element of the discretised pipe wall is connected to a corresponding element of the discretized insulation wall. The heat-ports and stars of all nodes are then collected to form two single ports, which can be connected to an ambient temperature.

    +

    It is possible to choose no insulation, if used for example for CCA ( concrete core activation).

    +

    Example Results

    +

    HVAC.Examples.Pipes.DPEAgg_ambientLoss

    +", + revisions=" +
      +
    • March 18, 2015 by Roozbeh Sangi:
      Outputs for stored energy and temperature added
    • +
    • November 26, 2014  by Roozbeh Sangi:
      Updated connectors to EBC Library 2.2, Updated documentation, Added example
    • +
    • May 19, 2014  by Roozbeh Sangi:
      Added to the HVAC library
    • +
    • November 13, 2013  by Ole Odendahl:
      Formatted documentation appropriately
    • +
    • August 3, 2011 by Ana Constantin:
      Implemented
    • +
    +")); +end DPEAgg_ambientLoss; diff --git a/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo b/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo new file mode 100644 index 0000000000..3d00608537 --- /dev/null +++ b/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo @@ -0,0 +1,101 @@ +within AixLib.Fluid.FixedResistances.Examples; +model DPEAgg_ambientLoss + + extends Modelica.Icons.Example; + + replaceable package Medium = + Modelica.Media.Water.ConstantPropertyLiquidWater "Medium in the system" annotation(choicesAllMatching = true); + + Modelica.Fluid.Sources.MassFlowSource_T Source( + redeclare package Medium = Medium, + use_m_flow_in=false, + use_T_in=true, + m_flow=0.001, + T=323.15, + nPorts=1) + annotation (Placement(transformation(extent={{-64,-10},{-44,10}}))); + Modelica.Blocks.Sources.Ramp ramp( + duration=3600, + offset=273.15 + 40, + startTime=400, + height=40) + annotation (Placement(transformation(extent={{-100,-6},{-80,14}}))); + Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemp(T=293.15) + annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Modelica.Fluid.Sources.FixedBoundary + Sink( + redeclare package Medium = Medium, nPorts=1) + annotation (Placement(transformation(extent={{-11,-11},{11,11}}, + rotation=180, + origin={79,1}))); + inner Modelica.Fluid.System system + annotation (Placement(transformation(extent={{80,80},{100,100}}))); + Modelica.Fluid.Sensors.Temperature temperatureAfter(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{14,-40},{34,-20}}))); + Modelica.Fluid.Sensors.Temperature temperatureBefore(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-52,-40},{-32,-20}}))); + AixLib.Fluid.FixedResistances.DPEAgg_ambientLoss dynamicPipeEBCAggregated_Ambient_Loss_UC( + Heat_Loss_To_Ambient=true, + nNodes=5, + length=2, + use_HeatTransferConvective=true, + redeclare package Medium = Medium, + parameterPipe=DataBase.Pipes.Copper.Copper_6x1(), + parameterIso=DataBase.Pipes.Isolation.Iso100pc(), + diameter=dynamicPipeEBCAggregated_Ambient_Loss_UC.parameterPipe.d_i, + withInsulation=false) + annotation (Placement(transformation(extent={{-16,-10},{4,10}}))); +equation + connect(ramp.y, Source.T_in) annotation (Line( + points={{-79,4},{-66,4}}, + color={0,0,127}, + smooth=Smooth.None)); + connect(dynamicPipeEBCAggregated_Ambient_Loss_UC.Star, fixedTemp.port) + annotation (Line( + points={{-7.4,5.6},{-7.4,30},{-30,30}}, + color={95,95,95}, + pattern=LinePattern.None, + smooth=Smooth.None)); + connect(Source.ports[1], dynamicPipeEBCAggregated_Ambient_Loss_UC.port_a) + annotation (Line( + points={{-44,0},{-16.4,0}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(temperatureBefore.port, dynamicPipeEBCAggregated_Ambient_Loss_UC.port_a) + annotation (Line( + points={{-42,-40},{-30,-40},{-30,0},{-16.4,0}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(dynamicPipeEBCAggregated_Ambient_Loss_UC.port_b, Sink.ports[1]) + annotation (Line(points={{4.4,0},{68,0},{68,1}}, color={0,127,255})); + connect(temperatureAfter.port, dynamicPipeEBCAggregated_Ambient_Loss_UC.port_b) + annotation (Line(points={{24,-40},{40,-40},{40,0},{4.4,0}}, color={0,127,255})); + connect(fixedTemp.port, dynamicPipeEBCAggregated_Ambient_Loss_UC.heatPort_outside) + annotation (Line(points={{-30,30},{-4.4,30},{-4.4,5.6}}, color={191,0,0})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), Documentation(info=" +

    Overview

    +

    Simple example to test the model for DynamicPipeEBCAggregated_Ambient_Loss

    +

    Concept

    +

    Plot:

    +

      +
    • x-axis: Time
    • +
    • y-axis: temperatureBefore; temperatureAfter
    • +

    +", + revisions=" +
      +
    • April 25, 2017   by Tobias Blacha:
      Moved into AixLib
    • +
    • November 26, 2014   by Roozbeh Sangi:
      Used for other model: Changed used pipe from DynamicPipeEBC1 to DynamicPipeEBCAggregated_Ambient_Loss
    • +
    • April 16, 2014   by Ana Constantin:
      Formated documentation.
    • +
    • April 11, 2011 by Ana Constantin:
      Implemented
    • +
    +"), + experiment( + StopTime=4000, + Interval=30, + Algorithm="Lsodar"), + experimentSetupOutput(events=false)); +end DPEAgg_ambientLoss; From c5af72eff22755ec14e2ebaf7b919ead44ad8134 Mon Sep 17 00:00:00 2001 From: TobiasBlacha Date: Tue, 25 Apr 2017 12:57:37 +0200 Subject: [PATCH 012/342] #335 packageorder updated --- AixLib/DataBase/Pipes/package.mo | 2 +- AixLib/DataBase/Pipes/package.order | 3 +++ AixLib/Fluid/FixedResistances/Examples/package.order | 1 + AixLib/Fluid/FixedResistances/package.order | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AixLib/DataBase/Pipes/package.mo b/AixLib/DataBase/Pipes/package.mo index 0af74f5b6e..08797a859b 100644 --- a/AixLib/DataBase/Pipes/package.mo +++ b/AixLib/DataBase/Pipes/package.mo @@ -1,4 +1,4 @@ within AixLib.DataBase; package Pipes - + end Pipes; diff --git a/AixLib/DataBase/Pipes/package.order b/AixLib/DataBase/Pipes/package.order index da6b86bfa4..832ae1f12a 100644 --- a/AixLib/DataBase/Pipes/package.order +++ b/AixLib/DataBase/Pipes/package.order @@ -1,2 +1,5 @@ Copper PipeBaseDataDefinition +Isolation +IsolationBaseDataDefinition +PE_X diff --git a/AixLib/Fluid/FixedResistances/Examples/package.order b/AixLib/Fluid/FixedResistances/Examples/package.order index 53c9d39b50..8c4459b5eb 100644 --- a/AixLib/Fluid/FixedResistances/Examples/package.order +++ b/AixLib/Fluid/FixedResistances/Examples/package.order @@ -4,3 +4,4 @@ HydraulicDiameter PerformanceHydraulicResistance1 PerformanceHydraulicResistance2 PressureDrop +DPEAgg_ambientLoss diff --git a/AixLib/Fluid/FixedResistances/package.order b/AixLib/Fluid/FixedResistances/package.order index 5bff79da10..c802f59ad4 100644 --- a/AixLib/Fluid/FixedResistances/package.order +++ b/AixLib/Fluid/FixedResistances/package.order @@ -5,3 +5,4 @@ LosslessPipe PressureDrop Examples Validation +DPEAgg_ambientLoss From 98186cb37d3ae04ca1770c1599ba0950c8617bbd Mon Sep 17 00:00:00 2001 From: TobiasBlacha Date: Tue, 25 Apr 2017 17:13:50 +0200 Subject: [PATCH 013/342] #335 Functionality of the pipe model expanded by the introduction of the parameter isEmbedded --- .../FixedResistances/DPEAgg_ambientLoss.mo | 108 ++++++++++++------ .../Examples/DPEAgg_ambientLoss.mo | 25 ++-- .../FixedResistances/Examples/package.order | 2 +- AixLib/Fluid/FixedResistances/package.order | 2 +- 4 files changed, 86 insertions(+), 51 deletions(-) diff --git a/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo b/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo index 276007b483..2b49722574 100644 --- a/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo +++ b/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo @@ -19,7 +19,7 @@ model DPEAgg_ambientLoss parameter Boolean isCircular = true "=true if cross sectional area is circular" annotation(Dialog(group = "Geometry")); parameter Modelica.SIunits.Diameter diameter=parameterPipe.d_i "Diameter of circular pipe" - annotation(Dialog(group = "Geometry"), enable = isCircular); + annotation(Dialog, enable = isCircular); parameter Modelica.SIunits.Area crossArea=Modelica.Constants.pi* diameter*diameter/4 "Inner cross section area" annotation(Dialog(group = "Geometry")); parameter Modelica.SIunits.Length perimeter=Modelica.Constants.pi* @@ -50,6 +50,15 @@ model DPEAgg_ambientLoss "Formulation of momentum balances" annotation(Dialog(tab="Assumptions", group = "Dynamics")); //Parameter Tab "HeatTransfer" + + parameter Boolean Heat_Loss_To_Ambient = false + "= true to internally simulate heat loss to ambient by convection and radiation" annotation(Dialog(tab="Heat transfer")); + parameter Boolean isEmbedded = false + "= true if pipe is embedded in a solid material, for example walls " + annotation(Dialog(tab="Heat transfer")); + parameter Boolean withInsulation = false + "= true to use a pipe with insulation" annotation(Dialog(tab="Heat transfer")); + parameter Boolean use_HeatTransferConvective = true "= true to use the convective HeatTransfer model" annotation(Dialog(tab="Heat transfer")); replaceable model HeatTransferConvective = @@ -63,14 +72,12 @@ model DPEAgg_ambientLoss parameter AixLib.DataBase.Pipes.PipeBaseDataDefinition parameterPipe= AixLib.DataBase.Pipes.Copper.Copper_6x1() "Pipe type" annotation (choicesAllMatching=true, Dialog(tab="Heat transfer")); - parameter Boolean withInsulation = false - "= true to use a pipe with insulation" annotation(Dialog(tab="Heat transfer")); - parameter AixLib.DataBase.Pipes.IsolationBaseDataDefinition + parameter AixLib.DataBase.Pipes.IsolationBaseDataDefinition parameterIso= AixLib.DataBase.Pipes.Isolation.Iso0pc() "Isolation Type" annotation (choicesAllMatching=true, Dialog(tab="Heat transfer")); - parameter Boolean Heat_Loss_To_Ambient = false - "= true to internally simulate heat loss to ambient by convection and radiation" annotation(Dialog(tab="Heat transfer")); + + parameter Modelica.SIunits.CoefficientOfHeatTransfer alpha=8 "Heat transfer coefficient to ambient" annotation (Dialog(tab="Heat transfer", enable = Heat_Loss_To_Ambient)); Utilities.HeatTransfer.CylindricHeatTransfer PipeWall[nNodes]( @@ -105,7 +112,7 @@ model DPEAgg_ambientLoss roughness=roughness, height_ab=height_ab, redeclare model FlowModel = FlowModel, - use_HeatTransfer=true, + use_HeatTransfer=Heat_Loss_To_Ambient, allowFlowReversal=allowFlowReversal, energyDynamics=energyDynamics, massDynamics=massDynamics, @@ -186,51 +193,51 @@ model DPEAgg_ambientLoss protected Modelica.Fluid.Interfaces.HeatPorts_a heatPorts[nNodes] - annotation (Placement(transformation(extent={{26,38},{66,46}}), + annotation (Placement(transformation(extent={{18,38},{58,46}}), iconTransformation(extent={{-46,20},{40,38}}))); public AixLib.Utilities.HeatTransfer.HeatConv heatConv[nNodes](alpha=fill(alpha, nNodes), A=Modelica.Constants.pi*PipeWall.d_out*length/nNodes) if - Heat_Loss_To_Ambient and not withInsulation + Heat_Loss_To_Ambient and not withInsulation and not isEmbedded "Convection from pipe wall" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, - origin={32,26}))); + origin={24,26}))); AixLib.Utilities.HeatTransfer.HeatConv heatConv_withInsulation[nNodes](alpha= fill(alpha, nNodes), A=Modelica.Constants.pi*Insulation.d_out*length/ - nNodes) if (Heat_Loss_To_Ambient and withInsulation) + nNodes) if (Heat_Loss_To_Ambient and withInsulation and not isEmbedded) "Convection from insulation" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, - origin={58,26}))); + origin={50,26}))); AixLib.Utilities.HeatTransfer.HeatToStar twoStar_RadEx[nNodes](eps=fill(eps, nNodes), A=Modelica.Constants.pi*PipeWall.d_out*length/nNodes) if - Heat_Loss_To_Ambient and not withInsulation + Heat_Loss_To_Ambient and not isEmbedded "Radiation" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=90, - origin={-50,28}))); + origin={-58,28}))); parameter Modelica.SIunits.Emissivity eps = 0.8 "Emissivity" annotation (Dialog(tab="Heat transfer", enable = Heat_Loss_To_Ambient)); - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort_outside annotation (Placement(transformation(extent={{34,72}, - {54,92}}), + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort_outside annotation (Placement(transformation(extent={{26,72}, + {46,92}}), iconTransformation(extent={{6,46},{26,66}}))); Modelica.Thermal.HeatTransfer.Components.ThermalCollector thermalCollector(m=nNodes) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=180, - origin={44,58}))); + origin={36,58}))); - AixLib.Utilities.Interfaces.Star Star if Heat_Loss_To_Ambient and not withInsulation - annotation (Placement(transformation(extent={{-62,74},{-42,94}}), + AixLib.Utilities.Interfaces.Star Star if Heat_Loss_To_Ambient and not isEmbedded + annotation (Placement(transformation(extent={{-70,74},{-50,94}}), iconTransformation(extent={{-24,46},{-4,66}}))); Modelica.Thermal.HeatTransfer.Components.ThermalCollector thermalCollector_Star(m=nNodes) if - Heat_Loss_To_Ambient and not withInsulation annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + Heat_Loss_To_Ambient and not isEmbedded annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=180, - origin={-52,58}))); + origin={-60,58}))); protected - Modelica.Fluid.Interfaces.HeatPorts_a heatPorts_Star[nNodes] if Heat_Loss_To_Ambient and not withInsulation - annotation (Placement(transformation(extent={{-70,38},{-30,46}}), + Modelica.Fluid.Interfaces.HeatPorts_a heatPorts_Star[nNodes] if Heat_Loss_To_Ambient and not isEmbedded + annotation (Placement(transformation(extent={{-78,38},{-38,46}}), iconTransformation(extent={{-46,20},{40,38}}))); /*Modelica.Blocks.Math.Sum sum1(nin=n) annotation (Placement(transformation(extent={{-20,-100},{0,-80}}))); @@ -269,22 +276,49 @@ equation connect(heatPort_outside, thermalCollector.port_b); //Connect pipe wall or insulation to the outside - if (withInsulation and Heat_Loss_To_Ambient) then - connect(PipeWall.port_b,Insulation.port_a); - connect(Insulation.port_b, heatConv_withInsulation.port_b); - connect( heatConv_withInsulation.port_a, heatPorts); - elseif withInsulation then + + if (isEmbedded and Heat_Loss_To_Ambient and not withInsulation) then + connect(PipeWall.port_b,heatPorts); + + elseif (isEmbedded and Heat_Loss_To_Ambient and withInsulation) then connect(PipeWall.port_b,Insulation.port_a); connect(Insulation.port_b, heatPorts); - elseif Heat_Loss_To_Ambient then - connect(PipeWall.port_b, heatConv.port_b); - connect( heatConv.port_a, heatPorts); - connect( heatConv.port_b, twoStar_RadEx.Therm); - connect( twoStar_RadEx.Star, heatPorts_Star); - connect( heatPorts_Star, thermalCollector_Star.port_a); - connect( thermalCollector_Star.port_b, Star); - - else + + elseif (withInsulation and Heat_Loss_To_Ambient and not isEmbedded) then + connect(PipeWall.port_b,Insulation.port_a); + connect(Insulation.port_b, heatConv_withInsulation.port_b); + connect(heatConv_withInsulation.port_a, heatPorts); + connect(heatPorts,thermalCollector.port_a); + connect(thermalCollector.port_b,heatPort_outside); + connect(Insulation.port_b, twoStar_RadEx.Therm); + connect(twoStar_RadEx.Star, heatPorts_Star); + connect(heatPorts_Star, thermalCollector_Star.port_a); + connect(thermalCollector_Star.port_b, Star); + + elseif + (Heat_Loss_To_Ambient and not withInsulation and not isEmbedded) then + connect(PipeWall.port_b,heatConv.port_b); + connect(heatConv.port_a, heatPorts); + connect(heatPorts,thermalCollector.port_a); + connect(thermalCollector.port_b,heatPort_outside); + connect(PipeWall.port_b, twoStar_RadEx.Therm); + connect(twoStar_RadEx.Star, heatPorts_Star); + connect(heatPorts_Star, thermalCollector_Star.port_a); + connect(thermalCollector_Star.port_b, Star); + + +// elseif withInsulation then +// connect(PipeWall.port_b,Insulation.port_a); +// connect(Insulation.port_b, heatPorts); +// elseif Heat_Loss_To_Ambient then +// connect(PipeWall.port_b, heatConv.port_b); +// connect( heatConv.port_a, heatPorts); +// connect( heatConv.port_b, twoStar_RadEx.Therm); +// connect( twoStar_RadEx.Star, heatPorts_Star); +// connect( heatPorts_Star, thermalCollector_Star.port_a); +// connect( thermalCollector_Star.port_b, Star); + + else connect(PipeWall.port_b, heatPorts); end if; diff --git a/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo b/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo index 3d00608537..0f95caa2ce 100644 --- a/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo +++ b/AixLib/Fluid/FixedResistances/Examples/DPEAgg_ambientLoss.mo @@ -37,16 +37,17 @@ model DPEAgg_ambientLoss Medium) annotation (Placement(transformation(extent={{-52,-40},{-32,-20}}))); AixLib.Fluid.FixedResistances.DPEAgg_ambientLoss dynamicPipeEBCAggregated_Ambient_Loss_UC( - Heat_Loss_To_Ambient=true, - nNodes=5, length=2, - use_HeatTransferConvective=true, redeclare package Medium = Medium, parameterPipe=DataBase.Pipes.Copper.Copper_6x1(), parameterIso=DataBase.Pipes.Isolation.Iso100pc(), diameter=dynamicPipeEBCAggregated_Ambient_Loss_UC.parameterPipe.d_i, + use_HeatTransferConvective=false, + nNodes=5, + Heat_Loss_To_Ambient=true, + isEmbedded=true, withInsulation=false) - annotation (Placement(transformation(extent={{-16,-10},{4,10}}))); + annotation (Placement(transformation(extent={{-14,-10},{6,10}}))); equation connect(ramp.y, Source.T_in) annotation (Line( points={{-79,4},{-66,4}}, @@ -54,26 +55,26 @@ equation smooth=Smooth.None)); connect(dynamicPipeEBCAggregated_Ambient_Loss_UC.Star, fixedTemp.port) annotation (Line( - points={{-7.4,5.6},{-7.4,30},{-30,30}}, + points={{-5.4,5.6},{-5.4,30},{-30,30}}, color={95,95,95}, pattern=LinePattern.None, smooth=Smooth.None)); connect(Source.ports[1], dynamicPipeEBCAggregated_Ambient_Loss_UC.port_a) annotation (Line( - points={{-44,0},{-16.4,0}}, + points={{-44,0},{-14.4,0}}, color={0,127,255}, smooth=Smooth.None)); connect(temperatureBefore.port, dynamicPipeEBCAggregated_Ambient_Loss_UC.port_a) annotation (Line( - points={{-42,-40},{-30,-40},{-30,0},{-16.4,0}}, + points={{-42,-40},{-30,-40},{-30,0},{-14.4,0}}, color={0,127,255}, smooth=Smooth.None)); connect(dynamicPipeEBCAggregated_Ambient_Loss_UC.port_b, Sink.ports[1]) - annotation (Line(points={{4.4,0},{68,0},{68,1}}, color={0,127,255})); + annotation (Line(points={{6.4,0},{68,0},{68,1}}, color={0,127,255})); connect(temperatureAfter.port, dynamicPipeEBCAggregated_Ambient_Loss_UC.port_b) - annotation (Line(points={{24,-40},{40,-40},{40,0},{4.4,0}}, color={0,127,255})); + annotation (Line(points={{24,-40},{40,-40},{40,0},{6.4,0}}, color={0,127,255})); connect(fixedTemp.port, dynamicPipeEBCAggregated_Ambient_Loss_UC.heatPort_outside) - annotation (Line(points={{-30,30},{-4.4,30},{-4.4,5.6}}, color={191,0,0})); + annotation (Line(points={{-30,30},{-2.4,30},{-2.4,5.6}}, color={191,0,0})); annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}})), Documentation(info="

    Overview

    @@ -94,8 +95,8 @@ equation
"), experiment( - StopTime=4000, + StopTime=400000, Interval=30, - Algorithm="Lsodar"), + __Dymola_Algorithm="Lsodar"), experimentSetupOutput(events=false)); end DPEAgg_ambientLoss; diff --git a/AixLib/Fluid/FixedResistances/Examples/package.order b/AixLib/Fluid/FixedResistances/Examples/package.order index 8c4459b5eb..0462f403ee 100644 --- a/AixLib/Fluid/FixedResistances/Examples/package.order +++ b/AixLib/Fluid/FixedResistances/Examples/package.order @@ -1,7 +1,7 @@ CompareFixedResistances +DPEAgg_ambientLoss FlowJunction HydraulicDiameter PerformanceHydraulicResistance1 PerformanceHydraulicResistance2 PressureDrop -DPEAgg_ambientLoss diff --git a/AixLib/Fluid/FixedResistances/package.order b/AixLib/Fluid/FixedResistances/package.order index c802f59ad4..23b131544e 100644 --- a/AixLib/Fluid/FixedResistances/package.order +++ b/AixLib/Fluid/FixedResistances/package.order @@ -1,3 +1,4 @@ +DPEAgg_ambientLoss HydraulicDiameter HydraulicResistance Junction @@ -5,4 +6,3 @@ LosslessPipe PressureDrop Examples Validation -DPEAgg_ambientLoss From 8b0e717bd6c84d7e54f415de07aa92dd8d5e4551 Mon Sep 17 00:00:00 2001 From: pme Date: Tue, 25 Apr 2017 17:18:23 +0200 Subject: [PATCH 014/342] reorder model structure --- .../Example.mo => Examples/ExergyMeters.mo} | 40 +++++++++---------- AixLib/Utilities/Sensors/Examples/package.mo | 4 ++ .../Utilities/Sensors/Examples/package.order | 1 + .../Sensors/ExergyMeter/package.order | 3 +- AixLib/Utilities/Sensors/package.order | 3 +- 5 files changed, 28 insertions(+), 23 deletions(-) rename AixLib/Utilities/Sensors/{ExergyMeter/Example.mo => Examples/ExergyMeters.mo} (91%) create mode 100644 AixLib/Utilities/Sensors/Examples/package.mo create mode 100644 AixLib/Utilities/Sensors/Examples/package.order diff --git a/AixLib/Utilities/Sensors/ExergyMeter/Example.mo b/AixLib/Utilities/Sensors/Examples/ExergyMeters.mo similarity index 91% rename from AixLib/Utilities/Sensors/ExergyMeter/Example.mo rename to AixLib/Utilities/Sensors/Examples/ExergyMeters.mo index 95f0df811b..73f2889631 100644 --- a/AixLib/Utilities/Sensors/ExergyMeter/Example.mo +++ b/AixLib/Utilities/Sensors/Examples/ExergyMeters.mo @@ -1,5 +1,5 @@ -within AixLib.Utilities.Sensors.ExergyMeter; -model Example +within AixLib.Utilities.Sensors.Examples; +model ExergyMeters extends Modelica.Icons.Example; @@ -18,7 +18,7 @@ model Example each freqHz=1/3600, each offset=3000) annotation (Placement(transformation(extent={{-10,-20},{10,0}}))); - StoredExergyMeter exergyStorageMeterMedium( + ExergyMeter.StoredExergyMeter exergyStorageMeterMedium( redeclare package Medium = Medium, T_ref_start=T_ref.k, T_start=T_start, @@ -34,7 +34,7 @@ model Example annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); inner Modelica.Fluid.System system annotation (Placement(transformation(extent={{80,-100},{100,-80}}))); - HeatExergyMeter exHeatSec + ExergyMeter.HeatExergyMeter exHeatSec annotation (Placement(transformation(extent={{74,5},{94,25}}))); AixLib.Fluid.Movers.FlowControlled_m_flow pumpPrim( addPowerToMedium=false, @@ -64,10 +64,10 @@ model Example extent={{-7,-7.5},{7,7.5}}, rotation=180, origin={-53,56.5}))); - FlowExergyMeter exPrimIn(redeclare package Medium = Medium) + ExergyMeter.FlowExergyMeter exPrimIn(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-36,76},{-14,96}}))); - FlowExergyMeter exPrimOut(redeclare package Medium = Medium) annotation ( - Placement(transformation( + ExergyMeter.FlowExergyMeter exPrimOut(redeclare package Medium = Medium) + annotation (Placement(transformation( extent={{-11,10},{11,-10}}, rotation=180, origin={-25,57}))); @@ -106,10 +106,10 @@ model Example extent={{10,-10},{-10,10}}, rotation=270, origin={94,70}))); - FlowExergyMeter exSecOut(redeclare package Medium = Medium) + ExergyMeter.FlowExergyMeter exSecOut(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,72},{56,92}}))); - FlowExergyMeter exSecIn(redeclare package Medium = Medium) annotation ( - Placement(transformation( + ExergyMeter.FlowExergyMeter exSecIn(redeclare package Medium = Medium) + annotation (Placement(transformation( extent={{-11,10},{11,-10}}, rotation=180, origin={41,54}))); @@ -122,7 +122,7 @@ model Example origin={-28,24}))); Modelica.Blocks.Math.Gain gain(k=-1) annotation (Placement(transformation(extent={{28,18},{40,30}}))); - HeatExergyMeter exHeatPrim annotation (Placement(transformation( + ExergyMeter.HeatExergyMeter exHeatPrim annotation (Placement(transformation( extent={{-10,10},{10,-10}}, rotation=180, origin={-68,15}))); @@ -166,7 +166,7 @@ equation connect(exPrimIn.port_b, bufferStorageHeatingcoils.port_a_heatGenerator) annotation (Line(points={{-16,86},{0.24,86},{0.24,85.96}}, color={0,127,255})); connect(bufferStorageHeatingcoils.port_b_heatGenerator, exPrimOut.port_a) - annotation (Line(points={{0.24,57.4},{-5.88,57.4},{-5.88,57},{-16,57}}, + annotation (Line(points={{0.24,57.4},{-5.88,57.4},{-5.88,57},{-14,57}}, color={0,127,255})); connect(exPrimOut.port_b, pipePrim.port_a) annotation (Line(points={{-36,57}, {-46,57},{-46,56.5}},color={0,127,255})); @@ -182,7 +182,7 @@ equation connect(exSecIn.port_a, pipeSec.port_b) annotation (Line(points={{50,54},{58,54},{58,54.5}}, color={0,127,255})); connect(exSecIn.port_b, bufferStorageHeatingcoils.port_a_consumer) - annotation (Line(points={{30,54},{28,54},{28,46},{12,46},{12,54}}, color={0, + annotation (Line(points={{32,54},{28,54},{28,46},{12,46},{12,54}}, color={0, 127,255})); connect(pipeSec.port_a, consumer.ports[1]) annotation (Line(points={{74,54.5}, {80,54.5},{80,68},{84,68}}, color={0,127,255})); @@ -209,15 +209,15 @@ equation connect(storageTemperatures.y, exergyStorageMeterMedium.T) annotation (Line(points={{-9,-58},{-34,-58},{-34,-40}}, color={0,0,127})); connect(T_ref.y, exPrimOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, - {-50,-10},{-50,38},{-35,38},{-35,47}}, color={0,0,127})); + {-50,-10},{-50,38},{-33,38},{-33,47}}, color={0,0,127})); connect(T_ref.y, exPrimIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, {-50,38},{-40,38},{-40,66},{-34,66},{-17,66},{-17,76}}, color={0,0,127})); connect(T_ref.y, exSecIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,38},{31,38},{31,44}},color={0,0,127})); + {-50,38},{33,38},{33,44}},color={0,0,127})); connect(T_ref.y, exSecOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, {-50,-10},{-50,38},{56,38},{56,62},{53,62},{53,72}}, color={0,0,127})); connect(p_ref.y, exPrimOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,-30},{-52,-30},{-52,40},{-26,40},{-26,47}}, color={0,0,127})); + {-76,-30},{-52,-30},{-52,40},{-24,40},{-24,47}}, color={0,0,127})); connect(p_ref.y, exPrimIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, {-76,-30},{-52,-30},{-52,40},{-42,40},{-42,68},{-26,68},{-26,76}}, color={0,0,127})); @@ -225,14 +225,14 @@ equation {-76,40},{-42,40},{-42,68},{-8,68},{-8,96},{30,96},{30,64},{44,64},{44, 72}}, color={0,0,127})); connect(p_ref.y, exSecIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,40},{-42,40},{-42,68},{-8,68},{-8,40},{40,40},{40,44}},color={0,0, + {-76,40},{-42,40},{-42,68},{-8,68},{-8,40},{42,40},{42,44}},color={0,0, 127})); connect(X_ref.y, exSecIn.X_ref) annotation (Line(points={{-79,-90},{-50,-90}, - {44,-90},{44,34},{49,34},{49,44}},color={0,0,127})); + {44,-90},{44,34},{51,34},{51,44}},color={0,0,127})); connect(X_ref.y, exSecOut.X_ref) annotation (Line(points={{-79,-90},{-18,-90}, {44,-90},{44,34},{54,34},{54,62},{35,62},{35,72}}, color={0,0,127})); connect(X_ref.y, exPrimOut.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, - {-54,42},{-17,42},{-17,47}}, color={0,0,127})); + {-54,42},{-15,42},{-15,47}}, color={0,0,127})); connect(X_ref.y, exPrimIn.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, {-54,44},{-35,44},{-35,76}}, color={0,0,127})); connect(pumpMassFlow.y, pumpPrim.m_flow_in) annotation (Line(points={{-87.4, @@ -260,4 +260,4 @@ equation
  • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
    Implemented.
  • ")); -end Example; +end ExergyMeters; diff --git a/AixLib/Utilities/Sensors/Examples/package.mo b/AixLib/Utilities/Sensors/Examples/package.mo new file mode 100644 index 0000000000..6aaa2d5283 --- /dev/null +++ b/AixLib/Utilities/Sensors/Examples/package.mo @@ -0,0 +1,4 @@ +within AixLib.Utilities.Sensors; +package Examples +extends Modelica.Icons.ExamplesPackage; +end Examples; diff --git a/AixLib/Utilities/Sensors/Examples/package.order b/AixLib/Utilities/Sensors/Examples/package.order new file mode 100644 index 0000000000..6640b9535a --- /dev/null +++ b/AixLib/Utilities/Sensors/Examples/package.order @@ -0,0 +1 @@ +ExergyMeters diff --git a/AixLib/Utilities/Sensors/ExergyMeter/package.order b/AixLib/Utilities/Sensors/ExergyMeter/package.order index a70e257a03..0a1fd52205 100644 --- a/AixLib/Utilities/Sensors/ExergyMeter/package.order +++ b/AixLib/Utilities/Sensors/ExergyMeter/package.order @@ -1,4 +1,3 @@ FlowExergyMeter -StoredExergyMeter HeatExergyMeter -Example +StoredExergyMeter diff --git a/AixLib/Utilities/Sensors/package.order b/AixLib/Utilities/Sensors/package.order index 0260dbb53d..80954fb548 100644 --- a/AixLib/Utilities/Sensors/package.order +++ b/AixLib/Utilities/Sensors/package.order @@ -1,3 +1,4 @@ EnergyMeter -ExergyMeter FuelCounter +ExergyMeter +Examples From 6fe7fbf643fb58f3b13f32cdb0a9231fb7c119bf Mon Sep 17 00:00:00 2001 From: pme Date: Tue, 25 Apr 2017 17:19:34 +0200 Subject: [PATCH 015/342] delete old files --- .../BaseClasses/SetPower.mo | 117 ----- .../BaseClasses/package.mo | 4 - .../BaseClasses/package.order | 1 - AixLib/HVAC/FacadeVentilationUnit/Example.mo | 100 ---- .../FacadeVentilationUnit/FVUController.mo | 337 ------------- .../FacadeVentilationUnit.mo | 442 ------------------ .../HVAC/FacadeVentilationUnit/package.order | 4 - AixLib/HVAC/Meter/ExergyMeter/Example.mo | 263 ----------- .../HVAC/Meter/ExergyMeter/FlowExergyMeter.mo | 127 ----- .../HVAC/Meter/ExergyMeter/HeatExergyMeter.mo | 120 ----- .../Meter/ExergyMeter/StoredExergyMeter.mo | 207 -------- AixLib/HVAC/Meter/ExergyMeter/package.mo | 8 - AixLib/HVAC/Meter/ExergyMeter/package.order | 4 - 13 files changed, 1734 deletions(-) delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/Example.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/FVUController.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/package.order delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/Example.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/package.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/package.order diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo deleted file mode 100644 index 321b1621d7..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo +++ /dev/null @@ -1,117 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; -model SetPower - "This model defines a specific massflow rate based on the input power share" - - extends Modelica.Fluid.Interfaces.PartialTwoPort; - - parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.05 - "Nominal mass flow rate of fan"; - parameter Medium.AbsolutePressure p_start=Medium.p_default - "Start value of pressure"; - parameter Real noUnits=1 "Number of identical FVU units"; - parameter Modelica.SIunits.PressureDifference dp_nominal=500 - "Initial pressure difference"; - parameter Medium.Temperature T_start=Medium.T_default - "Start value of temperature"; - - Modelica.Blocks.Tables.CombiTable1D volumeFlow(table=[0,1; 10,25; 20,40; - 30,60; 40,90; 50,100; 60,140; 70,175; 80,200; 90,225; 100,260]) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,-56}))); - Modelica.Blocks.Interfaces.RealInput powerShare( - min=0, - max=100, - nominal=60) "power share (percentage) for fan" - annotation (Placement(transformation( - origin={0,-100}, - extent={{-20,-20},{20,20}}, - rotation=90))); - - AixLib.Fluid.Movers.FlowControlled_m_flow fan( redeclare - package Medium = Medium, - addPowerToMedium=false, - m_flow_nominal=m_flow_nominal, - T_start=T_start, - m_flow(start=m_flow_nominal), - dp(start=dp_nominal), - dp_nominal=dp_nominal, - p_start=p_start, - riseTime=120, - nominalValuesDefineDefaultPressureCurve=true) - annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); - Modelica.Blocks.Math.Gain gain(k=1.2/3600*noUnits) - annotation (Placement( - transformation( - extent={{-6,-6},{6,6}}, - rotation=90, - origin={0,-28}))); -equation - - connect(port_a, fan.port_a) - annotation (Line(points={{-100,0},{-56,0},{-10,0}}, color={0,127,255})); - connect(fan.port_b, port_b) - annotation (Line(points={{10,0},{56,0},{100,0}}, color={0,127,255})); - connect(powerShare, volumeFlow.u[1]) annotation (Line(points={{0,-100},{0, - -80},{-6.66134e-016,-80},{-6.66134e-016,-68}}, - color={0,0,127})); - connect(gain.u, volumeFlow.y[1]) annotation (Line(points={{-4.44089e-016, - -35.2},{-4.44089e-016,-46},{8.88178e-016,-46},{8.88178e-016,-45}}, - color={0,0,127})); - connect(gain.y, fan.m_flow_in) annotation (Line(points={{4.44089e-016, - -21.4},{4.44089e-016,-24},{-0.2,-24},{-0.2,-12}}, - color={0,0,127})); - annotation (choicesAllMatching=true, - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, - {100,100}})), - Icon(graphics={ - Ellipse( - extent={{-4,68},{4,0}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-4,0},{4,-68}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{0,4},{30,-4}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-30,4},{0,-4}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse(extent={{-30,68},{30,-68}}, lineColor={0,0,0}), - Line( - points={{8,54},{58,54}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{8,-44},{60,-44}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{-12,-20},{76,-20}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{0,8},{82,8}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{6,32},{76,32}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled})}), - Documentation(info=" -

    Thsi model sets the mass flow rate of the air flow through a facade ventilation unit based on the input value, which is the power share set point of the fan.

    -", revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Input changed from revolving speed to power.
    • -
    • August 20, 2008  by Peter Matthes:
      Implemented.
    • -
    -")); -end SetPower; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo deleted file mode 100644 index 45d9419aa9..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo +++ /dev/null @@ -1,4 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -package BaseClasses - extends Modelica.Icons.BasesPackage; -end BaseClasses; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order deleted file mode 100644 index a512820164..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order +++ /dev/null @@ -1 +0,0 @@ -SetPower diff --git a/AixLib/HVAC/FacadeVentilationUnit/Example.mo b/AixLib/HVAC/FacadeVentilationUnit/Example.mo deleted file mode 100644 index b4993b1dbf..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/Example.mo +++ /dev/null @@ -1,100 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -model Example - import ExergyBasedControl; - extends Modelica.Icons.Example; - - package Medium1 = AixLib.Media.Air; - package Medium2 = AixLib.Media.Water; - - Modelica.Blocks.Sources.Constant roomTemperature(k=273.15 + 18) - annotation (Placement(transformation(extent={{-94,48},{-74,68}}))); - Modelica.Blocks.Sources.Sine outdoorTemperature( - freqHz=2/3600, - offset=273.15 + 10, - amplitude=20) - annotation (Placement(transformation(extent={{-94,8},{-74,28}}))); - Modelica.Blocks.Sources.Constant roomSetTemperature(k=273.15 + 22) - annotation (Placement(transformation(extent={{-94,-28},{-74,-8}}))); - Modelica.Blocks.Sources.Constant co2Concentration(k=800) - annotation (Placement(transformation(extent={{-94,-72},{-74,-52}}))); - AixLib.Fluid.Sources.Boundary_pT ambient_out( - redeclare package Medium = Medium1, - use_T_in=true, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation(extent={{6,-88},{26,-68}}))); - AixLib.Fluid.Sources.Boundary_pT ambient_in( - redeclare package Medium = Medium1, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation(extent={{4,-58},{24,-38}}))); - AixLib.Fluid.Sources.Boundary_pT heating_sink( - redeclare package Medium = Medium2, - p=100000) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={26,30}))); - AixLib.Fluid.Sources.Boundary_pT cooling_sink( - redeclare package Medium = Medium2, - p=100000) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={102,32}))); - AixLib.Fluid.Sources.Boundary_pT cooling_source( - redeclare package Medium = Medium2, - use_T_in=true, - p=140000) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={126,31}))); - AixLib.Fluid.Sources.Boundary_pT heating_source( - redeclare package Medium = Medium2, - use_T_in=true, - p=140000) annotation (Placement(transformation( - extent={{-9,-10},{9,10}}, - rotation=270, - origin={54,31}))); - AixLib.Fluid.Sources.Boundary_pT room_in( - redeclare package Medium = Medium1, - use_T_in=false, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={170,-27}))); - AixLib.Fluid.Sources.Boundary_pT room_out( - redeclare package Medium = Medium1, - use_T_in=true, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={168,-66}))); - Modelica.Blocks.Sources.Constant heatSourceTemperature(k=273.15 + 30) - annotation (Placement(transformation(extent={{24,74},{44,94}}))); - Modelica.Blocks.Sources.Constant coldsourceTemperature(k=273.15 + 17) - annotation (Placement(transformation(extent={{84,74},{104,94}}))); - FacadeVentilationUnit facadeVentilationUnit - annotation (Placement(transformation(extent={{-42,-14},{-6,6}}))); - FacadeVentilationUnit facadeVentilationUnit1 - annotation (Placement(transformation(extent={{74,-44},{110,-24}}))); -equation - connect(heatSourceTemperature.y, heating_source.T_in) - annotation (Line(points={{45,84},{58,84},{58,41.8}}, color={0,0,127})); - connect(coldsourceTemperature.y, cooling_source.T_in) annotation (Line(points= - {{105,84},{105,84},{130,84},{130,43}}, color={0,0,127})); - connect(roomTemperature.y, room_out.T_in) annotation (Line(points={{-73,58},{-73, - 58},{198,58},{198,-70},{180,-70}}, color={0,0,127})); - connect(outdoorTemperature.y, ambient_out.T_in) annotation (Line(points={{-73,18}, - {-58,18},{-58,-74},{4,-74}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, - {100,100}})), Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{200,100}})), - experiment(StopTime=3600), - Documentation(revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Implemented
    • -
    -", info=" -

    This model shows the usage of the facade ventilation unit and its controller.

    -"), - __Dymola_experimentSetupOutput); -end Example; diff --git a/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo b/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo deleted file mode 100644 index 615fb94967..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo +++ /dev/null @@ -1,337 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -model FVUController - - parameter Real minimumSupTemp = 273.15+17 "Minimum supply air temperature"; - - parameter Real co2SetConcentration = 600 "Set point for CO2 concentration"; - - parameter Real maxSupFanPower = 60 "Maximum supply air fan power"; - - parameter Real maxExFanPower = 60 "Maximum exhaust air fan power"; - - parameter Real fullyOpen = 100 - "Percentage value representing fuly opened flap"; - - Modelica.Blocks.Interfaces.RealInput roomTemperature - annotation (Placement(transformation(extent={{-120,70},{-80,110}}))); - Modelica.Blocks.Interfaces.RealInput outdoorTemperature - annotation (Placement(transformation(extent={{-120,10},{-80,50}}))); - Modelica.Blocks.Interfaces.RealInput co2Concentration - annotation (Placement(transformation(extent={{-120,-110},{-80,-70}}))); - Modelica.Blocks.Interfaces.RealInput roomSetTemperature - annotation (Placement(transformation(extent={{-120,-50},{-80,-10}}))); - Modelica.Blocks.Logical.OnOffController roomToBeCooled(bandwidth=2) - annotation (Placement(transformation(extent={{-60,80},{-40,100}}))); - Modelica.Blocks.Logical.OnOffController roomToBeHeated(bandwidth=2) - annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); - Modelica.Blocks.Logical.OnOffController roomToBeVentilated(bandwidth=200) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica.Blocks.Logical.OnOffController freeCoolingPossible(bandwidth=2) - annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); - Modelica.Blocks.Logical.OnOffController coldRecoveryPossible(bandwidth=2) - annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); - Modelica.Blocks.Logical.OnOffController heatRecoveryPossible(bandwidth=2) - annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); - Modelica.Blocks.Sources.Constant co2SeetConcentrationSource(k= - co2SetConcentration) annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=180, - origin={-46,6}))); - Modelica.Blocks.Math.Add add(k1=-1) - annotation (Placement(transformation(extent={{-62,-52},{-50,-40}}))); - Modelica.Blocks.Math.Add add1(k1=-1) - annotation (Placement(transformation(extent={{-64,-102},{-52,-90}}))); - Modelica.Blocks.Sources.Constant setDeviationFreeCooling(k=-4) - annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={-54,-24}))); - Modelica.Blocks.Sources.Constant setDeviationRecovery(k=0) annotation ( - Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={-62,-72}))); - Modelica.Blocks.Logical.Switch useCoolingValve - annotation (Placement(transformation(extent={{62,80},{74,92}}))); - Modelica.Blocks.Logical.And and1 - annotation (Placement(transformation(extent={{0,80},{14,94}}))); - Modelica.Blocks.Logical.And and2 - annotation (Placement(transformation(extent={{0,44},{14,58}}))); - Modelica.Blocks.Logical.Or climatizationNeeded - annotation (Placement(transformation(extent={{0,6},{14,20}}))); - Modelica.Blocks.Logical.And and3 - annotation (Placement(transformation(extent={{0,-34},{14,-20}}))); - Modelica.Blocks.Logical.Switch useHeatingValve - annotation (Placement(transformation(extent={{62,48},{74,60}}))); - Modelica.Blocks.Sources.Constant one(k=1) annotation (Placement( - transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={8,70}))); - Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement( - transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={6,34}))); - Modelica.Blocks.Logical.Or useExFan - annotation (Placement(transformation(extent={{60,0},{74,14}}))); - Modelica.Blocks.Logical.Switch switch3 - annotation (Placement(transformation(extent={{86,1},{98,13}}))); - Modelica.Blocks.Sources.Constant exhaustFan(k=maxExFanPower) - annotation (Placement(transformation(extent={{40,32},{52,44}}))); - Modelica.Blocks.Logical.Switch switch4 - annotation (Placement(transformation(extent={{114,-6},{126,6}}))); - Modelica.Blocks.Sources.Constant twoHours(k=2*3600) - annotation (Placement(transformation(extent={{100,86},{112,98}}))); - Modelica.Blocks.Logical.Timer timer - annotation (Placement(transformation(extent={{134,46},{148,60}}))); - Modelica.Blocks.Logical.Greater timePassed - annotation (Placement(transformation(extent={{162,52},{174,66}}))); - Modelica.Blocks.Logical.Not not1 - annotation (Placement(transformation(extent={{86,48},{96,58}}))); - Modelica.Blocks.Sources.Constant twentyMinutes(k=20*60) - annotation (Placement(transformation(extent={{100,66},{112,78}}))); - Modelica.Blocks.Logical.Greater timePassed1 - annotation (Placement(transformation(extent={{162,32},{174,46}}))); - Modelica.Blocks.Logical.Timer timer1 - annotation (Placement(transformation(extent={{134,26},{148,40}}))); - Modelica.Blocks.Logical.RSFlipFlop rSFlipFlop - annotation (Placement(transformation(extent={{105,40},{121,56}}))); - Modelica.Blocks.Interfaces.RealOutput exhaustFanPower - annotation (Placement(transformation(extent={{210,20},{230,40}}))); - Modelica.Blocks.Logical.Switch switch5 - annotation (Placement(transformation(extent={{28,-32},{40,-20}}))); - Modelica.Blocks.Interfaces.RealOutput coolingValveOpening - annotation (Placement(transformation(extent={{210,80},{230,100}}))); - Modelica.Blocks.Interfaces.RealOutput heatingValveOpening - annotation (Placement(transformation(extent={{210,50},{230,70}}))); - Modelica.Blocks.Logical.Switch switch1 - annotation (Placement(transformation(extent={{160,-33},{172,-21}}))); - Modelica.Blocks.Logical.Switch switch2 - annotation (Placement(transformation(extent={{116,-38},{128,-26}}))); - Modelica.Blocks.Sources.Constant supplyFan(k=maxSupFanPower) - annotation (Placement(transformation(extent={{84,-26},{96,-14}}))); - Modelica.Blocks.Interfaces.RealOutput supplyFanPower - annotation (Placement(transformation(extent={{210,-10},{230,10}}))); - Modelica.Blocks.Logical.Greater PexaLargerPsupa - annotation (Placement(transformation(extent={{138,-16},{150,-2}}))); - Modelica.Blocks.Sources.BooleanExpression booleanExpression(y=if - exhaustFanPower > supplyFanPower + 0.1 or exhaustFanPower < - supplyFanPower - 0.1 then false else true) - annotation (Placement(transformation(extent={{120,-70},{140,-50}}))); - Modelica.Blocks.Logical.Switch switch6 - annotation (Placement(transformation(extent={{160,-66},{172,-54}}))); - Modelica.Blocks.Interfaces.RealOutput circulationFlapOpening - annotation (Placement(transformation(extent={{210,-40},{230,-20}}))); - Modelica.Blocks.Logical.Or or3 - annotation (Placement(transformation(extent={{28,-50},{42,-36}}))); - Modelica.Blocks.Logical.Switch useHRC - annotation (Placement(transformation(extent={{62,-49},{74,-37}}))); - Modelica.Blocks.Interfaces.RealOutput HRCFlapOpening - annotation (Placement(transformation(extent={{210,-70},{230,-50}}))); - Modelica.Blocks.Logical.Pre pre1 annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=180, - origin={164,22}))); - Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=5) - annotation (Placement(transformation(extent={{40,-86},{52,-74}}))); - Modelica.Blocks.Logical.Switch switch7 - annotation (Placement(transformation(extent={{64,-86},{76,-74}}))); - Modelica.Blocks.Interfaces.RealOutput freshAirFlapOpening - annotation (Placement(transformation(extent={{210,-100},{230,-80}}))); -equation - connect(outdoorTemperature, add.u1) annotation (Line(points={{-100,30},{ - -78,30},{-78,-42.4},{-63.2,-42.4}}, color={0,0,127})); - connect(roomTemperature, add.u2) annotation (Line(points={{-100,90},{-74, - 90},{-74,-40},{-68,-40},{-66,-40},{-66,-49.6},{-63.2,-49.6}}, - color={0,0,127})); - connect(outdoorTemperature, add1.u2) annotation (Line(points={{-100,30},{ - -88,30},{-78,30},{-78,-99.6},{-65.2,-99.6}}, color={0,0,127})); - connect(roomTemperature, add1.u1) annotation (Line(points={{-100,90},{-88, - 90},{-74,90},{-74,-92.4},{-65.2,-92.4}}, color={0,0,127})); - connect(add1.y, heatRecoveryPossible.u) - annotation (Line(points={{-51.4,-96},{-42,-96}}, color={0,0,127})); - connect(add.y, coldRecoveryPossible.u) annotation (Line(points={{-49.4, - -46},{-48,-46},{-48,-66},{-42,-66}}, color={0,0,127})); - connect(setDeviationFreeCooling.y, freeCoolingPossible.reference) - annotation (Line(points={{-47.4,-24},{-46,-24},{-42,-24}}, color={0,0, - 127})); - connect(setDeviationRecovery.y, coldRecoveryPossible.reference) - annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-54},{-42,-54}}, - color={0,0,127})); - connect(setDeviationRecovery.y, heatRecoveryPossible.reference) - annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-84},{-42,-84}}, - color={0,0,127})); - connect(roomToBeCooled.y, and1.u1) annotation (Line(points={{-39,90},{-28, - 90},{-28,87},{-1.4,87}}, color={255,0,255})); - connect(coldRecoveryPossible.y, and1.u2) annotation (Line(points={{-19, - -60},{-6,-60},{-6,81.4},{-1.4,81.4}}, color={255,0,255})); - connect(roomToBeCooled.y, useCoolingValve.u2) annotation (Line(points={{ - -39,90},{-28,90},{-28,100},{22,100},{22,86},{60.8,86}}, color={ - 255,0,255})); - connect(roomToBeCooled.y, and2.u1) annotation (Line(points={{-39,90},{-28, - 90},{-28,51},{-1.4,51}}, color={255,0,255})); - connect(freeCoolingPossible.y, and2.u2) annotation (Line(points={{-19,-30}, - {-12,-30},{-12,45.4},{-1.4,45.4}}, color={255,0,255})); - connect(roomToBeCooled.y, climatizationNeeded.u1) annotation (Line(points= - {{-39,90},{-28,90},{-28,13},{-1.4,13}}, color={255,0,255})); - connect(roomToBeHeated.y, climatizationNeeded.u2) annotation (Line(points= - {{-39,60},{-30,60},{-30,7.4},{-1.4,7.4}}, color={255,0,255})); - connect(heatRecoveryPossible.y, and3.u2) annotation (Line(points={{-19, - -90},{-1.4,-90},{-1.4,-32.6}}, color={255,0,255})); - connect(roomToBeHeated.y, and3.u1) annotation (Line(points={{-39,60},{-30, - 60},{-30,8},{-10,8},{-10,-27},{-1.4,-27}}, color={255,0,255})); - connect(roomToBeHeated.y, useHeatingValve.u2) annotation (Line(points={{ - -39,60},{26,60},{26,54},{60.8,54}}, color={255,0,255})); - connect(one.y, useHeatingValve.u1) annotation (Line(points={{14.6,70},{30,70}, - {30,58.8},{60.8,58.8}}, color={0,0,127})); - connect(zero.y, useHeatingValve.u3) annotation (Line(points={{12.6,34},{ - 34,34},{34,49.2},{60.8,49.2}}, color={0,0,127})); - connect(roomToBeVentilated.y, useExFan.u2) annotation (Line(points={{-39, - 30},{-20,30},{-20,24},{18,24},{18,1.4},{58.6,1.4}}, color={255,0, - 255})); - connect(useExFan.y, switch3.u2) annotation (Line(points={{74.7,7},{79.35, - 7},{84.8,7}}, color={255,0,255})); - connect(exhaustFan.y, switch3.u1) annotation (Line(points={{52.6,38},{76, - 38},{76,11.8},{84.8,11.8}}, color={0,0,127})); - connect(zero.y, switch3.u3) annotation (Line(points={{12.6,34},{24,34},{ - 34,34},{34,-6},{80,-6},{80,2.2},{84.8,2.2}}, color={0,0,127})); - connect(useExFan.y, not1.u) annotation (Line(points={{74.7,7},{80,7},{80, - 53},{85,53}}, color={255,0,255})); - connect(timePassed.y, timer1.u) annotation (Line(points={{174.6,59},{184, - 59},{184,46},{128,46},{128,33},{132.6,33}}, color={255,0,255})); - connect(not1.y, rSFlipFlop.S) annotation (Line(points={{96.5,53},{100,53}, - {100,52.8},{103.4,52.8}}, color={255,0,255})); - connect(rSFlipFlop.Q, timer.u) annotation (Line(points={{121.8,52.8},{ - 127.4,52.8},{127.4,53},{132.6,53}}, color={255,0,255})); - connect(switch4.y, exhaustFanPower) - annotation (Line(points={{126.6,0},{192,0},{192,30},{220,30}}, - color={0,0,127})); - connect(zero.y, useCoolingValve.u3) annotation (Line(points={{12.6,34},{ - 24,34},{34,34},{34,81.2},{60.8,81.2}}, color={0,0,127})); - connect(freeCoolingPossible.y, switch5.u2) annotation (Line(points={{-19, - -30},{-12,-30},{-12,-14},{22,-14},{22,-26},{26.8,-26}}, color={ - 255,0,255})); - connect(zero.y, switch5.u1) annotation (Line(points={{12.6,34},{34,34},{ - 34,-16},{24,-16},{24,-21.2},{26.8,-21.2}}, color={0,0,127})); - connect(one.y, switch5.u3) annotation (Line(points={{14.6,70},{30,70},{30,-12}, - {20,-12},{20,-30.8},{26.8,-30.8}}, color={0,0,127})); - connect(switch5.y, useCoolingValve.u1) annotation (Line(points={{40.6,-26}, - {56,-26},{56,90},{56,90.8},{60.8,90.8}}, color={0,0,127})); - connect(useCoolingValve.y, coolingValveOpening) annotation (Line(points={{74.6,86}, - {82,86},{82,104},{204,104},{204,90},{220,90}}, color={0, - 0,127})); - connect(useHeatingValve.y, heatingValveOpening) annotation (Line(points={{74.6,54}, - {78,54},{78,80},{200,80},{200,60},{220,60}}, color={0,0, - 127})); - connect(co2SeetConcentrationSource.y, roomToBeVentilated.u) annotation ( - Line(points={{-52.6,6},{-62,6},{-62,24}}, color={0,0,127})); - connect(co2Concentration, roomToBeVentilated.reference) annotation (Line( - points={{-100,-90},{-76,-90},{-76,36},{-62,36}}, color={0,0,127})); - connect(climatizationNeeded.y, switch2.u2) annotation (Line(points={{14.7, - 13},{52,13},{52,-32},{114.8,-32}}, color={255,0,255})); - connect(supplyFan.y, switch2.u1) annotation (Line(points={{96.6,-20},{110, - -20},{110,-27.2},{114.8,-27.2}}, color={0,0,127})); - connect(zero.y, switch2.u3) annotation (Line(points={{12.6,34},{34,34},{ - 34,-6},{80,-6},{80,-36.8},{114.8,-36.8}}, color={0,0,127})); - connect(switch2.y, switch1.u3) annotation (Line(points={{128.6,-32},{154, - -32},{154,-31.8},{158.8,-31.8}}, color={0,0,127})); - connect(switch1.y, supplyFanPower) annotation (Line(points={{172.6,-27},{ - 200,-27},{200,0},{220,0}}, color={0,0,127})); - connect(PexaLargerPsupa.y, switch1.u2) annotation (Line(points={{150.6,-9}, - {152,-9},{152,-27},{158.8,-27}}, color={255,0,255})); - connect(switch4.y, switch1.u1) annotation (Line(points={{126.6,0},{142,0}, - {156,0},{156,-22.2},{158.8,-22.2}}, color={0,0,127})); - connect(booleanExpression.y, switch6.u2) - annotation (Line(points={{141,-60},{158.8,-60}}, color={255,0,255})); - connect(switch6.y, circulationFlapOpening) - annotation (Line(points={{172.6,-60},{196,-60},{196,-30},{220,-30}}, - color={0,0,127})); - connect(and1.y, or3.u1) annotation (Line(points={{14.7,87},{20,87},{20, - -43},{26.6,-43}}, color={255,0,255})); - connect(and3.y, or3.u2) annotation (Line(points={{14.7,-27},{18,-27},{18, - -48.6},{26.6,-48.6}}, color={255,0,255})); - connect(or3.y, useHRC.u2) annotation (Line(points={{42.7,-43},{42.7,-43}, - {60.8,-43}},color={255,0,255})); - connect(one.y, useHRC.u1) annotation (Line(points={{14.6,70},{22,70},{30,70}, - {30,-12},{50,-12},{50,-38.2},{60.8,-38.2}}, color={0,0,127})); - connect(zero.y, useHRC.u3) annotation (Line(points={{12.6,34},{34,34},{34, - -6},{54,-6},{54,-47.8},{60.8,-47.8}}, color={0,0,127})); - connect(useHRC.y, HRCFlapOpening) annotation (Line(points={{74.6,-43},{74, - -43},{74,-44},{186,-44},{186,-60},{220,-60}}, - color={0,0,127})); - connect(add1.y, freeCoolingPossible.u) annotation (Line(points={{-51.4, - -96},{-46,-96},{-46,-36},{-42,-36}}, color={0,0,127})); - connect(timePassed1.y, pre1.u) annotation (Line(points={{174.6,39},{182,39},{182, - 22},{171.2,22}}, color={255,0,255})); - connect(pre1.y, rSFlipFlop.R) annotation (Line(points={{157.4,22},{100,22},{100, - 43.2},{103.4,43.2}}, color={255,0,255})); - connect(roomTemperature, roomToBeHeated.u) annotation (Line(points={{-100,90}, - {-74,90},{-74,54},{-62,54}}, color={0,0,127})); - connect(roomSetTemperature, roomToBeHeated.reference) annotation (Line( - points={{-100,-30},{-70,-30},{-70,66},{-62,66}}, color={0,0,127})); - connect(roomSetTemperature, roomToBeCooled.u) annotation (Line(points={{-100, - -30},{-70,-30},{-70,84},{-62,84}}, color={0,0,127})); - connect(roomTemperature, roomToBeCooled.reference) annotation (Line( - points={{-100,90},{-74,90},{-74,96},{-62,96}}, color={0,0,127})); - connect(switch4.y, PexaLargerPsupa.u1) annotation (Line(points={{126.6,0}, - {130,0},{130,-9},{136.8,-9}}, color={0,0,127})); - connect(switch2.y, PexaLargerPsupa.u2) annotation (Line(points={{128.6, - -32},{130,-32},{130,-14.6},{136.8,-14.6}}, color={0,0,127})); - connect(timer.y, timePassed.u1) annotation (Line(points={{148.7,53},{154, - 53},{154,59},{160.8,59}}, color={0,0,127})); - connect(twoHours.y, timePassed.u2) annotation (Line(points={{112.6,92},{ - 134,92},{156,92},{156,53.4},{160.8,53.4}}, color={0,0,127})); - connect(timer1.y, timePassed1.u1) annotation (Line(points={{148.7,33},{ - 154,33},{154,39},{160.8,39}}, color={0,0,127})); - connect(twentyMinutes.y, timePassed1.u2) annotation (Line(points={{112.6, - 72},{132,72},{150,72},{150,33.4},{160.8,33.4}}, color={0,0,127})); - connect(exhaustFan.y, switch4.u1) annotation (Line(points={{52.6,38},{76, - 38},{76,26},{90,26},{90,18},{106,18},{106,4.8},{112.8,4.8}}, - color={0,0,127})); - connect(timePassed.y, switch4.u2) annotation (Line(points={{174.6,59},{ - 184,59},{184,12},{108,12},{108,0},{112.8,0}}, color={255,0,255})); - connect(switch3.y, switch4.u3) annotation (Line(points={{98.6,7},{104,7}, - {104,-4.8},{112.8,-4.8}}, color={0,0,127})); - connect(and2.y, useExFan.u1) annotation (Line(points={{14.7,51},{24,51},{ - 24,7},{58.6,7}}, color={255,0,255})); - connect(greaterThreshold.y,switch7. u2) annotation (Line(points={{52.6, - -80},{58,-80},{62.8,-80}}, color={255,0,255})); - connect(switch7.y, freshAirFlapOpening) annotation (Line(points={{76.6, - -80},{180,-80},{180,-90},{220,-90}}, color={0,0,127})); - connect(switch4.y, greaterThreshold.u) annotation (Line(points={{126.6,0}, - {174,0},{182,0},{182,-68},{78,-68},{78,-60},{32,-60},{32,-80},{ - 38.8,-80}}, color={0,0,127})); - connect(one.y, switch6.u3) annotation (Line(points={{14.6,70},{22,70},{30,70}, - {30,-12},{50,-12},{50,-56},{50,-58},{80,-58},{80,-64.8},{158.8,-64.8}}, - color={0,0,127})); - connect(zero.y, switch6.u1) annotation (Line(points={{12.6,34},{34,34},{ - 34,-6},{80,-6},{80,-48},{146,-48},{146,-55.2},{158.8,-55.2}}, - color={0,0,127})); - connect(one.y, switch7.u1) annotation (Line(points={{14.6,70},{30,70},{30,-12}, - {16,-12},{16,-70},{58,-70},{58,-75.2},{62.8,-75.2}}, color={0,0,127})); - connect(zero.y, switch7.u3) annotation (Line(points={{12.6,34},{34,34},{34,-6}, - {54,-6},{54,-84.8},{62.8,-84.8}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ - -100,-100},{220,100}}), graphics={Rectangle( - extent={{-100,100},{220,-100}}, - lineColor={28,108,200}, - fillColor={255,0,0}, - fillPattern=FillPattern.Solid), Text( - extent={{-58,40},{184,-34}}, - lineColor={0,0,0}, - fillColor={255,0,0}, - fillPattern=FillPattern.Solid, - textString="FVU Controller")}), Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ - 220,100}})), - Documentation(revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Implemented.
    • -
    -", info=" -

    This model is the controller of the facade ventilation unit.

    -

    Level of Development

    -

    -")); -end FVUController; diff --git a/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo b/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo deleted file mode 100644 index bab433836a..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo +++ /dev/null @@ -1,442 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -model FacadeVentilationUnit - "Facade Ventilation Unit (FVU) equipped with a recuperator" - import ExergyBasedControl; - - parameter - ExergyBasedControl.Components.FVU_Physical_Final.Records.FVUBaseRecord - FVUParam= - ExergyBasedControl.Components.FVU_Physical_Final.Records.FVUERCRecord(); - - parameter Modelica.SIunits.ThermodynamicTemperature T_start=273.15 + 20 - "Initial temperature in unit"; - - replaceable package Water = - Modelica.Media.Water.ConstantPropertyLiquidWater - "Water Model in the system"; - replaceable package Air = AixLib.Media.Air "Air Model in the system"; - -protected - parameter Real valveRiseTime = 200; - -public - BaseClasses.SetPower fanExhaustAir( - redeclare package Medium = Air, - allowFlowReversal=true, - noUnits=FVUParam.noUnits, - m_flow_nominal=FVUParam.m2_flow_nominal_heater, - T_start=T_start, - p_start=FVUParam.p_default + res.dp_nominal) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={-118,26}))); - BaseClasses.SetPower fanSupplyAir( - redeclare package Medium = Air, - noUnits=FVUParam.noUnits, - m_flow_nominal=FVUParam.m2_flow_nominal_heater, - p_start=FVUParam.p_default + FVUParam.dp2_nominal_heater + FVUParam.dp2_nominal_cooler) - annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=0, - origin={62,26}))); - Modelica.Fluid.Sensors.Temperature T_ExhaustAir(redeclare package Medium = - Air) - annotation (Placement(transformation(extent={{174,-58},{190,-46}}))); - AixLib.Fluid.HeatExchangers.ConstantEffectiveness heater( - redeclare package Medium2 = Air, - redeclare package Medium1 = Water, - m1_flow_nominal=FVUParam.m1_flow_nominal_heater, - m2_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_heater, - dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_heater) - annotation (Placement(transformation(extent={{116,22},{96,42}}))); - Modelica.Fluid.Interfaces.FluidPort_b OutgoingExhaustAir(redeclare package - Medium = Air) - "Fluid connector b (positive design flow direction is from port_a to port_b)" - annotation (Placement(transformation(extent={{-170,16},{-150,36}}))); - Modelica.Fluid.Interfaces.FluidPort_a FreshAir(redeclare package Medium = Air) - "Fluid connector a (positive design flow direction is from port_a to port_b)" - annotation (Placement(transformation(extent={{-168,-78},{-148,-58}}))); - Modelica.Fluid.Interfaces.FluidPort_a ExhaustAir(redeclare package Medium = - Air) - "Fluid connector a (positive design flow direction is from port_a to port_b)" - annotation (Placement(transformation(extent={{192,-78},{212,-58}}))); - Modelica.Fluid.Interfaces.FluidPort_b SupplyAir(redeclare package Medium = - Air) - "Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)" - annotation (Placement(transformation(extent={{192,16},{212,36}}))); - AixLib.Fluid.HeatExchangers.ConstantEffectiveness cooler( - redeclare package Medium2 = Air, - redeclare package Medium1 = Water, - dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_cooler, - dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_cooler, - m1_flow_nominal=FVUParam.m1_flow_nominal_cooler, - m2_flow_nominal=FVUParam.m2_flow_nominal_cooler) - annotation (Placement(transformation(extent={{182,22},{162,42}}))); - Modelica.Blocks.Interfaces.RealInput fanExhaustAirPower - "Real Input to control the revolving speed of the exhaust air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={-150,100}), iconTransformation( - extent={{-17,-17},{17,17}}, - rotation=270, - origin={-147,97}))); - Modelica.Blocks.Interfaces.RealInput fanSupplyAirPower - "Real Input to control the revolving speed of the supply air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={50,100}), iconTransformation( - extent={{-16,-16},{16,16}}, - rotation=270, - origin={54,96}))); - Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium - = Water) - "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{82,90},{102,110}}))); - Modelica.Fluid.Interfaces.FluidPort_a Heater_Flow(redeclare package Medium = - Water) - "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{112,90},{132,110}}))); - Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium - = Water) - "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{152,90},{172,110}}))); - Modelica.Fluid.Interfaces.FluidPort_a Cooler_Flow(redeclare package Medium = - Water) - "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{182,90},{202,110}}))); - Modelica.Fluid.Sensors.Temperature T_FreshAir(redeclare package Medium = Air) - annotation (Placement(transformation(extent={{-8,-6},{8,6}}, - rotation=180, - origin={-140,-82}))); - Modelica.Fluid.Sensors.Temperature T_OutgoingExhaustAir(redeclare package - Medium = Air) - annotation (Placement(transformation(extent={{-8,-6},{8,6}}, - rotation=0, - origin={-134,44}))); - Modelica.Fluid.Sensors.Temperature T_SupplyAir(redeclare package Medium = Air) - annotation (Placement(transformation(extent={{-8,-6},{8,6}}, - rotation=180, - origin={188,2}))); - Modelica.Fluid.Sensors.Temperature T_AfterHeatRecovery(redeclare package - Medium = Air) - annotation (Placement(transformation(extent={{-28,-10},{-12,2}}))); - - Modelica.Blocks.Interfaces.RealInput heatRecoveryFlapOpening - "Real Input to control the revolving speed of the exhaust air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={-100,100}), iconTransformation( - extent={{-17,-17},{17,17}}, - rotation=270, - origin={-97,97}))); - Modelica.Blocks.Interfaces.RealInput flapCircularAirOpening - "Real Input to control the revolving speed of the supply air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={0,100}), iconTransformation( - extent={{-17,-17},{17,17}}, - rotation=270, - origin={3,97}))); - Modelica.Blocks.Math.Add add1( - k1=-1) - annotation (Placement(transformation(extent={{-65,47},{-55,57}}))); - Modelica.Blocks.Sources.RealExpression realExpression1( - y=1) - annotation (Placement(transformation(extent={{-6.5,-8},{6.5,8}}, - rotation=180, - origin={-59.5,30}))); - Modelica.Fluid.Sensors.Temperature T_Mix(redeclare package Medium = Air) - annotation (Placement(transformation(extent={{32,42},{48,54}}))); - Modelica.Fluid.Sensors.Temperature T_AfterFan(redeclare package Medium = - Air) annotation (Placement(transformation(extent={{70,42},{86,54}}))); - inner Modelica.Fluid.System system - annotation (Placement(transformation(extent={{180,-100},{200,-80}}))); - AixLib.Fluid.FixedResistances.FixedResistanceDpM res(m_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp_nominal=100, redeclare package Medium = - Air) - annotation (Placement(transformation(extent={{-5,-5},{5,5}}, - rotation=180, - origin={-141,26}))); - Modelica.Blocks.Interfaces.RealOutput SupplyTemperature annotation (Placement( - transformation( - extent={{-14,-14},{14,14}}, - rotation=270, - origin={22,-106}), iconTransformation( - extent={{-13,-13},{13,13}}, - rotation=270, - origin={19,-105}))); - Modelica.Blocks.Interfaces.RealOutput MixTemperature annotation (Placement( - transformation( - extent={{-15,-15},{15,15}}, - rotation=270, - origin={-10,-107}), iconTransformation( - extent={{-14,-13.5},{14,13.5}}, - rotation=270, - origin={-11.5,-106}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapCirculationAir( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=20) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={30,-16}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapBypass( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=90) annotation (Placement(transformation( - extent={{-9,-9},{9,9}}, - rotation=0, - origin={-27,36}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapHeatRecovery( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=90) annotation (Placement(transformation( - extent={{-9,-9},{9,9}}, - rotation=0, - origin={-82,-68}))); - Modelica.Fluid.Sensors.Temperature T_beforeCooler(redeclare package Medium = - Air) annotation (Placement(transformation( - extent={{-8,-6},{8,6}}, - rotation=180, - origin={129,0}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapFreshAir( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=20) annotation (Placement(transformation( - extent={{-9,-9},{9,9}}, - rotation=0, - origin={-112,-68}))); - AixLib.Fluid.HeatExchangers.ConstantEffectiveness recuperator(redeclare - package Medium1 = - Air, redeclare package Medium2 = - Air, - eps=0.6, - m1_flow_nominal=FVUParam.m2_flow_nominal_heater, - m2_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp1_nominal=FVUParam.dp2_nominal_heater, - dp2_nominal=FVUParam.dp2_nominal_heater) - annotation (Placement(transformation(extent={{-44,-42},{-24,-22}}))); - Modelica.Fluid.Vessels.ClosedVolume volume( - nPorts=5, - use_portsData=false, - V=0.01, redeclare package Medium = - Air, - T_start=T_start) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={18,14}))); - AixLib.Fluid.FixedResistances.FixedResistanceDpM res1( - m_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp_nominal=100, redeclare package Medium = - Air) - annotation (Placement(transformation(extent={{-5,-5},{5,5}}, - rotation=180, - origin={-61,-68}))); - Modelica.Blocks.Interfaces.RealInput flapFreshAirOpening - "Actuator position (0: closed, 100: open)" annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={-50,100}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening heatingValve( - m_flow_nominal=0.05, - redeclare package Medium = Water, - dpValve_nominal=200) annotation (Placement(transformation( - extent={{-9,9},{9,-9}}, - rotation=90, - origin={122,60}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening coolingValve( - m_flow_nominal=0.05, - redeclare package Medium = Water, - dpValve_nominal=200) annotation (Placement(transformation( - extent={{-9,9},{9,-9}}, - rotation=90, - origin={192,58}))); - Modelica.Blocks.Interfaces.RealInput heatingValveOpening - "Actuator position (0: closed, 100: open)" annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={142,100}))); - Modelica.Blocks.Interfaces.RealInput coolingValveOpening - "Actuator position (0: closed, 100: open)" annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={212,100}))); -equation - - connect(cooler.port_b2, SupplyAir) annotation (Line( - points={{182,26},{202,26}}, - color={0,127,255}, - smooth=Smooth.None, - thickness=1)); - connect(T_ExhaustAir.port, ExhaustAir) annotation (Line( - points={{182,-58},{182,-68},{202,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_FreshAir.port, FreshAir) annotation (Line( - points={{-140,-76},{-140,-68},{-158,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_OutgoingExhaustAir.port, fanExhaustAir.port_b) annotation (Line( - points={{-134,38},{-134,26},{-128,26}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(cooler.port_b2, T_SupplyAir.port) annotation (Line( - points={{182,26},{188,26},{188,8}}, - color={0,127,255}, - smooth=Smooth.None)); - - connect(add1.u2, realExpression1.y) annotation (Line( - points={{-66,49},{-70,49},{-70,30},{-66.65,30}}, - color={0,0,127}, - smooth=Smooth.None)); - - connect(T_Mix.port, fanSupplyAir.port_a) - annotation (Line(points={{40,42},{40,26},{52,26}}, color={0,127,255})); - connect(OutgoingExhaustAir, res.port_b) - annotation (Line(points={{-160,26},{-146,26}}, color={0,127,255}, - thickness=1)); - connect(fanExhaustAir.port_b, res.port_a) annotation (Line( - points={{-128,26},{-136,26}}, - color={0,127,255}, - thickness=1)); - connect(FreshAir, FreshAir) annotation (Line( - points={{-158,-68},{-158,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_SupplyAir.T, SupplyTemperature); - connect(T_Mix.T, MixTemperature); - connect(T_AfterFan.port, fanSupplyAir.port_b) annotation (Line( - points={{78,42},{78,26},{72,26}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(add1.y, flapBypass.y) annotation (Line( - points={{-54.5,52},{-27,52},{-27,46.8}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(ExhaustAir, ExhaustAir) annotation (Line( - points={{202,-68},{202,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_beforeCooler.port,heater. port_b2) annotation (Line( - points={{129,6},{130,6},{130,26},{116,26}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(flapFreshAir.port_b, flapHeatRecovery.port_a) - annotation (Line(points={{-103,-68},{-91,-68}}, color={0,127,255})); - connect(FreshAir, flapFreshAir.port_a) - annotation (Line(points={{-158,-68},{-121,-68}}, color={0,127,255})); - connect(flapFreshAir.port_b, flapBypass.port_a) annotation (Line(points={{-103, - -68},{-100,-68},{-100,36},{-36,36}}, color={0,127,255})); - connect(fanSupplyAir.port_b, heater.port_a2) - annotation (Line(points={{72,26},{84,26},{96,26}}, color={0,127,255})); - connect(ExhaustAir, recuperator.port_a2) annotation (Line(points={{202,-68},{104, - -68},{-4,-68},{-4,-38},{-24,-38}}, color={0,127,255})); - connect(recuperator.port_b2, fanExhaustAir.port_a) annotation (Line(points={{-44,-38}, - {-44,-38},{-90,-38},{-90,26},{-108,26}}, color={0,127, - 255})); - connect(recuperator.port_b1, volume.ports[1]) annotation (Line(points={{-24,-26}, - {-6,-26},{-6,24},{21.2,24}}, - color={0,127,255})); - connect(flapBypass.port_b, volume.ports[2]) - annotation (Line(points={{-18,36},{19.6,36},{19.6,24}}, - color={0,127,255})); - connect(flapCirculationAir.port_b, volume.ports[3]) annotation (Line(points={{30,-6}, - {30,-6},{30,24},{18,24}}, color={0,127,255})); - connect(fanSupplyAir.port_a, volume.ports[4]) - annotation (Line(points={{52,26},{16.4,26},{16.4,24}}, - color={0,127,255})); - connect(T_AfterHeatRecovery.port, recuperator.port_b1) annotation (Line( - points={{-20,-10},{-20,-26},{-24,-26}}, color={0,127,255})); - connect(heater.port_b2,cooler. port_a2) annotation (Line(points={{116,26},{ - 140,26},{162,26}}, color={0,127,255})); - connect(flapHeatRecovery.port_b, res1.port_a) - annotation (Line(points={{-73,-68},{-56,-68}}, color={0,127,255})); - connect(res1.port_b, recuperator.port_a1) annotation (Line(points={{-66,-68}, - {-50,-68},{-50,-26},{-44,-26}}, color={0,127,255})); - connect(heater.port_a1, heatingValve.port_a) annotation (Line(points={{116, - 38},{122,38},{122,51}}, color={0,127,255})); - connect(heatingValve.port_b, Heater_Flow) annotation (Line(points={{122,69}, - {122,84.5},{122,100}}, color={0,127,255})); - connect(Cooler_Return, cooler.port_b1) annotation (Line(points={{162,100},{ - 162,38},{162,38}}, color={0,127,255})); - connect(cooler.port_a1, coolingValve.port_a) annotation (Line(points={{182,38}, - {192,38},{192,49}}, color={0,127,255})); - connect(coolingValve.port_b, Cooler_Flow) annotation (Line(points={{192,67},{ - 192,74},{192,100}}, color={0,127,255})); - connect(Heater_Return, heater.port_b1) annotation (Line(points={{92,100},{94, - 100},{94,38},{96,38}}, color={0,127,255})); - connect(heatRecoveryFlapOpening, add1.u1) - annotation (Line(points={{-100,100},{-100,55},{-66,55}}, color={0,0,127})); - connect(fanExhaustAirPower, fanExhaustAir.powerShare) annotation (Line(points= - {{-150,100},{-150,100},{-150,70},{-150,64},{-118,64},{-118,36}}, color= - {0,0,127})); - connect(flapFreshAirOpening, flapFreshAir.y) annotation (Line(points={{-50,100}, - {-50,100},{-50,76},{-50,68},{-104,68},{-104,-32},{-112,-32},{-112,-57.2}}, - color={0,0,127})); - connect(heatRecoveryFlapOpening, flapHeatRecovery.y) annotation (Line(points={ - {-100,100},{-100,55},{-82,55},{-82,-57.2}}, color={0,0,127})); - connect(fanSupplyAirPower, fanSupplyAir.powerShare) annotation (Line(points={{ - 50,100},{50,100},{50,68},{50,62},{62,62},{62,36}}, color={0,0,127})); - connect(heatingValveOpening, heatingValve.y) - annotation (Line(points={{142,100},{142,60},{132.8,60}}, color={0,0,127})); - connect(coolingValveOpening, coolingValve.y) annotation (Line(points={{212,100}, - {212,100},{212,62},{212,58},{202.8,58}}, color={0,0,127})); - connect(flapCircularAirOpening, flapCirculationAir.y) annotation (Line(points= - {{0,100},{0,100},{0,18},{0,-16},{18,-16}}, color={0,0,127})); - connect(ExhaustAir, flapCirculationAir.port_a) annotation (Line(points={{202,-68}, - {114,-68},{30,-68},{30,-26}}, color={0,127,255})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160, - -100},{200,100}})), - Icon(coordinateSystem(extent={{-160,-100},{200,100}}, preserveAspectRatio=false), - graphics={Rectangle( - extent={{-160,100},{200,-100}}, - lineColor={0,0,255}, - fillPattern=FillPattern.Solid, - fillColor={0,0,255}), Text( - extent={{-120,56},{168,-52}}, - lineColor={255,0,0}, - fillColor={0,0,255}, - fillPattern=FillPattern.Solid, - textString="FVU", - textStyle={TextStyle.Bold})}), - experiment(StopTime=86400, Interval=1), - __Dymola_experimentSetupOutput, - Documentation(info=" -

    overview

    -

    This is a model for Facade Ventilation Unit (FVU), which can be used for heating, cooling and ventilation purposes.

    -


    Level of Development

    -

    -


    Operation Modes of FVU:

    -

    The fresh air sucked in by the fan may flow through the heat recovery unit or through the bypass flap or through both of them. Depending on the operation mode, the fresh air cools down or heats up in the cooler or the heater to reach the desired supply temperature before it flows into the room. The air sucked out of the room may flow through the circulation air flap or heat recovery unit or both of them. The heater and the cooler are supported by the hot and cold water curcuis, respectively.

    -


    FVU Components:

    -

    Supply- and Exhaust fans:

    -

    The supply- and exhaust fans are modelled based on a table that gets an input signal in percent and gives a mass flow rate according to the data defined in the table. However, in order to achieve a high level of acoustic comfort, the power share input signal is limited to max. 50%.

    -

    Circulation Air flap:

    -

    In case of heating or cooling mode, it is checked if the mass flow rate through the supply fan is higher than the mass flow rate through the exhaust fan, and if so, circulation air operation gets activated. In this mode, the circulation air flap gets a signal from FVU-Controller, which means calculating a corresponding flap opening. The input signal Circ is defined as below:

    -

    -

    Recuperator, Heat Recovery and Bypass flap:

    -

    In order to preheat or precool the fresh air before flowing through the heater/cooler a recuperator is located between the fresh and exhaust air. In case of heating or cooling mode and when the free heating or free cooling are not activated (RH_free and RC_free = false), fresh air flows completely through the bypass flap. However at any time a maximum value from FVU-Controller is selected as an input signal for heat recovery flap. According to this input Signal it will be calculated how much volume flow rate flows through the bypass flap at any time. The Recuperator is so modelled that the efficiency of recuperator based on manufacturer data is readed as a function of volume flow rate. By defining the maximum heat power exchanged between the fresh and exhaust air in counter current flow recuperators, the heat power can be calculated at any time. here the recuperator is shown schematic:

    -

    -

    Heat Power of recuperator is calculated as below:

    -

    -", revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Implemented.
    • -
    -")); -end FacadeVentilationUnit; diff --git a/AixLib/HVAC/FacadeVentilationUnit/package.order b/AixLib/HVAC/FacadeVentilationUnit/package.order deleted file mode 100644 index 764d449774..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/package.order +++ /dev/null @@ -1,4 +0,0 @@ -BaseClasses -FacadeVentilationUnit -FVUController -Example diff --git a/AixLib/HVAC/Meter/ExergyMeter/Example.mo b/AixLib/HVAC/Meter/ExergyMeter/Example.mo deleted file mode 100644 index 1f242f365c..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/Example.mo +++ /dev/null @@ -1,263 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model Example - - extends Modelica.Icons.Example; - - parameter Modelica.SIunits.Temperature T_start=323.15 - "Start reference temperature of medium"; - - parameter Integer n = 10 "Number of layers"; - - parameter Real mass = 1000 "Mass of one layer"; - - package Medium = AixLib.Media.Water "Medium in the sensor" - annotation (choicesAllMatching=true); - - Modelica.Blocks.Sources.Sine pulse( - each amplitude=1000, - each freqHz=1/3600, - each offset=3000) - annotation (Placement(transformation(extent={{-10,-20},{10,0}}))); - StoredExergyMeter exergyStorageMeterMedium( - redeclare package Medium = Medium, - T_ref_start=T_ref.k, - T_start=T_start, - exergyContent_start=1.70904e+08, - n=n, - mass=mass) - annotation (Placement(transformation(extent={{-44,-40},{-24,-20}}))); - Modelica.Blocks.Sources.Constant T_ref(k=273.15) - annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); - Modelica.Blocks.Sources.Constant p_ref(k=101300) - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); - Modelica.Blocks.Sources.Constant X_ref[1](k={1}) - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); - inner Modelica.Fluid.System system - annotation (Placement(transformation(extent={{80,-100},{100,-80}}))); - HeatExergyMeter exHeatSec - annotation (Placement(transformation(extent={{74,5},{94,25}}))); - AixLib.Fluid.Movers.FlowControlled_m_flow pumpPrim( - addPowerToMedium=false, - nominalValuesDefineDefaultPressureCurve=true, - redeclare package Medium = Medium, - T_start=T_start, - m_flow_nominal=0.5, - m_flow_small=0.001) - annotation (Placement(transformation(extent={{-64,76},{-44,96}}))); - AixLib.Fluid.Storage.Storage - bufferStorageHeatingcoils(layer_HE(T_start=T_start), layer(T_start=T_start), - redeclare package Medium = Medium, - lambda_ins=0.075, - s_ins=0.2, - alpha_in=100, - alpha_out=10, - k_HE=300, - h=1.5, - V_HE=0.02, - A_HE=7, - n=10, - d=2) annotation (Placement(transformation(extent={{26,54},{-2,88}}))); - AixLib.Fluid.FixedResistances.StaticPipe pipePrim( - D=0.1, - redeclare package Medium = Medium, - m_flow_small=0.001) annotation (Placement(transformation( - extent={{-7,-7.5},{7,7.5}}, - rotation=180, - origin={-53,56.5}))); - FlowExergyMeter exPrimIn(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-36,76},{-14,96}}))); - FlowExergyMeter exPrimOut(redeclare package Medium = Medium) annotation ( - Placement(transformation( - extent={{-11,10},{11,-10}}, - rotation=180, - origin={-25,57}))); - Modelica.Fluid.Vessels.ClosedVolume heater(redeclare package Medium = Medium, - nPorts=2, - use_HeatTransfer=true, - use_portsData=false, - V(displayUnit="l") = 0.05, - T_start=T_start) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={-84,70}))); - AixLib.Fluid.Movers.FlowControlled_m_flow pumpSec( - addPowerToMedium=false, - nominalValuesDefineDefaultPressureCurve=true, - redeclare package Medium = Medium, - T_start=T_start, - m_flow_nominal=0.5, - m_flow_small=0.001) - annotation (Placement(transformation(extent={{60,72},{80,92}}))); - AixLib.Fluid.FixedResistances.StaticPipe pipeSec( - D=0.1, - redeclare package Medium = Medium, - m_flow_small=0.001) annotation (Placement(transformation( - extent={{-8,-7.5},{8,7.5}}, - rotation=180, - origin={66,54.5}))); - Modelica.Fluid.Vessels.ClosedVolume consumer( - redeclare package Medium = Medium, - use_HeatTransfer=true, - V(displayUnit="l") = 0.05, - use_portsData=false, - nPorts=2, - T_start=T_start) annotation (Placement(transformation( - extent={{10,-10},{-10,10}}, - rotation=270, - origin={94,70}))); - FlowExergyMeter exSecOut(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{34,72},{56,92}}))); - FlowExergyMeter exSecIn(redeclare package Medium = Medium) annotation ( - Placement(transformation( - extent={{-11,10},{11,-10}}, - rotation=180, - origin={41,54}))); - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow consumerHeatFlow - annotation (Placement(transformation(extent={{48,14},{68,34}}))); - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaterHeatFlow - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={-28,24}))); - Modelica.Blocks.Math.Gain gain(k=-1) - annotation (Placement(transformation(extent={{28,18},{40,30}}))); - HeatExergyMeter exHeatPrim annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=180, - origin={-68,15}))); - Modelica.Blocks.Sources.RealExpression storageTemperatures[n](y= - bufferStorageHeatingcoils.layer[:].heatPort.T) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={2,-58}))); - Modelica.Blocks.Sources.Constant pumpMassFlow(k=0.5) - annotation (Placement(transformation(extent={{-100,88},{-88,100}}))); - AixLib.Fluid.Sources.Boundary_pT expansionVesselSec( - redeclare package Medium = Medium, - nPorts=1, - p=110000) annotation (Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=270, - origin={58,94}))); - AixLib.Fluid.Sources.Boundary_pT expansionVesselPrim( - redeclare package Medium = Medium, - nPorts=1, - p=110000) annotation (Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=270, - origin={-70,94}))); -equation - connect(T_ref.y, exergyStorageMeterMedium.T_ref) annotation (Line(points={{-79,-10}, - {-72,-10},{-72,-23},{-44,-23}}, - color={0,0,127})); - connect(p_ref.y, exergyStorageMeterMedium.p_ref) annotation (Line(points={{-79,-50}, - {-76,-50},{-76,-30},{-44,-30}},color={0,0,127})); - connect(X_ref.y, exergyStorageMeterMedium.X_ref) annotation (Line(points={{-79,-90}, - {-54,-90},{-54,-37},{-44,-37}}, color={0,0,127})); - connect(p_ref.y, exergyStorageMeterMedium.p) annotation (Line(points={{-79,-50}, - {-74,-50},{-39,-50},{-39,-41}}, color={0,0,127})); - connect(X_ref.y, exergyStorageMeterMedium.X) annotation (Line(points={{-79,-90}, - {-80,-90},{-29,-90},{-29,-41}},color={0,0,127})); - - connect(pumpPrim.port_b, exPrimIn.port_a) - annotation (Line(points={{-44,86},{-40,86},{-36,86}}, color={0,127,255})); - connect(exPrimIn.port_b, bufferStorageHeatingcoils.port_a_heatGenerator) - annotation (Line(points={{-16,86},{0.24,86},{0.24,85.96}}, color={0,127,255})); - connect(bufferStorageHeatingcoils.port_b_heatGenerator, exPrimOut.port_a) - annotation (Line(points={{0.24,57.4},{-5.88,57.4},{-5.88,57},{-16,57}}, - color={0,127,255})); - connect(exPrimOut.port_b, pipePrim.port_a) annotation (Line(points={{-36,57}, - {-46,57},{-46,56.5}},color={0,127,255})); - connect(pipePrim.port_b, heater.ports[1]) annotation (Line(points={{-60,56.5}, - {-72,56.5},{-72,68},{-74,68}}, color={0,127,255})); - connect(heater.ports[2], pumpPrim.port_a) annotation (Line(points={{-74,72},{-70, - 72},{-70,86},{-64,86}}, color={0,127,255})); - connect(bufferStorageHeatingcoils.port_b_consumer, exSecOut.port_a) - annotation (Line(points={{12,88},{12,92},{28,92},{28,82},{34,82}}, color={0, - 127,255})); - connect(exSecOut.port_b, pumpSec.port_a) - annotation (Line(points={{54,82},{54,82},{60,82}}, color={0,127,255})); - connect(exSecIn.port_a, pipeSec.port_b) - annotation (Line(points={{50,54},{58,54},{58,54.5}}, color={0,127,255})); - connect(exSecIn.port_b, bufferStorageHeatingcoils.port_a_consumer) - annotation (Line(points={{30,54},{28,54},{28,46},{12,46},{12,54}}, color={0, - 127,255})); - connect(pipeSec.port_a, consumer.ports[1]) annotation (Line(points={{74,54.5}, - {80,54.5},{80,68},{84,68}}, color={0,127,255})); - connect(pumpSec.port_b, consumer.ports[2]) annotation (Line(points={{80,82},{82, - 82},{82,72},{84,72}}, color={0,127,255})); - connect(consumerHeatFlow.Q_flow, gain.y) - annotation (Line(points={{48,24},{40.6,24}}, color={0,0,127})); - connect(pulse.y, gain.u) annotation (Line(points={{11,-10},{20,-10},{20,24},{26.8, - 24}}, color={0,0,127})); - connect(pulse.y, heaterHeatFlow.Q_flow) annotation (Line(points={{11,-10},{20, - -10},{20,24},{-18,24}}, color={0,0,127})); - connect(consumerHeatFlow.port, exHeatSec.port_a) annotation (Line(points={{68, - 24},{71,24},{71,24.2},{74,24.2}}, color={191,0,0})); - connect(exHeatSec.port_b, consumer.heatPort) - annotation (Line(points={{94,24.2},{94,60}}, color={191,0,0})); - connect(heaterHeatFlow.port, exHeatPrim.port_a) annotation (Line(points={{-38, - 24},{-48,24},{-48,24.2},{-58,24.2}}, color={191,0,0})); - connect(exHeatPrim.port_b, heater.heatPort) - annotation (Line(points={{-78,24.2},{-84,24},{-84,60}}, color={191,0,0})); - connect(T_ref.y, exHeatPrim.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,15},{-58,15}}, color={0,0,127})); - connect(T_ref.y, exHeatSec.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,15},{74,15}}, color={0,0,127})); - connect(storageTemperatures.y, exergyStorageMeterMedium.T) - annotation (Line(points={{-9,-58},{-34,-58},{-34,-40}}, color={0,0,127})); - connect(T_ref.y, exPrimOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, - {-50,-10},{-50,38},{-35,38},{-35,47}}, color={0,0,127})); - connect(T_ref.y, exPrimIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,38},{-40,38},{-40,66},{-34,66},{-17,66},{-17,76}}, color={0,0,127})); - connect(T_ref.y, exSecIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,38},{31,38},{31,44}},color={0,0,127})); - connect(T_ref.y, exSecOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, - {-50,-10},{-50,38},{56,38},{56,62},{53,62},{53,72}}, color={0,0,127})); - connect(p_ref.y, exPrimOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,-30},{-52,-30},{-52,40},{-26,40},{-26,47}}, color={0,0,127})); - connect(p_ref.y, exPrimIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,-30},{-52,-30},{-52,40},{-42,40},{-42,68},{-26,68},{-26,76}}, - color={0,0,127})); - connect(p_ref.y, exSecOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,40},{-42,40},{-42,68},{-8,68},{-8,96},{30,96},{30,64},{44,64},{44, - 72}}, color={0,0,127})); - connect(p_ref.y, exSecIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,40},{-42,40},{-42,68},{-8,68},{-8,40},{40,40},{40,44}},color={0,0, - 127})); - connect(X_ref.y, exSecIn.X_ref) annotation (Line(points={{-79,-90},{-50,-90}, - {44,-90},{44,34},{49,34},{49,44}},color={0,0,127})); - connect(X_ref.y, exSecOut.X_ref) annotation (Line(points={{-79,-90},{-18,-90}, - {44,-90},{44,34},{54,34},{54,62},{35,62},{35,72}}, color={0,0,127})); - connect(X_ref.y, exPrimOut.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, - {-54,42},{-17,42},{-17,47}}, color={0,0,127})); - connect(X_ref.y, exPrimIn.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, - {-54,44},{-35,44},{-35,76}}, color={0,0,127})); - connect(pumpMassFlow.y, pumpPrim.m_flow_in) annotation (Line(points={{-87.4, - 94},{-76,94},{-76,100},{-54.2,100},{-54.2,98}}, - color={0,0,127})); - connect(pumpMassFlow.y, pumpSec.m_flow_in) annotation (Line(points={{-87.4,94}, - {-76,94},{-76,100},{69.8,100},{69.8,94}}, color={0,0,127})); - connect(expansionVesselSec.ports[1], pumpSec.port_a) annotation (Line(points= - {{58,90},{58,82},{58,82},{58,82},{60,82},{60,82}}, color={0,127,255})); - connect(expansionVesselPrim.ports[1], pumpPrim.port_a) - annotation (Line(points={{-70,90},{-70,86},{-64,86}}, color={0,127,255})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false)), - experiment(StopTime=1000, Interval=10), - __Dymola_experimentSetupOutput, - __Dymola_experimentFlags( - Advanced(GenerateVariableDependencies=false, OutputModelicaCode=false), - Evaluate=false, - OutputCPUtime=true, - OutputFlatModelica=false), - Documentation(info=" -

    This model shows the usage of all three ExergyMeters.

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -")); -end Example; diff --git a/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo deleted file mode 100644 index 65e8fcf1a9..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo +++ /dev/null @@ -1,127 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model FlowExergyMeter - - extends AixLib.Fluid.Interfaces.PartialTwoPort; - extends Modelica.Icons.RotationalSensor; - - Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) - "Reference composition" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={-90,-100}))); - Modelica.Fluid.Sources.Boundary_pT referenceEnvironment( - redeclare replaceable package Medium = Medium, - use_p_in=true, - nPorts=2, - use_T_in=true, - use_X_in=true) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={0,-56}))); - Modelica.Fluid.Sensors.MassFlowRate massFlowRate(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy(redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{70,0},{50,20}}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy(redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); -public - Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", - final quantity="ThermodynamicTemperature", min=0) "Reference temperature" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={90,-100}))); - Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) - "Reference pressure" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={0,-100}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy_ref(redeclare - package Medium = Medium) - annotation (Placement(transformation(extent={{-12,-62},{-32,-42}}))); - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy_ref(redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{18,-64},{38,-42}}))); - Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", - final unit="W") "Exergy content of the medium flow" - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,110}))); - Modelica.Blocks.Math.Add enthalpyDifference(k1=-1) - annotation (Placement(transformation(extent={{-36,20},{-16,40}}))); - Modelica.Blocks.Math.Add entropyDifference(k1=-1) - annotation (Placement(transformation(extent={{-36,46},{-16,66}}))); - Modelica.Blocks.Math.Product productWithReferenceTemperature - annotation (Placement(transformation(extent={{0,40},{20,60}}))); - Modelica.Blocks.Math.Add specificExergy(k1=-1) - annotation (Placement(transformation(extent={{40,40},{60,60}}))); - Modelica.Blocks.Math.Product exergyFlowRate - annotation (Placement(transformation(extent={{-10,-10},{10,10}}, - rotation=180, - origin={50,80}))); -equation - connect(specificEnthalpy_ref.port, referenceEnvironment.ports[1]) - annotation (Line(points={{-22,-62},{-22,-66},{2,-66}}, - color={0,127,255})); - connect(referenceEnvironment.ports[2], specificEntropy_ref.port) - annotation (Line(points={{-2,-66},{28,-66},{28,-64}}, - color={0,127,255})); - connect(massFlowRate.port_b,specificEntropy. port) - annotation (Line(points={{10,0},{60,0}}, color={0,127,255})); - connect(specificEnthalpy.h_out, enthalpyDifference.u2) annotation (Line( - points={{-49,10},{-46,10},{-46,24},{-38,24}}, color={0,0,127})); - connect(specificEnthalpy_ref.h_out, enthalpyDifference.u1) annotation (Line( - points={{-33,-52},{-44,-52},{-44,-24},{-44,36},{-38,36}},color={0,0,127})); - connect(T_ref, productWithReferenceTemperature.u2) annotation (Line(points={{90,-100}, - {90,-100},{90,-34},{20,-34},{20,34},{-8,34},{-8,44},{-2,44}}, - color={0,0,127})); - connect(enthalpyDifference.y, specificExergy.u2) annotation (Line(points={{-15,30}, - {32,30},{32,44},{38,44}}, color={0,0,127})); - connect(port_a, specificEnthalpy.port) - annotation (Line(points={{-100,0},{-80,0},{-60,0}}, color={0,127,255})); - connect(specificEntropy.port, port_b) - annotation (Line(points={{60,0},{80,0},{100,0}}, color={0,127,255})); - connect(specificEntropy_ref.s, entropyDifference.u1) annotation (Line(points={{39,-53}, - {39,-53},{44,-53},{44,-27},{-86,-27},{-86,62},{-38,62}}, - color={0,0,127})); - connect(productWithReferenceTemperature.y, specificExergy.u1) - annotation (Line(points={{21,50},{22,50},{22,50},{24,50},{32,50},{32,56}, - {38,56}}, color={0,0,127})); - connect(massFlowRate.m_flow, exergyFlowRate.u2) annotation (Line(points={{0,-11}, - {0,-26},{74,-26},{74,86},{62,86}}, color={0,0,127})); - connect(exergyFlowRate.y, exergy_flow) - annotation (Line(points={{39,80},{0,80},{0,110}}, color={0,0,127})); - connect(specificEntropy.s, entropyDifference.u2) annotation (Line(points={{49,10}, - {32,10},{32,-18},{-78,-18},{-78,50},{-38,50}}, color={0,0,127})); - connect(entropyDifference.y, productWithReferenceTemperature.u1) - annotation (Line(points={{-15,56},{-2,56}}, color={0,0,127})); - connect(specificExergy.y, exergyFlowRate.u1) annotation (Line(points={{61,50}, - {68,50},{68,74},{62,74}}, color={0,0,127})); - connect(X_ref, referenceEnvironment.X_in) annotation (Line(points={{-90,-100}, - {-90,-100},{-90,-78},{-90,-38},{-4,-38},{-4,-44}}, - color={0,0,127})); - connect(p_ref, referenceEnvironment.p_in) annotation (Line(points={{0,-100},{0, - -70},{48,-70},{48,-36},{8,-36},{8,-40},{8,-44}}, - color={0,0,127})); - connect(T_ref, referenceEnvironment.T_in) annotation (Line(points={{90,-100},{ - 90,-100},{90,-86},{90,-34},{4,-34},{4,-44}}, - color={0,0,127})); - connect(specificEnthalpy.port, massFlowRate.port_a) - annotation (Line(points={{-60,0},{-36,0},{-10,0}}, color={0,127,255})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}})), Documentation(info=" -

    The model calculates the exergy content of a medium flow consisting of multiple substances. The reference environment is variable. The underlying equation is

    -

    \"dE/dt=dm/dt*(h-h_ref-T_ref*(s-s_ref))\"/

    -

    with \"dE/dt\"/: exergy flow rate, \"dm/dt\"/: mass flow rate, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

    -

    The reference environment is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The sensor is ideal, i.e., it does not influence the fluid.

    -

    Level of Development

    -

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -"), - Icon(coordinateSystem(extent={{-100,-100},{120,100}}))); -end FlowExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo deleted file mode 100644 index b03dd0f9bf..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo +++ /dev/null @@ -1,120 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model HeatExergyMeter - - extends Modelica.Icons.RotationalSensor; - - parameter Boolean useConvectiveHeatFlow = true - "Set to 'true' in order to connect the meter to a convective heat port"; - parameter Boolean useRadiativeHeatFlow = false - "Set to 'true' in order to connect the meter to a radiative heat port"; - parameter Boolean solarRadiation = false - "Set to 'true' in order to connect the meter to a solar radiation port" annotation(Dialog(enable = if useRadiativeHeatFlow then true else false)); - parameter Modelica.SIunits.ThermodynamicTemperature sunTemperature = 6000 - "Temperature assumption for the solar radiation"; - Modelica.Blocks.Math.Add add(k2=-1) - annotation (Placement(transformation(extent={{20,-10},{40,10}}))); - Modelica.Blocks.Sources.Constant const(k=1) - annotation (Placement(transformation(extent={{-12,0},{0,12}}))); - Modelica.Blocks.Math.Division division - annotation (Placement(transformation(extent={{-20,-40},{0,-20}}))); - Modelica.Blocks.Math.Product product - annotation (Placement(transformation(extent={{60,20},{80,40}}))); - Modelica.Blocks.Nonlinear.Limiter limiter(uMax=400, uMin=1) - annotation (Placement(transformation(extent={{-66,-56},{-54,-44}}))); - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{-110,82},{-90,102}}))); - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{90,82},{110,102}}))); - Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{-10,82},{10,102}}))); - Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{-94,58},{-74,78}}))); - AixLib.HVAC.Interfaces.RadPort radPort_a if - useRadiativeHeatFlow - annotation (Placement(transformation(extent={{-110,-90},{-90,-70}}))); - AixLib.HVAC.Interfaces.RadPort radPort_b if - useRadiativeHeatFlow - annotation (Placement(transformation(extent={{90,-90},{110,-70}}))); - Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor1 if useRadiativeHeatFlow - annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=0, - origin={0,-74}))); - Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor1 if - useRadiativeHeatFlow - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); -public - Modelica.Blocks.Interfaces.RealInput T_ref( - final unit="K", - displayUnit="degC", - final quantity="ThermodynamicTemperature", - min=0) "Reference temperature" annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=0, - origin={-100,0}))); - Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", - final unit="W") "Exergy content of the medium flow" - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={0,-110}))); -equation - connect(const.y, add.u1) annotation (Line( - points={{0.6,6},{18,6}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(division.y, add.u2) annotation (Line( - points={{1,-30},{6,-30},{6,-6},{18,-6}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(add.y, product.u2) annotation (Line( - points={{41,0},{52,0},{52,24},{58,24}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(limiter.y, division.u2) annotation (Line( - points={{-53.4,-50},{-40,-50},{-40,-36},{-22,-36}}, - color={0,0,127}, - smooth=Smooth.None)); - - if useConvectiveHeatFlow then - connect(temperatureSensor.T, limiter.u); - connect(heatFlowSensor.Q_flow, product.u1); - connect(port_a, heatFlowSensor.port_a); - connect(heatFlowSensor.port_b, port_b); - connect(port_a, temperatureSensor.port); - - end if; - - if useRadiativeHeatFlow then - - if solarRadiation then - limiter.u = sunTemperature; - else - connect(temperatureSensor1.T, limiter.u); - end if; - - connect(heatFlowSensor1.Q_flow, product.u1); - connect(temperatureSensor1.port, radPort_a); - connect(heatFlowSensor1.port_a, radPort_a); - connect(heatFlowSensor1.port_b, radPort_b); - end if; - - connect(T_ref, division.u1) annotation (Line(points={{-100,0},{-40,0},{-40,-24}, - {-22,-24}}, color={0,0,127})); - connect(product.y, exergy_flow) annotation (Line(points={{81,30},{86,30},{86,-92}, - {20,-92},{0,-92},{0,-110}}, color={0,0,127})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}})), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Documentation(info=" -

    The model calculates the exergy flow rate of a radiaitive or convective heat flux. The reference environment (subscript \"_ref\"/) is variable. The basic equation is

    -

    \"dE/dt=dQ/dt*(1-T_ref/T)\"/

    -

    with \"dE/dt\"/: exergy flow rate, \"dQ/dt\"/: heat flow rate, \"T\"/: temperature

    -

    Level of Development

    -

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -")); -end HeatExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo deleted file mode 100644 index 978aa67101..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo +++ /dev/null @@ -1,207 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model StoredExergyMeter - - extends Modelica.Icons.RotationalSensor; - - replaceable package Medium = Modelica.Media.Interfaces.PartialMedium - "Medium in the sensor" annotation (choicesAllMatching=true); - - parameter Integer n=1 "Number of identical volumes"; - - parameter Modelica.SIunits.Mass mass=100 "mass of each layer"; - parameter Modelica.SIunits.Temperature T_start=323.15 - "Start reference temperature of medium" - annotation (Dialog(tab="Initialisation")); - parameter Modelica.SIunits.Temperature T_ref_start=273.15 - "Start reference temperature" annotation (Dialog(tab="Initialisation")); - parameter Modelica.SIunits.Energy exergyContent_start = 1e+05 - "Start exergy content" annotation (Dialog(tab="Initialisation")); - - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy[n](redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{70,0},{50,20}}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy[n](redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); -public - Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", - final quantity="ThermodynamicTemperature", min=0) "Reference temperature for EXERGY calculations in K. - It must be distinguished between the the reference temperature used for exergy calculations and the reference - for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" - annotation (Placement(transformation(extent={{-120,50},{-80,90}}))); - Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) - "Reference pressure" - annotation (Placement(transformation(extent={{-120,-20},{-80,20}}), - iconTransformation(extent={{-120,-20},{-80,20}}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy1[n](redeclare - package Medium = Medium) - annotation (Placement(transformation(extent={{-10,60},{-30,40}}))); - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy1[n](redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{10,60},{30,40}}))); - Modelica.Blocks.Interfaces.RealOutput ExergyChangeRate(final quantity="Power", - final unit="W") annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={106,-62}))); - Modelica.Fluid.Sources.Boundary_pT referenceEnvironment[n]( - redeclare package Medium = Medium, - each use_p_in=true, - each nPorts=2, - each use_T_in=true, - each use_X_in=true) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={0,80}))); - Modelica.Fluid.Sources.Boundary_pT boundary[n]( - redeclare package Medium = Medium, - each use_p_in=true, - each use_T_in=true, - each nPorts=2, - each use_X_in=true) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,0}))); -public - Modelica.Blocks.Interfaces.RealInput T[n]( - final unit="K", - displayUnit="degC", - final quantity="ThermodynamicTemperature", - min=0) "Reference temperature for EXERGY calculations in K. - It must be distinguished between the the reference temperature used for exergy calculations and the reference - for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={0,-112}), iconTransformation( - extent={{-20,-20},{20,20}}, - rotation=90, - origin={0,-100}))); - Modelica.Blocks.Interfaces.RealInput p( - final quantity="Pressure", - final unit="Pa", - displayUnit="bar", - min=0) "Reference pressure" annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=90, - origin={-50,-110}))); - Modelica.Blocks.Math.Sum sum1(nin=n) - annotation (Placement(transformation(extent={{-60,-60},{-40,-40}}))); - Modelica.Blocks.Math.Gain gain(k=mass) - annotation (Placement(transformation(extent={{-26,-57},{-12,-43}}))); - Modelica.Blocks.Math.Add add[n](each k1=-1) - annotation (Placement(transformation(extent={{-46,33},{-60,47}}))); - Modelica.Blocks.Math.Add add1[n](each k1=-1) - annotation (Placement(transformation(extent={{46,33},{60,47}}))); - Modelica.Blocks.Math.Sum sum2(nin=n) - annotation (Placement(transformation(extent={{64,-42},{44,-22}}))); - Modelica.Blocks.Math.Add add2(each k1=-1) - annotation (Placement(transformation(extent={{38,-69},{52,-55}}))); - Modelica.Blocks.Continuous.Derivative derivative( - x_start=exergyContent_start, - initType=Modelica.Blocks.Types.Init.InitialState, - T=10) - annotation (Placement(transformation(extent={{64,-72},{84,-52}}))); - Modelica.Blocks.Interfaces.RealOutput exergyContent( - start=exergyContent_start, - final quantity="Energy", - final unit="J") annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={106,-32}))); - Modelica.Blocks.Math.Product product - annotation (Placement(transformation(extent={{-6,-6},{6,6}}, - rotation=270, - origin={14,-46}))); - Modelica.Blocks.Math.Gain gain1( - k=mass) - annotation (Placement(transformation(extent={{-7,-7},{7,7}}, - rotation=180, - origin={27,-32}))); - Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) - "Reference composition" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=0, - origin={-100,-70}))); - Modelica.Blocks.Interfaces.RealInput X[Medium.nX]( - final quantity="MassFraction", - final unit="1", - min=0, - max=1) "Reference composition" annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=90, - origin={50,-110}))); -equation - - for i in 1:n loop - connect(p, boundary[i].p_in) annotation (Line(points={{-50,-110},{-50,-72},{ - -8,-72},{-8,-12}}, color={0,0,127})); - connect(T_ref, referenceEnvironment[i].T_in) annotation (Line(points={{-100,70}, - {-76,70},{-76,96},{4,96},{4,92}}, color={0,0,127})); - connect(p_ref, referenceEnvironment[i].p_in) annotation (Line(points={{-100,0}, - {-78,0},{-78,98},{8,98},{8,92}}, color={0,0,127})); - connect(X, boundary[i].X_in) annotation (Line(points={{50,-110},{50,-80},{2,-80}, - {2,-20},{4,-20},{4,-12}}, color={0,0,127})); - connect(X_ref, referenceEnvironment[i].X_in) annotation (Line(points={{-100,-70}, - {-72,-70},{-72,92},{-4,92}}, color={0,0,127})); - - end for; - - connect(specificEnthalpy[:].port, boundary[:].ports[1]) annotation (Line( - points={{-60,0},{-40,0},{-20,0},{-20,20},{-4,20},{-2,20},{-2,10}}, - color={0,127,255})); - connect(specificEntropy[:].port, boundary[:].ports[2]) annotation (Line( - points={{60,0},{40,0},{20,0},{20,20},{2,20},{2,10}}, color={0,127,255})); - connect(specificEnthalpy1.h_out, add.u1) annotation (Line(points={{-31,50},{-38, - 50},{-38,44.2},{-44.6,44.2}}, color={0,0,127})); - connect(specificEnthalpy.h_out, add.u2) annotation (Line(points={{-49,10},{-40, - 10},{-40,35.8},{-44.6,35.8}}, color={0,0,127})); - connect(add.y, sum1.u) annotation (Line(points={{-60.7,40},{-60.7,40},{-74,40}, - {-74,-50},{-62,-50}},color={0,0,127})); - connect(sum1.y, gain.u) annotation (Line(points={{-39,-50},{-34,-50},{-27.4,-50}}, - color={0,0,127})); - connect(specificEntropy1.s, add1.u1) annotation (Line(points={{31,50},{36,50}, - {36,44.2},{44.6,44.2}}, color={0,0,127})); - connect(specificEntropy.s, add1.u2) annotation (Line(points={{49,10},{40,10},{ - 40,35.8},{44.6,35.8}}, color={0,0,127})); - connect(add1.y, sum2.u) annotation (Line(points={{60.7,40},{60.7,40},{84,40},{ - 84,-32},{66,-32}}, - color={0,0,127})); - connect(derivative.y, ExergyChangeRate) - annotation (Line(points={{85,-62},{106,-62}}, color={0,0,127})); - connect(specificEnthalpy1[:].port, referenceEnvironment[:].ports[1]) - annotation (Line(points={{-20,60},{-20,70},{2,70}}, color={0,127,255})); - connect(specificEntropy1[:].port, referenceEnvironment[:].ports[2]) - annotation (Line(points={{20,60},{20,70},{-2,70}},color={0,127,255})); - connect(sum2.y, gain1.u) annotation (Line(points={{43,-32},{40,-32},{35.4,-32}}, - color={0,0,127})); - connect(gain1.y, product.u1) annotation (Line(points={{19.3,-32},{14,-32},{14, - -38.8},{17.6,-38.8}}, color={0,0,127})); - connect(T_ref, product.u2) annotation (Line(points={{-100,70},{-76,70},{-76,-28}, - {10.4,-28},{10.4,-38.8}}, color={0,0,127})); - connect(derivative.u, add2.y) - annotation (Line(points={{62,-62},{52.7,-62}}, color={0,0,127})); - connect(gain.y, add2.u2) annotation (Line(points={{-11.3,-50},{4,-50},{4,-66.2}, - {36.6,-66.2}}, color={0,0,127})); - connect(product.y, add2.u1) annotation (Line(points={{14,-52.6},{14,-57.8},{36.6, - -57.8}}, color={0,0,127})); - connect(add2.y, exergyContent) annotation (Line(points={{52.7,-62},{58,-62},{58, - -44},{90,-44},{90,-32},{106,-32}}, color={0,0,127})); - connect(T, boundary.T_in) annotation (Line(points={{0,-112},{0,-112},{0, - -28},{0,-22},{-4,-22},{-4,-12}}, - color={0,0,127})); - - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}})), Documentation(info=" -

    The model calculates the exergy content and its rate of change of a stratefied storage (i. e. with multiple layers) filled with a medium consisting of multiple substances. The reference environment is variable. The basic equation is

    -

    \"E=m*(h-h_ref-T_ref*(s-s_ref))\"/

    -

    with \"E\"/: exergy content, \"m\"/: mass, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

    -

    The reference environment (subscript \"_ref\"/) is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The rate of change of the exergy content is calculated using the approximate derivative block from MSL.

    -

    Level of Development

    -

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -")); -end StoredExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/package.mo b/AixLib/HVAC/Meter/ExergyMeter/package.mo deleted file mode 100644 index 6311e76e29..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/package.mo +++ /dev/null @@ -1,8 +0,0 @@ -within AixLib.HVAC.Meter; -package ExergyMeter - - -annotation (Documentation(info=" -

    This package contains models to perform an exergy analysis.

    -")); -end ExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/package.order b/AixLib/HVAC/Meter/ExergyMeter/package.order deleted file mode 100644 index a70e257a03..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/package.order +++ /dev/null @@ -1,4 +0,0 @@ -FlowExergyMeter -StoredExergyMeter -HeatExergyMeter -Example From 623a73090ffef954531ef852685a18d0705a4184 Mon Sep 17 00:00:00 2001 From: pme Date: Tue, 25 Apr 2017 17:24:33 +0200 Subject: [PATCH 016/342] delete old files. --- .../BaseClasses/FVUBaseRecord.mo | 89 ---- .../BaseClasses/FVURecord.mo | 62 --- .../BaseClasses/SetPower.mo | 117 ----- .../BaseClasses/package.mo | 4 - .../BaseClasses/package.order | 1 - AixLib/HVAC/FacadeVentilationUnit/Example.mo | 100 ---- .../FacadeVentilationUnit/FVUController.mo | 337 ------------- .../FacadeVentilationUnit.mo | 442 ------------------ .../HVAC/FacadeVentilationUnit/package.order | 4 - AixLib/HVAC/Meter/ExergyMeter/Example.mo | 263 ----------- .../HVAC/Meter/ExergyMeter/FlowExergyMeter.mo | 127 ----- .../HVAC/Meter/ExergyMeter/HeatExergyMeter.mo | 120 ----- .../Meter/ExergyMeter/StoredExergyMeter.mo | 207 -------- AixLib/HVAC/Meter/ExergyMeter/package.order | 4 - 14 files changed, 1877 deletions(-) delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/Example.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/FVUController.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo delete mode 100644 AixLib/HVAC/FacadeVentilationUnit/package.order delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/Example.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo delete mode 100644 AixLib/HVAC/Meter/ExergyMeter/package.order diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo deleted file mode 100644 index 4862d75d8c..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVUBaseRecord.mo +++ /dev/null @@ -1,89 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; -record FVUBaseRecord - "Base record for the facade ventilation unit model" - extends Modelica.Icons.Record; - - parameter Real noUnits=1 "Number of identical FVUs"; - parameter Modelica.SIunits.ThermalConductance UA_heater=120 - "Thermal conductance of heater at nominal flow, used to compute heat capacity"; - parameter Modelica.SIunits.ThermalConductance UA_cooler=65 - "Thermal conductance of cooler at nominal flow, used to compute heat capacity"; - parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_heater=0.1 - "Nominal mass flow rate on water side of heater"; - parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_heater=0.1 - "Nominal mass flow rate on air side of heater"; - parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_cooler=0.1 - "Nominal mass flow rate on water side of cooler"; - parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_cooler=0.1 - "Nominal mass flow rate on air side of cooler"; - parameter Modelica.SIunits.Pressure dp1_nominal_heater=1000 - "Nominal pressure loss on water side of heater"; - parameter Modelica.SIunits.Pressure dp2_nominal_heater=100 - "Nominal pressure loss on air side of heater"; - parameter Modelica.SIunits.Pressure dp1_nominal_cooler=1000 - "Nominal pressure loss on water side of cooler"; - parameter Modelica.SIunits.Pressure dp2_nominal_cooler=100 - "Nominal pressure loss on air side of cooler"; - parameter Modelica.SIunits.Pressure p_default=101300 - "Default static pressure at outlet"; - - annotation (Documentation(info=" -

    Overview

    -

    This is the base definition is zone records used in AixLib.Building.LowOrder.ThermalZone. All necessary parameters are defined here. Most values should be overwritten for a specific building, some are default values that might be appropriate in most cases. However, fell free to overwrite them in your own records.

    -

    Level of Development

    -

    \"stars:

    -

    Concept

    -

    Remark: The design heating power Q_N of the building is the sum of net design power according to transmission and ventilation losses at a given outdoor temperature and an additional re-heating power for early morning heat up after night set-back. Net design power can be simulated with constant boundary conditions (e. g.: no internal or external gains, Touside=-12 degC, ACH=0.5). The additional re-heating power is computed by a factor [f_RH]=W/m2 and the heated zone floor area.

    -

    The factor f_RH in W/m2 can be chosen form the following table:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    1 K

    2 K

    3 K

    re-heat time

    light

    medium

    heavy

    1 h

    11

    22

    45

    2 h

    6

    11

    22

    3 h

    4

    9

    16

    4 h

    2

    7

    13

    -

    References

    -

    Base data definition for record to be used in model AixLib.Building.LowOrder.ThermalZone

    - ", - revisions=" -
      -
    • June, 2015 by Moitz Lauster: -
      Added new parameters to use further calculation cores.
    • -
    • February 4, 2014 by Ole Odendahl:
      Added new parameters for the setup of the ACH. It is now possible to assign different values to the ACH for each zone based on this record.
    • -
    • January 27, 2014 by Ole Odendahl:
      Added new parameter withAHU to choose whether the zone is connected to a central air handling unit. Default false
    • -
    • March, 2012  by Peter Matthes:
      Implemented
    • -
    • November, 2012  by Moritz Lauster:
      Restored links
    • -
    -")); - -end FVUBaseRecord; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo deleted file mode 100644 index 842fb7776e..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/FVURecord.mo +++ /dev/null @@ -1,62 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; -record FVURecord - extends Modelica.Icons.Record; - extends FVUBaseRecord; - annotation(Documentation(info = " -

    Overview

    -

    This is the base definition is zone records used in AixLib.Building.LowOrder.ThermalZone. All necessary parameters are defined here. Most values should be overwritten for a specific building, some are default values that might be appropriate in most cases. However, fell free to overwrite them in your own records.

    -

    Level of Development

    -

    \"stars:

    -

    Concept

    -

    Remark: The design heating power Q_N of the building is the sum of net design power according to transmission and ventilation losses at a given outdoor temperature and an additional re-heating power for early morning heat up after night set-back. Net design power can be simulated with constant boundary conditions (e. g.: no internal or external gains, Touside=-12 degC, ACH=0.5). The additional re-heating power is computed by a factor [f_RH]=W/m2 and the heated zone floor area.

    -

    The factor f_RH in W/m2 can be chosen form the following table:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    1 K

    2 K

    3 K

    re-heat time

    light

    medium

    heavy

    1 h

    11

    22

    45

    2 h

    6

    11

    22

    3 h

    4

    9

    16

    4 h

    2

    7

    13

    -

    References

    -

    Base data definition for record to be used in model AixLib.Building.LowOrder.ThermalZone

    - ", revisions=" -
      -
    • June, 2015 by Moitz Lauster: -
      Added new parameters to use further calculation cores.
    • -
    • February 4, 2014 by Ole Odendahl:
      Added new parameters for the setup of the ACH. It is now possible to assign different values to the ACH for each zone based on this record.
    • -
    • January 27, 2014 by Ole Odendahl:
      Added new parameter withAHU to choose whether the zone is connected to a central air handling unit. Default false
    • -
    • March, 2012  by Peter Matthes:
      Implemented
    • -
    • November, 2012  by Moritz Lauster:
      Restored links
    • -
    -")); -end FVURecord; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo deleted file mode 100644 index 321b1621d7..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/SetPower.mo +++ /dev/null @@ -1,117 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit.BaseClasses; -model SetPower - "This model defines a specific massflow rate based on the input power share" - - extends Modelica.Fluid.Interfaces.PartialTwoPort; - - parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.05 - "Nominal mass flow rate of fan"; - parameter Medium.AbsolutePressure p_start=Medium.p_default - "Start value of pressure"; - parameter Real noUnits=1 "Number of identical FVU units"; - parameter Modelica.SIunits.PressureDifference dp_nominal=500 - "Initial pressure difference"; - parameter Medium.Temperature T_start=Medium.T_default - "Start value of temperature"; - - Modelica.Blocks.Tables.CombiTable1D volumeFlow(table=[0,1; 10,25; 20,40; - 30,60; 40,90; 50,100; 60,140; 70,175; 80,200; 90,225; 100,260]) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,-56}))); - Modelica.Blocks.Interfaces.RealInput powerShare( - min=0, - max=100, - nominal=60) "power share (percentage) for fan" - annotation (Placement(transformation( - origin={0,-100}, - extent={{-20,-20},{20,20}}, - rotation=90))); - - AixLib.Fluid.Movers.FlowControlled_m_flow fan( redeclare - package Medium = Medium, - addPowerToMedium=false, - m_flow_nominal=m_flow_nominal, - T_start=T_start, - m_flow(start=m_flow_nominal), - dp(start=dp_nominal), - dp_nominal=dp_nominal, - p_start=p_start, - riseTime=120, - nominalValuesDefineDefaultPressureCurve=true) - annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); - Modelica.Blocks.Math.Gain gain(k=1.2/3600*noUnits) - annotation (Placement( - transformation( - extent={{-6,-6},{6,6}}, - rotation=90, - origin={0,-28}))); -equation - - connect(port_a, fan.port_a) - annotation (Line(points={{-100,0},{-56,0},{-10,0}}, color={0,127,255})); - connect(fan.port_b, port_b) - annotation (Line(points={{10,0},{56,0},{100,0}}, color={0,127,255})); - connect(powerShare, volumeFlow.u[1]) annotation (Line(points={{0,-100},{0, - -80},{-6.66134e-016,-80},{-6.66134e-016,-68}}, - color={0,0,127})); - connect(gain.u, volumeFlow.y[1]) annotation (Line(points={{-4.44089e-016, - -35.2},{-4.44089e-016,-46},{8.88178e-016,-46},{8.88178e-016,-45}}, - color={0,0,127})); - connect(gain.y, fan.m_flow_in) annotation (Line(points={{4.44089e-016, - -21.4},{4.44089e-016,-24},{-0.2,-24},{-0.2,-12}}, - color={0,0,127})); - annotation (choicesAllMatching=true, - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, - {100,100}})), - Icon(graphics={ - Ellipse( - extent={{-4,68},{4,0}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-4,0},{4,-68}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{0,4},{30,-4}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-30,4},{0,-4}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse(extent={{-30,68},{30,-68}}, lineColor={0,0,0}), - Line( - points={{8,54},{58,54}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{8,-44},{60,-44}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{-12,-20},{76,-20}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{0,8},{82,8}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled}), - Line( - points={{6,32},{76,32}}, - color={170,213,255}, - arrow={Arrow.None,Arrow.Filled})}), - Documentation(info=" -

    Thsi model sets the mass flow rate of the air flow through a facade ventilation unit based on the input value, which is the power share set point of the fan.

    -", revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Input changed from revolving speed to power.
    • -
    • August 20, 2008  by Peter Matthes:
      Implemented.
    • -
    -")); -end SetPower; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo deleted file mode 100644 index 45d9419aa9..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.mo +++ /dev/null @@ -1,4 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -package BaseClasses - extends Modelica.Icons.BasesPackage; -end BaseClasses; diff --git a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order b/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order deleted file mode 100644 index a512820164..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/BaseClasses/package.order +++ /dev/null @@ -1 +0,0 @@ -SetPower diff --git a/AixLib/HVAC/FacadeVentilationUnit/Example.mo b/AixLib/HVAC/FacadeVentilationUnit/Example.mo deleted file mode 100644 index b4993b1dbf..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/Example.mo +++ /dev/null @@ -1,100 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -model Example - import ExergyBasedControl; - extends Modelica.Icons.Example; - - package Medium1 = AixLib.Media.Air; - package Medium2 = AixLib.Media.Water; - - Modelica.Blocks.Sources.Constant roomTemperature(k=273.15 + 18) - annotation (Placement(transformation(extent={{-94,48},{-74,68}}))); - Modelica.Blocks.Sources.Sine outdoorTemperature( - freqHz=2/3600, - offset=273.15 + 10, - amplitude=20) - annotation (Placement(transformation(extent={{-94,8},{-74,28}}))); - Modelica.Blocks.Sources.Constant roomSetTemperature(k=273.15 + 22) - annotation (Placement(transformation(extent={{-94,-28},{-74,-8}}))); - Modelica.Blocks.Sources.Constant co2Concentration(k=800) - annotation (Placement(transformation(extent={{-94,-72},{-74,-52}}))); - AixLib.Fluid.Sources.Boundary_pT ambient_out( - redeclare package Medium = Medium1, - use_T_in=true, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation(extent={{6,-88},{26,-68}}))); - AixLib.Fluid.Sources.Boundary_pT ambient_in( - redeclare package Medium = Medium1, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation(extent={{4,-58},{24,-38}}))); - AixLib.Fluid.Sources.Boundary_pT heating_sink( - redeclare package Medium = Medium2, - p=100000) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={26,30}))); - AixLib.Fluid.Sources.Boundary_pT cooling_sink( - redeclare package Medium = Medium2, - p=100000) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={102,32}))); - AixLib.Fluid.Sources.Boundary_pT cooling_source( - redeclare package Medium = Medium2, - use_T_in=true, - p=140000) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={126,31}))); - AixLib.Fluid.Sources.Boundary_pT heating_source( - redeclare package Medium = Medium2, - use_T_in=true, - p=140000) annotation (Placement(transformation( - extent={{-9,-10},{9,10}}, - rotation=270, - origin={54,31}))); - AixLib.Fluid.Sources.Boundary_pT room_in( - redeclare package Medium = Medium1, - use_T_in=false, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={170,-27}))); - AixLib.Fluid.Sources.Boundary_pT room_out( - redeclare package Medium = Medium1, - use_T_in=true, - p(displayUnit="Pa") = 101300) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={168,-66}))); - Modelica.Blocks.Sources.Constant heatSourceTemperature(k=273.15 + 30) - annotation (Placement(transformation(extent={{24,74},{44,94}}))); - Modelica.Blocks.Sources.Constant coldsourceTemperature(k=273.15 + 17) - annotation (Placement(transformation(extent={{84,74},{104,94}}))); - FacadeVentilationUnit facadeVentilationUnit - annotation (Placement(transformation(extent={{-42,-14},{-6,6}}))); - FacadeVentilationUnit facadeVentilationUnit1 - annotation (Placement(transformation(extent={{74,-44},{110,-24}}))); -equation - connect(heatSourceTemperature.y, heating_source.T_in) - annotation (Line(points={{45,84},{58,84},{58,41.8}}, color={0,0,127})); - connect(coldsourceTemperature.y, cooling_source.T_in) annotation (Line(points= - {{105,84},{105,84},{130,84},{130,43}}, color={0,0,127})); - connect(roomTemperature.y, room_out.T_in) annotation (Line(points={{-73,58},{-73, - 58},{198,58},{198,-70},{180,-70}}, color={0,0,127})); - connect(outdoorTemperature.y, ambient_out.T_in) annotation (Line(points={{-73,18}, - {-58,18},{-58,-74},{4,-74}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, - {100,100}})), Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{200,100}})), - experiment(StopTime=3600), - Documentation(revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Implemented
    • -
    -", info=" -

    This model shows the usage of the facade ventilation unit and its controller.

    -"), - __Dymola_experimentSetupOutput); -end Example; diff --git a/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo b/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo deleted file mode 100644 index 615fb94967..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/FVUController.mo +++ /dev/null @@ -1,337 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -model FVUController - - parameter Real minimumSupTemp = 273.15+17 "Minimum supply air temperature"; - - parameter Real co2SetConcentration = 600 "Set point for CO2 concentration"; - - parameter Real maxSupFanPower = 60 "Maximum supply air fan power"; - - parameter Real maxExFanPower = 60 "Maximum exhaust air fan power"; - - parameter Real fullyOpen = 100 - "Percentage value representing fuly opened flap"; - - Modelica.Blocks.Interfaces.RealInput roomTemperature - annotation (Placement(transformation(extent={{-120,70},{-80,110}}))); - Modelica.Blocks.Interfaces.RealInput outdoorTemperature - annotation (Placement(transformation(extent={{-120,10},{-80,50}}))); - Modelica.Blocks.Interfaces.RealInput co2Concentration - annotation (Placement(transformation(extent={{-120,-110},{-80,-70}}))); - Modelica.Blocks.Interfaces.RealInput roomSetTemperature - annotation (Placement(transformation(extent={{-120,-50},{-80,-10}}))); - Modelica.Blocks.Logical.OnOffController roomToBeCooled(bandwidth=2) - annotation (Placement(transformation(extent={{-60,80},{-40,100}}))); - Modelica.Blocks.Logical.OnOffController roomToBeHeated(bandwidth=2) - annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); - Modelica.Blocks.Logical.OnOffController roomToBeVentilated(bandwidth=200) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica.Blocks.Logical.OnOffController freeCoolingPossible(bandwidth=2) - annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); - Modelica.Blocks.Logical.OnOffController coldRecoveryPossible(bandwidth=2) - annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); - Modelica.Blocks.Logical.OnOffController heatRecoveryPossible(bandwidth=2) - annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); - Modelica.Blocks.Sources.Constant co2SeetConcentrationSource(k= - co2SetConcentration) annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=180, - origin={-46,6}))); - Modelica.Blocks.Math.Add add(k1=-1) - annotation (Placement(transformation(extent={{-62,-52},{-50,-40}}))); - Modelica.Blocks.Math.Add add1(k1=-1) - annotation (Placement(transformation(extent={{-64,-102},{-52,-90}}))); - Modelica.Blocks.Sources.Constant setDeviationFreeCooling(k=-4) - annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={-54,-24}))); - Modelica.Blocks.Sources.Constant setDeviationRecovery(k=0) annotation ( - Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={-62,-72}))); - Modelica.Blocks.Logical.Switch useCoolingValve - annotation (Placement(transformation(extent={{62,80},{74,92}}))); - Modelica.Blocks.Logical.And and1 - annotation (Placement(transformation(extent={{0,80},{14,94}}))); - Modelica.Blocks.Logical.And and2 - annotation (Placement(transformation(extent={{0,44},{14,58}}))); - Modelica.Blocks.Logical.Or climatizationNeeded - annotation (Placement(transformation(extent={{0,6},{14,20}}))); - Modelica.Blocks.Logical.And and3 - annotation (Placement(transformation(extent={{0,-34},{14,-20}}))); - Modelica.Blocks.Logical.Switch useHeatingValve - annotation (Placement(transformation(extent={{62,48},{74,60}}))); - Modelica.Blocks.Sources.Constant one(k=1) annotation (Placement( - transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={8,70}))); - Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement( - transformation( - extent={{-6,-6},{6,6}}, - rotation=0, - origin={6,34}))); - Modelica.Blocks.Logical.Or useExFan - annotation (Placement(transformation(extent={{60,0},{74,14}}))); - Modelica.Blocks.Logical.Switch switch3 - annotation (Placement(transformation(extent={{86,1},{98,13}}))); - Modelica.Blocks.Sources.Constant exhaustFan(k=maxExFanPower) - annotation (Placement(transformation(extent={{40,32},{52,44}}))); - Modelica.Blocks.Logical.Switch switch4 - annotation (Placement(transformation(extent={{114,-6},{126,6}}))); - Modelica.Blocks.Sources.Constant twoHours(k=2*3600) - annotation (Placement(transformation(extent={{100,86},{112,98}}))); - Modelica.Blocks.Logical.Timer timer - annotation (Placement(transformation(extent={{134,46},{148,60}}))); - Modelica.Blocks.Logical.Greater timePassed - annotation (Placement(transformation(extent={{162,52},{174,66}}))); - Modelica.Blocks.Logical.Not not1 - annotation (Placement(transformation(extent={{86,48},{96,58}}))); - Modelica.Blocks.Sources.Constant twentyMinutes(k=20*60) - annotation (Placement(transformation(extent={{100,66},{112,78}}))); - Modelica.Blocks.Logical.Greater timePassed1 - annotation (Placement(transformation(extent={{162,32},{174,46}}))); - Modelica.Blocks.Logical.Timer timer1 - annotation (Placement(transformation(extent={{134,26},{148,40}}))); - Modelica.Blocks.Logical.RSFlipFlop rSFlipFlop - annotation (Placement(transformation(extent={{105,40},{121,56}}))); - Modelica.Blocks.Interfaces.RealOutput exhaustFanPower - annotation (Placement(transformation(extent={{210,20},{230,40}}))); - Modelica.Blocks.Logical.Switch switch5 - annotation (Placement(transformation(extent={{28,-32},{40,-20}}))); - Modelica.Blocks.Interfaces.RealOutput coolingValveOpening - annotation (Placement(transformation(extent={{210,80},{230,100}}))); - Modelica.Blocks.Interfaces.RealOutput heatingValveOpening - annotation (Placement(transformation(extent={{210,50},{230,70}}))); - Modelica.Blocks.Logical.Switch switch1 - annotation (Placement(transformation(extent={{160,-33},{172,-21}}))); - Modelica.Blocks.Logical.Switch switch2 - annotation (Placement(transformation(extent={{116,-38},{128,-26}}))); - Modelica.Blocks.Sources.Constant supplyFan(k=maxSupFanPower) - annotation (Placement(transformation(extent={{84,-26},{96,-14}}))); - Modelica.Blocks.Interfaces.RealOutput supplyFanPower - annotation (Placement(transformation(extent={{210,-10},{230,10}}))); - Modelica.Blocks.Logical.Greater PexaLargerPsupa - annotation (Placement(transformation(extent={{138,-16},{150,-2}}))); - Modelica.Blocks.Sources.BooleanExpression booleanExpression(y=if - exhaustFanPower > supplyFanPower + 0.1 or exhaustFanPower < - supplyFanPower - 0.1 then false else true) - annotation (Placement(transformation(extent={{120,-70},{140,-50}}))); - Modelica.Blocks.Logical.Switch switch6 - annotation (Placement(transformation(extent={{160,-66},{172,-54}}))); - Modelica.Blocks.Interfaces.RealOutput circulationFlapOpening - annotation (Placement(transformation(extent={{210,-40},{230,-20}}))); - Modelica.Blocks.Logical.Or or3 - annotation (Placement(transformation(extent={{28,-50},{42,-36}}))); - Modelica.Blocks.Logical.Switch useHRC - annotation (Placement(transformation(extent={{62,-49},{74,-37}}))); - Modelica.Blocks.Interfaces.RealOutput HRCFlapOpening - annotation (Placement(transformation(extent={{210,-70},{230,-50}}))); - Modelica.Blocks.Logical.Pre pre1 annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=180, - origin={164,22}))); - Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=5) - annotation (Placement(transformation(extent={{40,-86},{52,-74}}))); - Modelica.Blocks.Logical.Switch switch7 - annotation (Placement(transformation(extent={{64,-86},{76,-74}}))); - Modelica.Blocks.Interfaces.RealOutput freshAirFlapOpening - annotation (Placement(transformation(extent={{210,-100},{230,-80}}))); -equation - connect(outdoorTemperature, add.u1) annotation (Line(points={{-100,30},{ - -78,30},{-78,-42.4},{-63.2,-42.4}}, color={0,0,127})); - connect(roomTemperature, add.u2) annotation (Line(points={{-100,90},{-74, - 90},{-74,-40},{-68,-40},{-66,-40},{-66,-49.6},{-63.2,-49.6}}, - color={0,0,127})); - connect(outdoorTemperature, add1.u2) annotation (Line(points={{-100,30},{ - -88,30},{-78,30},{-78,-99.6},{-65.2,-99.6}}, color={0,0,127})); - connect(roomTemperature, add1.u1) annotation (Line(points={{-100,90},{-88, - 90},{-74,90},{-74,-92.4},{-65.2,-92.4}}, color={0,0,127})); - connect(add1.y, heatRecoveryPossible.u) - annotation (Line(points={{-51.4,-96},{-42,-96}}, color={0,0,127})); - connect(add.y, coldRecoveryPossible.u) annotation (Line(points={{-49.4, - -46},{-48,-46},{-48,-66},{-42,-66}}, color={0,0,127})); - connect(setDeviationFreeCooling.y, freeCoolingPossible.reference) - annotation (Line(points={{-47.4,-24},{-46,-24},{-42,-24}}, color={0,0, - 127})); - connect(setDeviationRecovery.y, coldRecoveryPossible.reference) - annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-54},{-42,-54}}, - color={0,0,127})); - connect(setDeviationRecovery.y, heatRecoveryPossible.reference) - annotation (Line(points={{-55.4,-72},{-52,-72},{-52,-84},{-42,-84}}, - color={0,0,127})); - connect(roomToBeCooled.y, and1.u1) annotation (Line(points={{-39,90},{-28, - 90},{-28,87},{-1.4,87}}, color={255,0,255})); - connect(coldRecoveryPossible.y, and1.u2) annotation (Line(points={{-19, - -60},{-6,-60},{-6,81.4},{-1.4,81.4}}, color={255,0,255})); - connect(roomToBeCooled.y, useCoolingValve.u2) annotation (Line(points={{ - -39,90},{-28,90},{-28,100},{22,100},{22,86},{60.8,86}}, color={ - 255,0,255})); - connect(roomToBeCooled.y, and2.u1) annotation (Line(points={{-39,90},{-28, - 90},{-28,51},{-1.4,51}}, color={255,0,255})); - connect(freeCoolingPossible.y, and2.u2) annotation (Line(points={{-19,-30}, - {-12,-30},{-12,45.4},{-1.4,45.4}}, color={255,0,255})); - connect(roomToBeCooled.y, climatizationNeeded.u1) annotation (Line(points= - {{-39,90},{-28,90},{-28,13},{-1.4,13}}, color={255,0,255})); - connect(roomToBeHeated.y, climatizationNeeded.u2) annotation (Line(points= - {{-39,60},{-30,60},{-30,7.4},{-1.4,7.4}}, color={255,0,255})); - connect(heatRecoveryPossible.y, and3.u2) annotation (Line(points={{-19, - -90},{-1.4,-90},{-1.4,-32.6}}, color={255,0,255})); - connect(roomToBeHeated.y, and3.u1) annotation (Line(points={{-39,60},{-30, - 60},{-30,8},{-10,8},{-10,-27},{-1.4,-27}}, color={255,0,255})); - connect(roomToBeHeated.y, useHeatingValve.u2) annotation (Line(points={{ - -39,60},{26,60},{26,54},{60.8,54}}, color={255,0,255})); - connect(one.y, useHeatingValve.u1) annotation (Line(points={{14.6,70},{30,70}, - {30,58.8},{60.8,58.8}}, color={0,0,127})); - connect(zero.y, useHeatingValve.u3) annotation (Line(points={{12.6,34},{ - 34,34},{34,49.2},{60.8,49.2}}, color={0,0,127})); - connect(roomToBeVentilated.y, useExFan.u2) annotation (Line(points={{-39, - 30},{-20,30},{-20,24},{18,24},{18,1.4},{58.6,1.4}}, color={255,0, - 255})); - connect(useExFan.y, switch3.u2) annotation (Line(points={{74.7,7},{79.35, - 7},{84.8,7}}, color={255,0,255})); - connect(exhaustFan.y, switch3.u1) annotation (Line(points={{52.6,38},{76, - 38},{76,11.8},{84.8,11.8}}, color={0,0,127})); - connect(zero.y, switch3.u3) annotation (Line(points={{12.6,34},{24,34},{ - 34,34},{34,-6},{80,-6},{80,2.2},{84.8,2.2}}, color={0,0,127})); - connect(useExFan.y, not1.u) annotation (Line(points={{74.7,7},{80,7},{80, - 53},{85,53}}, color={255,0,255})); - connect(timePassed.y, timer1.u) annotation (Line(points={{174.6,59},{184, - 59},{184,46},{128,46},{128,33},{132.6,33}}, color={255,0,255})); - connect(not1.y, rSFlipFlop.S) annotation (Line(points={{96.5,53},{100,53}, - {100,52.8},{103.4,52.8}}, color={255,0,255})); - connect(rSFlipFlop.Q, timer.u) annotation (Line(points={{121.8,52.8},{ - 127.4,52.8},{127.4,53},{132.6,53}}, color={255,0,255})); - connect(switch4.y, exhaustFanPower) - annotation (Line(points={{126.6,0},{192,0},{192,30},{220,30}}, - color={0,0,127})); - connect(zero.y, useCoolingValve.u3) annotation (Line(points={{12.6,34},{ - 24,34},{34,34},{34,81.2},{60.8,81.2}}, color={0,0,127})); - connect(freeCoolingPossible.y, switch5.u2) annotation (Line(points={{-19, - -30},{-12,-30},{-12,-14},{22,-14},{22,-26},{26.8,-26}}, color={ - 255,0,255})); - connect(zero.y, switch5.u1) annotation (Line(points={{12.6,34},{34,34},{ - 34,-16},{24,-16},{24,-21.2},{26.8,-21.2}}, color={0,0,127})); - connect(one.y, switch5.u3) annotation (Line(points={{14.6,70},{30,70},{30,-12}, - {20,-12},{20,-30.8},{26.8,-30.8}}, color={0,0,127})); - connect(switch5.y, useCoolingValve.u1) annotation (Line(points={{40.6,-26}, - {56,-26},{56,90},{56,90.8},{60.8,90.8}}, color={0,0,127})); - connect(useCoolingValve.y, coolingValveOpening) annotation (Line(points={{74.6,86}, - {82,86},{82,104},{204,104},{204,90},{220,90}}, color={0, - 0,127})); - connect(useHeatingValve.y, heatingValveOpening) annotation (Line(points={{74.6,54}, - {78,54},{78,80},{200,80},{200,60},{220,60}}, color={0,0, - 127})); - connect(co2SeetConcentrationSource.y, roomToBeVentilated.u) annotation ( - Line(points={{-52.6,6},{-62,6},{-62,24}}, color={0,0,127})); - connect(co2Concentration, roomToBeVentilated.reference) annotation (Line( - points={{-100,-90},{-76,-90},{-76,36},{-62,36}}, color={0,0,127})); - connect(climatizationNeeded.y, switch2.u2) annotation (Line(points={{14.7, - 13},{52,13},{52,-32},{114.8,-32}}, color={255,0,255})); - connect(supplyFan.y, switch2.u1) annotation (Line(points={{96.6,-20},{110, - -20},{110,-27.2},{114.8,-27.2}}, color={0,0,127})); - connect(zero.y, switch2.u3) annotation (Line(points={{12.6,34},{34,34},{ - 34,-6},{80,-6},{80,-36.8},{114.8,-36.8}}, color={0,0,127})); - connect(switch2.y, switch1.u3) annotation (Line(points={{128.6,-32},{154, - -32},{154,-31.8},{158.8,-31.8}}, color={0,0,127})); - connect(switch1.y, supplyFanPower) annotation (Line(points={{172.6,-27},{ - 200,-27},{200,0},{220,0}}, color={0,0,127})); - connect(PexaLargerPsupa.y, switch1.u2) annotation (Line(points={{150.6,-9}, - {152,-9},{152,-27},{158.8,-27}}, color={255,0,255})); - connect(switch4.y, switch1.u1) annotation (Line(points={{126.6,0},{142,0}, - {156,0},{156,-22.2},{158.8,-22.2}}, color={0,0,127})); - connect(booleanExpression.y, switch6.u2) - annotation (Line(points={{141,-60},{158.8,-60}}, color={255,0,255})); - connect(switch6.y, circulationFlapOpening) - annotation (Line(points={{172.6,-60},{196,-60},{196,-30},{220,-30}}, - color={0,0,127})); - connect(and1.y, or3.u1) annotation (Line(points={{14.7,87},{20,87},{20, - -43},{26.6,-43}}, color={255,0,255})); - connect(and3.y, or3.u2) annotation (Line(points={{14.7,-27},{18,-27},{18, - -48.6},{26.6,-48.6}}, color={255,0,255})); - connect(or3.y, useHRC.u2) annotation (Line(points={{42.7,-43},{42.7,-43}, - {60.8,-43}},color={255,0,255})); - connect(one.y, useHRC.u1) annotation (Line(points={{14.6,70},{22,70},{30,70}, - {30,-12},{50,-12},{50,-38.2},{60.8,-38.2}}, color={0,0,127})); - connect(zero.y, useHRC.u3) annotation (Line(points={{12.6,34},{34,34},{34, - -6},{54,-6},{54,-47.8},{60.8,-47.8}}, color={0,0,127})); - connect(useHRC.y, HRCFlapOpening) annotation (Line(points={{74.6,-43},{74, - -43},{74,-44},{186,-44},{186,-60},{220,-60}}, - color={0,0,127})); - connect(add1.y, freeCoolingPossible.u) annotation (Line(points={{-51.4, - -96},{-46,-96},{-46,-36},{-42,-36}}, color={0,0,127})); - connect(timePassed1.y, pre1.u) annotation (Line(points={{174.6,39},{182,39},{182, - 22},{171.2,22}}, color={255,0,255})); - connect(pre1.y, rSFlipFlop.R) annotation (Line(points={{157.4,22},{100,22},{100, - 43.2},{103.4,43.2}}, color={255,0,255})); - connect(roomTemperature, roomToBeHeated.u) annotation (Line(points={{-100,90}, - {-74,90},{-74,54},{-62,54}}, color={0,0,127})); - connect(roomSetTemperature, roomToBeHeated.reference) annotation (Line( - points={{-100,-30},{-70,-30},{-70,66},{-62,66}}, color={0,0,127})); - connect(roomSetTemperature, roomToBeCooled.u) annotation (Line(points={{-100, - -30},{-70,-30},{-70,84},{-62,84}}, color={0,0,127})); - connect(roomTemperature, roomToBeCooled.reference) annotation (Line( - points={{-100,90},{-74,90},{-74,96},{-62,96}}, color={0,0,127})); - connect(switch4.y, PexaLargerPsupa.u1) annotation (Line(points={{126.6,0}, - {130,0},{130,-9},{136.8,-9}}, color={0,0,127})); - connect(switch2.y, PexaLargerPsupa.u2) annotation (Line(points={{128.6, - -32},{130,-32},{130,-14.6},{136.8,-14.6}}, color={0,0,127})); - connect(timer.y, timePassed.u1) annotation (Line(points={{148.7,53},{154, - 53},{154,59},{160.8,59}}, color={0,0,127})); - connect(twoHours.y, timePassed.u2) annotation (Line(points={{112.6,92},{ - 134,92},{156,92},{156,53.4},{160.8,53.4}}, color={0,0,127})); - connect(timer1.y, timePassed1.u1) annotation (Line(points={{148.7,33},{ - 154,33},{154,39},{160.8,39}}, color={0,0,127})); - connect(twentyMinutes.y, timePassed1.u2) annotation (Line(points={{112.6, - 72},{132,72},{150,72},{150,33.4},{160.8,33.4}}, color={0,0,127})); - connect(exhaustFan.y, switch4.u1) annotation (Line(points={{52.6,38},{76, - 38},{76,26},{90,26},{90,18},{106,18},{106,4.8},{112.8,4.8}}, - color={0,0,127})); - connect(timePassed.y, switch4.u2) annotation (Line(points={{174.6,59},{ - 184,59},{184,12},{108,12},{108,0},{112.8,0}}, color={255,0,255})); - connect(switch3.y, switch4.u3) annotation (Line(points={{98.6,7},{104,7}, - {104,-4.8},{112.8,-4.8}}, color={0,0,127})); - connect(and2.y, useExFan.u1) annotation (Line(points={{14.7,51},{24,51},{ - 24,7},{58.6,7}}, color={255,0,255})); - connect(greaterThreshold.y,switch7. u2) annotation (Line(points={{52.6, - -80},{58,-80},{62.8,-80}}, color={255,0,255})); - connect(switch7.y, freshAirFlapOpening) annotation (Line(points={{76.6, - -80},{180,-80},{180,-90},{220,-90}}, color={0,0,127})); - connect(switch4.y, greaterThreshold.u) annotation (Line(points={{126.6,0}, - {174,0},{182,0},{182,-68},{78,-68},{78,-60},{32,-60},{32,-80},{ - 38.8,-80}}, color={0,0,127})); - connect(one.y, switch6.u3) annotation (Line(points={{14.6,70},{22,70},{30,70}, - {30,-12},{50,-12},{50,-56},{50,-58},{80,-58},{80,-64.8},{158.8,-64.8}}, - color={0,0,127})); - connect(zero.y, switch6.u1) annotation (Line(points={{12.6,34},{34,34},{ - 34,-6},{80,-6},{80,-48},{146,-48},{146,-55.2},{158.8,-55.2}}, - color={0,0,127})); - connect(one.y, switch7.u1) annotation (Line(points={{14.6,70},{30,70},{30,-12}, - {16,-12},{16,-70},{58,-70},{58,-75.2},{62.8,-75.2}}, color={0,0,127})); - connect(zero.y, switch7.u3) annotation (Line(points={{12.6,34},{34,34},{34,-6}, - {54,-6},{54,-84.8},{62.8,-84.8}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ - -100,-100},{220,100}}), graphics={Rectangle( - extent={{-100,100},{220,-100}}, - lineColor={28,108,200}, - fillColor={255,0,0}, - fillPattern=FillPattern.Solid), Text( - extent={{-58,40},{184,-34}}, - lineColor={0,0,0}, - fillColor={255,0,0}, - fillPattern=FillPattern.Solid, - textString="FVU Controller")}), Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ - 220,100}})), - Documentation(revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Implemented.
    • -
    -", info=" -

    This model is the controller of the facade ventilation unit.

    -

    Level of Development

    -

    -")); -end FVUController; diff --git a/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo b/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo deleted file mode 100644 index bab433836a..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/FacadeVentilationUnit.mo +++ /dev/null @@ -1,442 +0,0 @@ -within AixLib.HVAC.FacadeVentilationUnit; -model FacadeVentilationUnit - "Facade Ventilation Unit (FVU) equipped with a recuperator" - import ExergyBasedControl; - - parameter - ExergyBasedControl.Components.FVU_Physical_Final.Records.FVUBaseRecord - FVUParam= - ExergyBasedControl.Components.FVU_Physical_Final.Records.FVUERCRecord(); - - parameter Modelica.SIunits.ThermodynamicTemperature T_start=273.15 + 20 - "Initial temperature in unit"; - - replaceable package Water = - Modelica.Media.Water.ConstantPropertyLiquidWater - "Water Model in the system"; - replaceable package Air = AixLib.Media.Air "Air Model in the system"; - -protected - parameter Real valveRiseTime = 200; - -public - BaseClasses.SetPower fanExhaustAir( - redeclare package Medium = Air, - allowFlowReversal=true, - noUnits=FVUParam.noUnits, - m_flow_nominal=FVUParam.m2_flow_nominal_heater, - T_start=T_start, - p_start=FVUParam.p_default + res.dp_nominal) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={-118,26}))); - BaseClasses.SetPower fanSupplyAir( - redeclare package Medium = Air, - noUnits=FVUParam.noUnits, - m_flow_nominal=FVUParam.m2_flow_nominal_heater, - p_start=FVUParam.p_default + FVUParam.dp2_nominal_heater + FVUParam.dp2_nominal_cooler) - annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=0, - origin={62,26}))); - Modelica.Fluid.Sensors.Temperature T_ExhaustAir(redeclare package Medium = - Air) - annotation (Placement(transformation(extent={{174,-58},{190,-46}}))); - AixLib.Fluid.HeatExchangers.ConstantEffectiveness heater( - redeclare package Medium2 = Air, - redeclare package Medium1 = Water, - m1_flow_nominal=FVUParam.m1_flow_nominal_heater, - m2_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_heater, - dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_heater) - annotation (Placement(transformation(extent={{116,22},{96,42}}))); - Modelica.Fluid.Interfaces.FluidPort_b OutgoingExhaustAir(redeclare package - Medium = Air) - "Fluid connector b (positive design flow direction is from port_a to port_b)" - annotation (Placement(transformation(extent={{-170,16},{-150,36}}))); - Modelica.Fluid.Interfaces.FluidPort_a FreshAir(redeclare package Medium = Air) - "Fluid connector a (positive design flow direction is from port_a to port_b)" - annotation (Placement(transformation(extent={{-168,-78},{-148,-58}}))); - Modelica.Fluid.Interfaces.FluidPort_a ExhaustAir(redeclare package Medium = - Air) - "Fluid connector a (positive design flow direction is from port_a to port_b)" - annotation (Placement(transformation(extent={{192,-78},{212,-58}}))); - Modelica.Fluid.Interfaces.FluidPort_b SupplyAir(redeclare package Medium = - Air) - "Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)" - annotation (Placement(transformation(extent={{192,16},{212,36}}))); - AixLib.Fluid.HeatExchangers.ConstantEffectiveness cooler( - redeclare package Medium2 = Air, - redeclare package Medium1 = Water, - dp1_nominal(displayUnit="Pa") = FVUParam.dp1_nominal_cooler, - dp2_nominal(displayUnit="Pa") = FVUParam.dp2_nominal_cooler, - m1_flow_nominal=FVUParam.m1_flow_nominal_cooler, - m2_flow_nominal=FVUParam.m2_flow_nominal_cooler) - annotation (Placement(transformation(extent={{182,22},{162,42}}))); - Modelica.Blocks.Interfaces.RealInput fanExhaustAirPower - "Real Input to control the revolving speed of the exhaust air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={-150,100}), iconTransformation( - extent={{-17,-17},{17,17}}, - rotation=270, - origin={-147,97}))); - Modelica.Blocks.Interfaces.RealInput fanSupplyAirPower - "Real Input to control the revolving speed of the supply air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={50,100}), iconTransformation( - extent={{-16,-16},{16,16}}, - rotation=270, - origin={54,96}))); - Modelica.Fluid.Interfaces.FluidPort_b Heater_Return(redeclare package Medium - = Water) - "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{82,90},{102,110}}))); - Modelica.Fluid.Interfaces.FluidPort_a Heater_Flow(redeclare package Medium = - Water) - "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{112,90},{132,110}}))); - Modelica.Fluid.Interfaces.FluidPort_b Cooler_Return(redeclare package Medium - = Water) - "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{152,90},{172,110}}))); - Modelica.Fluid.Interfaces.FluidPort_a Cooler_Flow(redeclare package Medium = - Water) - "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)" - annotation (Placement(transformation(extent={{182,90},{202,110}}))); - Modelica.Fluid.Sensors.Temperature T_FreshAir(redeclare package Medium = Air) - annotation (Placement(transformation(extent={{-8,-6},{8,6}}, - rotation=180, - origin={-140,-82}))); - Modelica.Fluid.Sensors.Temperature T_OutgoingExhaustAir(redeclare package - Medium = Air) - annotation (Placement(transformation(extent={{-8,-6},{8,6}}, - rotation=0, - origin={-134,44}))); - Modelica.Fluid.Sensors.Temperature T_SupplyAir(redeclare package Medium = Air) - annotation (Placement(transformation(extent={{-8,-6},{8,6}}, - rotation=180, - origin={188,2}))); - Modelica.Fluid.Sensors.Temperature T_AfterHeatRecovery(redeclare package - Medium = Air) - annotation (Placement(transformation(extent={{-28,-10},{-12,2}}))); - - Modelica.Blocks.Interfaces.RealInput heatRecoveryFlapOpening - "Real Input to control the revolving speed of the exhaust air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={-100,100}), iconTransformation( - extent={{-17,-17},{17,17}}, - rotation=270, - origin={-97,97}))); - Modelica.Blocks.Interfaces.RealInput flapCircularAirOpening - "Real Input to control the revolving speed of the supply air fan" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={0,100}), iconTransformation( - extent={{-17,-17},{17,17}}, - rotation=270, - origin={3,97}))); - Modelica.Blocks.Math.Add add1( - k1=-1) - annotation (Placement(transformation(extent={{-65,47},{-55,57}}))); - Modelica.Blocks.Sources.RealExpression realExpression1( - y=1) - annotation (Placement(transformation(extent={{-6.5,-8},{6.5,8}}, - rotation=180, - origin={-59.5,30}))); - Modelica.Fluid.Sensors.Temperature T_Mix(redeclare package Medium = Air) - annotation (Placement(transformation(extent={{32,42},{48,54}}))); - Modelica.Fluid.Sensors.Temperature T_AfterFan(redeclare package Medium = - Air) annotation (Placement(transformation(extent={{70,42},{86,54}}))); - inner Modelica.Fluid.System system - annotation (Placement(transformation(extent={{180,-100},{200,-80}}))); - AixLib.Fluid.FixedResistances.FixedResistanceDpM res(m_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp_nominal=100, redeclare package Medium = - Air) - annotation (Placement(transformation(extent={{-5,-5},{5,5}}, - rotation=180, - origin={-141,26}))); - Modelica.Blocks.Interfaces.RealOutput SupplyTemperature annotation (Placement( - transformation( - extent={{-14,-14},{14,14}}, - rotation=270, - origin={22,-106}), iconTransformation( - extent={{-13,-13},{13,13}}, - rotation=270, - origin={19,-105}))); - Modelica.Blocks.Interfaces.RealOutput MixTemperature annotation (Placement( - transformation( - extent={{-15,-15},{15,15}}, - rotation=270, - origin={-10,-107}), iconTransformation( - extent={{-14,-13.5},{14,13.5}}, - rotation=270, - origin={-11.5,-106}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapCirculationAir( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=20) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={30,-16}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapBypass( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=90) annotation (Placement(transformation( - extent={{-9,-9},{9,9}}, - rotation=0, - origin={-27,36}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapHeatRecovery( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=90) annotation (Placement(transformation( - extent={{-9,-9},{9,9}}, - rotation=0, - origin={-82,-68}))); - Modelica.Fluid.Sensors.Temperature T_beforeCooler(redeclare package Medium = - Air) annotation (Placement(transformation( - extent={{-8,-6},{8,6}}, - rotation=180, - origin={129,0}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening flapFreshAir( - m_flow_nominal=0.05, - dpValve_nominal=500, - redeclare package Medium = Air, - riseTime=20) annotation (Placement(transformation( - extent={{-9,-9},{9,9}}, - rotation=0, - origin={-112,-68}))); - AixLib.Fluid.HeatExchangers.ConstantEffectiveness recuperator(redeclare - package Medium1 = - Air, redeclare package Medium2 = - Air, - eps=0.6, - m1_flow_nominal=FVUParam.m2_flow_nominal_heater, - m2_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp1_nominal=FVUParam.dp2_nominal_heater, - dp2_nominal=FVUParam.dp2_nominal_heater) - annotation (Placement(transformation(extent={{-44,-42},{-24,-22}}))); - Modelica.Fluid.Vessels.ClosedVolume volume( - nPorts=5, - use_portsData=false, - V=0.01, redeclare package Medium = - Air, - T_start=T_start) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={18,14}))); - AixLib.Fluid.FixedResistances.FixedResistanceDpM res1( - m_flow_nominal=FVUParam.m2_flow_nominal_heater, - dp_nominal=100, redeclare package Medium = - Air) - annotation (Placement(transformation(extent={{-5,-5},{5,5}}, - rotation=180, - origin={-61,-68}))); - Modelica.Blocks.Interfaces.RealInput flapFreshAirOpening - "Actuator position (0: closed, 100: open)" annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={-50,100}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening heatingValve( - m_flow_nominal=0.05, - redeclare package Medium = Water, - dpValve_nominal=200) annotation (Placement(transformation( - extent={{-9,9},{9,-9}}, - rotation=90, - origin={122,60}))); - AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening coolingValve( - m_flow_nominal=0.05, - redeclare package Medium = Water, - dpValve_nominal=200) annotation (Placement(transformation( - extent={{-9,9},{9,-9}}, - rotation=90, - origin={192,58}))); - Modelica.Blocks.Interfaces.RealInput heatingValveOpening - "Actuator position (0: closed, 100: open)" annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={142,100}))); - Modelica.Blocks.Interfaces.RealInput coolingValveOpening - "Actuator position (0: closed, 100: open)" annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={212,100}))); -equation - - connect(cooler.port_b2, SupplyAir) annotation (Line( - points={{182,26},{202,26}}, - color={0,127,255}, - smooth=Smooth.None, - thickness=1)); - connect(T_ExhaustAir.port, ExhaustAir) annotation (Line( - points={{182,-58},{182,-68},{202,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_FreshAir.port, FreshAir) annotation (Line( - points={{-140,-76},{-140,-68},{-158,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_OutgoingExhaustAir.port, fanExhaustAir.port_b) annotation (Line( - points={{-134,38},{-134,26},{-128,26}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(cooler.port_b2, T_SupplyAir.port) annotation (Line( - points={{182,26},{188,26},{188,8}}, - color={0,127,255}, - smooth=Smooth.None)); - - connect(add1.u2, realExpression1.y) annotation (Line( - points={{-66,49},{-70,49},{-70,30},{-66.65,30}}, - color={0,0,127}, - smooth=Smooth.None)); - - connect(T_Mix.port, fanSupplyAir.port_a) - annotation (Line(points={{40,42},{40,26},{52,26}}, color={0,127,255})); - connect(OutgoingExhaustAir, res.port_b) - annotation (Line(points={{-160,26},{-146,26}}, color={0,127,255}, - thickness=1)); - connect(fanExhaustAir.port_b, res.port_a) annotation (Line( - points={{-128,26},{-136,26}}, - color={0,127,255}, - thickness=1)); - connect(FreshAir, FreshAir) annotation (Line( - points={{-158,-68},{-158,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_SupplyAir.T, SupplyTemperature); - connect(T_Mix.T, MixTemperature); - connect(T_AfterFan.port, fanSupplyAir.port_b) annotation (Line( - points={{78,42},{78,26},{72,26}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(add1.y, flapBypass.y) annotation (Line( - points={{-54.5,52},{-27,52},{-27,46.8}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(ExhaustAir, ExhaustAir) annotation (Line( - points={{202,-68},{202,-68}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(T_beforeCooler.port,heater. port_b2) annotation (Line( - points={{129,6},{130,6},{130,26},{116,26}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(flapFreshAir.port_b, flapHeatRecovery.port_a) - annotation (Line(points={{-103,-68},{-91,-68}}, color={0,127,255})); - connect(FreshAir, flapFreshAir.port_a) - annotation (Line(points={{-158,-68},{-121,-68}}, color={0,127,255})); - connect(flapFreshAir.port_b, flapBypass.port_a) annotation (Line(points={{-103, - -68},{-100,-68},{-100,36},{-36,36}}, color={0,127,255})); - connect(fanSupplyAir.port_b, heater.port_a2) - annotation (Line(points={{72,26},{84,26},{96,26}}, color={0,127,255})); - connect(ExhaustAir, recuperator.port_a2) annotation (Line(points={{202,-68},{104, - -68},{-4,-68},{-4,-38},{-24,-38}}, color={0,127,255})); - connect(recuperator.port_b2, fanExhaustAir.port_a) annotation (Line(points={{-44,-38}, - {-44,-38},{-90,-38},{-90,26},{-108,26}}, color={0,127, - 255})); - connect(recuperator.port_b1, volume.ports[1]) annotation (Line(points={{-24,-26}, - {-6,-26},{-6,24},{21.2,24}}, - color={0,127,255})); - connect(flapBypass.port_b, volume.ports[2]) - annotation (Line(points={{-18,36},{19.6,36},{19.6,24}}, - color={0,127,255})); - connect(flapCirculationAir.port_b, volume.ports[3]) annotation (Line(points={{30,-6}, - {30,-6},{30,24},{18,24}}, color={0,127,255})); - connect(fanSupplyAir.port_a, volume.ports[4]) - annotation (Line(points={{52,26},{16.4,26},{16.4,24}}, - color={0,127,255})); - connect(T_AfterHeatRecovery.port, recuperator.port_b1) annotation (Line( - points={{-20,-10},{-20,-26},{-24,-26}}, color={0,127,255})); - connect(heater.port_b2,cooler. port_a2) annotation (Line(points={{116,26},{ - 140,26},{162,26}}, color={0,127,255})); - connect(flapHeatRecovery.port_b, res1.port_a) - annotation (Line(points={{-73,-68},{-56,-68}}, color={0,127,255})); - connect(res1.port_b, recuperator.port_a1) annotation (Line(points={{-66,-68}, - {-50,-68},{-50,-26},{-44,-26}}, color={0,127,255})); - connect(heater.port_a1, heatingValve.port_a) annotation (Line(points={{116, - 38},{122,38},{122,51}}, color={0,127,255})); - connect(heatingValve.port_b, Heater_Flow) annotation (Line(points={{122,69}, - {122,84.5},{122,100}}, color={0,127,255})); - connect(Cooler_Return, cooler.port_b1) annotation (Line(points={{162,100},{ - 162,38},{162,38}}, color={0,127,255})); - connect(cooler.port_a1, coolingValve.port_a) annotation (Line(points={{182,38}, - {192,38},{192,49}}, color={0,127,255})); - connect(coolingValve.port_b, Cooler_Flow) annotation (Line(points={{192,67},{ - 192,74},{192,100}}, color={0,127,255})); - connect(Heater_Return, heater.port_b1) annotation (Line(points={{92,100},{94, - 100},{94,38},{96,38}}, color={0,127,255})); - connect(heatRecoveryFlapOpening, add1.u1) - annotation (Line(points={{-100,100},{-100,55},{-66,55}}, color={0,0,127})); - connect(fanExhaustAirPower, fanExhaustAir.powerShare) annotation (Line(points= - {{-150,100},{-150,100},{-150,70},{-150,64},{-118,64},{-118,36}}, color= - {0,0,127})); - connect(flapFreshAirOpening, flapFreshAir.y) annotation (Line(points={{-50,100}, - {-50,100},{-50,76},{-50,68},{-104,68},{-104,-32},{-112,-32},{-112,-57.2}}, - color={0,0,127})); - connect(heatRecoveryFlapOpening, flapHeatRecovery.y) annotation (Line(points={ - {-100,100},{-100,55},{-82,55},{-82,-57.2}}, color={0,0,127})); - connect(fanSupplyAirPower, fanSupplyAir.powerShare) annotation (Line(points={{ - 50,100},{50,100},{50,68},{50,62},{62,62},{62,36}}, color={0,0,127})); - connect(heatingValveOpening, heatingValve.y) - annotation (Line(points={{142,100},{142,60},{132.8,60}}, color={0,0,127})); - connect(coolingValveOpening, coolingValve.y) annotation (Line(points={{212,100}, - {212,100},{212,62},{212,58},{202.8,58}}, color={0,0,127})); - connect(flapCircularAirOpening, flapCirculationAir.y) annotation (Line(points= - {{0,100},{0,100},{0,18},{0,-16},{18,-16}}, color={0,0,127})); - connect(ExhaustAir, flapCirculationAir.port_a) annotation (Line(points={{202,-68}, - {114,-68},{30,-68},{30,-26}}, color={0,127,255})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160, - -100},{200,100}})), - Icon(coordinateSystem(extent={{-160,-100},{200,100}}, preserveAspectRatio=false), - graphics={Rectangle( - extent={{-160,100},{200,-100}}, - lineColor={0,0,255}, - fillPattern=FillPattern.Solid, - fillColor={0,0,255}), Text( - extent={{-120,56},{168,-52}}, - lineColor={255,0,0}, - fillColor={0,0,255}, - fillPattern=FillPattern.Solid, - textString="FVU", - textStyle={TextStyle.Bold})}), - experiment(StopTime=86400, Interval=1), - __Dymola_experimentSetupOutput, - Documentation(info=" -

    overview

    -

    This is a model for Facade Ventilation Unit (FVU), which can be used for heating, cooling and ventilation purposes.

    -


    Level of Development

    -

    -


    Operation Modes of FVU:

    -

    The fresh air sucked in by the fan may flow through the heat recovery unit or through the bypass flap or through both of them. Depending on the operation mode, the fresh air cools down or heats up in the cooler or the heater to reach the desired supply temperature before it flows into the room. The air sucked out of the room may flow through the circulation air flap or heat recovery unit or both of them. The heater and the cooler are supported by the hot and cold water curcuis, respectively.

    -


    FVU Components:

    -

    Supply- and Exhaust fans:

    -

    The supply- and exhaust fans are modelled based on a table that gets an input signal in percent and gives a mass flow rate according to the data defined in the table. However, in order to achieve a high level of acoustic comfort, the power share input signal is limited to max. 50%.

    -

    Circulation Air flap:

    -

    In case of heating or cooling mode, it is checked if the mass flow rate through the supply fan is higher than the mass flow rate through the exhaust fan, and if so, circulation air operation gets activated. In this mode, the circulation air flap gets a signal from FVU-Controller, which means calculating a corresponding flap opening. The input signal Circ is defined as below:

    -

    -

    Recuperator, Heat Recovery and Bypass flap:

    -

    In order to preheat or precool the fresh air before flowing through the heater/cooler a recuperator is located between the fresh and exhaust air. In case of heating or cooling mode and when the free heating or free cooling are not activated (RH_free and RC_free = false), fresh air flows completely through the bypass flap. However at any time a maximum value from FVU-Controller is selected as an input signal for heat recovery flap. According to this input Signal it will be calculated how much volume flow rate flows through the bypass flap at any time. The Recuperator is so modelled that the efficiency of recuperator based on manufacturer data is readed as a function of volume flow rate. By defining the maximum heat power exchanged between the fresh and exhaust air in counter current flow recuperators, the heat power can be calculated at any time. here the recuperator is shown schematic:

    -

    -

    Heat Power of recuperator is calculated as below:

    -

    -", revisions=" -
      -
    • November 10, 2016  by Roozbeh Sangi and Marc Baranski:
      Implemented.
    • -
    -")); -end FacadeVentilationUnit; diff --git a/AixLib/HVAC/FacadeVentilationUnit/package.order b/AixLib/HVAC/FacadeVentilationUnit/package.order deleted file mode 100644 index 764d449774..0000000000 --- a/AixLib/HVAC/FacadeVentilationUnit/package.order +++ /dev/null @@ -1,4 +0,0 @@ -BaseClasses -FacadeVentilationUnit -FVUController -Example diff --git a/AixLib/HVAC/Meter/ExergyMeter/Example.mo b/AixLib/HVAC/Meter/ExergyMeter/Example.mo deleted file mode 100644 index 1f242f365c..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/Example.mo +++ /dev/null @@ -1,263 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model Example - - extends Modelica.Icons.Example; - - parameter Modelica.SIunits.Temperature T_start=323.15 - "Start reference temperature of medium"; - - parameter Integer n = 10 "Number of layers"; - - parameter Real mass = 1000 "Mass of one layer"; - - package Medium = AixLib.Media.Water "Medium in the sensor" - annotation (choicesAllMatching=true); - - Modelica.Blocks.Sources.Sine pulse( - each amplitude=1000, - each freqHz=1/3600, - each offset=3000) - annotation (Placement(transformation(extent={{-10,-20},{10,0}}))); - StoredExergyMeter exergyStorageMeterMedium( - redeclare package Medium = Medium, - T_ref_start=T_ref.k, - T_start=T_start, - exergyContent_start=1.70904e+08, - n=n, - mass=mass) - annotation (Placement(transformation(extent={{-44,-40},{-24,-20}}))); - Modelica.Blocks.Sources.Constant T_ref(k=273.15) - annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); - Modelica.Blocks.Sources.Constant p_ref(k=101300) - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); - Modelica.Blocks.Sources.Constant X_ref[1](k={1}) - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); - inner Modelica.Fluid.System system - annotation (Placement(transformation(extent={{80,-100},{100,-80}}))); - HeatExergyMeter exHeatSec - annotation (Placement(transformation(extent={{74,5},{94,25}}))); - AixLib.Fluid.Movers.FlowControlled_m_flow pumpPrim( - addPowerToMedium=false, - nominalValuesDefineDefaultPressureCurve=true, - redeclare package Medium = Medium, - T_start=T_start, - m_flow_nominal=0.5, - m_flow_small=0.001) - annotation (Placement(transformation(extent={{-64,76},{-44,96}}))); - AixLib.Fluid.Storage.Storage - bufferStorageHeatingcoils(layer_HE(T_start=T_start), layer(T_start=T_start), - redeclare package Medium = Medium, - lambda_ins=0.075, - s_ins=0.2, - alpha_in=100, - alpha_out=10, - k_HE=300, - h=1.5, - V_HE=0.02, - A_HE=7, - n=10, - d=2) annotation (Placement(transformation(extent={{26,54},{-2,88}}))); - AixLib.Fluid.FixedResistances.StaticPipe pipePrim( - D=0.1, - redeclare package Medium = Medium, - m_flow_small=0.001) annotation (Placement(transformation( - extent={{-7,-7.5},{7,7.5}}, - rotation=180, - origin={-53,56.5}))); - FlowExergyMeter exPrimIn(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-36,76},{-14,96}}))); - FlowExergyMeter exPrimOut(redeclare package Medium = Medium) annotation ( - Placement(transformation( - extent={{-11,10},{11,-10}}, - rotation=180, - origin={-25,57}))); - Modelica.Fluid.Vessels.ClosedVolume heater(redeclare package Medium = Medium, - nPorts=2, - use_HeatTransfer=true, - use_portsData=false, - V(displayUnit="l") = 0.05, - T_start=T_start) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={-84,70}))); - AixLib.Fluid.Movers.FlowControlled_m_flow pumpSec( - addPowerToMedium=false, - nominalValuesDefineDefaultPressureCurve=true, - redeclare package Medium = Medium, - T_start=T_start, - m_flow_nominal=0.5, - m_flow_small=0.001) - annotation (Placement(transformation(extent={{60,72},{80,92}}))); - AixLib.Fluid.FixedResistances.StaticPipe pipeSec( - D=0.1, - redeclare package Medium = Medium, - m_flow_small=0.001) annotation (Placement(transformation( - extent={{-8,-7.5},{8,7.5}}, - rotation=180, - origin={66,54.5}))); - Modelica.Fluid.Vessels.ClosedVolume consumer( - redeclare package Medium = Medium, - use_HeatTransfer=true, - V(displayUnit="l") = 0.05, - use_portsData=false, - nPorts=2, - T_start=T_start) annotation (Placement(transformation( - extent={{10,-10},{-10,10}}, - rotation=270, - origin={94,70}))); - FlowExergyMeter exSecOut(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{34,72},{56,92}}))); - FlowExergyMeter exSecIn(redeclare package Medium = Medium) annotation ( - Placement(transformation( - extent={{-11,10},{11,-10}}, - rotation=180, - origin={41,54}))); - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow consumerHeatFlow - annotation (Placement(transformation(extent={{48,14},{68,34}}))); - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaterHeatFlow - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={-28,24}))); - Modelica.Blocks.Math.Gain gain(k=-1) - annotation (Placement(transformation(extent={{28,18},{40,30}}))); - HeatExergyMeter exHeatPrim annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=180, - origin={-68,15}))); - Modelica.Blocks.Sources.RealExpression storageTemperatures[n](y= - bufferStorageHeatingcoils.layer[:].heatPort.T) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={2,-58}))); - Modelica.Blocks.Sources.Constant pumpMassFlow(k=0.5) - annotation (Placement(transformation(extent={{-100,88},{-88,100}}))); - AixLib.Fluid.Sources.Boundary_pT expansionVesselSec( - redeclare package Medium = Medium, - nPorts=1, - p=110000) annotation (Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=270, - origin={58,94}))); - AixLib.Fluid.Sources.Boundary_pT expansionVesselPrim( - redeclare package Medium = Medium, - nPorts=1, - p=110000) annotation (Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=270, - origin={-70,94}))); -equation - connect(T_ref.y, exergyStorageMeterMedium.T_ref) annotation (Line(points={{-79,-10}, - {-72,-10},{-72,-23},{-44,-23}}, - color={0,0,127})); - connect(p_ref.y, exergyStorageMeterMedium.p_ref) annotation (Line(points={{-79,-50}, - {-76,-50},{-76,-30},{-44,-30}},color={0,0,127})); - connect(X_ref.y, exergyStorageMeterMedium.X_ref) annotation (Line(points={{-79,-90}, - {-54,-90},{-54,-37},{-44,-37}}, color={0,0,127})); - connect(p_ref.y, exergyStorageMeterMedium.p) annotation (Line(points={{-79,-50}, - {-74,-50},{-39,-50},{-39,-41}}, color={0,0,127})); - connect(X_ref.y, exergyStorageMeterMedium.X) annotation (Line(points={{-79,-90}, - {-80,-90},{-29,-90},{-29,-41}},color={0,0,127})); - - connect(pumpPrim.port_b, exPrimIn.port_a) - annotation (Line(points={{-44,86},{-40,86},{-36,86}}, color={0,127,255})); - connect(exPrimIn.port_b, bufferStorageHeatingcoils.port_a_heatGenerator) - annotation (Line(points={{-16,86},{0.24,86},{0.24,85.96}}, color={0,127,255})); - connect(bufferStorageHeatingcoils.port_b_heatGenerator, exPrimOut.port_a) - annotation (Line(points={{0.24,57.4},{-5.88,57.4},{-5.88,57},{-16,57}}, - color={0,127,255})); - connect(exPrimOut.port_b, pipePrim.port_a) annotation (Line(points={{-36,57}, - {-46,57},{-46,56.5}},color={0,127,255})); - connect(pipePrim.port_b, heater.ports[1]) annotation (Line(points={{-60,56.5}, - {-72,56.5},{-72,68},{-74,68}}, color={0,127,255})); - connect(heater.ports[2], pumpPrim.port_a) annotation (Line(points={{-74,72},{-70, - 72},{-70,86},{-64,86}}, color={0,127,255})); - connect(bufferStorageHeatingcoils.port_b_consumer, exSecOut.port_a) - annotation (Line(points={{12,88},{12,92},{28,92},{28,82},{34,82}}, color={0, - 127,255})); - connect(exSecOut.port_b, pumpSec.port_a) - annotation (Line(points={{54,82},{54,82},{60,82}}, color={0,127,255})); - connect(exSecIn.port_a, pipeSec.port_b) - annotation (Line(points={{50,54},{58,54},{58,54.5}}, color={0,127,255})); - connect(exSecIn.port_b, bufferStorageHeatingcoils.port_a_consumer) - annotation (Line(points={{30,54},{28,54},{28,46},{12,46},{12,54}}, color={0, - 127,255})); - connect(pipeSec.port_a, consumer.ports[1]) annotation (Line(points={{74,54.5}, - {80,54.5},{80,68},{84,68}}, color={0,127,255})); - connect(pumpSec.port_b, consumer.ports[2]) annotation (Line(points={{80,82},{82, - 82},{82,72},{84,72}}, color={0,127,255})); - connect(consumerHeatFlow.Q_flow, gain.y) - annotation (Line(points={{48,24},{40.6,24}}, color={0,0,127})); - connect(pulse.y, gain.u) annotation (Line(points={{11,-10},{20,-10},{20,24},{26.8, - 24}}, color={0,0,127})); - connect(pulse.y, heaterHeatFlow.Q_flow) annotation (Line(points={{11,-10},{20, - -10},{20,24},{-18,24}}, color={0,0,127})); - connect(consumerHeatFlow.port, exHeatSec.port_a) annotation (Line(points={{68, - 24},{71,24},{71,24.2},{74,24.2}}, color={191,0,0})); - connect(exHeatSec.port_b, consumer.heatPort) - annotation (Line(points={{94,24.2},{94,60}}, color={191,0,0})); - connect(heaterHeatFlow.port, exHeatPrim.port_a) annotation (Line(points={{-38, - 24},{-48,24},{-48,24.2},{-58,24.2}}, color={191,0,0})); - connect(exHeatPrim.port_b, heater.heatPort) - annotation (Line(points={{-78,24.2},{-84,24},{-84,60}}, color={191,0,0})); - connect(T_ref.y, exHeatPrim.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,15},{-58,15}}, color={0,0,127})); - connect(T_ref.y, exHeatSec.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,15},{74,15}}, color={0,0,127})); - connect(storageTemperatures.y, exergyStorageMeterMedium.T) - annotation (Line(points={{-9,-58},{-34,-58},{-34,-40}}, color={0,0,127})); - connect(T_ref.y, exPrimOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, - {-50,-10},{-50,38},{-35,38},{-35,47}}, color={0,0,127})); - connect(T_ref.y, exPrimIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,38},{-40,38},{-40,66},{-34,66},{-17,66},{-17,76}}, color={0,0,127})); - connect(T_ref.y, exSecIn.T_ref) annotation (Line(points={{-79,-10},{-50,-10}, - {-50,38},{31,38},{31,44}},color={0,0,127})); - connect(T_ref.y, exSecOut.T_ref) annotation (Line(points={{-79,-10},{-64,-10}, - {-50,-10},{-50,38},{56,38},{56,62},{53,62},{53,72}}, color={0,0,127})); - connect(p_ref.y, exPrimOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,-30},{-52,-30},{-52,40},{-26,40},{-26,47}}, color={0,0,127})); - connect(p_ref.y, exPrimIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,-30},{-52,-30},{-52,40},{-42,40},{-42,68},{-26,68},{-26,76}}, - color={0,0,127})); - connect(p_ref.y, exSecOut.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,40},{-42,40},{-42,68},{-8,68},{-8,96},{30,96},{30,64},{44,64},{44, - 72}}, color={0,0,127})); - connect(p_ref.y, exSecIn.p_ref) annotation (Line(points={{-79,-50},{-76,-50}, - {-76,40},{-42,40},{-42,68},{-8,68},{-8,40},{40,40},{40,44}},color={0,0, - 127})); - connect(X_ref.y, exSecIn.X_ref) annotation (Line(points={{-79,-90},{-50,-90}, - {44,-90},{44,34},{49,34},{49,44}},color={0,0,127})); - connect(X_ref.y, exSecOut.X_ref) annotation (Line(points={{-79,-90},{-18,-90}, - {44,-90},{44,34},{54,34},{54,62},{35,62},{35,72}}, color={0,0,127})); - connect(X_ref.y, exPrimOut.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, - {-54,42},{-17,42},{-17,47}}, color={0,0,127})); - connect(X_ref.y, exPrimIn.X_ref) annotation (Line(points={{-79,-90},{-54,-90}, - {-54,44},{-35,44},{-35,76}}, color={0,0,127})); - connect(pumpMassFlow.y, pumpPrim.m_flow_in) annotation (Line(points={{-87.4, - 94},{-76,94},{-76,100},{-54.2,100},{-54.2,98}}, - color={0,0,127})); - connect(pumpMassFlow.y, pumpSec.m_flow_in) annotation (Line(points={{-87.4,94}, - {-76,94},{-76,100},{69.8,100},{69.8,94}}, color={0,0,127})); - connect(expansionVesselSec.ports[1], pumpSec.port_a) annotation (Line(points= - {{58,90},{58,82},{58,82},{58,82},{60,82},{60,82}}, color={0,127,255})); - connect(expansionVesselPrim.ports[1], pumpPrim.port_a) - annotation (Line(points={{-70,90},{-70,86},{-64,86}}, color={0,127,255})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false)), - experiment(StopTime=1000, Interval=10), - __Dymola_experimentSetupOutput, - __Dymola_experimentFlags( - Advanced(GenerateVariableDependencies=false, OutputModelicaCode=false), - Evaluate=false, - OutputCPUtime=true, - OutputFlatModelica=false), - Documentation(info=" -

    This model shows the usage of all three ExergyMeters.

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -")); -end Example; diff --git a/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo deleted file mode 100644 index 65e8fcf1a9..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/FlowExergyMeter.mo +++ /dev/null @@ -1,127 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model FlowExergyMeter - - extends AixLib.Fluid.Interfaces.PartialTwoPort; - extends Modelica.Icons.RotationalSensor; - - Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) - "Reference composition" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={-90,-100}))); - Modelica.Fluid.Sources.Boundary_pT referenceEnvironment( - redeclare replaceable package Medium = Medium, - use_p_in=true, - nPorts=2, - use_T_in=true, - use_X_in=true) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={0,-56}))); - Modelica.Fluid.Sensors.MassFlowRate massFlowRate(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-10,10},{10,-10}}))); - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy(redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{70,0},{50,20}}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy(redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); -public - Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", - final quantity="ThermodynamicTemperature", min=0) "Reference temperature" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={90,-100}))); - Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) - "Reference pressure" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={0,-100}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy_ref(redeclare - package Medium = Medium) - annotation (Placement(transformation(extent={{-12,-62},{-32,-42}}))); - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy_ref(redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{18,-64},{38,-42}}))); - Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", - final unit="W") "Exergy content of the medium flow" - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,110}))); - Modelica.Blocks.Math.Add enthalpyDifference(k1=-1) - annotation (Placement(transformation(extent={{-36,20},{-16,40}}))); - Modelica.Blocks.Math.Add entropyDifference(k1=-1) - annotation (Placement(transformation(extent={{-36,46},{-16,66}}))); - Modelica.Blocks.Math.Product productWithReferenceTemperature - annotation (Placement(transformation(extent={{0,40},{20,60}}))); - Modelica.Blocks.Math.Add specificExergy(k1=-1) - annotation (Placement(transformation(extent={{40,40},{60,60}}))); - Modelica.Blocks.Math.Product exergyFlowRate - annotation (Placement(transformation(extent={{-10,-10},{10,10}}, - rotation=180, - origin={50,80}))); -equation - connect(specificEnthalpy_ref.port, referenceEnvironment.ports[1]) - annotation (Line(points={{-22,-62},{-22,-66},{2,-66}}, - color={0,127,255})); - connect(referenceEnvironment.ports[2], specificEntropy_ref.port) - annotation (Line(points={{-2,-66},{28,-66},{28,-64}}, - color={0,127,255})); - connect(massFlowRate.port_b,specificEntropy. port) - annotation (Line(points={{10,0},{60,0}}, color={0,127,255})); - connect(specificEnthalpy.h_out, enthalpyDifference.u2) annotation (Line( - points={{-49,10},{-46,10},{-46,24},{-38,24}}, color={0,0,127})); - connect(specificEnthalpy_ref.h_out, enthalpyDifference.u1) annotation (Line( - points={{-33,-52},{-44,-52},{-44,-24},{-44,36},{-38,36}},color={0,0,127})); - connect(T_ref, productWithReferenceTemperature.u2) annotation (Line(points={{90,-100}, - {90,-100},{90,-34},{20,-34},{20,34},{-8,34},{-8,44},{-2,44}}, - color={0,0,127})); - connect(enthalpyDifference.y, specificExergy.u2) annotation (Line(points={{-15,30}, - {32,30},{32,44},{38,44}}, color={0,0,127})); - connect(port_a, specificEnthalpy.port) - annotation (Line(points={{-100,0},{-80,0},{-60,0}}, color={0,127,255})); - connect(specificEntropy.port, port_b) - annotation (Line(points={{60,0},{80,0},{100,0}}, color={0,127,255})); - connect(specificEntropy_ref.s, entropyDifference.u1) annotation (Line(points={{39,-53}, - {39,-53},{44,-53},{44,-27},{-86,-27},{-86,62},{-38,62}}, - color={0,0,127})); - connect(productWithReferenceTemperature.y, specificExergy.u1) - annotation (Line(points={{21,50},{22,50},{22,50},{24,50},{32,50},{32,56}, - {38,56}}, color={0,0,127})); - connect(massFlowRate.m_flow, exergyFlowRate.u2) annotation (Line(points={{0,-11}, - {0,-26},{74,-26},{74,86},{62,86}}, color={0,0,127})); - connect(exergyFlowRate.y, exergy_flow) - annotation (Line(points={{39,80},{0,80},{0,110}}, color={0,0,127})); - connect(specificEntropy.s, entropyDifference.u2) annotation (Line(points={{49,10}, - {32,10},{32,-18},{-78,-18},{-78,50},{-38,50}}, color={0,0,127})); - connect(entropyDifference.y, productWithReferenceTemperature.u1) - annotation (Line(points={{-15,56},{-2,56}}, color={0,0,127})); - connect(specificExergy.y, exergyFlowRate.u1) annotation (Line(points={{61,50}, - {68,50},{68,74},{62,74}}, color={0,0,127})); - connect(X_ref, referenceEnvironment.X_in) annotation (Line(points={{-90,-100}, - {-90,-100},{-90,-78},{-90,-38},{-4,-38},{-4,-44}}, - color={0,0,127})); - connect(p_ref, referenceEnvironment.p_in) annotation (Line(points={{0,-100},{0, - -70},{48,-70},{48,-36},{8,-36},{8,-40},{8,-44}}, - color={0,0,127})); - connect(T_ref, referenceEnvironment.T_in) annotation (Line(points={{90,-100},{ - 90,-100},{90,-86},{90,-34},{4,-34},{4,-44}}, - color={0,0,127})); - connect(specificEnthalpy.port, massFlowRate.port_a) - annotation (Line(points={{-60,0},{-36,0},{-10,0}}, color={0,127,255})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}})), Documentation(info=" -

    The model calculates the exergy content of a medium flow consisting of multiple substances. The reference environment is variable. The underlying equation is

    -

    \"dE/dt=dm/dt*(h-h_ref-T_ref*(s-s_ref))\"/

    -

    with \"dE/dt\"/: exergy flow rate, \"dm/dt\"/: mass flow rate, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

    -

    The reference environment is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The sensor is ideal, i.e., it does not influence the fluid.

    -

    Level of Development

    -

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -"), - Icon(coordinateSystem(extent={{-100,-100},{120,100}}))); -end FlowExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo deleted file mode 100644 index b03dd0f9bf..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/HeatExergyMeter.mo +++ /dev/null @@ -1,120 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model HeatExergyMeter - - extends Modelica.Icons.RotationalSensor; - - parameter Boolean useConvectiveHeatFlow = true - "Set to 'true' in order to connect the meter to a convective heat port"; - parameter Boolean useRadiativeHeatFlow = false - "Set to 'true' in order to connect the meter to a radiative heat port"; - parameter Boolean solarRadiation = false - "Set to 'true' in order to connect the meter to a solar radiation port" annotation(Dialog(enable = if useRadiativeHeatFlow then true else false)); - parameter Modelica.SIunits.ThermodynamicTemperature sunTemperature = 6000 - "Temperature assumption for the solar radiation"; - Modelica.Blocks.Math.Add add(k2=-1) - annotation (Placement(transformation(extent={{20,-10},{40,10}}))); - Modelica.Blocks.Sources.Constant const(k=1) - annotation (Placement(transformation(extent={{-12,0},{0,12}}))); - Modelica.Blocks.Math.Division division - annotation (Placement(transformation(extent={{-20,-40},{0,-20}}))); - Modelica.Blocks.Math.Product product - annotation (Placement(transformation(extent={{60,20},{80,40}}))); - Modelica.Blocks.Nonlinear.Limiter limiter(uMax=400, uMin=1) - annotation (Placement(transformation(extent={{-66,-56},{-54,-44}}))); - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{-110,82},{-90,102}}))); - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{90,82},{110,102}}))); - Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{-10,82},{10,102}}))); - Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor if useConvectiveHeatFlow - annotation (Placement(transformation(extent={{-94,58},{-74,78}}))); - AixLib.HVAC.Interfaces.RadPort radPort_a if - useRadiativeHeatFlow - annotation (Placement(transformation(extent={{-110,-90},{-90,-70}}))); - AixLib.HVAC.Interfaces.RadPort radPort_b if - useRadiativeHeatFlow - annotation (Placement(transformation(extent={{90,-90},{110,-70}}))); - Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensor1 if useRadiativeHeatFlow - annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=0, - origin={0,-74}))); - Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor1 if - useRadiativeHeatFlow - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); -public - Modelica.Blocks.Interfaces.RealInput T_ref( - final unit="K", - displayUnit="degC", - final quantity="ThermodynamicTemperature", - min=0) "Reference temperature" annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=0, - origin={-100,0}))); - Modelica.Blocks.Interfaces.RealOutput exergy_flow(final quantity="Power", - final unit="W") "Exergy content of the medium flow" - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={0,-110}))); -equation - connect(const.y, add.u1) annotation (Line( - points={{0.6,6},{18,6}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(division.y, add.u2) annotation (Line( - points={{1,-30},{6,-30},{6,-6},{18,-6}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(add.y, product.u2) annotation (Line( - points={{41,0},{52,0},{52,24},{58,24}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(limiter.y, division.u2) annotation (Line( - points={{-53.4,-50},{-40,-50},{-40,-36},{-22,-36}}, - color={0,0,127}, - smooth=Smooth.None)); - - if useConvectiveHeatFlow then - connect(temperatureSensor.T, limiter.u); - connect(heatFlowSensor.Q_flow, product.u1); - connect(port_a, heatFlowSensor.port_a); - connect(heatFlowSensor.port_b, port_b); - connect(port_a, temperatureSensor.port); - - end if; - - if useRadiativeHeatFlow then - - if solarRadiation then - limiter.u = sunTemperature; - else - connect(temperatureSensor1.T, limiter.u); - end if; - - connect(heatFlowSensor1.Q_flow, product.u1); - connect(temperatureSensor1.port, radPort_a); - connect(heatFlowSensor1.port_a, radPort_a); - connect(heatFlowSensor1.port_b, radPort_b); - end if; - - connect(T_ref, division.u1) annotation (Line(points={{-100,0},{-40,0},{-40,-24}, - {-22,-24}}, color={0,0,127})); - connect(product.y, exergy_flow) annotation (Line(points={{81,30},{86,30},{86,-92}, - {20,-92},{0,-92},{0,-110}}, color={0,0,127})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}})), Icon(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Documentation(info=" -

    The model calculates the exergy flow rate of a radiaitive or convective heat flux. The reference environment (subscript \"_ref\"/) is variable. The basic equation is

    -

    \"dE/dt=dQ/dt*(1-T_ref/T)\"/

    -

    with \"dE/dt\"/: exergy flow rate, \"dQ/dt\"/: heat flow rate, \"T\"/: temperature

    -

    Level of Development

    -

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -")); -end HeatExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo b/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo deleted file mode 100644 index 978aa67101..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/StoredExergyMeter.mo +++ /dev/null @@ -1,207 +0,0 @@ -within AixLib.HVAC.Meter.ExergyMeter; -model StoredExergyMeter - - extends Modelica.Icons.RotationalSensor; - - replaceable package Medium = Modelica.Media.Interfaces.PartialMedium - "Medium in the sensor" annotation (choicesAllMatching=true); - - parameter Integer n=1 "Number of identical volumes"; - - parameter Modelica.SIunits.Mass mass=100 "mass of each layer"; - parameter Modelica.SIunits.Temperature T_start=323.15 - "Start reference temperature of medium" - annotation (Dialog(tab="Initialisation")); - parameter Modelica.SIunits.Temperature T_ref_start=273.15 - "Start reference temperature" annotation (Dialog(tab="Initialisation")); - parameter Modelica.SIunits.Energy exergyContent_start = 1e+05 - "Start exergy content" annotation (Dialog(tab="Initialisation")); - - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy[n](redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{70,0},{50,20}}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy[n](redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{-70,0},{-50,20}}))); -public - Modelica.Blocks.Interfaces.RealInput T_ref(final unit="K", displayUnit="degC", - final quantity="ThermodynamicTemperature", min=0) "Reference temperature for EXERGY calculations in K. - It must be distinguished between the the reference temperature used for exergy calculations and the reference - for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" - annotation (Placement(transformation(extent={{-120,50},{-80,90}}))); - Modelica.Blocks.Interfaces.RealInput p_ref(final quantity="Pressure", final unit="Pa", displayUnit="bar", min=0) - "Reference pressure" - annotation (Placement(transformation(extent={{-120,-20},{-80,20}}), - iconTransformation(extent={{-120,-20},{-80,20}}))); - Modelica.Fluid.Sensors.SpecificEnthalpy specificEnthalpy1[n](redeclare - package Medium = Medium) - annotation (Placement(transformation(extent={{-10,60},{-30,40}}))); - Modelica.Fluid.Sensors.SpecificEntropy specificEntropy1[n](redeclare package - Medium = Medium) - annotation (Placement(transformation(extent={{10,60},{30,40}}))); - Modelica.Blocks.Interfaces.RealOutput ExergyChangeRate(final quantity="Power", - final unit="W") annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={106,-62}))); - Modelica.Fluid.Sources.Boundary_pT referenceEnvironment[n]( - redeclare package Medium = Medium, - each use_p_in=true, - each nPorts=2, - each use_T_in=true, - each use_X_in=true) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={0,80}))); - Modelica.Fluid.Sources.Boundary_pT boundary[n]( - redeclare package Medium = Medium, - each use_p_in=true, - each use_T_in=true, - each nPorts=2, - each use_X_in=true) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={0,0}))); -public - Modelica.Blocks.Interfaces.RealInput T[n]( - final unit="K", - displayUnit="degC", - final quantity="ThermodynamicTemperature", - min=0) "Reference temperature for EXERGY calculations in K. - It must be distinguished between the the reference temperature used for exergy calculations and the reference - for enthalpy/inner energy calculations. The latter should time invariant and the same for all components of a system" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={0,-112}), iconTransformation( - extent={{-20,-20},{20,20}}, - rotation=90, - origin={0,-100}))); - Modelica.Blocks.Interfaces.RealInput p( - final quantity="Pressure", - final unit="Pa", - displayUnit="bar", - min=0) "Reference pressure" annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=90, - origin={-50,-110}))); - Modelica.Blocks.Math.Sum sum1(nin=n) - annotation (Placement(transformation(extent={{-60,-60},{-40,-40}}))); - Modelica.Blocks.Math.Gain gain(k=mass) - annotation (Placement(transformation(extent={{-26,-57},{-12,-43}}))); - Modelica.Blocks.Math.Add add[n](each k1=-1) - annotation (Placement(transformation(extent={{-46,33},{-60,47}}))); - Modelica.Blocks.Math.Add add1[n](each k1=-1) - annotation (Placement(transformation(extent={{46,33},{60,47}}))); - Modelica.Blocks.Math.Sum sum2(nin=n) - annotation (Placement(transformation(extent={{64,-42},{44,-22}}))); - Modelica.Blocks.Math.Add add2(each k1=-1) - annotation (Placement(transformation(extent={{38,-69},{52,-55}}))); - Modelica.Blocks.Continuous.Derivative derivative( - x_start=exergyContent_start, - initType=Modelica.Blocks.Types.Init.InitialState, - T=10) - annotation (Placement(transformation(extent={{64,-72},{84,-52}}))); - Modelica.Blocks.Interfaces.RealOutput exergyContent( - start=exergyContent_start, - final quantity="Energy", - final unit="J") annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={106,-32}))); - Modelica.Blocks.Math.Product product - annotation (Placement(transformation(extent={{-6,-6},{6,6}}, - rotation=270, - origin={14,-46}))); - Modelica.Blocks.Math.Gain gain1( - k=mass) - annotation (Placement(transformation(extent={{-7,-7},{7,7}}, - rotation=180, - origin={27,-32}))); - Modelica.Blocks.Interfaces.RealInput X_ref[Medium.nX](final quantity="MassFraction", final unit="1", min=0, max=1) - "Reference composition" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=0, - origin={-100,-70}))); - Modelica.Blocks.Interfaces.RealInput X[Medium.nX]( - final quantity="MassFraction", - final unit="1", - min=0, - max=1) "Reference composition" annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=90, - origin={50,-110}))); -equation - - for i in 1:n loop - connect(p, boundary[i].p_in) annotation (Line(points={{-50,-110},{-50,-72},{ - -8,-72},{-8,-12}}, color={0,0,127})); - connect(T_ref, referenceEnvironment[i].T_in) annotation (Line(points={{-100,70}, - {-76,70},{-76,96},{4,96},{4,92}}, color={0,0,127})); - connect(p_ref, referenceEnvironment[i].p_in) annotation (Line(points={{-100,0}, - {-78,0},{-78,98},{8,98},{8,92}}, color={0,0,127})); - connect(X, boundary[i].X_in) annotation (Line(points={{50,-110},{50,-80},{2,-80}, - {2,-20},{4,-20},{4,-12}}, color={0,0,127})); - connect(X_ref, referenceEnvironment[i].X_in) annotation (Line(points={{-100,-70}, - {-72,-70},{-72,92},{-4,92}}, color={0,0,127})); - - end for; - - connect(specificEnthalpy[:].port, boundary[:].ports[1]) annotation (Line( - points={{-60,0},{-40,0},{-20,0},{-20,20},{-4,20},{-2,20},{-2,10}}, - color={0,127,255})); - connect(specificEntropy[:].port, boundary[:].ports[2]) annotation (Line( - points={{60,0},{40,0},{20,0},{20,20},{2,20},{2,10}}, color={0,127,255})); - connect(specificEnthalpy1.h_out, add.u1) annotation (Line(points={{-31,50},{-38, - 50},{-38,44.2},{-44.6,44.2}}, color={0,0,127})); - connect(specificEnthalpy.h_out, add.u2) annotation (Line(points={{-49,10},{-40, - 10},{-40,35.8},{-44.6,35.8}}, color={0,0,127})); - connect(add.y, sum1.u) annotation (Line(points={{-60.7,40},{-60.7,40},{-74,40}, - {-74,-50},{-62,-50}},color={0,0,127})); - connect(sum1.y, gain.u) annotation (Line(points={{-39,-50},{-34,-50},{-27.4,-50}}, - color={0,0,127})); - connect(specificEntropy1.s, add1.u1) annotation (Line(points={{31,50},{36,50}, - {36,44.2},{44.6,44.2}}, color={0,0,127})); - connect(specificEntropy.s, add1.u2) annotation (Line(points={{49,10},{40,10},{ - 40,35.8},{44.6,35.8}}, color={0,0,127})); - connect(add1.y, sum2.u) annotation (Line(points={{60.7,40},{60.7,40},{84,40},{ - 84,-32},{66,-32}}, - color={0,0,127})); - connect(derivative.y, ExergyChangeRate) - annotation (Line(points={{85,-62},{106,-62}}, color={0,0,127})); - connect(specificEnthalpy1[:].port, referenceEnvironment[:].ports[1]) - annotation (Line(points={{-20,60},{-20,70},{2,70}}, color={0,127,255})); - connect(specificEntropy1[:].port, referenceEnvironment[:].ports[2]) - annotation (Line(points={{20,60},{20,70},{-2,70}},color={0,127,255})); - connect(sum2.y, gain1.u) annotation (Line(points={{43,-32},{40,-32},{35.4,-32}}, - color={0,0,127})); - connect(gain1.y, product.u1) annotation (Line(points={{19.3,-32},{14,-32},{14, - -38.8},{17.6,-38.8}}, color={0,0,127})); - connect(T_ref, product.u2) annotation (Line(points={{-100,70},{-76,70},{-76,-28}, - {10.4,-28},{10.4,-38.8}}, color={0,0,127})); - connect(derivative.u, add2.y) - annotation (Line(points={{62,-62},{52.7,-62}}, color={0,0,127})); - connect(gain.y, add2.u2) annotation (Line(points={{-11.3,-50},{4,-50},{4,-66.2}, - {36.6,-66.2}}, color={0,0,127})); - connect(product.y, add2.u1) annotation (Line(points={{14,-52.6},{14,-57.8},{36.6, - -57.8}}, color={0,0,127})); - connect(add2.y, exergyContent) annotation (Line(points={{52.7,-62},{58,-62},{58, - -44},{90,-44},{90,-32},{106,-32}}, color={0,0,127})); - connect(T, boundary.T_in) annotation (Line(points={{0,-112},{0,-112},{0, - -28},{0,-22},{-4,-22},{-4,-12}}, - color={0,0,127})); - - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}})), Documentation(info=" -

    The model calculates the exergy content and its rate of change of a stratefied storage (i. e. with multiple layers) filled with a medium consisting of multiple substances. The reference environment is variable. The basic equation is

    -

    \"E=m*(h-h_ref-T_ref*(s-s_ref))\"/

    -

    with \"E\"/: exergy content, \"m\"/: mass, \"h\"/: specific enthalpy, \"T\"/: temperature, \"s\"/:specific entropy

    -

    The reference environment (subscript \"_ref\"/) is modeled using a boundary with temperature, pressure and composition as input. The medium model is replaceable. The physical enthalpy and entropy are determined using the respective sensors from MSL. The rate of change of the exergy content is calculated using the approximate derivative block from MSL.

    -

    Level of Development

    -

    -", revisions=" -
      -
    • November 10, 2016  by Marc Baranski and Roozbeh Sangi:
      Implemented.
    • -
    -")); -end StoredExergyMeter; diff --git a/AixLib/HVAC/Meter/ExergyMeter/package.order b/AixLib/HVAC/Meter/ExergyMeter/package.order deleted file mode 100644 index a70e257a03..0000000000 --- a/AixLib/HVAC/Meter/ExergyMeter/package.order +++ /dev/null @@ -1,4 +0,0 @@ -FlowExergyMeter -StoredExergyMeter -HeatExergyMeter -Example From e73a7b0b56c69e75c83fea0cae2209e76dd2b1bb Mon Sep 17 00:00:00 2001 From: TobiasBlacha Date: Tue, 25 Apr 2017 17:24:53 +0200 Subject: [PATCH 017/342] #335 Revisions expanded --- AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo b/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo index 2b49722574..482a403967 100644 --- a/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo +++ b/AixLib/Fluid/FixedResistances/DPEAgg_ambientLoss.mo @@ -363,6 +363,8 @@ equation ", revisions="