modelCHP
Extends from AixLib.Fluid.BoilerCHP.BaseClasses.PartialHeatGenerator (Partial model for heat generators).
Information
Overview
A table based combined heat and power (CHP) model. Depending on the user choice, this model can be both heat and electricity driven.
Concept
When controlled by heat demand, the CHP is controlled either by flow temperature or by return temperature. When electricity control is activated, an electricity profile needs to be connected to the model. During electricity controlled operation, heat controllers act as emergency systems.
A complete On/Off controller is implemented which takes charge of the timing of each turning on and off command. For example it can be set that between each on and off command, the CHP needs 300 seconds (set in parameter SD_delay) to be able to execute the other command. During this time a PI controller controls the temperature continuously.
Minimum possible capacity can be set to prevent the CHP working in lower capacities. If the timing does not allow a shut down at times lower capacities are required, the CHP works on minimum capacity until the shut down is permitted. This can result in the rise of water temperature higher than setpoint and may in some cases result in temperatures higher than boiling point of water.
The dimension of thermal and electrical power outputs and fuel input as well as the electricity profile should be in kW. The dimension of fuel consumption depends on the user's data.
Assumptions
The combustion temperature T_sorce is at the moment set to a constant value of 1748 K. The value is relevant for exergy analysis.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp_nominal (from PartialHeatGenerator) | a*(m_flow_nominal/rho_default)^n | Pressure drop at nominal mass flow rate |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| Advanced › Sensor Properties | |||
| Modelica.Units.SI.Time | tau (from PartialHeatGenerator) | 1 | Time constant of the temperature sensors at nominal flow rate |
| Modelica.Blocks.Types.Init | initType (from PartialHeatGenerator) | Modelica.Blocks.Types.Init.InitialState | Type of initialization (InitialState and InitialOutput are identical) |
| Boolean | transferHeat (from PartialHeatGenerator) | false | If true, temperature T converges towards TAmb when no flow |
| Modelica.Units.SI.Temperature | TAmb (from PartialHeatGenerator) | Medium.T_default | Fixed ambient temperature for heat transfer |
| Modelica.Units.SI.Time | tauHeaTra (from PartialHeatGenerator) | 1200 | Time constant for heat transfer, default 20 minutes |
| Initialization | |||
| Modelica.Units.SI.Temperature | T_start (from PartialHeatGenerator) | Medium.T_default | Initial or guess value of output (= state) |
| Modelica.Units.SI.AbsolutePressure | dp_start (from PartialHeatGenerator) | 0 | Guess value of dp = port_a.p - port_b.p |
| Modelica.Units.SI.MassFlowRate | m_flow_start (from PartialHeatGenerator) | 0 | Guess value of m_flow = port_a.m_flow |
| Modelica.Units.SI.AbsolutePressure | p_start (from PartialHeatGenerator) | Medium.p_default | Start value of pressure |
| Advanced › Pressure drop | |||
| Boolean | from_dp (from PartialHeatGenerator) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | linearized (from PartialHeatGenerator) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM (from PartialHeatGenerator) | 0.3 | Fraction of nominal mass flow rate where transition to turbulent occurs |
| Real | a (from PartialHeatGenerator) | Coefficient of volume flow rate dependent nominal pressure drop, dp_nominal=a*V_flow_nominal^n. | |
| Real | n (from PartialHeatGenerator) | 2 | Exponent of volume flow rate dependent nominal pressure drop, dp_nominal=a*V_flow_nominal^n. |
| Modelica.Units.SI.Density | rho_default (from PartialHeatGenerator) | Medium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default) | Density used for parameterization of pressure curve |
| Dynamics | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from PartialHeatGenerator) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Unit properties | |||
| AixLib.DataBase.CHP.CHPDataSimple.CHPBaseDataDefinition | param | CHP data set | |
| Real | minCapacity | Minimum allowable working capacity in percent | |
| Control system | |||
| Boolean | electricityDriven | false | If the CHP is controlled by electricity demand (external table required) |
| Boolean | TSetIn | true | Input temperature setpoint from outside (Otherwise max temp in database) |
| Boolean | ctrlStrategy | true | True for flow-, false for return- temperature control strategy |
| Modelica.Units.SI.TemperatureDifference | minDeltaT | 10 | Minimum flow and return temperature difference |
| Modelica.Units.SI.TemperatureDifference | TFlowRange | 2 | Range of allowable flow temperature |
| Modelica.Units.SI.Time | delayTime | 3600 | Shutdown/Startup delay |
| Real | Kc | 1 | Gain of the controller |
| Modelica.Units.SI.Time | Tc | 60 | Time Constant (T>0 required) |
| Modelica.Units.SI.Time | delayUnit | 60 | Delay measurement of the controller output |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Blocks.Interfaces.RealInput | TSet | Temperature setpoint | |
| Modelica.Blocks.Interfaces.RealInput | elSet | Electrical power setpoint | |
| Modelica.Blocks.Interfaces.BooleanInput | on | False for shut down | |
| Modelica.Blocks.Interfaces.RealOutput | TSource | Combustion temperature | |
| Modelica.Blocks.Interfaces.RealOutput | electricalPower | Electrical power | |
| Modelica.Blocks.Interfaces.RealOutput | thermalPower | Thermal power | |
| Modelica.Blocks.Interfaces.RealOutput | fuelInput | Fuel input | |
| Modelica.Blocks.Interfaces.RealOutput | fuelConsumption | Fuel consumption |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_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.ThermodynamicState | sta_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 |
| AixLib.Fluid.Sensors.TemperatureTwoPort | senTRet (from PartialHeatGenerator) | Temperature sensor of cold side of heat generator (return) | |
| AixLib.Fluid.Sensors.TemperatureTwoPort | senTSup (from PartialHeatGenerator) | Temperature sensor of hot side of heat generator (supply) | |
| AixLib.Fluid.Sensors.MassFlowRate | senMasFlo (from PartialHeatGenerator) | Sensor for mass flwo rate | |
| Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow | heater (from PartialHeatGenerator) | Prescribed heat flow | |
| AixLib.Fluid.MixingVolumes.MixingVolume | vol (from PartialHeatGenerator) | Fluid volume | |
| AixLib.Fluid.FixedResistances.PressureDrop | preDro (from PartialHeatGenerator) | Pressure drop | |
| BaseClasses.Controllers.DelayedOnOffController | delayedOnOffController | OnOff controller to swicht between the modes | |
| BaseClasses.Controllers.PIController | thControl | Thermal controller | |
| Modelica.Blocks.Math.Min | min | Determines the min value of both PI controllers | |
| Modelica.Blocks.Tables.CombiTable1Ds | combiTable1Ds | Time table to read CHP performance data | |
| Modelica.Blocks.Continuous.LimPID | elControl | Electrical controller | |
| Modelica.Blocks.Sources.Constant | constSetpoint | Constant setpoint if utilized | |
| Modelica.Blocks.Sources.Constant | const | Adds safety value on min capacity | |
| Modelica.Blocks.Logical.Switch | ctrlSwitch | Changes the measured temperature source | |
| Modelica.Blocks.Sources.BooleanConstant | booleanConstant | Determines control strategy | |
| Modelica.Blocks.Math.Gain | gain | Conversion factor | |
| Modelica.Blocks.Sources.Constant | exothermicTemperature | Exothermic temperature |
Revisions
-
December 08, 2016 by Moritz Lauster:
Adapted to AixLib conventions -
October 11, 2016 by Pooyan Jahangiri:
Merged with AixLib -
January 09, 2006 by Peter Matthes:
V0.1: Initial configuration. -
November 28, 2014 by Roozbeh Sangi:
Output for source Temperature added. -
October 7, 2013 by Ole Odendahl:
Formatted documentation appropriately - by Pooyan Jahangiri:
First implementation.