Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Short cycling in air-to-water HP example #1877

Merged
merged 12 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ record Generic "Generic record definition for safety control blocks"
parameter Modelica.Units.SI.Time minOnTime
"Mimimum on-time" annotation (Dialog(group=
"On/Off Control", enable=use_minOnTime));
parameter Real ySetRed(unit="1")
"Reduced relative compressor speed to allow longer on-time"
annotation (
Dialog(group="On/Off Control",
enable=use_minOnTime));
parameter Boolean use_minOffTime
"=false to ignore minimum off time"
annotation (Dialog(group="On/Off Control"),
Expand All @@ -21,11 +26,7 @@ record Generic "Generic record definition for safety control blocks"
parameter Integer maxCycRat "Maximum cycle rate"
annotation (Dialog(group="On/Off Control",
enable=use_maxCycRat));
parameter Real ySetRed(unit="1")
"Reduced relative compressor speed to allow longer on-time"
annotation (
Dialog(group="On/Off Control",
enable=use_minOnTime));

parameter Boolean onOffMea_start=true
"Start value for the on-off signal of the device, true for on"
annotation (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ model AirToWater2D_OneRoomRadiator
mCon_flow_nominal=heaPum.mCon_flow_nominal,
sin(nPorts=1, redeclare package Medium = MediumAir),
booToReaPumEva(realTrue=heaPum.mEva_flow_nominal),
pumHeaPumSou(redeclare package Medium = MediumAir),
pumHeaPumSou(
dp_nominal=heaPum.dpEva_nominal,
redeclare package Medium = MediumAir),
sou(use_T_in=true,
redeclare package Medium = MediumAir));
redeclare package Medium = MediumAir),
pumHeaPum(dp_nominal=heaPum.dpCon_nominal));

