modelHeatPumpCarnot

Substation with a heat pump carnot model

Extends from AixLib.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).

Information

A simple substation model using a fixed return temperature and the actual supply temperature to calculate the mass flow rate drawn from the network. This model uses an open loop design to prescribe the required flow rate. This model includes a heat pump model using the district heating network as its source.

  • Novemver 22, 2019, by Nils Neuland:
    Revised variable names and documentation to follow guidelines.
  • March 4, 2018, by Marcus Fuchs:
    First implementation.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.HeatFlowRateQ_flow_nominalNominal heat flow rate added to medium
Modelica.Units.SI.TemperatureDifferencedTDesignDesign temperature difference for the heat pump on its district heating side
Modelica.Units.SI.TemperatureTReturnFixed return temperature
Modelica.Units.SI.TemperatureDifferencedTBuildingDesign temperature difference for the building's heating system
Modelica.Units.SI.TemperatureTSupplyBuildingFixed supply temperature for the building heating system
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
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
Design parameter
Modelica.Units.SI.Pressuredp_nominal30000Pressure difference at nominal flow rate
Flow resistance
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Modelica.Units.SI.Timetau30Time constant at nominal flow (if energyDynamics <> SteadyState)
Modelica.Fluid.Types.DynamicsenergyDynamicsModelica.Fluid.Types.Dynamics.SteadyStateType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state

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)
Modelica.Blocks.Interfaces.RealInputQ_flow_inputPrescribed heat flow
Modelica.Blocks.Interfaces.RealOutputdpOutOutput signal of pressure difference

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
Sensors.TemperatureTwoPortsenT_supplySupply flow temperature sensor
Sensors.TemperatureTwoPortsenT_returnReturn flow temperature sensor
Modelica.Blocks.Math.AdddeltaTDifferernce of flow and return line temperature in K
Modelica.Blocks.Sources.ConstantdTheaPumTemperature drop over heat pump in K
Modelica.Blocks.Math.Gaingain
Modelica.Blocks.Math.Divisionhea2MasFlo
Sources.MassFlowSource_TsinkSink extracting prescribed flow from the network
Modelica.Blocks.Math.GainchangeSignChanges sign of prescribed flow for extraction from network
Sources.MassFlowSource_TsourceSource sending prescribed flow back to the network
HeatPumps.Carnot_TConheaPum
Modelica.Blocks.Math.AddQ_conDifferernce of heat demand and electric power of heat pump
Sources.MassFlowSource_TsourceHeating
Sources.Boundary_pTsinkHeating
Modelica.Blocks.Math.GainmasFloBuildingChanges sign of prescribed flow for extraction from network
Modelica.Blocks.Sources.ConstanttemperatureSupplyBuildingTemperature of supply line
Modelica.Blocks.Sources.ConstantdeltaTBuildingTemperature difference in building heating system
Modelica.Blocks.Math.AddtemperatureReturnBuildingTemperature returning from building heating system
Modelica.Blocks.Math.GaingainInputOptional gain on the input
Modelica.Blocks.Sources.ConstantminT_returnMinimal return Temperature
Modelica.Blocks.Math.Maxmax

Contents

NameDescription
MediumBuildingMedium in the building heating system