Buildings.Fluid.Boilers

Package with boiler models

Information

This package contains components models for boilers.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Fluid.Boilers.BoilerPolynomial BoilerPolynomial Boiler with efficiency curve described by a polynomial of the temperature
Buildings.Fluid.Boilers.Examples Examples Collection of models that illustrate model use and test models

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

Boiler with efficiency curve described by a polynomial of the temperature

Buildings.Fluid.Boilers.BoilerPolynomial

Information

This is a model of a boiler whose efficiency is described by a polynomial. The heat input into the medium is

Q̇ = y Q̇0 η ⁄ η0

where y ∈ [0, 1] is the control signal, 0 is the nominal power, η is the efficiency at the current operating point, and η0 is the efficiency at y=1 and nominal temperature T=T0 as specified by the parameter T_nominal.

The parameter effCur determines what polynomial is used to compute the efficiency, which is defined as

η = Q̇ ⁄ Q̇f,

where is the heat transferred to the working fluid (typically water or air), and f is the heat of combustion released by the fuel.

The following polynomials can be selected to compute the efficiency:

Parameter effCur Efficiency curve
Buildings.Fluid.Types.EfficiencyCurves.Constant η = a1
Buildings.Fluid.Types.EfficiencyCurves.Polynomial η = a1 + a2 y + a3 y2 + ...
Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear η = a1 + a2 y + a3 y2 + (a4 + a5 y + a6 y2) T

where T is the boiler outlet temperature in Kelvin. For effCur = Buildings.Fluid.Types.EfficiencyCurves.Polynomial, an arbitrary number of polynomial coefficients can be specified.

The parameter Q_flow_nominal is the power transferred to the fluid for y=1 and, if the efficiency depends on temperature, for T=T0.

The fuel mass flow rate and volume flow rate are computed as

f = Q̇f ⁄ hf

and

f = ṁf ⁄ ρf,

where the fuel heating value hf and the fuel mass density ρf are obtained from the parameter fue. Note that if η is the efficiency relative to the lower heating value, then the fuel properties also need to be used for the lower heating value.

Optionally, the port heatPort can be connected to a heat port outside of this model to impose a boundary condition in order to model heat losses to the ambient. When using this heatPort, make sure that the efficiency curve effCur does not already account for this heat loss.

On the Assumptions tag, the model can be parameterized to compute a transient or steady-state response. The transient response of the boiler is computed using a first order differential equation to compute the boiler's water and metal temperature, which are lumped into one state. The boiler outlet temperature is equal to this water temperature.

