diff --git a/.travis.yml b/.travis.yml index 6dfc060da2d..f3dac3db1ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,9 +96,9 @@ env: # - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Utilities\"" # - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Utilities\"" # - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Utilities\"" - - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Templates.AirHandlers\"" + # - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Templates.AirHandlers\"" # - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Templates.AirHandlers\"" - - TEST_ARG="make test-templates-optimica"" + - TEST_ARG="make test-templates-optimica" before_install: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin diff --git a/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/BoilerHotWater.mos b/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/BoilerHotWater.mos new file mode 100644 index 00000000000..a1410ac1175 --- /dev/null +++ b/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/BoilerHotWater.mos @@ -0,0 +1,21 @@ +simulateModel("Buildings.Templates.Components.Validation.BoilerHotWater", + method="cvode", + tolerance=1e-6, + stopTime=2000.0, + resultFile="BoilerHotWater"); +createPlot(id=1, + position={19, 10, 474, 390}, + y={"THeaWatRet.y", "THeaWatSupSet.y", "boiTab.bus.THeaWatSup", "boiPol.bus.THeaWatSup"}, + subPlot=1, + autoscale=true, + grid=true); +createPlot(id=1, + y={"boiTab.boi.Q_flow_nominal", "boiPol.boi.Q_flow_nominal", "boiTab.boi.QWat_flow", "boiPol.boi.QWat_flow"}, + subPlot=2, + autoscale=true, + grid=true); +createPlot(id=1, + y={"boiTab.boi.m_flow_nominal", "boiPol.boi.m_flow_nominal", "boiTab.boi.m_flow", "boiPol.boi.m_flow"}, + subPlot=3, + autoscale=true, + grid=true); \ No newline at end of file diff --git a/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/BoilerHotWaterRecord.mos b/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/BoilerHotWaterRecord.mos new file mode 100644 index 00000000000..cfc651598b8 --- /dev/null +++ b/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/BoilerHotWaterRecord.mos @@ -0,0 +1,16 @@ +simulateModel("Buildings.Templates.Components.Validation.BoilerHotWaterRecord", + method="cvode", + tolerance=1e-6, + stopTime=2000.0, + resultFile="BoilerHotWaterRecord"); +createPlot(id=1, + position={19, 10, 474, 390}, + y={"per.Q_flow_nominal", "datBoiTab.per.Q_flow_nominal", "datBoiTabRed.per.Q_flow_nominal", "datBoiTabLoc.per.Q_flow_nominal"}, + subPlot=1, + autoscale=true, + grid=true); +createPlot(id=1, + y={"per.effCur[4, 11]", "datBoiTab.per.effCur[4, 11]", "datBoiTabRed.per.effCur[4, 11]", "datBoiTabLoc.per.effCur[4, 11]"}, + subPlot=2, + autoscale=true, + grid=true); diff --git a/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/PumpMultipleRecord.mos b/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/PumpMultipleRecord.mos new file mode 100644 index 00000000000..57309173814 --- /dev/null +++ b/Buildings/Resources/Scripts/Dymola/Templates/Components/Validation/PumpMultipleRecord.mos @@ -0,0 +1,31 @@ +simulateModel("Buildings.Templates.Components.Validation.PumpMultipleRecord", + method="cvode", + tolerance=1e-6, + stopTime=2000.0, + resultFile="PumpMultipleRecord"); +createPlot(id=1, + position={19, 10, 476, 550}, + y={"V_flow_nominal[1]", "V_flow_nominal[2]"}, + subPlot=1, + autoscale=true, + grid=true); +createPlot(id=1, + y={"datDef.per[1].pressure.V_flow[2]", "datDef.per[2].pressure.V_flow[2]"}, + subPlot=2, + autoscale=true, + grid=true); +createPlot(id=1, + y={"datRed.per[1].pressure.V_flow[2]", "datRed.per[2].pressure.V_flow[2]"}, + subPlot=3, + autoscale=true, + grid=true); +createPlot(id=1, + y={"datAss.per[1].pressure.V_flow[2]", "datAss.per[2].pressure.V_flow[2]"}, + subPlot=4, + autoscale=true, + grid=true); +createPlot(id=1, + y={"datPre.per[1].pressure.V_flow[2]", "datPre.per[2].pressure.V_flow[2]"}, + subPlot=5, + autoscale=true, + grid=true); \ No newline at end of file diff --git a/Buildings/Templates/Components/Boilers/HotWaterPolynomial.mo b/Buildings/Templates/Components/Boilers/HotWaterPolynomial.mo index 644652dae3f..acf553fcfd4 100644 --- a/Buildings/Templates/Components/Boilers/HotWaterPolynomial.mo +++ b/Buildings/Templates/Components/Boilers/HotWaterPolynomial.mo @@ -1,6 +1,6 @@ within Buildings.Templates.Components.Boilers; -model HotWaterPolynomial "Hot water boiler" - extends Buildings.Templates.Components.Interfaces.BoilerHotWater( +model HotWaterPolynomial "Hot water boiler with efficiency described by a polynomial" + extends Buildings.Templates.Components.Interfaces.PartialBoilerHotWater( final typMod=Buildings.Templates.Components.Types.BoilerHotWaterModel.Polynomial, redeclare Buildings.Fluid.Boilers.BoilerPolynomial boi( final Q_flow_nominal = dat.cap_nominal, @@ -11,5 +11,32 @@ model HotWaterPolynomial "Hot water boiler" annotation ( defaultComponentName="boi", Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); + coordinateSystem(preserveAspectRatio=false)), + Documentation(info=" +

+This is a model for a hot water boiler where the efficiency is computed +based on a polynomial of the firing rate and optionally of the hot water +temperature. +This model is based on + +Buildings.Fluid.Boilers.BoilerPolynomial. +The user may refer to the documentation of + +Buildings.Fluid.Boilers.UsersGuide +for the modeling assumptions. +

+

Control points

+

+See the documentation of + +Buildings.Templates.Components.Interfaces.BoilerHotWater. +

+", revisions=" + +")); end HotWaterPolynomial; diff --git a/Buildings/Templates/Components/Boilers/HotWaterTable.mo b/Buildings/Templates/Components/Boilers/HotWaterTable.mo index f7f00df6122..a7f5065b7ed 100644 --- a/Buildings/Templates/Components/Boilers/HotWaterTable.mo +++ b/Buildings/Templates/Components/Boilers/HotWaterTable.mo @@ -1,11 +1,45 @@ within Buildings.Templates.Components.Boilers; -model HotWaterTable "Hot water boiler" - extends Buildings.Templates.Components.Interfaces.BoilerHotWater( +model HotWaterTable "Hot water boiler with efficiency described by a table" + extends Buildings.Templates.Components.Interfaces.PartialBoilerHotWater( final typMod=Buildings.Templates.Components.Types.BoilerHotWaterModel.Table, redeclare Buildings.Fluid.Boilers.BoilerTable boi(final per=dat.per)); annotation ( defaultComponentName="boi", Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); + coordinateSystem(preserveAspectRatio=false)), + Documentation(info=" +