IBPSA.Fluid.HeatPumps.ModularReversible.AirToWaterTableData2D
heaPum(
Expand All @@ -21,7 +24,6 @@ model AirToWater2D_OneRoomRadiator
dpCon_nominal(displayUnit="Pa") = 2000,
dpEva_nominal(displayUnit="Pa") = 200,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
QCoo_flow_nominal=-20000,
TConHea_nominal=rad.TRad_nominal,
TEvaHea_nominal=283.15,
TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup,
Expand All @@ -35,7 +37,8 @@ model AirToWater2D_OneRoomRadiator
redeclare
IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021
safCtrPar(
use_minOnTime=false,
use_minOnTime=true,
minOnTime=300,
use_minOffTime=true,
minOffTime=300,
use_maxCycRat=true)) "Reversible heat pump based on 2D table data"
Expand Down Expand Up @@ -95,6 +98,11 @@ equation
</p>
</html>", revisions="<html>
<ul>
<li>
<i>May 5, 2024</i> by Fabian Wuellhorst:<br/>
Updated documentation and changed default value (see issue <a href=
\"https://github.com/ibpsa/modelica-ibpsa/issues/1876\">#1576</a>)
</li>
<li>
<i>October 2, 2022</i> by Fabian Wuellhorst:<br/>
First implementation (see issue <a href=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ partial model PartialOneRoomRadiator

//----------------------------------------------------------------------------//

Movers.FlowControlled_m_flow pumHeaPum(
replaceable IBPSA.Fluid.Movers.Preconfigured.FlowControlled_m_flow pumHeaPum(
redeclare package Medium = MediumWat,
nominalValuesDefineDefaultPressureCurve=true,
m_flow_nominal=mCon_flow_nominal,
m_flow_start=0.85,
m_flow_start=mCon_flow_nominal,
T_start=TRadSup_nominal,
use_inputFilter=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
Expand All @@ -97,8 +96,8 @@ partial model PartialOneRoomRadiator
//------------------------------------------------------------------------------------//

IBPSA.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
Modelica.Utilities.Files.loadResource(
"modelica://IBPSA/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
Modelica.Utilities.Files.loadResource(
"modelica://IBPSA/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
"Weather data reader"
annotation (Placement(transformation(extent={{-220,40},{-200,60}})));
IBPSA.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
Expand All @@ -109,18 +108,19 @@ partial model PartialOneRoomRadiator

//--------------------------------------------------------------------------------------//

Movers.FlowControlled_m_flow pumHeaPumSou(
IBPSA.Fluid.Movers.Preconfigured.FlowControlled_m_flow pumHeaPumSou(
redeclare package Medium = MediumWat,
m_flow_start=0.85,
m_flow_start=mEva_flow_nominal,
m_flow_nominal=mEva_flow_nominal,
use_inputFilter=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
"Pump for heat pump source side" annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={-30,-180})));
Modelica.Blocks.Math.BooleanToReal booToReaPumCon(realTrue=mCon_flow_nominal,
y(start=0)) "Pump signal" annotation (Placement(transformation(
Modelica.Blocks.Math.BooleanToReal booToReaPumCon(
realTrue=mCon_flow_nominal,
y(start=0)) "Pump signal" annotation (Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={-110,-110})));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ model CarnotWithLosses_OneRoomRadiator
mEva_flow_nominal=heaPum.mEva_flow_nominal,
mCon_flow_nominal=heaPum.mCon_flow_nominal,
sin(nPorts=1),
booToReaPumEva(realTrue=heaPum.mEva_flow_nominal));
booToReaPumEva(realTrue=heaPum.mEva_flow_nominal),
pumHeaPumSou(dp_nominal=heaPum.dpEva_nominal),
pumHeaPum(dp_nominal=heaPum.dpCon_nominal));
extends Modelica.Icons.Example;

parameter Real perHeaLos=0.1
parameter Real perHeaLos=0.01
"Percentage of heat losses in the heat exchangers to the nominal heating output";
IBPSA.Fluid.HeatPumps.ModularReversible.CarnotWithLosses heaPum(
redeclare package MediumCon = MediumWat,
Expand All @@ -31,10 +33,9 @@ model CarnotWithLosses_OneRoomRadiator
TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup,
TEvaCoo_nominal=sou.T + 10,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021
safCtrPar,
redeclare IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar,
etaCarnot_nominal=0.4)
"Reversible heat pump with losses and Carnot approach"
"Reversible heat pump with losses and Carnot approach"
annotation (Placement(transformation(extent={{20,-160},{0,-140}})));
Modelica.Blocks.Sources.Constant temAmbBas(final k(
final unit="K",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ model LargeScaleWaterToWater_OneRoomRadiator
Q_flow_nominal=200000,
sin(nPorts=1),
booToReaPumEva(realTrue=heaPum.mEva_flow_nominal),
pumHeaPum(
redeclare IBPSA.Fluid.Movers.Data.Pumps.Wilo.VeroLine80slash115dash2comma2slash2 per),
pumHeaPumSou(
redeclare IBPSA.Fluid.Movers.Data.Pumps.Wilo.VeroLine80slash115dash2comma2slash2 per));
pumHeaPumSou(dp_nominal=150000),
pumHeaPum(dp_nominal=150000),
sou(use_T_in=true));

IBPSA.Fluid.HeatPumps.ModularReversible.LargeScaleWaterToWater heaPum(
allowDifferentDeviceIdentifiers=true,
QHea_flow_nominal=Q_flow_nominal,
use_intSafCtr=true,
QCoo_flow_nominal=-Q_flow_nominal/2,
TConHea_nominal=TRadSup_nominal,
dpCon_nominal(displayUnit="Pa"),
TEvaHea_nominal=sou.T,
Expand All @@ -28,7 +28,7 @@ model LargeScaleWaterToWater_OneRoomRadiator
redeclare IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021
safCtrPar,
TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup,
TEvaCoo_nominal=sou.T + 10,
TEvaCoo_nominal=sou.T + 30,
redeclare
IBPSA.Fluid.HeatPumps.ModularReversible.Data.TableData2D.EN14511.WAMAK_WaterToWater_220kW
datTabHea,
Expand All @@ -37,6 +37,16 @@ model LargeScaleWaterToWater_OneRoomRadiator
datTabCoo)
"Large scale water to water heat pump"
annotation (Placement(transformation(extent={{20,-160},{0,-140}})));
Modelica.Blocks.Sources.Pulse TAirSouSte(
amplitude=20,
width=10,
period=86400,
offset=283.15,
startTime=86400/2) if witCoo "Air source temperature step for cooling phase"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={-150,-200})));
equation
connect(heaPum.port_b2, sin.ports[1]) annotation (Line(points={{20,-156},{38,
-156},{38,-200},{60,-200}}, color={0,127,255}));
Expand All @@ -47,11 +57,13 @@ equation
connect(heaPum.port_a1, temRet.port_b) annotation (Line(points={{20,-144},{60,
-144},{60,-30}}, color={0,127,255}));
connect(oneRooRadHeaPumCtr.ySet, heaPum.ySet) annotation (Line(
points={{-139.167,-66.6667},{26,-66.6667},{26,-148},{21.2,-148}},
points={{-139.167,-66.6667},{26,-66.6667},{26,-148.1},{21.1,-148.1}},
color={
0,0,127}));
connect(oneRooRadHeaPumCtr.hea, heaPum.hea) annotation (Line(points={{
-139.167,-75},{32,-75},{32,-151.9},{21.1,-151.9}}, color={255,0,255}));
-139.167,-75},{32,-75},{32,-152.1},{21.1,-152.1}}, color={255,0,255}));
connect(TAirSouSte.y, sou.T_in) annotation (Line(points={{-139,-200},{-92,-200},
{-92,-196},{-82,-196}}, color={0,0,127}));
annotation (
__Dymola_Commands(file=
"modelica://IBPSA/Resources/Scripts/Dymola/Fluid/HeatPumps/ModularReversible/Examples/LargeScaleWaterToWater_OneRoomRadiator.mos"
Expand All @@ -76,23 +88,14 @@ equation
</p>
<p>
Furthermore, this example demonstrates the warnings which
are raised if the table data boundary conditions
(e.g. <code>mEva_flow_nominal</code>) deviates from
the parameter in use.
are raised if two devices are combined with different sizes, leading
to different scaling factors for heating and cooling operation.
If the default <code>QCoo_flow_nominal</code> is used (leading to
the same scaling factors), the mass flow rates will differ.
Setting the parameter <code>allowDifferentDeviceIdentifiers</code> to false,
an additional warning is raised, indicating that the table data for cooling and
heating operation do not originate from the same real device.
</p>
<p>
To fix this issue, the user has to either
</p>
<ol>
<li>
Check the assumption of using a different mass flow rate, or
</li>
<li>
adjust the mass flow rates in the hydraulic system.
If the deviation is too big, the system would also not
work in reality.
</li>
</ol>
<p>
Please check the documentation of
<a href=\"modelica://IBPSA.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator\">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ model Modular_OneRoomRadiator
IBPSA.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator(
mEva_flow_nominal=heaPum.mEva_flow_nominal,
sin(nPorts=1, redeclare package Medium = MediumAir),
pumHeaPumSou(redeclare package Medium = MediumAir),
pumHeaPumSou(
dp_nominal=heaPum.dpEva_nominal,
redeclare package Medium = MediumAir),
sou(redeclare package Medium = MediumAir),
booToReaPumEva(realTrue=heaPum.mEva_flow_nominal));
booToReaPumEva(realTrue=heaPum.mEva_flow_nominal),
pumHeaPum(dp_nominal=heaPum.dpCon_nominal));
extends Modelica.Icons.Example;

IBPSA.Fluid.HeatPumps.ModularReversible.Modular heaPum(
Expand All @@ -34,32 +37,31 @@ model Modular_OneRoomRadiator
use_evaCap=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare model RefrigerantCycleHeatPumpHeating =
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.ConstantCarnotEffectiveness
(
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.ConstantCarnotEffectiveness(
redeclare
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.Frosting.NoFrosting
iceFacCal,
TAppCon_nominal=0,
TAppEva_nominal=0),
redeclare model RefrigerantCycleHeatPumpCooling =
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.TableData2D (
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.TableData2D(
redeclare
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.Frosting.NoFrosting
iceFacCal,
mCon_flow_nominal=heaPum.mCon_flow_nominal,
mEva_flow_nominal=heaPum.mEva_flow_nominal,
datTab=IBPSA.Fluid.Chillers.ModularReversible.Data.TableData2D.EN14511.Vitocal251A08()),
redeclare IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021
safCtrPar(
redeclare IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar(
use_TConOutHea=true,
use_TEvaOutHea=false,
use_antFre=true,
TAntFre=275.15),
QCoo_flow_nominal=-Q_flow_nominal*0.5)
"Modular reversible heat pump"
"Modular reversible heat pump"
annotation (Placement(transformation(extent={{20,-160},{0,-140}})));

Modelica.Blocks.Sources.Constant temAmbBas(final k(
Modelica.Blocks.Sources.Constant temAmbBas(
final k(
final unit="K",
displayUnit="degC") = 291.15)
"Ambient temperature in basement of building" annotation (Placement(
Expand Down
Loading
Loading