From a7a8a4506b7fd2f630c20a714618455840c5aabc Mon Sep 17 00:00:00 2001 From: Tobias Blacha Date: Fri, 23 Sep 2016 12:23:35 +0200 Subject: [PATCH 1/3] correction of the model paths in Fluid.Storage.Examples.StorageBoiler and Fluid.Storage.Examples.StorageSolarCollector --- .../Fluid/Storage/Examples/StorageBoiler.mo | 19 ++++++++++++------- .../Storage/Examples/StorageSolarCollector.mo | 17 +++++++++++------ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/AixLib/Fluid/Storage/Examples/StorageBoiler.mo b/AixLib/Fluid/Storage/Examples/StorageBoiler.mo index 4d798d3225..2994aa6566 100644 --- a/AixLib/Fluid/Storage/Examples/StorageBoiler.mo +++ b/AixLib/Fluid/Storage/Examples/StorageBoiler.mo @@ -7,7 +7,7 @@ model StorageBoiler Modelica.Media.Water.ConstantPropertyLiquidWater constrainedby Modelica.Media.Interfaces.PartialMedium; - AixLib.HVAC.Storage.Storage storage( + AixLib.Fluid.Storage.Storage storage( n=10, V_HE=0.05, kappa=0.4, @@ -23,9 +23,11 @@ model StorageBoiler redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-56,14},{-36,34}}))); Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent = {{-94, 14}, {-74, 34}}))); - Pumps.Pump pump(redeclare package Medium = Medium, m_flow_small=1e-4) + AixLib.Fluid.Movers.Pump + pump(redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-32, 62}))); - HeatGeneration.Boiler boiler(Q_flow_max = 50000, boilerEfficiencyB = AixLib.DataBase.Boiler.BoilerCondensing(), + AixLib.Fluid.HeatExchangers.Boiler + boiler(Q_flow_max = 50000, boilerEfficiencyB = AixLib.DataBase.Boiler.BoilerCondensing(), redeclare package Medium = Medium, m_flow_nominal=0.01) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {-16, 76}))); AixLib.Fluid.Sources.FixedBoundary @@ -33,10 +35,12 @@ model StorageBoiler annotation(Placement(transformation(extent = {{-86, 70}, {-66, 90}}))); Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {6, 60}))); Modelica.Blocks.Sources.Constant const(k = 273.15 + 80) annotation(Placement(transformation(extent = {{-3, -3}, {3, 3}}, rotation = 180, origin = {13, 69}))); - Pipes.StaticPipe pipe(D = 0.05, l = 5, + AixLib.Fluid.FixedResistances.Pipe + pipe(D = 0.05, l = 5, redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-26, -10}, {-6, 10}}))); - HydraulicResistances.HydraulicResistance hydraulicResistance(zeta = 1000, + AixLib.Fluid.FixedResistances.HydraulicResistance + hydraulicResistance(zeta = 1000, redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{8, -10}, {28, 10}}))); AixLib.Fluid.Sources.Boundary_ph @@ -48,7 +52,8 @@ model StorageBoiler AixLib.Fluid.Sources.FixedBoundary boundary_ph2(nPorts=1, redeclare package Medium = Medium) annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin = {-72, 46}))); - Pipes.StaticPipe pipe1(D = 0.05, l = 5, + AixLib.Fluid.FixedResistances.Pipe + pipe1(D = 0.05, l = 5, redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-66, -20}, {-46, 0}}))); equation @@ -71,7 +76,7 @@ equation connect(boundary_p.ports[1], pump.port_a) annotation (Line( points={{-66,80},{-32,80},{-32,72}}, color={0,127,255})); - annotation( experiment(StopTime = 86400, Interval = 60),Documentation(info = " + annotation (experiment(StopTime = 86400, Interval = 60),Documentation(info = "

Overview

This is a simple example of a storage and a boiler.

", revisions=" diff --git a/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo b/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo index 4a7b24e37a..3e179091b8 100644 --- a/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo +++ b/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo @@ -7,7 +7,7 @@ model StorageSolarCollector Modelica.Media.Water.ConstantPropertyLiquidWater constrainedby Modelica.Media.Interfaces.PartialMedium; - AixLib.HVAC.Storage.Storage storage( + AixLib.Fluid.Storage.Storage storage( n=10, V_HE=0.05, kappa=0.4, @@ -23,14 +23,16 @@ model StorageSolarCollector redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-56,14},{-36,34}}))); Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent = {{-94, 14}, {-74, 34}}))); - Pumps.Pump pump(ControlStrategy = 1, + AixLib.Fluid.Movers.Pump + pump(ControlStrategy = 1, redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-38, 64}))); AixLib.Fluid.Sources.FixedBoundary boundary_p(nPorts=1, redeclare package Medium = Medium) annotation(Placement(transformation(extent = {{-86, 70}, {-66, 90}}))); Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {-10, 64}))); - Pipes.StaticPipe pipe(D = 0.05, l = 5, + AixLib.Fluid.FixedResistances.Pipe + pipe(D = 0.05, l = 5, redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-34, -10}, {-14, 10}}))); AixLib.Fluid.Sources.Boundary_ph @@ -40,15 +42,18 @@ model StorageSolarCollector AixLib.Fluid.Sources.FixedBoundary boundary_ph2(nPorts=1, redeclare package Medium = Medium) annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin = {-72, 46}))); - Pipes.StaticPipe pipe1(D = 0.05, l = 5, + AixLib.Fluid.FixedResistances.Pipe + pipe1(D = 0.05, l = 5, redeclare package Medium = Medium, m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-68, -20}, {-48, 0}}))); - HeatGeneration.SolarThermal solarThermal(Collector = AixLib.DataBase.SolarThermal.FlatCollector(), A = 20, + AixLib.Fluid.HeatExchangers.SolarThermal + solarThermal(Collector = AixLib.DataBase.SolarThermal.FlatCollector(), A = 20, redeclare package Medium = Medium, m_flow_nominal=0.01) annotation(Placement(transformation(extent = {{24, -10}, {44, 10}}))); Modelica.Blocks.Sources.Pulse pulse(period = 3600, width = 1, amplitude = 60, offset=101325) annotation(Placement(transformation(extent = {{-142, -14}, {-122, 6}}))); - AixLib.HVAC.Valves.SimpleValve simpleValve( + AixLib.Fluid.Actuators.Valves.SimpleValve + simpleValve( Kvs=2, redeclare package Medium = Medium, m_flow_small=1e-4) annotation (Placement(transformation( From af10ea68634d2c27287264b899a7881b69885ae8 Mon Sep 17 00:00:00 2001 From: Tobias Blacha Date: Mon, 26 Sep 2016 14:52:19 +0200 Subject: [PATCH 2/3] Issue262 moves all submodels of Fluid.Storage.Examples.StorageBoiler and Fluid.Storage.Examples.StorageSolarCollector on the canvas and sets default values for unknown parameters of Storage.BaseClasses.Bouyancy --- AixLib/Fluid/Storage/BaseClasses/Bouyancy.mo | 10 +-- .../Fluid/Storage/Examples/StorageBoiler.mo | 67 +++++++++------ .../Storage/Examples/StorageSolarCollector.mo | 85 ++++++++++++------- 3 files changed, 98 insertions(+), 64 deletions(-) diff --git a/AixLib/Fluid/Storage/BaseClasses/Bouyancy.mo b/AixLib/Fluid/Storage/BaseClasses/Bouyancy.mo index 7775188804..73e545ceff 100644 --- a/AixLib/Fluid/Storage/BaseClasses/Bouyancy.mo +++ b/AixLib/Fluid/Storage/BaseClasses/Bouyancy.mo @@ -6,10 +6,10 @@ model Bouyancy parameter Real kappa = 0.4; Modelica.SIunits.TemperatureDifference dT; Modelica.SIunits.ThermalConductivity lambda_eff; - parameter Modelica.SIunits.Acceleration g = baseParameters.g; - Modelica.SIunits.SpecificHeatCapacity cp = baseParameters.cp_Water; - Modelica.SIunits.ThermalConductivity lambda = baseParameters.lambda_Water; - Modelica.SIunits.Density rho = baseParameters.rho_Water; + parameter Modelica.SIunits.Acceleration g = Modelica.Constants.g_n; + Modelica.SIunits.SpecificHeatCapacity cp = 4180; + Modelica.SIunits.ThermalConductivity lambda = 0.598; + Modelica.SIunits.Density rho = 1000; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a annotation(Placement(transformation(extent = {{-16, 86}, {4, 106}}))); Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b annotation(Placement(transformation(extent = {{-16, -104}, {4, -84}}))); equation @@ -21,7 +21,7 @@ equation end if; port_a.Q_flow = lambda_eff * A / dx * dT; port_a.Q_flow + port_b.Q_flow = 0; - annotation( Documentation(info = " + annotation (Documentation(info = "

Overview

Bouyancy model for the heat transfer between the layers in a buffer storage.

", revisions = " diff --git a/AixLib/Fluid/Storage/Examples/StorageBoiler.mo b/AixLib/Fluid/Storage/Examples/StorageBoiler.mo index 2994aa6566..d23a528adf 100644 --- a/AixLib/Fluid/Storage/Examples/StorageBoiler.mo +++ b/AixLib/Fluid/Storage/Examples/StorageBoiler.mo @@ -21,60 +21,75 @@ model StorageBoiler h=2, k_HE=1500, redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-56,14},{-36,34}}))); - Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent = {{-94, 14}, {-74, 34}}))); + annotation (Placement(transformation(extent={{-18,12},{2,32}}))); + Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent={{-56,12}, + {-36,32}}))); AixLib.Fluid.Movers.Pump pump(redeclare package Medium = Medium, m_flow_small=1e-4) - annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-32, 62}))); + annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin={6,60}))); AixLib.Fluid.HeatExchangers.Boiler boiler(Q_flow_max = 50000, boilerEfficiencyB = AixLib.DataBase.Boiler.BoilerCondensing(), redeclare package Medium = Medium, - m_flow_nominal=0.01) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {-16, 76}))); + m_flow_nominal=0.01) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin={22,74}))); AixLib.Fluid.Sources.FixedBoundary boundary_p(nPorts=1, redeclare package Medium = Medium) - annotation(Placement(transformation(extent = {{-86, 70}, {-66, 90}}))); - Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {6, 60}))); - Modelica.Blocks.Sources.Constant const(k = 273.15 + 80) annotation(Placement(transformation(extent = {{-3, -3}, {3, 3}}, rotation = 180, origin = {13, 69}))); + annotation(Placement(transformation(extent={{-48,68}, + {-28,88}}))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin={46,48}))); + Modelica.Blocks.Sources.Constant const(k = 273.15 + 80) annotation(Placement(transformation(extent = {{-3, -3}, {3, 3}}, rotation = 180, origin={51,67}))); AixLib.Fluid.FixedResistances.Pipe pipe(D = 0.05, l = 5, redeclare package Medium = Medium, - m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-26, -10}, {-6, 10}}))); + m_flow_small=1e-4) annotation(Placement(transformation(extent={{12,-12}, + {32,8}}))); AixLib.Fluid.FixedResistances.HydraulicResistance hydraulicResistance(zeta = 1000, redeclare package Medium = Medium, - m_flow_small=1e-4) annotation(Placement(transformation(extent = {{8, -10}, {28, 10}}))); + m_flow_small=1e-4) annotation(Placement(transformation(extent={{46,-12}, + {66,8}}))); AixLib.Fluid.Sources.Boundary_ph boundary_ph1(use_p_in = true, h = 0.8e5, nPorts=1, - redeclare package Medium = Medium) annotation(Placement(transformation(extent = {{-104, -20}, {-84, 0}}))); + redeclare package Medium = Medium) annotation(Placement(transformation(extent={{-66,-22}, + {-46,-2}}))); Modelica.Blocks.Sources.Ramp ramp(duration = 1000, height = 0.00001e5, - offset=101325) annotation(Placement(transformation(extent = {{-136, -14}, {-116, 6}}))); + offset=101325) annotation(Placement(transformation(extent={{-96,-14}, + {-76,6}}))); AixLib.Fluid.Sources.FixedBoundary boundary_ph2(nPorts=1, redeclare package Medium = Medium) - annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin = {-72, 46}))); + annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin={-34,44}))); AixLib.Fluid.FixedResistances.Pipe pipe1(D = 0.05, l = 5, redeclare package Medium = Medium, - m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-66, -20}, {-46, 0}}))); + m_flow_small=1e-4) annotation(Placement(transformation(extent={{-28,-22}, + {-8,-2}}))); equation - connect(fixedTemperature.port, storage.heatPort) annotation(Line(points = {{-74, 24}, {-54, 24}}, color = {191, 0, 0})); - connect(pump.port_a, boiler.port_b) annotation(Line(points = {{-32, 72}, {-32, 76}, {-26, 76}}, color = {0, 127, 255})); - connect(booleanExpression.y, pump.IsNight) annotation(Line(points = {{-5, 60}, {-14, 60}, {-14, 62}, {-21.8, 62}}, color = {255, 0, 255})); - connect(const.y, boiler.T_set) annotation(Line(points = {{9.7, 69}, {-5.2, 69}}, color = {0, 0, 127})); - connect(pipe.port_b, hydraulicResistance.port_a) annotation(Line(points = {{-6, 0}, {8, 0}}, color = {0, 127, 255})); - connect(hydraulicResistance.port_b, boiler.port_a) annotation(Line(points = {{28, 0}, {52, 0}, {52, 76}, {-6, 76}}, color = {0, 127, 255})); - connect(pump.port_b, storage.port_a_heatGenerator) annotation(Line(points = {{-32, 52}, {-32, 32.8}, {-37.6, 32.8}}, color = {0, 127, 255})); - connect(pipe.port_a, storage.port_b_heatGenerator) annotation(Line(points = {{-26, 0}, {-32, 0}, {-32, 16}, {-37.6, 16}}, color = {0, 127, 255})); - connect(ramp.y, boundary_ph1.p_in) annotation(Line(points={{-115,-4},{-106,-2}}, color = {0, 0, 127})); - connect(pipe1.port_b, storage.port_a_consumer) annotation(Line(points = {{-46, -10}, {-46, 14}}, color = {0, 127, 255})); + connect(fixedTemperature.port, storage.heatPort) annotation(Line(points={{-36,22}, + {-16,22}}, color = {191, 0, 0})); + connect(pump.port_a, boiler.port_b) annotation(Line(points={{6,70},{6,74},{12, + 74}}, color = {0, 127, 255})); + connect(booleanExpression.y, pump.IsNight) annotation(Line(points={{35,48},{ + 24,48},{24,60},{16.2,60}}, color = {255, 0, 255})); + connect(const.y, boiler.T_set) annotation(Line(points={{47.7,67},{32.8,67}}, color = {0, 0, 127})); + connect(pipe.port_b, hydraulicResistance.port_a) annotation(Line(points={{32,-2}, + {46,-2}}, color = {0, 127, 255})); + connect(hydraulicResistance.port_b, boiler.port_a) annotation(Line(points={{66,-2}, + {90,-2},{90,74},{32,74}}, color = {0, 127, 255})); + connect(pump.port_b, storage.port_a_heatGenerator) annotation(Line(points={{6,50},{ + 6,30.8},{0.4,30.8}}, color = {0, 127, 255})); + connect(pipe.port_a, storage.port_b_heatGenerator) annotation(Line(points={{12,-2}, + {6,-2},{6,14},{0.4,14}}, color = {0, 127, 255})); + connect(ramp.y, boundary_ph1.p_in) annotation(Line(points={{-75,-4},{-68,-4}}, color = {0, 0, 127})); + connect(pipe1.port_b, storage.port_a_consumer) annotation(Line(points={{-8,-12}, + {-8,12}}, color = {0, 127, 255})); connect(boundary_ph1.ports[1], pipe1.port_a) annotation (Line( - points={{-84,-10},{-66,-10}}, + points={{-46,-12},{-28,-12}}, color={0,127,255})); connect(storage.port_b_consumer, boundary_ph2.ports[1]) annotation (Line( - points={{-46,34},{-46,46},{-62,46}}, + points={{-8,32},{-8,44},{-24,44}}, color={0,127,255})); connect(boundary_p.ports[1], pump.port_a) annotation (Line( - points={{-66,80},{-32,80},{-32,72}}, + points={{-28,78},{6,78},{6,70}}, color={0,127,255})); annotation (experiment(StopTime = 86400, Interval = 60),Documentation(info = "

Overview

diff --git a/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo b/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo index 3e179091b8..cf1243220c 100644 --- a/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo +++ b/AixLib/Fluid/Storage/Examples/StorageSolarCollector.mo @@ -21,37 +21,42 @@ model StorageSolarCollector d=1.5, h=2.5, redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-56,14},{-36,34}}))); - Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent = {{-94, 14}, {-74, 34}}))); + annotation (Placement(transformation(extent={{-30,14},{-10,34}}))); + Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent={{-60,14}, + {-40,34}}))); AixLib.Fluid.Movers.Pump pump(ControlStrategy = 1, redeclare package Medium = Medium, - m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-38, 64}))); + m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin={-8,70}))); AixLib.Fluid.Sources.FixedBoundary boundary_p(nPorts=1, redeclare package Medium = Medium) annotation(Placement(transformation(extent = {{-86, 70}, {-66, 90}}))); - Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {-10, 64}))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin={36,70}))); AixLib.Fluid.FixedResistances.Pipe pipe(D = 0.05, l = 5, redeclare package Medium = Medium, - m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-34, -10}, {-14, 10}}))); + m_flow_small=1e-4) annotation(Placement(transformation(extent={{-6,-10}, + {14,10}}))); AixLib.Fluid.Sources.Boundary_ph boundary_ph1(use_p_in = true, h = 42e3, nPorts=1, - redeclare package Medium = Medium) annotation(Placement(transformation(extent = {{-112, -20}, {-92, 0}}))); + redeclare package Medium = Medium) annotation(Placement(transformation(extent={{-66,-26}, + {-46,-6}}))); AixLib.Fluid.Sources.FixedBoundary boundary_ph2(nPorts=1, redeclare package Medium = Medium) - annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin = {-72, 46}))); + annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin={-76,52}))); AixLib.Fluid.FixedResistances.Pipe pipe1(D = 0.05, l = 5, redeclare package Medium = Medium, - m_flow_small=1e-4) annotation(Placement(transformation(extent = {{-68, -20}, {-48, 0}}))); + m_flow_small=1e-4) annotation(Placement(transformation(extent={{-40,-26}, + {-20,-6}}))); AixLib.Fluid.HeatExchangers.SolarThermal solarThermal(Collector = AixLib.DataBase.SolarThermal.FlatCollector(), A = 20, redeclare package Medium = Medium, m_flow_nominal=0.01) annotation(Placement(transformation(extent = {{24, -10}, {44, 10}}))); Modelica.Blocks.Sources.Pulse pulse(period = 3600, width = 1, amplitude = 60, - offset=101325) annotation(Placement(transformation(extent = {{-142, -14}, {-122, 6}}))); + offset=101325) annotation(Placement(transformation(extent={{-96,-18}, + {-76,2}}))); AixLib.Fluid.Actuators.Valves.SimpleValve simpleValve( Kvs=2, @@ -59,14 +64,17 @@ model StorageSolarCollector m_flow_small=1e-4) annotation (Placement(transformation( extent={{-10,9},{10,-9}}, rotation=90, - origin={79,42}))); + origin={69,42}))); AixLib.Fluid.Sensors.TemperatureTwoPort temperatureSensor(redeclare package Medium = Medium, - m_flow_nominal=0.01) annotation(Placement(transformation(extent = {{58, -10}, {78, 10}}))); - Modelica.Blocks.Continuous.LimPID PI(controllerType = Modelica.Blocks.Types.SimpleController.PI, k = 0.05, Ti = 60, yMax = 0.999, yMin = 0) annotation(Placement(transformation(extent = {{-6, 6}, {6, -6}}, rotation = 90, origin = {100, 12}))); - Modelica.Blocks.Sources.Constant const(k = 273.15 + 70) annotation(Placement(transformation(extent = {{84, -10}, {90, -4}}))); - Modelica.Blocks.Math.Add add(k2 = -1) annotation(Placement(transformation(extent = {{-4, -4}, {4, 4}}, rotation = 90, origin = {98, 30}))); - Modelica.Blocks.Sources.Constant const1(k = 1) annotation(Placement(transformation(extent = {{82, 22}, {88, 28}}))); + m_flow_nominal=0.01) annotation(Placement(transformation(extent={{48,-10}, + {68,10}}))); + Modelica.Blocks.Continuous.LimPID PI(controllerType = Modelica.Blocks.Types.SimpleController.PI, k = 0.05, Ti = 60, yMax = 0.999, yMin = 0) annotation(Placement(transformation(extent = {{-6, 6}, {6, -6}}, rotation = 90, origin={90,14}))); + Modelica.Blocks.Sources.Constant const(k = 273.15 + 70) annotation(Placement(transformation(extent={{74,-10}, + {80,-4}}))); + Modelica.Blocks.Math.Add add(k2 = -1) annotation(Placement(transformation(extent = {{-4, -4}, {4, 4}}, rotation = 90, origin={88,30}))); + Modelica.Blocks.Sources.Constant const1(k = 1) annotation(Placement(transformation(extent={{70,20}, + {78,28}}))); Modelica.SIunits.Conversions.NonSIunits.Energy_kWh Q_ges; Modelica.Blocks.Sources.CombiTimeTable hotSummerDay( extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, @@ -79,36 +87,47 @@ model StorageSolarCollector annotation (Placement(transformation(extent={{10,32},{30,52}}))); equation der(Q_ges) = (solarThermal.volume.heatPort.Q_flow - fixedTemperature.port.Q_flow) / 3.6e6; - connect(fixedTemperature.port, storage.heatPort) annotation(Line(points = {{-74, 24}, {-54, 24}}, color = {191, 0, 0})); - connect(booleanExpression.y, pump.IsNight) annotation(Line(points = {{-21, 64}, {-27.8, 64}}, color = {255, 0, 255})); - connect(pump.port_b, storage.port_a_heatGenerator) annotation(Line(points = {{-38, 54}, {-38, 32.8}, {-37.6, 32.8}}, color = {0, 127, 255})); - connect(pipe.port_a, storage.port_b_heatGenerator) annotation(Line(points = {{-34, 0}, {-38, 0}, {-38, 16}, {-37.6, 16}}, color = {0, 127, 255})); - connect(pipe1.port_b, storage.port_a_consumer) annotation(Line(points = {{-48, -10}, {-46, -10}, {-46, 14}}, color = {0, 127, 255})); + connect(fixedTemperature.port, storage.heatPort) annotation(Line(points={{-40,24}, + {-28,24}}, color = {191, 0, 0})); + connect(booleanExpression.y, pump.IsNight) annotation(Line(points={{25,70},{ + 2.2,70}}, color = {255, 0, 255})); + connect(pump.port_b, storage.port_a_heatGenerator) annotation(Line(points={{-8,60}, + {-8,32.8},{-11.6,32.8}}, color = {0, 127, 255})); + connect(pipe.port_a, storage.port_b_heatGenerator) annotation(Line(points={{-6,0},{ + -8,0},{-8,16},{-11.6,16}}, color = {0, 127, 255})); + connect(pipe1.port_b, storage.port_a_consumer) annotation(Line(points={{-20,-16}, + {-20,14}}, color = {0, 127, 255})); connect(hotSummerDay.y[2], solarThermal.Irradiation) annotation(Line(points={{31,42}, {31,10.8},{35,10.8}}, color = {0, 0, 127})); connect(hotSummerDay.y[1], solarThermal.T_air) annotation(Line(points={{31,42}, {31,22},{28,22},{28,10.8}}, color = {0, 0, 127})); - connect(pulse.y, boundary_ph1.p_in) annotation(Line(points={{-121,-4},{-114,-2}}, color = {0, 0, 127})); - connect(simpleValve.port_b, pump.port_a) annotation(Line(points = {{79, 52}, {78, 52}, {78, 74}, {-38, 74}}, color = {0, 127, 255})); - connect(solarThermal.port_b, temperatureSensor.port_a) annotation(Line(points = {{44, 0}, {58, 0}}, color = {0, 127, 255})); - connect(solarThermal.port_a, pipe.port_b) annotation(Line(points = {{24, 0}, {-14, 0}}, color = {0, 127, 255})); - connect(temperatureSensor.port_b, simpleValve.port_a) annotation(Line(points = {{78, 0}, {78, 32}, {79, 32}}, color = {0, 127, 255})); - connect(const.y, PI.u_s) annotation(Line(points = {{90.3, -7}, {100, -7}, {100, 4.8}}, color = {0, 0, 127})); - connect(PI.y, add.u2) annotation(Line(points = {{100, 18.6}, {100, 25.2}, {100.4, 25.2}}, color = {0, 0, 127})); - connect(add.y, simpleValve.opening) annotation(Line(points = {{98, 34.4}, {98, 42}, {86.2, 42}}, color = {0, 0, 127})); - connect(const1.y, add.u1) annotation(Line(points = {{88.3, 25}, {92.15, 25}, {92.15, 25.2}, {95.6, 25.2}}, color = {0, 0, 127})); + connect(pulse.y, boundary_ph1.p_in) annotation(Line(points={{-75,-8},{-68,-8}}, color = {0, 0, 127})); + connect(simpleValve.port_b, pump.port_a) annotation(Line(points={{69,52},{68, + 52},{68,80},{-8,80}}, color = {0, 127, 255})); + connect(solarThermal.port_b, temperatureSensor.port_a) annotation(Line(points={{44,0},{ + 48,0}}, color = {0, 127, 255})); + connect(solarThermal.port_a, pipe.port_b) annotation(Line(points={{24,0},{14, + 0}}, color = {0, 127, 255})); + connect(temperatureSensor.port_b, simpleValve.port_a) annotation(Line(points={{68,0},{ + 68,32},{69,32}}, color = {0, 127, 255})); + connect(const.y, PI.u_s) annotation(Line(points={{80.3,-7},{90,-7},{90,6.8}}, color = {0, 0, 127})); + connect(PI.y, add.u2) annotation(Line(points={{90,20.6},{90,25.2},{90.4,25.2}}, color = {0, 0, 127})); + connect(add.y, simpleValve.opening) annotation(Line(points={{88,34.4},{88,42}, + {76.2,42}}, color = {0, 0, 127})); connect(boundary_ph1.ports[1], pipe1.port_a) annotation (Line( - points={{-92,-10},{-68,-10}}, + points={{-46,-16},{-40,-16}}, color={0,127,255})); connect(boundary_ph2.ports[1], storage.port_b_consumer) annotation (Line( - points={{-62,46},{-48,46},{-46,34}}, + points={{-66,52},{-20,52},{-20,34}}, color={0,127,255})); connect(boundary_p.ports[1], pump.port_a) annotation (Line( - points={{-66,80},{-38,80},{-38,74}}, + points={{-66,80},{-36,80},{-8,80}}, color={0,127,255})); connect(temperatureSensor.T, PI.u_m) annotation (Line( - points={{68,11},{68,18},{92.8,12}}, + points={{58,11},{58,14},{82.8,14}}, color={0,0,127})); + connect(const1.y, add.u1) annotation (Line(points={{78.4,24},{85.6,24},{85.6, + 25.2}}, color={0,0,127})); annotation (experiment(StopTime = 172800, Interval = 60),Documentation(info = "

Overview

This is a simple example of a storage and a solar collector.

From d69184e64cab32b5e8b67524af2acd7ad003d04e Mon Sep 17 00:00:00 2001 From: mlauster Date: Mon, 26 Sep 2016 16:34:32 +0200 Subject: [PATCH 3/3] changes version number #275 --- AixLib/package.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AixLib/package.mo b/AixLib/package.mo index e3d9dbf4be..bbdfa1566b 100644 --- a/AixLib/package.mo +++ b/AixLib/package.mo @@ -1,6 +1,6 @@ within ; package AixLib - annotation(uses(Modelica(version = "3.2.1")), version = "0.3.1", Documentation(info = " + annotation(uses(Modelica(version = "3.2.1")), version = "0.3.2", Documentation(info = "

The free open-source AixLib library is being developed for research and teaching purposes. It aims at dynamic simulations of thermal and hydraulic systems to develop control strategies for HVAC systems and analyse interactions in complex systems. It is used for simulations on component, building and city district level. As this library is developed mainly for academic purposes, user-friendliness and model robustness is not a main task. This research focus thus influences the layout and philosophy of the library.

Various connectors of the Modelica Standard Library are used, e.g. Modelica.Fluid and Modelica.HeatTransfer. These are accompanied by own connectors for simplified hydraulics (no fluid.media, incompressible, one phase) , shortwave radiation (intensity), longwave radiation (heat flow combined with a virtual temperature) and combined longwave radiation and thermal. The pressure in the connectors is the total pressure. The used media models are simplified from the Modelica.Media library. If possible and necessary, components use continuously differentiable equations. In general, zero mass flow rate and reverse flow are supported.

Most models have been analytically verified. In addition, hydraulic components are compared to empirical data such as performance curves. High and low order building models have been validated using a standard test suite provided by the ANSI/ASHRAE Standard 140 and VDI 6007 Guideline. The library has only been tested with Dymola.