modelThermalElectricalFollowing

CHP model that can be thermal or electrical load following

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

Information

This model for combined heat and power device uses empirical data contained within a "performance map" to represent device-specific performance characteristics coupled with thermally massive elements to characterize the device's dynamic thermal performance. It was developed based on the specification described in Beausoleil-Morrison (2007).

Model applicability

The model is primarily intended to predict the energy performance of combustion-based cogeneration devices, such as internal combustion engine and Stirling engine units. However, the general model specification makes it applicable to any device simultaneously producing heat and power from which heat is recovered as hot water, as long as recalibration is undertaken. Fuel cell based micro-cogeneration technology is outside of the modeling scope.

The parameters required to define the governing equations can be determined from bench testing with only non intrusive measurements (e.g. fuel flow rate, cooling water flow rates and temperature, electrical production). The ability to reuse and recalibrate the component models or sub-models ensures that they are applicable to future generations of cogeneration devices.

Model topology

Three control volumes are used to model the cogeneration unit dynamic thermal characteristics.

  • The energy conversion control volume represents the engine working fluid, combustion gases and engine alternator. It feeds information from the engine unit performance map into the thermal model, see Buildings.Fluid.CHPs.BaseClasses.EnergyConversion.
  • The thermal mass control volume represents the aggregated thermal capacitance associated with the engine block and the majority of the heat exchanger shells, see Buildings.Fluid.CHPs.BaseClasses.EngineTemperature.
  • The cooling water control volume represents the cooling water flowing through the device and the elements of the heat exchanger in immediate thermal contact.


Control_Volumes.png

Depending on the current mode, control signals and plant boundary conditions, the CHP unit switches between six possible operating modes: off mode, stand-by mode, pump-on mode, warm-up mode, normal operation mode, cool-down mode. The mode switch control is implemented in Buildings.Fluid.CHPs.BaseClasses.Controller.

References

Beausoleil-Morrison, Ian and Kelly, Nick, 2007. Specifications for modelling fuel cell and combustion-based residential cogeneration device within whole-building simulation programs, Section III. [Report]

Parameters

TypeNameDefaultDescription
BooleanhomotopyInitialization (from TwoPortHeatMassExchanger)true= true, use homotopy method
Buildings.Fluid.CHPs.Data.GenericperCHP unit performance data
BooleanswitchThermalElectricalFollowingtrueSet to true for switching between thermal and electrical following, to false for electrical following only
Modelica.Units.SI.TemperatureTEngIniMedium.T_defaultInitial engine temperature
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominal (from PartialTwoPortInterface)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedp_nominal (from TwoPortFlowResistanceParameters)Pressure difference
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed
Flow resistance
BooleancomputeFlowResistance (from TwoPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp (from TwoPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
Realn (from TwoPortFlowResistanceParameters)2Flow exponent, n=1 for laminar, n=2 for turbulent
BooleanlinearizeFlowResistance (from TwoPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM (from TwoPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics › Nominal condition
Modelica.Units.SI.Timetau (from TwoPortHeatMassExchanger)30Time constant at nominal flow (if energyDynamics <> SteadyState)
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from TwoPortHeatMassExchanger)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Initialization
Medium.AbsolutePressurep_start (from TwoPortHeatMassExchanger)Medium.p_defaultStart value of pressure
Medium.TemperatureT_start (from TwoPortHeatMassExchanger)Medium.T_defaultStart value of temperature
Medium.MassFraction[Medium.nX]X_start (from TwoPortHeatMassExchanger)Medium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_start (from TwoPortHeatMassExchanger)fill(0, Medium.nC)Start value of trace substances
Dynamics
Modelica.Units.SI.TimewaitTime60Wait time before transition from pump-on mode fires
Cooling water outlet temperature controller
Controls.OBC.CDL.Types.SimpleControllerwatOutConBuildings.Controls.OBC.CDL.Types.SimpleController.PIType of controller
Realk1Gain of controller
Modelica.Units.SI.TimeTi0.5Time constant of integrator block
Modelica.Units.SI.TimeTd0.1Time constant of derivative block

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)
Buildings.Controls.OBC.CDL.Interfaces.RealInputTWatOutSetWater outlet set point temperature, which is input signal for thermal following
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputtheFolEnable thermal following, false if electrical following
Buildings.Controls.OBC.CDL.Interfaces.RealInputPEleDemElectric power demand
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputavaSigTrue when the plant is available
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aTRooHeat port for room temperature
Buildings.Controls.OBC.CDL.Interfaces.RealOutputmWatSet_flowWater mass flow rate set point based on internal control
Buildings.Controls.OBC.CDL.Interfaces.RealOutputPConPower consumption during stand-by and cool-down modes
Buildings.Controls.OBC.CDL.Interfaces.RealOutputPEleNetElectric power generation
Buildings.Controls.OBC.CDL.Interfaces.RealOutputmFue_flowFuel mass flow rate
Buildings.Controls.OBC.CDL.Interfaces.RealOutputQWat_flowHeat transfer rate to the water control volume

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicStatesta_b (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow))Medium properties in port_b
Buildings.Fluid.MixingVolumes.MixingVolumevol (from TwoPortHeatMassExchanger)
Buildings.Fluid.FixedResistances.PressureDroppreDro (from TwoPortHeatMassExchanger)Flow resistance
Buildings.Fluid.CHPs.BaseClasses.EnergyConversioneneConEnergy conversion
Buildings.Fluid.CHPs.BaseClasses.EngineTemperatureengEngine control volume
Buildings.Fluid.CHPs.BaseClasses.ControlleropeModCurrent operation mode
Buildings.Controls.OBC.CDL.Logical.AndrunSigRun if avaFlag and PEleDem non zero
Buildings.Controls.OBC.CDL.Reals.HysteresishysDetermine if demand larger than zero
Buildings.Fluid.CHPs.BaseClasses.FilterPowerfilPower after applied constraints
Buildings.Fluid.CHPs.BaseClasses.WaterFlowControlconWatInternal controller for water mass flow rate
Modelica.Blocks.Sources.RealExpressionmWat_flowWater mass flow rate
Modelica.Blocks.Sources.RealExpressionTWatInWater inlet temperature
Buildings.Fluid.CHPs.BaseClasses.AssertWaterTemperatureassWatTemAssert if water temperature is outside boundaries
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorTWatOutWater outlet temperature
Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensorwatHeaHeat transfer from the water control volume
Buildings.Fluid.CHPs.BaseClasses.PowerConsumptionpowConPower consumption during stand-by and cool-down modes
Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensorQLosHeat transfer to the surrounding
Buildings.Controls.OBC.CDL.Reals.PIDWithResetcooWatConCooling water outlet controller
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameterelePowDemElectric power demand if thermal following
Buildings.Controls.OBC.CDL.Reals.SwitchswiSwitch between thermal and electrical following
Buildings.Controls.OBC.CDL.Logical.Sources.ConstantoptFolFeed false to switch block if no optional following
Buildings.Controls.OBC.CDL.Reals.Sources.Constantzer1Constant zero
Buildings.Controls.OBC.CDL.Reals.MultiplyByParametergaiHeat transfer to the water control volume
Modelica.StateGraph.StateGraphRootstateGraphRoot
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorTRooSenRoom temperature

Revisions

  • April 30, 2021, by Michael Wetter:
    Reformulated replaceable class to avoid access of components that are not in the constraining type.
    This is for issue #2471.
  • April 8, 2020, by Antoine Gautier:
    Refactored implementation.
  • February 14, 2020, by Jianjun Hu:
    Added documentation.
  • June 1, 2019, by Tea Zakula:
    First implementation.