Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in
Buildings.Fluid.Boilers.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
BoilerPolynomial
|
Boilers with efficiency specified by polynomial and with open loop control |
BoilerPolynomialClosedLoop
|
Boilers with efficiency specified by polynomial and with open loop control |
BoilerTable
|
Boilers with efficiency described by table |
Boilers with efficiency specified by polynomial and with open loop control
Information
This example demonstrates the open loop response of the boiler
model for a control signal that is first a ramp from
0
to
1, followed by a step that switches the boilers off and
then on again.
The instances of the boiler models are parameterized
so that
boi1
is a dynamic model and
boi2
is a steady-state model.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Power | Q_flow_nominal | 3000 | Nominal power [W] |
Temperature | dT_nominal | 20 | Nominal temperature difference [K] |
MassFlowRate | m_flow_nominal | Q_flow_nominal/dT_nominal/4200 | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | 3000 | Pressure drop at m_flow_nominal [Pa] |
Modelica definition
model BoilerPolynomial
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Power Q_flow_nominal=3000 ;
parameter Modelica.Units.SI.Temperature dT_nominal=20
;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=Q_flow_nominal/
dT_nominal/4200 ;
parameter Modelica.Units.SI.PressureDifference dp_nominal=3000
;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=2,
p(displayUnit="Pa") = 300000,
T=333.15) ;
Buildings.Fluid.Sources.Boundary_pT sou(
nPorts=2,
redeclare package Medium = Medium,
p=300000 + dp_nominal,
T=303.15);
Modelica.Blocks.Sources.TimeTable y(table=[0,0; 1800,1; 1800,0; 2400,0; 2400,
1; 3600,1]);
Buildings.Fluid.Boilers.BoilerPolynomial boi1(
a={0.9},
effCur=Buildings.Fluid.Types.EfficiencyCurves.Constant,
Q_flow_nominal=Q_flow_nominal,
m_flow_nominal = m_flow_nominal,
redeclare package Medium = Medium,
dp_nominal=dp_nominal,
fue=
Buildings.Fluid.Data.Fuels.NaturalGasLowerHeatingValue(),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
from_dp=true,
T_start=293.15) ;
Buildings.HeatTransfer.Sources.FixedTemperature TAmb1( T=288.15)
;
Buildings.Fluid.Boilers.BoilerPolynomial boi2(
a={0.9},
effCur=Buildings.Fluid.Types.EfficiencyCurves.Constant,
Q_flow_nominal=Q_flow_nominal,
m_flow_nominal = m_flow_nominal,
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
dp_nominal=dp_nominal,
fue=
Buildings.Fluid.Data.Fuels.NaturalGasLowerHeatingValue(),
from_dp=true,
T_start=293.15) ;
Buildings.HeatTransfer.Sources.FixedTemperature TAmb2( T=288.15)
;
equation
connect(TAmb1.port, boi1.heatPort);
connect(TAmb2.port, boi2.heatPort);
connect(sou.ports[1], boi1.port_a);
connect(sou.ports[2], boi2.port_a);
connect(boi2.port_b, sin.ports[2]);
connect(boi1.port_b, sin.ports[1]);
connect(y.y, boi1.y);
connect(y.y, boi2.y);
end BoilerPolynomial;
Boilers with efficiency specified by polynomial and with open loop control
Information
This model illustrates how to use a boiler model
with closed loop control.
The controller modulates the boiler temperature between
60°C and 80°C.
A three-way valve mixes recirculated water with boiler water
to regulate the temperature of the volume at a constant temperature
of 40°C.
There is also a bypass in the boiler loop to ensure circulation when the
valve position is such that it only recirculates water from the load.
The bypass between valve and pump mixes recirculated water, thereby
allowing the valve to work over a larger operating range.
The expansion vessel near the boiler is used to set a reference pressure,
and it is used to accommodate for the thermal expansion of the water.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Power | Q_flow_nominal | 20000 | Nominal power [W] |
Temperature | dT_nominal | 20 | Nominal temperature difference [K] |
MassFlowRate | m_flow_nominal | Q_flow_nominal/dT_nominal/4200 | Nominal mass flow rate [kg/s] |
Modelica definition
model BoilerPolynomialClosedLoop
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Power Q_flow_nominal=20000 ;
parameter Modelica.Units.SI.Temperature dT_nominal=20
;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=Q_flow_nominal/
dT_nominal/4200 ;
Buildings.Fluid.Boilers.BoilerPolynomial boi(
a={0.9},
effCur=Buildings.Fluid.Types.EfficiencyCurves.Constant,
Q_flow_nominal=Q_flow_nominal,
redeclare package Medium = Medium,
dp_nominal=20000,
m_flow_nominal=m_flow_nominal,
fue=
Buildings.Fluid.Data.Fuels.HeatingOilLowerHeatingValue(),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
T_start=293.15) ;
Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=20);
Modelica.Blocks.Math.BooleanToReal booleanToReal;
Actuators.Valves.ThreeWayEqualPercentageLinear val(
redeclare package Medium = Medium,
l={0.01,0.01},
m_flow_nominal=m_flow_nominal,
dpValve_nominal=6000,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState);
Movers.FlowControlled_m_flow pumLoa(
redeclare package Medium = Medium,
m_flow_nominal=2*m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Movers.FlowControlled_m_flow pumBoi(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Modelica.Blocks.Sources.Constant m_flow_pum(k=m_flow_nominal)
;
Modelica.Blocks.Sources.Constant TSetBoi(k=273.15 + 70)
;
Controls.Continuous.LimPID conPID(
Td=1,
k=0.5,
Ti=100);
Modelica.Blocks.Sources.Constant TSetHea(k=273.15 + 40)
;
Buildings.Fluid.FixedResistances.Junction spl(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,2,1},
dp_nominal={0,0,200},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Buildings.Fluid.FixedResistances.Junction spl1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal={0,0,100},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Buildings.Fluid.FixedResistances.Junction spl2(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=0*{1,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Buildings.Fluid.FixedResistances.Junction spl3(
redeclare package Medium = Medium,
dp_nominal=0*{1,1,1},
m_flow_nominal=m_flow_nominal*{2,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Storage.ExpansionVessel exp(
redeclare package Medium = Medium, V_start=1);
Buildings.Fluid.FixedResistances.Junction spl4(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=0*{1,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
MixingVolumes.MixingVolume vol(
nPorts=2,
redeclare package Medium = Medium,
m_flow_nominal=2*m_flow_nominal,
V=1,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Modelica.Thermal.HeatTransfer.Components.ThermalConductor thermalConductor(G=0.1
*Q_flow_nominal/(40 - 20));
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TBou(T=293.15)
;
Modelica.Blocks.Math.Gain gain(k=2)
;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TVol
;
equation
connect(onOffController.y, booleanToReal.u);
connect(boi.port_b, pumBoi.port_a);
connect(boi.T, onOffController.u);
connect(conPID.y, val.y);
connect(TSetHea.y, conPID.u_s);
connect(TSetBoi.y, onOffController.reference);
connect(val.port_2, spl.port_1);
connect(spl.port_2, pumLoa.port_a);
connect(pumBoi.port_b, spl1.port_1);
connect(spl1.port_2, val.port_1);
connect(spl2.port_2, boi.port_a);
connect(boi.port_a, exp.port_a);
connect(spl3.port_2, spl4.port_1);
connect(spl4.port_2, spl2.port_1);
connect(spl4.port_3, val.port_3);
connect(booleanToReal.y, boi.y);
connect(m_flow_pum.y, pumBoi.m_flow_in);
connect(vol.ports[1], spl3.port_1);
connect(TBou.port, thermalConductor.port_a);
connect(thermalConductor.port_b, vol.heatPort);
connect(gain.y, pumLoa.m_flow_in);
connect(m_flow_pum.y, gain.u);
connect(TVol.port, vol.heatPort);
connect(TVol.T, conPID.u_m);
connect(pumLoa.port_b, vol.ports[2]);
connect(spl.port_3, spl3.port_3);
connect(spl1.port_3, spl2.port_3);
end BoilerPolynomialClosedLoop;
Boilers with efficiency described by table
Information
Similar to
Buildings.Fluid.Boilers.Examples.BoilerPolynomial,
this example demonstrates the open loop response of the boiler model
with boi1
a dynamic model and
boi2
a steady-state model.
In addition to the control signal,
the inlet temperature is also varied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
FBdash2501 | per | | Record containing a table that describes the efficiency curves |
Modelica definition
model BoilerTable
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Buildings.Fluid.Boilers.Data.Lochinvar.Crest.FBdash2501 per
;
Buildings.Fluid.Boilers.BoilerTable boi1(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
from_dp=true,
T_start=293.15,
per=per) ;
Buildings.Fluid.Boilers.BoilerTable boi2(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
from_dp=true,
T_start=293.15,
per=per) ;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
p(displayUnit="Pa") = 300000,
T=sou.T,
nPorts=2) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
p=300000 + per.dp_nominal,
use_T_in=true,
nPorts=2) ;
Buildings.HeatTransfer.Sources.FixedTemperature TAmb(T=288.15)
;
Modelica.Blocks.Sources.TimeTable y(table=[0,0; 1800,1; 1800,0; 2400,0; 2400,1;
6000,1]) ;
Modelica.Blocks.Sources.TimeTable TIn(table=[0,303.15; 3000,303.15; 4200,293.15;
4800,293.15; 5400,303.15; 6000,303.15])
;
equation
connect(TAmb.port,boi1. heatPort);
connect(y.y,boi1. y);
connect(TIn.y, sou.T_in);
connect(y.y,boi2. y);
connect(TAmb.port,boi2. heatPort);
connect(sou.ports[1],boi1. port_a);
connect(sou.ports[2],boi2. port_a);
connect(boi1.port_b, sin.ports[1]);
connect(boi2.port_b, sin.ports[2]);
end BoilerTable;