Extends from Interfaces.TwoPortHeatMassExchanger (Partial model transporting one fluid stream with storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
PowerQ_flow_nominal Nominal heating power [W]
TemperatureT_nominal353.15Temperature used to compute nominal efficiency (only used if efficiency curve depends on temperature) [K]
EfficiencyCurveseffCurBuildings.Fluid.Types.Effici...Curve used to compute the efficiency
Reala[:]{0.9}Coefficients for efficiency curve
Genericfue Fuel type
ThermalConductanceUA0.05*Q_flow_nominal/30Overall UA value [W/K]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure difference [Pa]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Ttrue= true, if actual temperature at port is computed
Flow resistance
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
TimetauVWat*rho_default/m_flow_nomi...Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
VolumeVWat1.5E-6*Q_flow_nominalWater volume of boiler [m3]
MassmDry1.5E-3*Q_flow_nominalMass of boiler that will be lumped to water heat capacity [kg]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input RealInputyPart load ratio
output RealOutputT[K]
HeatPort_aheatPortHeat port, can be used to connect to ambient

Modelica definition

model BoilerPolynomial "Boiler with efficiency curve described by a polynomial of the temperature" extends Interfaces.TwoPortHeatMassExchanger( redeclare final Buildings.Fluid.MixingVolumes.MixingVolume vol, show_T=true, final tau=VWat*rho_default/m_flow_nominal); parameter Modelica.SIunits.Power Q_flow_nominal "Nominal heating power"; parameter Modelica.SIunits.Temperature T_nominal=353.15 "Temperature used to compute nominal efficiency (only used if efficiency curve depends on temperature)"; // Assumptions parameter Buildings.Fluid.Types.EfficiencyCurves effCur=Buildings.Fluid.Types.EfficiencyCurves.Constant "Curve used to compute the efficiency"; parameter Real a[:]={0.9} "Coefficients for efficiency curve"; parameter Buildings.Fluid.Data.Fuels.Generic fue "Fuel type"; parameter Modelica.SIunits.ThermalConductance UA=0.05*Q_flow_nominal/30 "Overall UA value"; parameter Modelica.SIunits.Volume VWat=1.5E-6*Q_flow_nominal "Water volume of boiler"; parameter Modelica.SIunits.Mass mDry=1.5E-3*Q_flow_nominal "Mass of boiler that will be lumped to water heat capacity"; Modelica.SIunits.Efficiency eta=if effCur == Buildings.Fluid.Types.EfficiencyCurves.Constant then a[1] elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.Polynomial then Buildings.Utilities.Math.Functions.polynomial(a=a, x=y) elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then Buildings.Utilities.Math.Functions.quadraticLinear( a=aQuaLin, x1=y, x2=T) else 0 "Boiler efficiency"; Modelica.SIunits.Power QFue_flow=y*Q_flow_nominal/eta_nominal "Heat released by fuel"; Modelica.SIunits.Power QWat_flow=eta*QFue_flow "Heat transfer from gas into water"; Modelica.SIunits.MassFlowRate mFue_flow=QFue_flow/fue.h "Fuel mass flow rate"; Modelica.SIunits.VolumeFlowRate VFue_flow=mFue_flow/fue.d "Fuel volume flow rate"; Modelica.Blocks.Interfaces.RealInput y(min=0, max=1) "Part load ratio"; Modelica.Blocks.Interfaces.RealOutput T( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC", min=0); Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort "Heat port, can be used to connect to ambient"; Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCapDry(C=500*mDry, T(start=T_start)) if not (energyDynamics == Modelica.Fluid.Types.Dynamics.SteadyState) "heat capacity of boiler metal"; protected parameter Real eta_nominal(fixed=false) "Boiler efficiency at nominal condition"; parameter Real aQuaLin[6]=if size(a, 1) == 6 then a else fill(0, 6) "Auxiliary variable for efficiency curve because quadraticLinear requires exactly 6 elements"; Buildings.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo; Modelica.Blocks.Sources.RealExpression Q_flow_in(y=QWat_flow); Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen "Temperature of fluid"; Modelica.Thermal.HeatTransfer.Components.ThermalConductor UAOve(G=UA) "Overall thermal conductance (if heatPort is connected)"; initial equation if effCur == Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then assert(size(a, 1) == 6, "The boiler has the efficiency curve set to 'Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear', and hence the parameter 'a' must have exactly 6 elements. However, only " + String(size(a, 1)) + " elements were provided."); end if; if effCur == Buildings.Fluid.Types.EfficiencyCurves.Constant then eta_nominal = a[1]; elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.Polynomial then eta_nominal = Buildings.Utilities.Math.Functions.polynomial(a=a, x=1); elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then // For this efficiency curve, a must have 6 elements. eta_nominal = Buildings.Utilities.Math.Functions.quadraticLinear( a=aQuaLin, x1=1, x2=T_nominal); else eta_nominal = 999; end if; equation assert(eta > 0.001, "Efficiency curve is wrong."); connect(UAOve.port_b, vol.heatPort); connect(UAOve.port_a, heatPort); connect(heaCapDry.port, vol.heatPort); connect(temSen.T, T); connect(preHeaFlo.port, vol.heatPort); connect(Q_flow_in.y, preHeaFlo.Q_flow); connect(vol.heatPort, temSen.port); end BoilerPolynomial;