Name | Description |
---|---|
BoilerPolynomial | Boiler with efficiency curve described by a polynomial of the temperature |
Examples | Collection of models that illustrate model use and test models |
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.
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.PartialDynamicTwoPortTransformer (Partial model transporting one fluid stream with storing mass or energy).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Power | Q_flow_nominal | Nominal heating power [W] | |
Temperature | T_nominal | 353.15 | Temperature used to compute nominal efficiency (only used if efficiency curve depends on temperature) [K] |
EfficiencyCurves | effCur | Buildings.Fluid.Types.Effici... | Curve used to compute the efficiency |
Real | a[:] | {0.9} | Coefficients for efficiency curve |
TemperatureDifference | dT_nominal | Temperature difference of water loop at nominal load [K] | |
ThermalConductance | UA | 0.05*Q_flow_nominal/30 | Overall UA value [W/K] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Q_flow_nominal/dT_nominal/cp... | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | Pressure [Pa] | |
Time | tau | 0 | Time constant at nominal flow [s] |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Dynamics | energyDynamics | system.energyDynamics | Formulation of energy balance |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance |
Volume | VWat | 1.5E-6*Q_flow_nominal | Water volume of boiler [m3] |
Mass | mDry | 1.5E-3*Q_flow_nominal | Mass of boiler that will be lumped to water heat capacity [kg] |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_V_flow | true | = true, if volume flow rate at inflowing port is computed |
Initialization | |||
AbsolutePressure | p_a_start | system.p_start | Guess value for inlet pressure [Pa] |
AbsolutePressure | p_b_start | p_a_start | Guess value for outlet pressure [Pa] |
AbsolutePressure | p_start | system.p_start | Start value of pressure [Pa] |
Boolean | use_T_start | true | = true, use T_start, otherwise h_start |
Temperature | T_start | if use_T_start then system.T... | Start value of temperature [K] |
SpecificEnthalpy | h_start | if use_T_start then Medium.s... | Start value of specific enthalpy [J/kg] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Flow resistance | |||
Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
input RealInput | y | Part load ratio |
HeatPort_a | heatPort | Heat port, can be used to connect to ambient |
output RealOutput | T | [K] |
model BoilerPolynomial "Boiler with efficiency curve described by a polynomial of the temperature" // For the preDro(m_flow(nominal)), we use a constant specific heat capacity. // Otherwise, the nominal attribute won't be set by Dymola 7.1 because // cp_nominal is a non-literal value. // Since only the order of magnitude should be correct, using a constant // value for cp suffices. extends Interfaces.PartialDynamicTwoPortTransformer( m_flow_nominal=Q_flow_nominal/dT_nominal/cp_nominal, final tau=0, preDro(m_flow(nominal=Q_flow_nominal/dT_nominal/4200)), vol(final V = VWat)); 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 Modelica.SIunits.TemperatureDifference dT_nominal(min=0) "Temperature difference of water loop at nominal load"; 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 if not (energyDynamics == Modelica.Fluid.Types.Dynamics.SteadyState) "Mass of boiler that will be lumped to water heat capacity"; Real eta(min=0) "Boiler efficiency"; Modelica.SIunits.Power QFue_flow "Sensible heat released by fuel"; Modelica.SIunits.Power QWat_flow "Heat transfer from gas into water"; Modelica.Blocks.Interfaces.RealInput y(min=0, max=1) "Part load ratio"; protected Real eta_nominal "Boiler efficiency at nominal condition"; parameter Modelica.SIunits.SpecificHeatCapacity cp_nominal= Medium.specificHeatCapacityCp(sta_nominal) "Specific heat capacity of fluid in boiler"; protected Modelica.Thermal.HeatTransfer.Components.ThermalConductor UAOve(G=UA) "Overall thermal conductance (if heatPort is connected)"; public 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"; Modelica.Blocks.Interfaces.RealOutput T(final quantity="ThermodynamicTemperature", final unit = "K", displayUnit = "degC", min=0); public Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo; Modelica.Blocks.Sources.RealExpression Q_flow_in(y=QWat_flow); equation if effCur ==Buildings.Fluid.Types.EfficiencyCurves.Constant then eta = a[1]; eta_nominal = a[1]; elseif effCur ==Buildings.Fluid.Types.EfficiencyCurves.Polynomial then eta = Buildings.Utilities.Math.Functions.polynomial( a=a, x=y); eta_nominal = Buildings.Utilities.Math.Functions.polynomial( a=a, x=1); elseif effCur ==Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then eta = Buildings.Utilities.Math.Functions.quadraticLinear( a=a, x1=y, x2=T); eta_nominal = Buildings.Utilities.Math.Functions.quadraticLinear( a=a, x1=1, x2=T_nominal); else eta = 0; eta_nominal = 999; end if; assert(eta > 0.001, "Efficiency curve is wrong."); // Heat released by fuel QFue_flow = y * Q_flow_nominal/eta_nominal; // Heat input into water QWat_flow = eta * QFue_flow; 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); end BoilerPolynomial;