+This is a model for a hot water boiler where the efficiency is computed +based on a lookup table indexed by the firing rate and the inlet temperature. +This model is based on + +Buildings.Fluid.Boilers.BoilerTable. +The user may refer to the documentation of + +Buildings.Fluid.Boilers.UsersGuide +for the modeling assumptions. +

+

Control points

+

+See the documentation of + +Buildings.Templates.Components.Interfaces.BoilerHotWater. +

+

Model parameters

+

+The design parameters and the efficiency table are specified with an instance of + +Buildings.Templates.Components.Data.BoilerHotWater. +The documentation of this record class provides further details on how to +properly parameterize the model. +

+", revisions=" + +")); end HotWaterTable; diff --git a/Buildings/Templates/Components/Data/BoilerHotWater.mo b/Buildings/Templates/Components/Data/BoilerHotWater.mo index 1a646a9b0cc..228aed3520d 100644 --- a/Buildings/Templates/Components/Data/BoilerHotWater.mo +++ b/Buildings/Templates/Components/Data/BoilerHotWater.mo @@ -14,8 +14,7 @@ record BoilerHotWater "Data for hot water boilers" final min=0) "HW mass flow rate" annotation(Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.HeatFlowRate cap_nominal( - final min=0) + parameter Modelica.Units.SI.HeatFlowRate cap_nominal "Heating capacity" annotation(Dialog(group="Nominal condition")); parameter Modelica.Units.SI.PressureDifference dpHeaWat_nominal( @@ -28,15 +27,13 @@ record BoilerHotWater "Data for hot water boilers" "HW supply temperature" annotation(Dialog(group="Nominal condition")); - /* FIXME: The following yields a final overriding message for fue with Dymola - when redeclaring per. Open ticket at DS. - */ - replaceable parameter Buildings.Fluid.Boilers.Data.Generic per + replaceable parameter Buildings.Fluid.Boilers.Data.Generic per(fue=fue) constrainedby Buildings.Fluid.Boilers.Data.Generic( - fue=fue, - Q_flow_nominal=cap_nominal, + Q_flow_nominal=abs(cap_nominal), TIn_nominal=THeaWatSup_nominal - - cap_nominal/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq/mHeaWat_flow_nominal, + abs(cap_nominal)/ + Buildings.Utilities.Psychrometrics.Constants.cpWatLiq/ + mHeaWat_flow_nominal, m_flow_nominal=mHeaWat_flow_nominal, dp_nominal=dpHeaWat_nominal) "Boiler performance data" @@ -59,8 +56,7 @@ record BoilerHotWater "Data for hot water boilers" typMod==Buildings.Templates.Components.Types.BoilerHotWaterModel.Polynomial and (effCur==Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear))); - annotation (Dialog(enable= - typMod==Buildings.Templates.Components.Types.ModelBoilerHotWater.Table), +annotation ( defaultComponentName="datBoi", Documentation(info="

This record provides the set of sizing and operating parameters for @@ -68,5 +64,35 @@ the classes within Buildings.Templates.Components.Boilers.

+

+When using the boiler model where the efficiency is based on a lookup table +(typMod=Buildings.Templates.Components.Types.BoilerHotWaterModel.Table), +the design values declared at the top-level are propagated by default to the +performance data record per under the assumption that the nominal +conditions from the performance data match the design conditions. +Redeclaring the parameter per allows assigning a value to the efficiency curve +without overwriting the default bindings to the design values for the other parameters. +This is the recommended approach. +Alternatively, assigning the parameter per to a local instance of a +compatible record allows completely overwriting all the parameters inside per. +In this case, the consistency between the design parameters and the values from the +subrecord per is checked and a warning is issued if the design capacity or +HW flow rate (resp. pressure drop) is higher (resp. lower) than the value from the +performance data record. +This check is performed within + +Buildings.Templates.Components.Interfaces.PartialBoilerHotWater. +The validation model + +Buildings.Templates.Components.Validation.BoilerHotWater +illustrates the different use cases of this record. +

+", revisions=" + ")); end BoilerHotWater; diff --git a/Buildings/Templates/Components/Data/PumpMultiple.mo b/Buildings/Templates/Components/Data/PumpMultiple.mo index c9c21faa047..6825b51a086 100644 --- a/Buildings/Templates/Components/Data/PumpMultiple.mo +++ b/Buildings/Templates/Components/Data/PumpMultiple.mo @@ -1,5 +1,5 @@ within Buildings.Templates.Components.Data; -record PumpMultiple "Record for multiple pumps models" +record PumpMultiple "Record for multiple-pump models" extends Modelica.Icons.Record; parameter Buildings.Templates.Components.Types.Pump typ @@ -10,56 +10,81 @@ record PumpMultiple "Record for multiple pumps models" start=1) "Number of pumps" annotation (Dialog(group="Configuration", enable=false)); - parameter Modelica.Units.SI.Density rho_default= - Modelica.Media.Water.ConstantPropertyLiquidWater.d_const - "Default medium density" - annotation(Dialog(enable=false)); parameter Modelica.Units.SI.MassFlowRate m_flow_nominal[nPum]( each start=1, each final min=0) - "Individual pump nominal mass flow rate" + "Mass flow rate - Each pump" annotation ( - Dialog(group="Pump")); + Dialog(group="Nominal condition", + enable=typ<>Buildings.Templates.Components.Types.Pump.None)); parameter Modelica.Units.SI.PressureDifference dp_nominal[nPum]( each start=0, each final min=0) - "Total pressure rise" - annotation (Dialog(group="Pump", + "Total pressure rise - Each pump" + annotation (Dialog(group="Nominal condition", enable=typ<>Buildings.Templates.Components.Types.Pump.None)); // To avoid missing support for zero-sized record in case of nPum=0 we use max(nPum, 1). - replaceable parameter Fluid.Movers.Data.Generic per[max(nPum, 1)] - constrainedby Buildings.Fluid.Movers.Data.Generic( - pressure( - V_flow=if typ<>Buildings.Templates.Components.Types.Pump.None then - {{0, 1, 2} * m_flow_nominal[i] / rho_default for i in 1:nPum} - else [0], - dp=if typ<>Buildings.Templates.Components.Types.Pump.None then - {{1.14, 1, 0.42} * dp_nominal[i] for i in 1:nPum} - else [0])) - "Performance data" - annotation(Dialog(group="Pump", - enable=typ<>Buildings.Templates.Components.Types.Pump.None)); + replaceable parameter Fluid.Movers.Data.Generic per[max(nPum, 1)]( + pressure( + V_flow=if typ<>Buildings.Templates.Components.Types.Pump.None then + {{0, 1, 2} * m_flow_nominal[i] / rho_default for i in 1:nPum} else [0], + dp=if typ<>Buildings.Templates.Components.Types.Pump.None then + {{1.14, 1, 0.42} * dp_nominal[i] for i in 1:nPum} else [0])) + constrainedby Buildings.Fluid.Movers.Data.Generic + "Performance data - Each pump" + annotation(Dialog(enable=typ<>Buildings.Templates.Components.Types.Pump.None)); + + parameter Modelica.Units.SI.Density rho_default= + Modelica.Media.Water.ConstantPropertyLiquidWater.d_const + "Default medium density" + annotation(Dialog(enable=false)); + annotation ( defaultComponentName="datPum", Documentation(info="

