LBL logo

Buildings.Fluid.Boilers.Examples

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
Buildings.Fluid.Boilers.Examples.BoilerPolynomial BoilerPolynomial Test model
Buildings.Fluid.Boilers.Examples.BoilerPolynomialClosedLoop BoilerPolynomialClosedLoop Boiler with closed loop control

Buildings.Fluid.Boilers.Examples.BoilerPolynomial Buildings.Fluid.Boilers.Examples.BoilerPolynomial

Test model

Buildings.Fluid.Boilers.Examples.BoilerPolynomial

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

TypeNameDefaultDescription
PowerQ_flow_nominal3000Nominal power [W]
TemperaturedT_nominal20Nominal temperature difference [K]
MassFlowRatem_flow_nominalQ_flow_nominal/dT_nominal/4200Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal3000Pressure drop at m_flow_nominal [Pa]

Modelica definition

model BoilerPolynomial "Test model" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Modelica.SIunits.Power Q_flow_nominal = 3000 "Nominal power"; parameter Modelica.SIunits.Temperature dT_nominal = 20 "Nominal temperature difference"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal = Q_flow_nominal/dT_nominal/4200 "Nominal mass flow rate"; parameter Modelica.SIunits.PressureDifference dp_nominal = 3000 "Pressure drop at m_flow_nominal"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=2, p(displayUnit="Pa") = 300000, T=333.15) "Sink"; 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) "Boiler"; Buildings.HeatTransfer.Sources.FixedTemperature TAmb1( T=288.15) "Ambient temperature in boiler room"; 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, massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dp_nominal=dp_nominal, fue=Buildings.Fluid.Data.Fuels.NaturalGasLowerHeatingValue(), from_dp=true, T_start=293.15) "Boiler"; Buildings.HeatTransfer.Sources.FixedTemperature TAmb2( T=288.15) "Ambient temperature in boiler room"; 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;

Buildings.Fluid.Boilers.Examples.BoilerPolynomialClosedLoop Buildings.Fluid.Boilers.Examples.BoilerPolynomialClosedLoop

Boiler with closed loop control

Buildings.Fluid.Boilers.Examples.BoilerPolynomialClosedLoop

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

TypeNameDefaultDescription
PowerQ_flow_nominal20000Nominal power [W]
TemperaturedT_nominal20Nominal temperature difference [K]
MassFlowRatem_flow_nominalQ_flow_nominal/dT_nominal/4200Nominal mass flow rate [kg/s]

Modelica definition

model BoilerPolynomialClosedLoop "Boiler with closed loop control" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Modelica.SIunits.Power Q_flow_nominal = 20000 "Nominal power"; parameter Modelica.SIunits.Temperature dT_nominal = 20 "Nominal temperature difference"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal = Q_flow_nominal/dT_nominal/4200 "Nominal mass flow rate"; 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) "Boiler"; 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) "Pump for heating load"; Movers.FlowControlled_m_flow pumBoi( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Pump for boiler loop"; Modelica.Blocks.Sources.Constant m_flow_pum(k=m_flow_nominal) "Mass flow rate of pump"; Modelica.Blocks.Sources.Constant TSetBoi(k=273.15 + 70) "Temperature setpoint for boiler"; Controls.Continuous.LimPID conPID( Td=1, k=0.5, controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=100); Modelica.Blocks.Sources.Constant TSetHea(k=273.15 + 40) "Temperature setpoint for heating load"; FixedResistances.SplitterFixedResistanceDpM 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) "Splitter/mixer"; FixedResistances.SplitterFixedResistanceDpM 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) "Splitter/mixer"; FixedResistances.SplitterFixedResistanceDpM 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) "Splitter/mixer"; FixedResistances.SplitterFixedResistanceDpM 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) "Splitter/mixer"; Storage.ExpansionVessel exp(redeclare package Medium = Medium, V_start=1); FixedResistances.SplitterFixedResistanceDpM 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) "Splitter/mixer"; 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) "Fixed temperature boundary condition"; Modelica.Blocks.Math.Gain gain(k=2) "Multiply the mass flow rate as this circuit has a smaller temperature difference"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TVol "Sensor for volume temperature"; 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;

http://simulationresearch.lbl.gov/modelica