diff --git a/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo b/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo index c4fc28d751..24782bc1c4 100644 --- a/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo +++ b/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo @@ -1,132 +1,135 @@ -within IBPSA.Examples.Tutorial.SimpleHouse; -model SimpleHouse4 "Heating model" - extends SimpleHouse3; - - parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=3000 - "Nominal capacity of heating system"; - parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=0.1 - "Nominal mass flow rate for water loop"; - parameter Boolean use_constantHeater=true - "To enable/disable the connection between the constant source and heater"; - - IBPSA.Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad( - redeclare package Medium = MediumWater, - T_a_nominal=333.15, - T_b_nominal=313.15, - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, - allowFlowReversal=false, - Q_flow_nominal=QHea_flow_nominal) "Radiator" - annotation (Placement(transformation(extent={{140,-140},{160,-120}}))); - IBPSA.Fluid.HeatExchangers.HeaterCooler_u heaWat( - redeclare package Medium = MediumWater, - m_flow_nominal=mWat_flow_nominal, - energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, - allowFlowReversal=false, - dp_nominal=5000, - Q_flow_nominal=QHea_flow_nominal) "Heater for water circuit" - annotation (Placement(transformation(extent={{60,-140},{80,-120}}))); - IBPSA.Fluid.Movers.FlowControlled_m_flow pum( - redeclare package Medium = MediumWater, - use_inputFilter=false, - m_flow_nominal=mWat_flow_nominal, - energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, - allowFlowReversal=false, - nominalValuesDefineDefaultPressureCurve=true, - inputType=IBPSA.Fluid.Types.InputType.Constant) "Pump" - annotation (Placement(transformation(extent={{160,-190},{140,-170}}))); - IBPSA.Fluid.Sources.Boundary_pT bouWat(redeclare package Medium = MediumWater, nPorts=1) - "Pressure bound for water circuit" annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - origin={20,-180}))); - Modelica.Blocks.Sources.Constant conHea(k=1) - annotation (Placement(transformation(extent={{80,-110},{60,-90}}))); -equation - connect(heaWat.port_b,rad. port_a) annotation (Line(points={{80,-130},{140,-130}}, - color={0,127,255})); - connect(rad.port_b, pum.port_a) annotation (Line(points={{160,-130},{175,-130}, - {175,-180},{160,-180}}, color={0,127,255})); - connect(heaWat.port_a, pum.port_b) annotation (Line(points={{60,-130},{39.75,-130}, - {39.75,-180},{140,-180}}, color={0,127,255})); - connect(rad.heatPortCon, zon.heatPort) annotation (Line(points={{148,-122.8},{ - 148,40},{160,40}}, color={191,0,0})); - connect(rad.heatPortRad, walCap.port) annotation (Line(points={{152,-122.8},{152, - 1.77636e-15},{160,1.77636e-15}}, color={191,0,0})); - if use_constantHeater then - connect(conHea.y, heaWat.u) annotation (Line(points={{59,-100},{40,-100},{40,-124}, - {58,-124}}, color={0,0,127})); - end if; - connect(bouWat.ports[1], pum.port_b) - annotation (Line(points={{30,-180},{140,-180}},color={0,127,255})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220, - -220},{220,220}})), - experiment(Tolerance=1e-6, StopTime=1e+06), - Documentation(revisions=" - -", info=" -

-The wall temperature (and therefore the room temperature) is quite low. -In this step a heating system is added to resolve this. It consists of a radiator, a pump and a heater. -The radiator has a nominal power of 3 kW for an inlet and outlet temperature of the radiator of 60°C -and 40°C, and a room air and radiative temperature of 20°C. -The pump has a (nominal) mass flow rate of 0.1 kg/s. -Since the heating system uses water as a heat carrier fluid, -the media for the models in the heating circuit should be set to MediumWater. -

-

Required models

- -

Connection instructions

-

-The radiator contains one port for convective heat transfer and one for radiative heat transfer. -Connect both in a reasonable way. Since the heating system uses water as a heat carrier fluid, -the media for the models should be set to MediumWater. -

-

-The Boundary_pT model needs to be used to set an absolute pressure somewhere in the system. -Otherwise the absolute pressure in the system is undefined. -Pressure difference modelling may be disregarded in the heating circuit -since the chosen pump sets a fixed mass flow rate regardless of the pressure drop. -

-

-Set the heater input to 1, meaning that it will produce 1 times its nominal power. -

-

Reference result

-

-The result of the air temperature is plotted in the figure below. -The temperature rises very steeply since the wall is relatively well insulated (k=0.04 W/(m*K)) -and the heater is not disabled when it becomes too warm. -

-

-\"Air -

-"), - __Dymola_Commands(file= - "modelica://IBPSA/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse4.mos" - "Simulate and plot")); -end SimpleHouse4; +within IBPSA.Examples.Tutorial.SimpleHouse; +model SimpleHouse4 "Heating model" + extends SimpleHouse3; + + parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=3000 + "Nominal capacity of heating system"; + parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=0.1 + "Nominal mass flow rate for water loop"; + parameter Boolean use_constantHeater=true + "To enable/disable the connection between the constant source and heater and circulation pump"; + + IBPSA.Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad( + redeclare package Medium = MediumWater, + T_a_nominal=333.15, + T_b_nominal=313.15, + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + allowFlowReversal=false, + Q_flow_nominal=QHea_flow_nominal) "Radiator" + annotation (Placement(transformation(extent={{140,-140},{160,-120}}))); + IBPSA.Fluid.HeatExchangers.HeaterCooler_u heaWat( + redeclare package Medium = MediumWater, + m_flow_nominal=mWat_flow_nominal, + energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, + allowFlowReversal=false, + dp_nominal=5000, + Q_flow_nominal=QHea_flow_nominal) "Heater for water circuit" + annotation (Placement(transformation(extent={{60,-140},{80,-120}}))); + Fluid.Movers.Preconfigured.FlowControlled_m_flow + pum( + redeclare package Medium = MediumWater, + use_inputFilter=false, + m_flow_nominal=mWat_flow_nominal, + energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, + allowFlowReversal=false) "Pump" + annotation (Placement(transformation(extent={{110,-190},{90,-170}}))); + IBPSA.Fluid.Sources.Boundary_pT bouWat(redeclare package Medium = MediumWater, nPorts=1) + "Pressure bound for water circuit" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + origin={20,-180}))); + Modelica.Blocks.Sources.Constant conHea(k=1) + annotation (Placement(transformation(extent={{80,-110},{60,-90}}))); + Modelica.Blocks.Sources.Constant conPum(k=mWat_flow_nominal) + annotation (Placement(transformation(extent={{130,-160},{110,-140}}))); +equation + connect(heaWat.port_b,rad. port_a) annotation (Line(points={{80,-130},{140,-130}}, + color={0,127,255})); + connect(rad.port_b, pum.port_a) annotation (Line(points={{160,-130},{175,-130}, + {175,-180},{110,-180}}, color={0,127,255})); + connect(heaWat.port_a, pum.port_b) annotation (Line(points={{60,-130},{39.75,-130}, + {39.75,-180},{90,-180}}, color={0,127,255})); + connect(rad.heatPortCon, zon.heatPort) annotation (Line(points={{148,-122.8},{ + 148,40},{160,40}}, color={191,0,0})); + connect(rad.heatPortRad, walCap.port) annotation (Line(points={{152,-122.8},{152, + 1.77636e-15},{160,1.77636e-15}}, color={191,0,0})); + if use_constantHeater then + connect(conPum.y, pum.m_flow_in) annotation (Line(points={{109,-150},{100,-150}, + {100,-168}}, color={0,0,127})); + connect(conHea.y, heaWat.u) annotation (Line(points={{59,-100},{40,-100},{40,-124}, + {58,-124}}, color={0,0,127})); + end if; + connect(bouWat.ports[1], pum.port_b) + annotation (Line(points={{30,-180},{90,-180}}, color={0,127,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220, + -220},{220,220}})), + experiment(Tolerance=1e-6, StopTime=1e+06), + Documentation(revisions=" + +", info=" +

+The wall temperature (and therefore the room temperature) is quite low. +In this step a heating system is added to resolve this. It consists of a radiator, a pump and a heater. +The radiator has a nominal power of 3 kW for an inlet and outlet temperature of the radiator of 60°C +and 40°C, and a room air and radiative temperature of 20°C. +The pump has a (nominal) mass flow rate of 0.1 kg/s. +Since the heating system uses water as a heat carrier fluid, +the media for the models in the heating circuit should be set to MediumWater. +

+

Required models

+ +

Connection instructions

+

+The radiator contains one port for convective heat transfer and one for radiative heat transfer. +Connect both in a reasonable way. Since the heating system uses water as a heat carrier fluid, +the media for the models should be set to MediumWater. +

+

+The Boundary_pT model needs to be used to set an absolute pressure somewhere in the system. +Otherwise the absolute pressure in the system is undefined. +Pressure difference modelling may be disregarded in the heating circuit +since the chosen pump sets a fixed mass flow rate regardless of the pressure drop. +

+

+Set the heater input to 1, meaning that it will produce 1 times its nominal power. +

+

Reference result

+

+The result of the air temperature is plotted in the figure below. +The temperature rises very steeply since the wall is relatively well insulated (k=0.04 W/(m*K)) +and the heater is not disabled when it becomes too warm. +

+

+\"Air +

+"), + __Dymola_Commands(file= + "modelica://IBPSA/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse4.mos" + "Simulate and plot")); +end SimpleHouse4; diff --git a/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse5.mo b/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse5.mo index 52a25ecc82..2b51844c97 100644 --- a/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse5.mo +++ b/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse5.mo @@ -1,85 +1,85 @@ -within IBPSA.Examples.Tutorial.SimpleHouse; -model SimpleHouse5 "Heating controller model" - extends SimpleHouse4(pum(inputType=IBPSA.Fluid.Types.InputType.Stages, - massFlowRates=mWat_flow_nominal*{1}), final use_constantHeater=false); - - Modelica.Blocks.Math.BooleanToInteger booInt "Boolean to integer" - annotation (Placement(transformation(extent={{0,-160},{20,-140}}))); - Modelica.Blocks.Math.BooleanToReal booRea "Boolean to real" - annotation (Placement(transformation(extent={{0,-120},{20,-100}}))); - Modelica.Blocks.Logical.Hysteresis hysRad(uLow=273.15 + 21, uHigh=273.15 + 23) - "Hysteresis controller for radiator" - annotation (Placement(transformation(extent={{-80,-120},{-60,-100}}))); - Modelica.Blocks.Logical.Not not1 - "Negation for enabling heating when temperature is low" - annotation (Placement(transformation(extent={{-40,-120},{-20,-100}}))); - Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemZonAir - "Zone air temperature sensor" - annotation (Placement(transformation(extent={{90,160},{70,180}}))); -equation - connect(booInt.y, pum.stage) annotation (Line(points={{21,-150},{150,-150},{150, - -168}}, color={255,127,0})); - connect(booInt.u, not1.y) annotation (Line(points={{-2,-150},{-11.5,-150},{-11.5, - -110},{-19,-110}}, color={255,0,255})); - connect(not1.u,hysRad. y) annotation (Line(points={{-42,-110},{-59,-110}}, - color={255,0,255})); - connect(senTemZonAir.T,hysRad. u) annotation (Line(points={{69,170},{-210,170}, - {-210,-110},{-82,-110}}, color={0,0,127})); - connect(senTemZonAir.port, zon.heatPort) - annotation (Line(points={{90,170},{160,170},{160,40}}, color={191,0,0})); - connect(not1.y, booRea.u) - annotation (Line(points={{-19,-110},{-2,-110}}, color={255,0,255})); - connect(booRea.y, heaWat.u) annotation (Line(points={{21,-110},{40,-110},{40,-124}, - {58,-124}}, color={0,0,127})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220, - -220},{220,220}})), - experiment(Tolerance=1e-6, StopTime=1e+06), - Documentation(revisions=" - -", info=" -

-Since the zone becomes too warm, a controller is required that disables the heater when a setpoint is reached. -We will implement a hysteresis controller with a setpoint of 295.15 +/- 1K (21-23°C). -A temperature sensor will measure the zone air temperature. -

-

Required models

- -

Connection instructions

-

-The heater modulation level should be set to one when the heater is on and to zero otherwise. -

-

Reference result

-

-The figure below shows the air temperature when the controller is added. -

-

-\"Air -

-"), - __Dymola_Commands(file= - "modelica://IBPSA/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse5.mos" - "Simulate and plot")); -end SimpleHouse5; +within IBPSA.Examples.Tutorial.SimpleHouse; +model SimpleHouse5 "Heating controller model" + extends SimpleHouse4(final use_constantHeater=false); + + Modelica.Blocks.Math.BooleanToReal booRea1(realTrue=mWat_flow_nominal) + "Boolean to integer" + annotation (Placement(transformation(extent={{0,-160},{20,-140}}))); + Modelica.Blocks.Math.BooleanToReal booRea "Boolean to real" + annotation (Placement(transformation(extent={{0,-120},{20,-100}}))); + Modelica.Blocks.Logical.Hysteresis hysRad(uLow=273.15 + 21, uHigh=273.15 + 23) + "Hysteresis controller for radiator" + annotation (Placement(transformation(extent={{-80,-120},{-60,-100}}))); + Modelica.Blocks.Logical.Not not1 + "Negation for enabling heating when temperature is low" + annotation (Placement(transformation(extent={{-40,-120},{-20,-100}}))); + Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemZonAir + "Zone air temperature sensor" + annotation (Placement(transformation(extent={{90,160},{70,180}}))); +equation + connect(booRea1.u, not1.y) annotation (Line(points={{-2,-150},{-11.5,-150},{-11.5, + -110},{-19,-110}}, color={255,0,255})); + connect(not1.u,hysRad. y) annotation (Line(points={{-42,-110},{-59,-110}}, + color={255,0,255})); + connect(senTemZonAir.T,hysRad. u) annotation (Line(points={{69,170},{-210,170}, + {-210,-110},{-82,-110}}, color={0,0,127})); + connect(senTemZonAir.port, zon.heatPort) + annotation (Line(points={{90,170},{160,170},{160,40}}, color={191,0,0})); + connect(not1.y, booRea.u) + annotation (Line(points={{-19,-110},{-2,-110}}, color={255,0,255})); + connect(booRea.y, heaWat.u) annotation (Line(points={{21,-110},{40,-110},{40,-124}, + {58,-124}}, color={0,0,127})); + connect(booRea1.y, pum.m_flow_in) annotation (Line(points={{21,-150},{100,-150}, + {100,-168}}, color={0,0,127})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220, + -220},{220,220}})), + experiment(Tolerance=1e-6, StopTime=1e+06), + Documentation(revisions=" + +", info=" +

+Since the zone becomes too warm, a controller is required that disables the heater when a setpoint is reached. +We will implement a hysteresis controller with a setpoint of 295.15 +/- 1K (21-23°C). +A temperature sensor will measure the zone air temperature. +

+

Required models

+ +

Connection instructions

+

+The heater modulation level should be set to one when the heater is on and to zero otherwise. +

+

Reference result

+

+The figure below shows the air temperature when the controller is added. +

+

+\"Air +

+"), + __Dymola_Commands(file= + "modelica://IBPSA/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse5.mos" + "Simulate and plot")); +end SimpleHouse5; diff --git a/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse6.mo b/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse6.mo index 125ca17b30..9a323b25c2 100644 --- a/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse6.mo +++ b/IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse6.mo @@ -1,144 +1,149 @@ -within IBPSA.Examples.Tutorial.SimpleHouse; -model SimpleHouse6 "Free cooling model" - extends SimpleHouse5( - zon(nPorts=2), - mAir_flow_nominal=0.1, - AWin=6); - - parameter Modelica.Units.SI.PressureDifference dpAir_nominal=200 - "Pressure drop at nominal mass flow rate for air loop"; - - IBPSA.Fluid.Actuators.Dampers.Exponential vavDam( - redeclare package Medium = MediumAir, - from_dp=true, - m_flow_nominal=mAir_flow_nominal, - dpDamper_nominal=dpAir_nominal) - "Damper" annotation (Placement(transformation(extent={{-10,10},{10, - -10}}, origin={110,130}))); - IBPSA.Fluid.Movers.FlowControlled_dp fan( - redeclare package Medium = MediumAir, - show_T=true, - dp_nominal=dpAir_nominal, - use_inputFilter=false, - energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, - nominalValuesDefineDefaultPressureCurve=true, - m_flow_nominal=mAir_flow_nominal) - "Constant head fan" annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - origin={0,130}))); - Modelica.Blocks.Sources.Constant con_dp(k=dpAir_nominal) "Pressure head" - annotation (Placement(transformation(extent={{-60,90},{-40,110}}))); - IBPSA.Fluid.HeatExchangers.ConstantEffectiveness hexRec( - redeclare package Medium1 = MediumAir, - redeclare package Medium2 = MediumAir, - dp1_nominal=10, - dp2_nominal=10, - m1_flow_nominal=mAir_flow_nominal, - m2_flow_nominal=mAir_flow_nominal, - eps=0.85) "Heat exchanger for heat recuperation" - annotation (Placement(transformation(extent={{-55,124},{-85,156}}))); - IBPSA.Fluid.Sources.Boundary_pT - bouAir( - redeclare package Medium = MediumAir, - use_T_in=true, - nPorts=2) "Air boundary with constant temperature" - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - origin={-110,140}))); - Modelica.Blocks.Logical.Hysteresis hysAir(uLow=273.15 + 23, uHigh=273.15 + 25) - "Hysteresis controller for damper" - annotation (Placement(transformation(extent={{40,90},{60,110}}))); - Modelica.Blocks.Math.BooleanToReal booToRea1 "Boolean to real" - annotation (Placement(transformation(extent={{80,90},{100,110}}))); -equation - connect(con_dp.y, fan.dp_in) - annotation (Line(points={{-39,100},{0,100},{0,118}}, color={0,0,127})); - connect(hexRec.port_a1, zon.ports[1]) annotation (Line(points={{-55,149.6},{169, - 149.6},{169,50},{170,50}}, color={0,127,255})); - connect(bouAir.T_in, weaBus.TDryBul) annotation (Line(points={{-122,144},{-130, - 144},{-130,0}}, color={0,0,127})); - connect(vavDam.port_b, zon.ports[2]) annotation (Line(points={{120,130},{142,130}, - {142,50},{170,50}}, - color={0,127,255})); - connect(booToRea1.y, vavDam.y) - annotation (Line(points={{101,100},{110,100},{110,118}}, - color={0,0,127})); - connect(hysAir.y, booToRea1.u) - annotation (Line(points={{61,100},{78,100}}, - color={255,0,255})); - connect(vavDam.port_a, fan.port_b) - annotation (Line(points={{100,130},{10,130}}, color={0,127,255})); - connect(hysAir.u, hysRad.u) annotation (Line(points={{38,100},{30,100},{30,170}, - {-210,170},{-210,-110},{-82,-110}}, color={0,0,127})); - connect(bouAir.ports[1], hexRec.port_a2) annotation (Line(points={{-100,139},{ - -100,130.4},{-85,130.4}}, color={0,127,255})); - connect(fan.port_a, hexRec.port_b2) annotation (Line(points={{-10,130},{-32,130}, - {-32,130.4},{-55,130.4}}, color={0,127,255})); - connect(hexRec.port_b1, bouAir.ports[2]) annotation (Line(points={{-85,149.6}, - {-100,149.6},{-100,141}}, color={0,127,255})); - annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220, - -220},{220,220}})), - experiment(Tolerance=1e-6, StopTime=1e+06), - Documentation(revisions=" - -", info=" -

-For this last exercise, we first increase the window size -from 2 m2 to 6 m2. -

-

-We will add a ventilation model that allows to perform free cooling -using outside air when solar irradiation heats up the room too much. -The system consists of a fan, a damper, a controller with an air temperature setpoint -between 23°C and 25°C, -and a heat recovery unit with a constant effectiveness of 85%. -The damper and fan have a nominal pressure drop/raise of 200 Pa. -The heat recovery unit has a nominal pressure drop of 10 Pa at both sides. -The nominal mass flow rate of the ventilation system is 0.1 kg/s. -

-

Required models

- -

Connection instructions

-

-Connect the components such that they exchange mass (and therefore also energy) -with the MixingVolume representing the zone air. -Add a boundary_pT to draw air from the environment. -Enable its temperature input and connect it to the TDryBul variable in the weather data reader. -Also reconsider the nominal mass flow rate parameter value in the MixingVolume -given the flow rate information of the ventilation system. -

-

Reference result

-

-The figures below show the results. -

-

-\"Air -

-

-\"Ventilation -

-"), - __Dymola_Commands(file= - "modelica://IBPSA/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse6.mos" - "Simulate and plot")); -end SimpleHouse6; +within IBPSA.Examples.Tutorial.SimpleHouse; +model SimpleHouse6 "Free cooling model" + extends SimpleHouse5( + zon(nPorts=2), + mAir_flow_nominal=0.1, + AWin=6); + + parameter Modelica.Units.SI.PressureDifference dpAir_nominal=200 + "Pressure drop at nominal mass flow rate for air loop"; + + IBPSA.Fluid.Actuators.Dampers.Exponential vavDam( + redeclare package Medium = MediumAir, + from_dp=true, + m_flow_nominal=mAir_flow_nominal, + dpDamper_nominal=dpAir_nominal) + "Damper" annotation (Placement(transformation(extent={{-10,10},{10, + -10}}, origin={110,130}))); + Fluid.Movers.Preconfigured.FlowControlled_dp + fan( + redeclare package Medium = MediumAir, + show_T=true, + dp_nominal=dpAir_nominal, + use_inputFilter=false, + energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, + m_flow_nominal=mAir_flow_nominal) + "Constant head fan" annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + origin={0,130}))); + IBPSA.Fluid.HeatExchangers.ConstantEffectiveness hexRec( + redeclare package Medium1 = MediumAir, + redeclare package Medium2 = MediumAir, + dp1_nominal=10, + dp2_nominal=10, + m1_flow_nominal=mAir_flow_nominal, + m2_flow_nominal=mAir_flow_nominal, + eps=0.85) "Heat exchanger for heat recuperation" + annotation (Placement(transformation(extent={{-55,124},{-85,156}}))); + IBPSA.Fluid.Sources.Boundary_pT + bouAir( + redeclare package Medium = MediumAir, + use_T_in=true, + nPorts=2) "Air boundary with constant temperature" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + origin={-110,140}))); + Modelica.Blocks.Logical.Hysteresis hysAir(uLow=273.15 + 23, uHigh=273.15 + 25) + "Hysteresis controller for damper" + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=270, + origin={50,110}))); + Modelica.Blocks.Math.BooleanToReal booRea2 "Boolean to real" + annotation (Placement(transformation(extent={{80,80},{100,100}}))); + Modelica.Blocks.Math.BooleanToReal booRea3(realTrue=dpAir_nominal) + "Boolean to real" + annotation (Placement(transformation(extent={{30,80},{10,100}}))); +equation + connect(hexRec.port_a1, zon.ports[1]) annotation (Line(points={{-55,149.6},{169, + 149.6},{169,50},{170,50}}, color={0,127,255})); + connect(bouAir.T_in, weaBus.TDryBul) annotation (Line(points={{-122,144},{-130, + 144},{-130,0}}, color={0,0,127})); + connect(vavDam.port_b, zon.ports[2]) annotation (Line(points={{120,130},{142,130}, + {142,50},{170,50}}, + color={0,127,255})); + connect(booRea2.y, vavDam.y) + annotation (Line(points={{101,90},{110,90},{110,118}}, color={0,0,127})); + connect(hysAir.y, booRea2.u) + annotation (Line(points={{50,99},{50,90},{78,90}}, color={255,0,255})); + connect(vavDam.port_a, fan.port_b) + annotation (Line(points={{100,130},{10,130}}, color={0,127,255})); + connect(bouAir.ports[1], hexRec.port_a2) annotation (Line(points={{-100,139},{ + -100,130.4},{-85,130.4}}, color={0,127,255})); + connect(fan.port_a, hexRec.port_b2) annotation (Line(points={{-10,130},{-32,130}, + {-32,130.4},{-55,130.4}}, color={0,127,255})); + connect(hexRec.port_b1, bouAir.ports[2]) annotation (Line(points={{-85,149.6}, + {-100,149.6},{-100,141}}, color={0,127,255})); + connect(booRea1.y, pum.m_flow_in) annotation (Line(points={{21,-150},{100, + -150},{100,-168}}, color={0,0,127})); + connect(hysAir.u, hysRad.u) annotation (Line(points={{50,122},{50,170},{-210, + 170},{-210,-110},{-82,-110}}, color={0,0,127})); + connect(booRea3.y, fan.dp_in) + annotation (Line(points={{9,90},{0,90},{0,118}}, color={0,0,127})); + connect(booRea3.u, hysAir.y) + annotation (Line(points={{32,90},{50,90},{50,99}}, color={255,0,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220, + -220},{220,220}})), + experiment(Tolerance=1e-6, StopTime=1e+06), + Documentation(revisions=" + +", info=" +

+For this last exercise, we first increase the window size +from 2 m2 to 6 m2. +

+

+We will add a ventilation model that allows to perform free cooling +using outside air when solar irradiation heats up the room too much. +The system consists of a fan, a damper, a controller with an air temperature setpoint +between 23°C and 25°C, +and a heat recovery unit with a constant effectiveness of 85%. +The damper and fan have a nominal pressure drop/raise of 200 Pa. +The heat recovery unit has a nominal pressure drop of 10 Pa at both sides. +The nominal mass flow rate of the ventilation system is 0.1 kg/s. +

+

Required models

+ +

Connection instructions

+

+Connect the components such that they exchange mass (and therefore also energy) +with the MixingVolume representing the zone air. +Add a boundary_pT to draw air from the environment. +Enable its temperature input and connect it to the TDryBul variable in the weather data reader. +Also reconsider the nominal mass flow rate parameter value in the MixingVolume +given the flow rate information of the ventilation system. +

+

Reference result

+

+The figures below show the results. +

+

+\"Air +

+

+\"Ventilation +

+"), + __Dymola_Commands(file= + "modelica://IBPSA/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse6.mos" + "Simulate and plot")); +end SimpleHouse6;