This record provides the set of sizing and operating parameters for -the multiple pump model +the multiple-pump model Buildings.Templates.Components.Pumps.Multiple.

-A default pump characteristic is provided, which goes through +A default flow characteristic is provided, which goes through the design operating point and spans over 0 and twice the design flow rate at maximum speed. This default characteristic is based on a least squares polynomial fit of the characteristics from Buildings.Fluid.Movers.Data.Pumps.Wilo. +The user may refer to the documentation of + +Buildings.Fluid.HydronicConfigurations.UsersGuide.ModelParameters +for further details. Note that a default medium density is used to parameterize the pump characteristic. So models that use this record should overwrite this default value with the density of the medium in use, especially in the case of a water/glycol mix.

+

+In order to modify the default characteristic, one may use either +of the following methods. +

+ +

+Those various use cases are illustrated in + +Buildings.Templates.Components.Validation.PumpMultipleRecord. +

")); end PumpMultiple; diff --git a/Buildings/Templates/Components/Data/PumpSingle.mo b/Buildings/Templates/Components/Data/PumpSingle.mo index 1ff6cd4a50d..227ead5b1cf 100644 --- a/Buildings/Templates/Components/Data/PumpSingle.mo +++ b/Buildings/Templates/Components/Data/PumpSingle.mo @@ -9,22 +9,22 @@ record PumpSingle "Record for single pump model" parameter Modelica.Units.SI.MassFlowRate m_flow_nominal( start=1, final min=0) - "Individual pump nominal mass flow rate" - annotation (Dialog(group="Pump")); + "Mass flow rate" + annotation (Dialog(group="Nominal condition", + enable=typ<>Buildings.Templates.Components.Types.Pump.None)); parameter Modelica.Units.SI.PressureDifference dp_nominal( start=0, final min=0) "Total pressure rise" - annotation (Dialog(group="Pump", + annotation (Dialog(group="Nominal condition", enable=typ<>Buildings.Templates.Components.Types.Pump.None)); - replaceable parameter Fluid.Movers.Data.Generic per - constrainedby Buildings.Fluid.Movers.Data.Generic( - pressure( - V_flow={0, 1, 2} * m_flow_nominal / rho_default, - dp={1.14, 1, 0.42} * dp_nominal)) + replaceable parameter Fluid.Movers.Data.Generic per( + pressure( + V_flow={0, 1, 2} * m_flow_nominal / rho_default, + dp={1.14, 1, 0.42} * dp_nominal)) + constrainedby Buildings.Fluid.Movers.Data.Generic "Performance data" - annotation(Dialog(group="Pump", - enable=typ<>Buildings.Templates.Components.Types.Pump.None)); + annotation(Dialog(enable=typ<>Buildings.Templates.Components.Types.Pump.None)); parameter Modelica.Units.SI.Density rho_default= Modelica.Media.Water.ConstantPropertyLiquidWater.d_const @@ -40,17 +40,11 @@ the single pump model Buildings.Templates.Components.Pumps.Single.

-A default pump characteristic is provided, which goes through -the design operating point and spans over -0 and twice the design flow rate at maximum speed. -This default characteristic is based on a least squares -polynomial fit of the characteristics from - -Buildings.Fluid.Movers.Data.Pumps.Wilo. -Note that a default medium density is used to parameterize -the pump characteristic. So models that use this record should -overwrite this default value with the density of the medium -in use, especially in the case of a water/glycol mix. +A default flow characteristic is provided and can be overwritten as +described in the documentation of + +Buildings.Templates.Components.Data.PumpMultiple +in the more generic case of multiple units.

")); end PumpSingle; diff --git a/Buildings/Templates/Components/Interfaces/BoilerHotWater.mo b/Buildings/Templates/Components/Interfaces/BoilerHotWater.mo deleted file mode 100644 index a2da48291ad..00000000000 --- a/Buildings/Templates/Components/Interfaces/BoilerHotWater.mo +++ /dev/null @@ -1,93 +0,0 @@ -within Buildings.Templates.Components.Interfaces; -model BoilerHotWater "Hot water boiler" - extends Buildings.Templates.Components.Interfaces.PartialBoilerHotWater; - - replaceable Buildings.Fluid.Boilers.BaseClasses.PartialBoiler boi( - redeclare final package Medium=Medium, - final energyDynamics=energyDynamics, - final allowFlowReversal=allowFlowReversal, - final show_T=show_T, - final m_flow_small=m_flow_small) - "Boiler" - annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); - - Controls.OBC.CDL.Continuous.PIDWithReset ctl( - Ti=60, - final yMax=1, - final yMin=0, - final reverseActing=true) - "HW supply temperature controller" - annotation (Placement(transformation(extent={{-50,30},{-30,50}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swiSet - "Switch setpoint to measured value when disabled" - annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swiSig - "Switch control signal to zero when disabled" - annotation (Placement(transformation(extent={{0,30},{20,50}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant valDis(final k=0) - "Value when disabled" - annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); -equation - connect(port_a, boi.port_a) - annotation (Line(points={{-100,0},{-80,0},{-80,-60},{-10,-60}}, - color={0,127,255})); - connect(boi.port_b, port_b) - annotation (Line(points={{10,-60},{80,-60},{80,0},{100,0}}, - color={0,127,255})); - connect(boi.T, ctl.u_m) annotation (Line(points={{11,-52},{20,-52},{20,20},{ - -40,20},{-40,28}}, - color={0,0,127})); - connect(swiSet.y, ctl.u_s) - annotation (Line(points={{-58,40},{-52,40}}, color={0,0,127})); - connect(boi.T, swiSet.u3) annotation (Line(points={{11,-52},{20,-52},{20,20}, - {-90,20},{-90,32},{-82,32}}, color={0,0,127})); - connect(bus.THeaWatSupSet, swiSet.u1) annotation (Line( - points={{0,100},{0,80},{-90,80},{-90,48},{-82,48}}, - color={255,204,51}, - thickness=0.5)); - connect(bus.y1, swiSet.u2) annotation (Line( - points={{0,100},{0,80},{-90,80},{-90,40},{-82,40}}, - color={255,204,51}, - thickness=0.5)); - connect(swiSet.u2, ctl.trigger) annotation (Line(points={{-82,40},{-86,40},{ - -86,24},{-46,24},{-46,28}}, color={255,0,255})); - connect(ctl.y, swiSig.u1) annotation (Line(points={{-28,40},{-20,40},{-20,48}, - {-2,48}}, color={0,0,127})); - connect(valDis.y, swiSig.u3) annotation (Line(points={{-28,0},{-4,0},{-4,32}, - {-2,32}}, color={0,0,127})); - connect(swiSet.u2, swiSig.u2) annotation (Line(points={{-82,40},{-86.1538,40}, - {-86.1538,24},{-10,24},{-10,40},{-2,40}}, color={255,0,255})); - connect(swiSig.y, bus.y_actual) annotation (Line(points={{22,40},{40,40},{40, - 96},{0,96},{0,100}}, - color={0,0,127})); - connect(swiSig.y, boi.y) annotation (Line(points={{22,40},{40,40},{40,-40},{ - -20,-40},{-20,-52},{-12,-52}}, color={0,0,127})); - connect(boi.T, bus.THeaWatSup) annotation (Line(points={{11,-52},{60,-52},{60, - 98},{0,98},{0,100}}, color={0,0,127})); - annotation ( - defaultComponentName="boi", - Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false)), - Documentation(info=" -

