Package with examples of active beam models
Information
This package contains examples for the use of models that can be found in
Buildings.Fluid.HeatExchangers.ActiveBeams.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Information
This example tests the implementation of
Buildings.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating
for both heating and cooling mode. An air volume is maintained at a temperature between 22°C and
25°C by two controllers that regulate the water flow rate in the active beam.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model CoolingAndHeating
extends Modelica.Icons.Example;
package MediumA =
Buildings.Media.Air ;
package MediumW =
Buildings.Media.Water ;
Buildings.Fluid.Sources.Boundary_pT sin_1(
redeclare package Medium = MediumW,
nPorts=1) ;
Buildings.Fluid.Sources.MassFlowSource_T souAir(
redeclare package Medium = MediumA,
m_flow=0.0792,
use_m_flow_in=false,
nPorts=1,
T=285.85) ;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = MediumA,
nPorts=1) ;
Modelica.Thermal.HeatTransfer.Components.ThermalConductor theConWal(G=200)
;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaFlo
;
Modelica.Blocks.Sources.Constant TSetHea(k=273.15 + 22)
;
Buildings.HeatTransfer.Sources.FixedTemperature TOut(T=301.15)
;
Buildings.Controls.Continuous.LimPID conHea(
yMax=0.094,
Td=0,
Ti=100,
k=0.1)
;
Sources.MassFlowSource_T pumCoo(
redeclare package Medium = MediumW,
use_m_flow_in=true,
nPorts=1,
T=288.15) ;
Modelica.Blocks.Math.Gain gain(k=1200) ;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTem
;
Sources.MassFlowSource_T pumHea(
redeclare package Medium = MediumW,
use_m_flow_in=true,
nPorts=1,
T=320.95) ;
Buildings.Fluid.Sources.Boundary_pT sin_2(
redeclare package Medium = MediumW,
nPorts=1) ;
Modelica.Blocks.Sources.Sine sine(
f=1/86400,
amplitude=1,
phase=-1.5707963267949) ;
Buildings.Fluid.MixingVolumes.MixingVolume vol(nPorts=2,
redeclare package Medium = MediumA,
m_flow_nominal=0.1,
V=30,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Modelica.Blocks.Sources.Constant TSetCoo(k=273.15 + 25)
;
Buildings.Controls.Continuous.LimPID conCoo(
yMax=0.094,
reverseActing=false,
Td=0,
k=0.5,
Ti=70)
;
Buildings.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating beaCooHea(
redeclare package MediumWat = MediumW,
redeclare package MediumAir = MediumA,
redeclare Buildings.Fluid.HeatExchangers.ActiveBeams.Data.Trox.DID632A_nozzleH_length6ft_cooling
perCoo,
redeclare Buildings.Fluid.HeatExchangers.ActiveBeams.Data.Trox.DID632A_nozzleH_length6ft_heating
perHea,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial)
;
equation
connect(TOut.port, theConWal.port_a);
connect(gain.y, heaFlo.Q_flow);
connect(senTem.T,conHea. u_m);
connect(sine.y, gain.u);
connect(bou.ports[1], vol.ports[1]);
connect(theConWal.port_b, vol.heatPort);
connect(heaFlo.port, vol.heatPort);
connect(senTem.port, vol.heatPort);
connect(TSetHea.y, conHea.u_s);
connect(TSetCoo.y, conCoo.u_s);
connect(conCoo.u_m, senTem.T);
connect(beaCooHea.watCoo_b, sin_1.ports[1]);
connect(sin_2.ports[1], beaCooHea.watHea_b);
connect(souAir.ports[1], beaCooHea.air_a);
connect(beaCooHea.air_b, vol.ports[2]);
connect(beaCooHea.heaPor, vol.heatPort);
connect(conCoo.y, pumCoo.m_flow_in);
connect(conHea.y, pumHea.m_flow_in);
connect(pumCoo.ports[1], beaCooHea.watCoo_a);
connect(pumHea.ports[1], beaCooHea.watHea_a);
end CoolingAndHeating;
Information
This example tests the implementation of
Buildings.Fluid.HeatExchangers.ActiveBeams.Cooling.
An air volume is maintained at a temperature below 25°C by a controller
that regulates the water flow rate in the active beam.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model CoolingOnly
extends Modelica.Icons.Example;
package MediumA =
Buildings.Media.Air ;
package MediumW =
Buildings.Media.Water ;
Buildings.Fluid.Sources.Boundary_pT sin_1(
redeclare package Medium = MediumW,
nPorts=1) ;
Buildings.Fluid.Sources.MassFlowSource_T souAir(
redeclare package Medium = MediumA,
use_m_flow_in=false,
m_flow=0.0792,
nPorts=1,
T=285.85) ;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = MediumA,
nPorts=1) ;
Modelica.Thermal.HeatTransfer.Components.ThermalConductor theConWal(G=200)
;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaFlo
;
Modelica.Blocks.Sources.Constant TSetCoo(k=273.15 + 25)
;
Buildings.HeatTransfer.Sources.FixedTemperature TOut(T=301.15)
;
Buildings.Controls.Continuous.LimPID conPID(
reverseActing=false,
Td=0,
k=0.5,
Ti=70,
yMax=0.094) ;
Sources.MassFlowSource_T pum(
redeclare package Medium = MediumW,
use_m_flow_in=true,
nPorts=1,
T=288.15) ;
Modelica.Blocks.Math.Gain gain(k=1200) ;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTem
;
Modelica.Blocks.Sources.Sine sine(
f=1/86400,
amplitude=1,
phase=-1.5707963267949) ;
Buildings.Fluid.MixingVolumes.MixingVolume vol(
nPorts=2,
redeclare package Medium = MediumA,
m_flow_nominal=0.1,
V=30,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
T_start=293.15) ;
Buildings.Fluid.HeatExchangers.ActiveBeams.Cooling beaCoo(
redeclare package MediumWat = MediumW,
redeclare package MediumAir = MediumA,
redeclare Buildings.Fluid.HeatExchangers.ActiveBeams.Data.Trox.DID632A_nozzleH_length6ft_cooling
perCoo,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
equation
connect(TOut.port, theConWal.port_a);
connect(gain.y, heaFlo.Q_flow);
connect(TSetCoo.y, conPID.u_s);
connect(senTem.T, conPID.u_m);
connect(vol.ports[1], bou.ports[1]);
connect(heaFlo.port, vol.heatPort);
connect(theConWal.port_b, vol.heatPort);
connect(senTem.port, vol.heatPort);
connect(sine.y, gain.u);
connect(beaCoo.watCoo_b, sin_1.ports[1]);
connect(beaCoo.heaPor, vol.heatPort);
connect(souAir.ports[1], beaCoo.air_a);
connect(beaCoo.air_b, vol.ports[2]);
connect(pum.ports[1], beaCoo.watCoo_a);
connect(pum.m_flow_in, conPID.y);
end CoolingOnly;
Information
This example tests the implementation of
Buildings.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating, but operates it only in heating mode.
An air volume is maintained at a temperature above 22°C by a controller
that regulates the water flow rate in the active beam.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model HeatingOnly
extends Modelica.Icons.Example;
package MediumA =
Buildings.Media.Air ;
package MediumW =
Buildings.Media.Water ;
Buildings.Fluid.Sources.Boundary_pT sin_1(
redeclare package Medium = MediumW,
nPorts=1) ;
Buildings.Fluid.Sources.MassFlowSource_T souAir(
redeclare package Medium = MediumA,
m_flow=0.0792,
use_m_flow_in=false,
nPorts=1,
T=285.85) ;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = MediumA,
nPorts=1) ;
Modelica.Thermal.HeatTransfer.Components.ThermalConductor theConWal(G=200)
;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heaFlo
;
Modelica.Blocks.Sources.Constant TSetHea(k=273.15 + 22)
;
Buildings.HeatTransfer.Sources.FixedTemperature TOut(T=301.15)
;
Buildings.Controls.Continuous.LimPID conPID(
yMax=0.094,
Td=0,
Ti=100,
k=0.1) ;
Buildings.Fluid.Sources.Boundary_pT sou_1(
redeclare package Medium = MediumW,
T=288.15,
nPorts=1) ;
Modelica.Blocks.Math.Gain gain(k=1200);
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTem
;
Sources.MassFlowSource_T pumHea(
redeclare package Medium = MediumW,
use_m_flow_in=true,
nPorts=1,
T=320.95) ;
Buildings.Fluid.Sources.Boundary_pT sin_2(
redeclare package Medium = MediumW,
nPorts=1) ;
Modelica.Blocks.Sources.Sine sine(
f=1/86400,
amplitude=1,
phase=-1.5707963267949) ;
Buildings.Fluid.MixingVolumes.MixingVolume vol(nPorts=2,
redeclare package Medium = MediumA,
m_flow_nominal=0.1,
V=30,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
T_start=293.15) ;
Buildings.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating beaCooHea(
redeclare package MediumWat = MediumW,
redeclare package MediumAir = MediumA,
redeclare Buildings.Fluid.HeatExchangers.ActiveBeams.Data.Trox.DID632A_nozzleH_length6ft_cooling
perCoo,
redeclare Buildings.Fluid.HeatExchangers.ActiveBeams.Data.Trox.DID632A_nozzleH_length6ft_heating
perHea,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
equation
connect(TOut.port, theConWal.port_a);
connect(gain.y, heaFlo.Q_flow);
connect(TSetHea.y, conPID.u_s);
connect(senTem.T, conPID.u_m);
connect(sine.y, gain.u);
connect(bou.ports[1], vol.ports[1]);
connect(theConWal.port_b, vol.heatPort);
connect(heaFlo.port, vol.heatPort);
connect(senTem.port, vol.heatPort);
connect(beaCooHea.watHea_b, sin_2.ports[1]);
connect(beaCooHea.heaPor, vol.heatPort);
connect(souAir.ports[1], beaCooHea.air_a);
connect(sin_1.ports[1], beaCooHea.watCoo_b);
connect(sou_1.ports[1], beaCooHea.watCoo_a);
connect(beaCooHea.air_b, vol.ports[2]);
connect(pumHea.ports[1], beaCooHea.watHea_a);
connect(pumHea.m_flow_in, conPID.y);
end HeatingOnly;