modelVarTSupplyDpFixedTempDifferenceBypass

Substation with variable supply temperature and fixed dT

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 temperature difference 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.

  • Novemver 22, 2019, by Nils Neuland:
    Revised variable names and documentation to follow guidelines.
  • October 23, 2018, by Tobias Blacha:
    First implementation.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.HeatFlowRateQ_flow_nominalNominal heat flow rate added to medium
Modelica.Units.SI.TemperatureDifferencedTDesignConstant temperature difference for the substation's heat exchanger
Modelica.Units.SI.MassFlowRatem_flo_bypassMinimum bypass flow through substation
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.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
Modelica.Blocks.Sources.ConstantdeltaTFixed temperature difference between supply and return
Modelica.Blocks.Math.AddtemRet
Utilities.Math.SmoothMaxsmoothMax
Modelica.Blocks.Sources.RealExpressionm_flo_min
Utilities.Logical.SmoothSwitchswitch1
Modelica.Blocks.Logical.LessEqualThresholdlessEqualThreshold
MixingVolumes.MixingVolumevol