Control points

-

-The following input and output points are available. -

- -")); -end BoilerHotWater; diff --git a/Buildings/Templates/Components/Interfaces/PartialBoilerHotWater.mo b/Buildings/Templates/Components/Interfaces/PartialBoilerHotWater.mo index afe8b33d87c..8cdaf133dab 100644 --- a/Buildings/Templates/Components/Interfaces/PartialBoilerHotWater.mo +++ b/Buildings/Templates/Components/Interfaces/PartialBoilerHotWater.mo @@ -1,5 +1,5 @@ within Buildings.Templates.Components.Interfaces; -partial model PartialBoilerHotWater "Interface class for chiller models" +partial model PartialBoilerHotWater "Interface class for hot water boiler models" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( final m_flow_nominal=mHeaWat_flow_nominal); @@ -38,14 +38,129 @@ partial model PartialBoilerHotWater "Interface class for chiller models" annotation (Placement(transformation(extent={{-20,80},{20,120}}), iconTransformation(extent={{-20,80},{20, 120}}))); + replaceable Buildings.Fluid.Boilers.BaseClasses.PartialBoiler boi( + redeclare final package Medium=Medium, + final energyDynamics=energyDynamics, + final allowFlowReversal=allowFlowReversal, + final show_T=show_T, + final m_flow_small=m_flow_small) + "Boiler" + annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); + + Controls.OBC.CDL.Continuous.PIDWithReset ctl( + Ti=60, + final yMax=1, + final yMin=0, + final reverseActing=true) + "HW supply temperature controller" + annotation (Placement(transformation(extent={{-50,30},{-30,50}}))); + Buildings.Controls.OBC.CDL.Continuous.Switch swiSet + "Switch setpoint to measured value when disabled" + annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + Buildings.Controls.OBC.CDL.Continuous.Switch swiSig + "Switch control signal to zero when disabled" + annotation (Placement(transformation(extent={{0,30},{20,50}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant valDis(final k=0) + "Value when disabled" + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + +initial equation + if typMod==Buildings.Templates.Components.Types.BoilerHotWaterModel.Table then + assert(mHeaWat_flow_nominal <= dat.per.m_flow_nominal, + "In "+ getInstanceName() + ": " + + "The design HW flow rate of the boiler model (" + + String(mHeaWat_flow_nominal) + " kg/s) should be lower than the value from " + + "the performance data record (" + String(dat.per.m_flow_nominal) + " kg/s)", + level=AssertionLevel.warning); + assert(dpHeaWat_nominal >= dat.per.dp_nominal, + "In "+ getInstanceName() + ": " + + "The design HW pressure drop of the boiler model (" + + String(dpHeaWat_nominal) + " Pa) should be higher than the value from " + + "the performance data record (" + String(dat.per.dp_nominal) + " Pa)", + level=AssertionLevel.warning); + assert(cap_nominal <= dat.per.Q_flow_nominal, + "In "+ getInstanceName() + ": " + + "The design capacity of the boiler model (" + + String(cap_nominal) + " W) should be lower than the value from " + + "the performance data record (" + String(dat.per.Q_flow_nominal) + " W)", + level=AssertionLevel.warning); + end if; + +equation + connect(port_a, boi.port_a) + annotation (Line(points={{-100,0},{-80,0},{-80,-60},{-10,-60}}, + color={0,127,255})); + connect(boi.port_b, port_b) + annotation (Line(points={{10,-60},{80,-60},{80,0},{100,0}}, + color={0,127,255})); + connect(boi.T, ctl.u_m) annotation (Line(points={{11,-52},{20,-52},{20,20},{ + -40,20},{-40,28}}, + color={0,0,127})); + connect(swiSet.y, ctl.u_s) + annotation (Line(points={{-58,40},{-52,40}}, color={0,0,127})); + connect(boi.T, swiSet.u3) annotation (Line(points={{11,-52},{20,-52},{20,20}, + {-90,20},{-90,32},{-82,32}}, color={0,0,127})); + connect(bus.THeaWatSupSet, swiSet.u1) annotation (Line( + points={{0,100},{0,80},{-90,80},{-90,48},{-82,48}}, + color={255,204,51}, + thickness=0.5)); + connect(bus.y1, swiSet.u2) annotation (Line( + points={{0,100},{0,80},{-90,80},{-90,40},{-82,40}}, + color={255,204,51}, + thickness=0.5)); + connect(swiSet.u2, ctl.trigger) annotation (Line(points={{-82,40},{-86,40},{ + -86,24},{-46,24},{-46,28}}, color={255,0,255})); + connect(ctl.y, swiSig.u1) annotation (Line(points={{-28,40},{-20,40},{-20,48}, + {-2,48}}, color={0,0,127})); + connect(valDis.y, swiSig.u3) annotation (Line(points={{-28,0},{-4,0},{-4,32}, + {-2,32}}, color={0,0,127})); + connect(swiSet.u2, swiSig.u2) annotation (Line(points={{-82,40},{-86.1538,40}, + {-86.1538,24},{-10,24},{-10,40},{-2,40}}, color={255,0,255})); + connect(swiSig.y, bus.y_actual) annotation (Line(points={{22,40},{40,40},{40, + 96},{0,96},{0,100}}, + color={0,0,127})); + connect(swiSig.y, boi.y) annotation (Line(points={{22,40},{40,40},{40,-40},{ + -20,-40},{-20,-52},{-12,-52}}, color={0,0,127})); + connect(boi.T, bus.THeaWatSup) annotation (Line(points={{11,-52},{60,-52},{60, + 98},{0,98},{0,100}}, color={0,0,127})); + + annotation (Documentation(info="

This partial class provides a standard interface for hot water boiler models. +It includes a replaceable instance of + +Buildings.Fluid.Boilers.BaseClasses.PartialBoiler. +This model is used to construct the hot water boiler models within + +Buildings.Templates.Components.Boilers.

+

Control points

+

+The following input and output points are available. +

+ ", revisions=" @@ -54,8 +169,7 @@ First implementation. extent={{100,60},{-100,-60}}, lineColor={0,0,0}, lineThickness=1), - Text( - extent={{-60,20},{60,-20}}, + Text( extent={{-60,20},{60,-20}}, textColor={0,0,0}, textString="BOI"), Bitmap(extent={{-20,60},{20,100}}, fileName= diff --git a/Buildings/Templates/Components/Interfaces/PartialFan.mo b/Buildings/Templates/Components/Interfaces/PartialFan.mo index da0520e67b5..56481bc2d7f 100644 --- a/Buildings/Templates/Components/Interfaces/PartialFan.mo +++ b/Buildings/Templates/Components/Interfaces/PartialFan.mo @@ -60,10 +60,8 @@ equation connect(port_b, V_flow.port_b) annotation (Line(points={{100,0},{90,0}}, color={0,127,255})); annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ - Line( - visible=typ == Buildings.Templates.Components.Types.Fan.SingleVariable + Line( visible=typ == Buildings.Templates.Components.Types.Fan.SingleVariable or typ == Buildings.Templates.Components.Types.Fan.ArrayVariable, - points={{0,-30},{0,-160}}, color={0,0,0}), Bitmap( diff --git a/Buildings/Templates/Components/Interfaces/PartialPump.mo b/Buildings/Templates/Components/Interfaces/PartialPump.mo index 95c19de133e..1d1ab7160c3 100644 --- a/Buildings/Templates/Components/Interfaces/PartialPump.mo +++ b/Buildings/Templates/Components/Interfaces/PartialPump.mo @@ -64,13 +64,12 @@ This partial class provides a standard interface for pump models. ", revisions=" "), Icon(graphics={ - Line( - points={{-100,0},{100,0}}, + Line( points={{-100,0},{100,0}}, color={0,0,0}, thickness=5), Bitmap( diff --git a/Buildings/Templates/Components/Interfaces/PartialPumpMultiple.mo b/Buildings/Templates/Components/Interfaces/PartialPumpMultiple.mo index 10e368c64df..73ea5943369 100644 --- a/Buildings/Templates/Components/Interfaces/PartialPumpMultiple.mo +++ b/Buildings/Templates/Components/Interfaces/PartialPumpMultiple.mo @@ -67,7 +67,7 @@ both headered pumps and dedicated pumps. ", revisions=" diff --git a/Buildings/Templates/Components/Interfaces/PartialPumpSingle.mo b/Buildings/Templates/Components/Interfaces/PartialPumpSingle.mo index b2faae062da..933d5730910 100644 --- a/Buildings/Templates/Components/Interfaces/PartialPumpSingle.mo +++ b/Buildings/Templates/Components/Interfaces/PartialPumpSingle.mo @@ -28,7 +28,7 @@ single pump models. ", revisions=" diff --git a/Buildings/Templates/Components/Interfaces/package.order b/Buildings/Templates/Components/Interfaces/package.order index e2f6ab0960f..ef3e94d40fd 100644 --- a/Buildings/Templates/Components/Interfaces/package.order +++ b/Buildings/Templates/Components/Interfaces/package.order @@ -1,5 +1,4 @@ Bus -BoilerHotWater PartialBoilerHotWater PartialCoil PartialDamper diff --git a/Buildings/Templates/Components/Pumps/Multiple.mo b/Buildings/Templates/Components/Pumps/Multiple.mo index db90214ab15..5fa70ee0dcd 100644 --- a/Buildings/Templates/Components/Pumps/Multiple.mo +++ b/Buildings/Templates/Components/Pumps/Multiple.mo @@ -169,21 +169,13 @@ or current switch) y1_actual: DI signal dedicated to each unit, with a dimensionality of one -

Pump characteristics

+

Model parameters

-To support dedicated arrangements where the pumps may not be equally -sized, the design flow rate and pressure drop, as well as the -pump curves must be specified for each unit (as Modelica arrays). -A default pump characteristic is provided, which goes through the design -operating point and spans over 0 and twice the design flow rate at maximum speed. -This default characteristic is based on a least squares polynomial fit of the -characteristics from - -Buildings.Fluid.Movers.Data.Pumps.Wilo. -The user may refer to the documentation of - -Buildings.Fluid.HydronicConfigurations.UsersGuide.ModelParameters -for further details. +The design parameters and the pump characteristics are specified with an instance of + +Buildings.Templates.Components.Data.PumpMultiple. +The documentation of this record class provides further details on how to +properly parameterize the model.

", revisions=" -

Pump characteristics

+

Model parameters

-A default pump characteristic is provided, which goes through the design -operating point and spans over 0 and twice the design flow rate at maximum speed. -This default characteristic is based on a least squares polynomial fit of the -characteristics from - -Buildings.Fluid.Movers.Data.Pumps.Wilo. -The user may refer to the documentation of - -Buildings.Fluid.HydronicConfigurations.UsersGuide.ModelParameters -for further details. +The design parameters and the pump characteristics are specified with an instance of + +Buildings.Templates.Components.Data.PumpSingle. +The documentation of this record class provides further details on how to +properly parameterize the model.

", revisions=" +", revisions=" + ")); end BoilerGroup; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36.mo index 13ec316f5d9..54549b8d8cb 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36.mo @@ -372,6 +372,31 @@ This limitation stems from the Guideline 36 controller implementation in Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant.Controller.

+

Control points

+

+The Guideline 36 control sequence requires the following input points in +addition to the ones from the HW plant model. +

+

References

+", revisions=" + ")); end Guideline36; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36Plugin.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36Plugin.mo index 347da507111..552e8b7f849 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36Plugin.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/Guideline36Plugin.mo @@ -1169,5 +1169,14 @@ equation connect(THeaWatSup.y, TPlaHotWatSupSet) annotation (Line(points={{302,260},{420,260}}, color={0,0,127})); annotation (Diagram(coordinateSystem(extent={{-400,-600},{400,600}})), Icon( - coordinateSystem(extent={{-100,-340},{100,340}}))); + coordinateSystem(extent={{-100,-340},{100,340}})), + Documentation(info=" +

+FIXME: This class is for temporary use only. +It aims at providing the outside connectors and parameters of the +G36 controller while the comments at + +are being addressed. +

+")); end Guideline36Plugin; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/OpenLoop.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/OpenLoop.mo index 085d44fb0ad..d233fd8d7cb 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/OpenLoop.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/OpenLoop.mo @@ -146,5 +146,12 @@ for the plant model Buildings.Templates.HeatingPlants.HotWater.BoilerPlant. It is only used for testing purposes.

+", revisions=" + ")); end OpenLoop; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/TypesTmp.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/TypesTmp.mo index b43eb93c132..fa62a66a39b 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/TypesTmp.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Controls/TypesTmp.mo @@ -54,8 +54,8 @@ package TypesTmp "Definitions for secondary pump speed control types"; annotation (Documentation(info="

-FIXME: Temporary files to be deleted when merging -issue2180_BoilerPlant_MainController_oct_2021. +FIXME: Temporary files to be deleted after merging +issue2180_BoilerPlant_MainController_oct_2021.

")); end TypesTmp; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Interfaces/PartialController.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Interfaces/PartialController.mo index 179eb0f22fe..968a315282a 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Interfaces/PartialController.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Interfaces/PartialController.mo @@ -283,5 +283,12 @@ equation

This partial class provides a standard interface for boiler plant controllers.

+", revisions=" + ")); end PartialController; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupPolynomial.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupPolynomial.mo index a9d2fc08346..22533b6f6f4 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupPolynomial.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupPolynomial.mo @@ -24,13 +24,16 @@ model BoilerGroupPolynomial "Validation model for boiler group" dpHeaWatBoi_nominal=fill(Buildings.Templates.Data.Defaults.dpHeaWatBoi, nBoi), THeaWatBoiSup_nominal=fill(Buildings.Templates.Data.Defaults.THeaWatSup, nBoi)) "Design and operating parameters" - annotation (Placement(transformation(extent={{180,180},{200,200}}))); + annotation (Placement(transformation(extent={{100,100},{120,120}}))); parameter Buildings.Templates.Components.Data.PumpMultiple datPumHeaWatPri( final typ=Buildings.Templates.Components.Types.Pump.Multiple, final nPum=nBoi, final m_flow_nominal=fill(mHeaWat_flow_nominal/datPumHeaWatPri.nPum, datPumHeaWatPri.nPum), - dp_nominal=datBoi.dpHeaWatBoi_nominal .+ Buildings.Templates.Data.Defaults.dpValChe) - "Parameter record for primary HW pumps"; + dp_nominal=datBoi.dpHeaWatBoi_nominal .+ + Buildings.Templates.Data.Defaults.dpValChe .+ + Buildings.Templates.Data.Defaults.dpValIso) + "Parameter record for primary HW pumps" + annotation (Placement(transformation(extent={{100,60},{120,80}}))); parameter Modelica.Units.SI.Time tau=10 "Time constant at nominal flow" annotation (Dialog(tab="Dynamics", group="Nominal condition")); @@ -48,7 +51,7 @@ model BoilerGroupPolynomial "Validation model for boiler group" final dat=datBoi, final energyDynamics=energyDynamics) "Boiler group" - annotation (Placement(transformation(extent={{-120,-60},{-40,60}}))); + annotation (Placement(transformation(extent={{-120,-100},{-40,20}}))); Buildings.Templates.Components.Pumps.Multiple pumHeaWatPri( have_var=false, have_valChe=true, @@ -57,7 +60,7 @@ model BoilerGroupPolynomial "Validation model for boiler group" final energyDynamics=energyDynamics, final tau=tau) "Primary HW pumps" - annotation (Placement(transformation(extent={{0,30},{20,50}}))); + annotation (Placement(transformation(extent={{0,-10},{20,10}}))); Buildings.Templates.Components.Routing.MultipleToMultiple inlPumHeaWatPri( redeclare final package Medium=Medium, final nPorts_a=nBoi, @@ -65,22 +68,22 @@ model BoilerGroupPolynomial "Validation model for boiler group" final m_flow_nominal=mHeaWat_flow_nominal, final energyDynamics=energyDynamics) "Primary HW pumps inlet manifold" - annotation (Placement(transformation(extent={{-30,30},{-10,50}}))); + annotation (Placement(transformation(extent={{-30,-10},{-10,10}}))); Buildings.Templates.Components.Routing.MultipleToSingle outPumHeaWatPri( redeclare final package Medium=Medium, final nPorts=nBoi, final m_flow_nominal=mHeaWat_flow_nominal, final energyDynamics=energyDynamics) "Primary HW pumps outlet manifold" - annotation (Placement(transformation(extent={{30,30},{50,50}}))); + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); Fluid.Sensors.TemperatureTwoPort THeaWatSup( redeclare final package Medium=Medium, final m_flow_nominal=mHeaWat_flow_nominal) "HW supply temperature" - annotation (Placement(transformation(extent={{60,30},{80,50}}))); + annotation (Placement(transformation(extent={{60,-10},{80,10}}))); Fluid.Sensors.MassFlowRate mHeaWat_flow( redeclare final package Medium=Medium) "HW mass flow rate" - annotation (Placement(transformation(extent={{90,30},{110,50}}))); + annotation (Placement(transformation(extent={{90,-10},{110,10}}))); Fluid.Sources.Boundary_pT bouHeaWat( redeclare final package Medium = Medium, p=Buildings.Templates.Data.Defaults.pHeaWat_rel_min, @@ -88,27 +91,26 @@ model BoilerGroupPolynomial "Validation model for boiler group" nPorts=2) "Boundary conditions for HW distribution system" annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=-90, - origin={60,-60}))); + origin={60,-100}))); Fluid.Sensors.TemperatureTwoPort THeaWatRet( redeclare final package Medium =Medium, final m_flow_nominal=mHeaWat_flow_nominal) "HW return temperature" - annotation (Placement(transformation(extent={{30,-50},{10,-30}}))); + annotation (Placement(transformation(extent={{30,-90},{10,-70}}))); Buildings.Templates.Components.Routing.SingleToMultiple inlBoi( redeclare final package Medium = Medium, final nPorts=nBoi, final m_flow_nominal=mHeaWat_flow_nominal, final energyDynamics=energyDynamics) "Boiler group inlet manifold" - annotation (Placement(transformation(extent={{-10,-50},{-30,-30}}))); + annotation (Placement(transformation(extent={{-10,-90},{-30,-70}}))); Controls.OpenLoop ctl( final have_boiCon=true, final have_boiNon=false, final nBoiCon=nBoi, final nBoiNon=0, + final typPumHeaWatPriCon=Buildings.Templates.HeatingPlants.HotWater.Types.PumpsPrimary.Variable, final typArrPumHeaWatPriCon=boi.typArrPumHeaWatPri, - final have_varPumHeaWatPriCon=pumHeaWatPri.have_var, - final have_varPumHeaWatPriNon=false, final typPumHeaWatSec=Buildings.Templates.HeatingPlants.HotWater.Types.PumpsSecondary.None, have_valHeaWatMinBypCon=false, have_valHeaWatMinBypNon=false, @@ -116,46 +118,48 @@ model BoilerGroupPolynomial "Validation model for boiler group" THeaWatSup_nominal=Buildings.Templates.Data.Defaults.THeaWatSup, sta={fill(0, nBoi)})) "Controller" - annotation (Placement(transformation(extent={{-10,150},{10,170}}))); + annotation (Placement(transformation(extent={{-10,110},{10,130}}))); Buildings.Templates.HeatingPlants.HotWater.Interfaces.Bus busPla "Plant control bus" - annotation (Placement(transformation(extent={{-100,100}, - {-60,140}}), iconTransformation(extent={{-310,60},{-270,100}}))); + annotation (Placement(transformation(extent={{-100,60},{-60,100}}), + iconTransformation(extent={{-310,60},{-270,100}}))); equation connect(inlPumHeaWatPri.ports_b, pumHeaWatPri.ports_a) - annotation (Line(points={{-10,40},{0,40}}, color={0,127,255})); + annotation (Line(points={{-10,0},{0,0}}, color={0,127,255})); connect(boi.ports_bHeaWat, inlPumHeaWatPri.ports_a) - annotation (Line(points={{-40,40},{-30,40}}, color={0,127,255})); + annotation (Line(points={{-40,2.85714},{-36,2.85714},{-36,0},{-30,0}}, + color={0,127,255})); connect(outPumHeaWatPri.port_b, THeaWatSup.port_a) - annotation (Line(points={{50,40},{60,40}}, color={0,127,255})); + annotation (Line(points={{50,0},{60,0}}, color={0,127,255})); connect(THeaWatSup.port_b, mHeaWat_flow.port_a) - annotation (Line(points={{80,40},{90,40}},color={0,127,255})); + annotation (Line(points={{80,0},{90,0}}, color={0,127,255})); connect(inlBoi.ports_b, boi.ports_aHeaWat) - annotation (Line(points={{-30,-40},{-40,-40}}, color={0,127,255})); + annotation (Line(points={{-30,-80},{-36,-80},{-36,-82.8571},{-40,-82.8571}}, + color={0,127,255})); connect(THeaWatRet.port_b, inlBoi.port_a) - annotation (Line(points={{10,-40},{-10,-40}}, color={0,127,255})); + annotation (Line(points={{10,-80},{-10,-80}}, color={0,127,255})); connect(ctl.bus, busPla) annotation (Line( - points={{-10,160},{-80,160},{-80,120}}, + points={{-10,120},{-80,120},{-80,80}}, color={255,204,51}, thickness=0.5)); connect(pumHeaWatPri.ports_b, outPumHeaWatPri.ports_a) - annotation (Line(points={{20,40},{30,40}}, color={0,127,255})); - connect(mHeaWat_flow.port_b, bouHeaWat.ports[1]) annotation (Line(points={{110,40}, - {120,40},{120,-40},{59,-40},{59,-50}}, color={0,127,255})); - connect(bouHeaWat.ports[2], THeaWatRet.port_a) annotation (Line(points={{61,-50}, - {61,-40},{30,-40}}, color={0,127,255})); + annotation (Line(points={{20,0},{30,0}}, color={0,127,255})); + connect(mHeaWat_flow.port_b, bouHeaWat.ports[1]) annotation (Line(points={{110,0}, + {120,0},{120,-80},{59,-80},{59,-90}}, color={0,127,255})); + connect(bouHeaWat.ports[2], THeaWatRet.port_a) annotation (Line(points={{61,-90}, + {61,-80},{30,-80}}, color={0,127,255})); connect(busPla, boi.bus) annotation (Line( - points={{-80,120},{-80,60}}, + points={{-80,80},{-80,20}}, color={255,204,51}, thickness=0.5)); connect(busPla.pumHeaWatPriCon, pumHeaWatPri.bus) annotation (Line( - points={{-80,120},{10,120},{10,50}}, + points={{-80,80},{10,80},{10,10}}, color={255,204,51}, thickness=0.5)); annotation ( - Diagram(coordinateSystem(extent={{-220,-220},{220,220}})), + Diagram(coordinateSystem(extent={{-140,-140},{140,140}})), experiment( StopTime=2000, Tolerance=1e-06), @@ -164,15 +168,20 @@ equation "Simulate and plot"), Documentation(info="

-FIXME: Bug in Dymola #SR01004314-01. -The parameters inside pumHeaWatPri.dat are left unassigned and the start value -is used instead without any warning being issued. -OCT properly propagates the parameter values from the composite component binding. +This model validates the boiler group model + +Buildings.Templates.HeatingPlants.HotWater.Components.BoilerGroup +in the case where a polynomial is used to represent the boiler efficiency. +The HW supply temperature setpoint, the HW return temperature and the +primary HW pump speed are fixed at their design value when the boilers are +enabled.

-This model validates the boiler group model - -Buildings.Templates.HeatingPlants.HotWater.Components.BoilerGroups.BoilerGroupPolynomial. +The model illustrates a bug in Dymola (#SR01004314-01). +The parameter bindings for pumHeaWatPri.dat are not properly interpreted +and the start value is used for all those parameters without any warning being issued. +Hence, the total HW flow rate differs from its design value. +OCT properly propagates the parameter values from the composite component binding.

")); end BoilerGroupPolynomial; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupTable.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupTable.mo index e1fef038d70..86876b9bf3f 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupTable.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerGroupTable.mo @@ -12,15 +12,20 @@ model BoilerGroupTable "Validation model for boiler group" "Simulate and plot"), Documentation(info="

-FIXME: Bug in Dymola #SR01004314-01. -The parameters inside pumHeaWatPri.dat are left unassigned and the start value -is used instead without any warning being issued. -OCT properly propagates the parameter values from the composite component binding. +This model validates the boiler group model + +Buildings.Templates.HeatingPlants.HotWater.Components.BoilerGroup +in the case where a lookup table is used to represent the boiler efficiency. +The HW supply temperature setpoint, the HW return temperature and the +primary HW pump speed are fixed at their design value when the boilers are +enabled.

-This model validates the boiler group model - -Buildings.Templates.HeatingPlants.HotWater.Components.BoilerGroups.BoilerGroupTable. +The model illustrates a bug in Dymola (#SR01004314-01). +The parameter bindings for pumHeaWatPri.dat are not properly interpreted +and the start value is used for all those parameters without any warning being issued. +Hence, the total HW flow rate differs from its design value. +OCT properly propagates the parameter values from the composite component binding.

")); diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerTable.mo b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerTable.mo deleted file mode 100644 index 5b271ac5605..00000000000 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/BoilerTable.mo +++ /dev/null @@ -1,88 +0,0 @@ -within Buildings.Templates.HeatingPlants.HotWater.Components.Validation; -model BoilerTable - extends Modelica.Icons.Example; - - replaceable package Medium=Buildings.Media.Water - constrainedby Modelica.Media.Interfaces.PartialMedium - "HW medium"; - - Buildings.Templates.Components.Data.BoilerHotWater datBoi( - final typMod=boi.typMod, - fue=Buildings.Fluid.Data.Fuels.NaturalGasLowerHeatingValue(), - mHeaWat_flow_nominal=datBoi.cap_nominal/15/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq, - cap_nominal=1000E3, - dpHeaWat_nominal(displayUnit="Pa") = 5000, - THeaWatSup_nominal=333.15) - "Design and operating parameters" - annotation (Placement(transformation(extent={{60,60},{80,80}}))); - //redeclare Buildings.Fluid.Boilers.Data.Lochinvar.KnightXL.KBXdash0500 per, - Buildings.Templates.Components.Boilers.HotWaterTable boi( - redeclare final package Medium = Medium, - final dat=datBoi, - is_con=false) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - Fluid.Sources.Boundary_pT retHeaWat(redeclare final package Medium=Medium, - p=Buildings.Templates.Data.Defaults.pHeaWat_rel_min + boi.dpHeaWat_nominal, - use_T_in=true, - T=datBoi.THeaWatSup_nominal - 15, - nPorts=1) - "Boundary conditions for HW distribution system" - annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); - Fluid.Sources.Boundary_pT supHeaWat(redeclare final package Medium =Medium, - p=Buildings.Templates.Data.Defaults.pHeaWat_rel_min, - nPorts=1) - "Boundary conditions for HW distribution system" - annotation (Placement(transformation(extent={{90,-10},{70,10}}))); - Fluid.Sensors.TemperatureTwoPort THeaWatSup( - redeclare final package Medium=Medium, - final m_flow_nominal=datBoi.mHeaWat_flow_nominal) - "HW supply temperature" - annotation (Placement(transformation(extent={{30,-10},{50,10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp THeaWatRet( - height=35, - duration=500, - offset=datBoi.THeaWatSup_nominal - 25, - startTime=100) "HW return temperature value" - annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1Boi( - table=[0,1; 1,1], - timeScale=3600, - period=3600) "Boiler Enable signal" - annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); - Buildings.Templates.HeatingPlants.HotWater.Interfaces.Bus bus annotation ( - Placement(transformation(extent={{-20,20},{20,60}}), iconTransformation( - extent={{-296,-74},{-256,-34}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant THeaWatSupSet(k= - Buildings.Templates.Data.Defaults.THeaWatSup) - "HW supply temperature setpoint" - annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); -equation - connect(retHeaWat.ports[1], boi.port_a) - annotation (Line(points={{-20,0},{-10,0}}, color={0,127,255})); - connect(boi.port_b, THeaWatSup.port_a) - annotation (Line(points={{10,0},{30,0}}, color={0,127,255})); - connect(THeaWatSup.port_b, supHeaWat.ports[1]) - annotation (Line(points={{50,0},{70,0}}, color={0,127,255})); - connect(THeaWatRet.y, retHeaWat.T_in) annotation (Line(points={{-58,0},{-52,0}, - {-52,4},{-42,4}}, color={0,0,127})); - connect(boi.bus, bus) annotation (Line( - points={{0,10},{0,10},{0,40}}, - color={255,204,51}, - thickness=0.5), Text( - string="%second", - index=1, - extent={{6,3},{6,3}}, - horizontalAlignment=TextAlignment.Left)); - connect(y1Boi.y[1], bus.y1) annotation (Line(points={{-58,80},{0,80},{0,40}}, - color={255,0,255}), Text( - string="%second", - index=1, - extent={{6,3},{6,3}}, - horizontalAlignment=TextAlignment.Left)); - connect(THeaWatSupSet.y, bus.THeaWatSupSet) - annotation (Line(points={{-58,40},{0,40}}, color={0,0,127})); - annotation (Documentation(info=" -FIXME: The example yields a final overriding message for fue with Dymola -when redeclaring per inside datBoi. Open ticket at DS. -")); -end BoilerTable; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/package.order b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/package.order index 3732ff090b0..dd4566c1fb5 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/package.order +++ b/Buildings/Templates/HeatingPlants/HotWater/Components/Validation/package.order @@ -1,3 +1,2 @@ BoilerGroupPolynomial BoilerGroupTable -BoilerTable diff --git a/Buildings/Templates/HeatingPlants/HotWater/Interfaces/Bus.mo b/Buildings/Templates/HeatingPlants/HotWater/Interfaces/Bus.mo index bfdff1901c0..db93fb03275 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Interfaces/Bus.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Interfaces/Bus.mo @@ -3,5 +3,12 @@ expandable connector Bus "Control bus for HW plant" extends Modelica.Icons.SignalBus; annotation ( - defaultComponentName="bus"); + defaultComponentName="bus", Documentation(info=" +

+This expandable connector provides a standard interface for +all control signals of the hot water plant models within + +Buildings.Templates.HeatingPlants.HotWater. +

+")); end Bus; diff --git a/Buildings/Templates/HeatingPlants/HotWater/Interfaces/PartialBoilerPlant.mo b/Buildings/Templates/HeatingPlants/HotWater/Interfaces/PartialBoilerPlant.mo index 5573084ddd3..85e494ca830 100644 --- a/Buildings/Templates/HeatingPlants/HotWater/Interfaces/PartialBoilerPlant.mo +++ b/Buildings/Templates/HeatingPlants/HotWater/Interfaces/PartialBoilerPlant.mo @@ -8,7 +8,8 @@ partial model PartialBoilerPlant parameter Buildings.Templates.HeatingPlants.HotWater.Types.Boiler typ "Type of boilers" annotation (Evaluate=true, Dialog(group="Boilers")); - parameter Buildings.Templates.Components.Types.BoilerHotWaterModel typMod=Buildings.Templates.Components.Types.BoilerHotWaterModel.Polynomial + parameter Buildings.Templates.Components.Types.BoilerHotWaterModel typMod= + Buildings.Templates.Components.Types.BoilerHotWaterModel.Polynomial "Type of boiler model" annotation (Evaluate=true, Dialog(group="Boilers")); @@ -362,15 +363,114 @@ initial equation extent={{-200,-200},{200,200}}), graphics={ Rectangle( - extent={{-200,200},{202,-200}}, + extent={{-200,198},{202,-202}}, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), + Line( + points={{-60,-60},{50,-60},{50,0}}, + color={28,108,200}, + thickness=5), + Ellipse( + extent={{-40,-40},{0,-80}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Sphere, + fillColor={0,100,199}), + Line( + points={{-60,100},{50,100},{50,0},{200,0}}, + color={28,108,200}, + thickness=5), + Rectangle( + extent={{-180,-40},{-60,-120}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={95,95,95}, + fillPattern=FillPattern.Solid), Text( extent={{-149,-214},{151,-254}}, textColor={0,0,255}, - textString="%name")}), + textString="%name"), + Polygon( + points={{-121,-90},{-133,-108},{-107,-108},{-121,-90}}, + pattern=LinePattern.None, + smooth=Smooth.None, + fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}), + Rectangle( + extent={{-180,120},{-60,40}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={95,95,95}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-121,70},{-133,52},{-107,52},{-121,70}}, + pattern=LinePattern.None, + smooth=Smooth.None, + fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}), + Ellipse( + extent={{130,20},{170,-20}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Sphere, + fillColor={0,100,199}, + startAngle=0, + endAngle=360, + visible=typPumHeaWatSec == Buildings.Templates.HeatingPlants.HotWater.Types.PumpsSecondary.Centralized), + Polygon( + points={{150,20},{150,-20},{170,0},{150,20}}, + lineColor={0,0,0}, + pattern=LinePattern.None, + fillPattern=FillPattern.HorizontalCylinder, + fillColor={255,255,255}, + visible=typPumHeaWatSec == Buildings.Templates.HeatingPlants.HotWater.Types.PumpsSecondary.Centralized), + + Line( + points={{200,-100},{-60,-100}}, + color={28,108,200}, + pattern=LinePattern.Dash, + thickness=5), + Ellipse( + extent={{-40,120},{0,80}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Sphere, + fillColor={0,100,199}), + Polygon( + points={{-20,120},{-20,80},{0,100},{-20,120}}, + lineColor={0,0,0}, + pattern=LinePattern.None, + fillPattern=FillPattern.HorizontalCylinder, + fillColor={255,255,255}), + Line( + points={{-60,60},{20,60},{20,-98}}, + color={28,108,200}, + thickness=5, + pattern=LinePattern.Dash), + Line( + points={{102,-2},{102,-102}}, + color={28,108,200}, + thickness=5), + Polygon( + points={{-20,-40},{-20,-80},{0,-60},{-20,-40}}, + lineColor={0,0,0}, + pattern=LinePattern.None, + fillPattern=FillPattern.HorizontalCylinder, + fillColor={255,255,255})}), Diagram(coordinateSystem( preserveAspectRatio=false, - extent={{-300,-280},{300,280}}))); + extent={{-300,-280},{300,280}})), + Documentation(revisions=" + +", info=" +

+This partial class provides a standard interface for hot water boiler +plant models. +

+")); end PartialBoilerPlant;