Buildings.Obsolete.DistrictHeatingCooling.SubStations.BaseClasses

Package with base classes for substations

Information

This package contains base classes that are used to construct the models in Buildings.Obsolete.DistrictHeatingCooling.SubStations.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Obsolete.DistrictHeatingCooling.SubStations.BaseClasses.HeatingOrCooling HeatingOrCooling Base class for heating or cooling substation

Buildings.Obsolete.DistrictHeatingCooling.SubStations.BaseClasses.HeatingOrCooling Buildings.Obsolete.DistrictHeatingCooling.SubStations.BaseClasses.HeatingOrCooling

Base class for heating or cooling substation

Buildings.Obsolete.DistrictHeatingCooling.SubStations.BaseClasses.HeatingOrCooling

Information

Base class for a heating or cooling substation that draws as much water as needed to maintain the prescribed temperature difference dTHex over the heat exchanger.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Design parameter
Pressuredp_nominal30000Pressure difference at nominal flow rate [Pa]
Assumptions
BooleanallowFlowReversalfalse= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Timetau30Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
output RealOutputPPumElectrical power consumed by pump [W]

Modelica definition

partial model HeatingOrCooling "Base class for heating or cooling substation" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( final m_flow(start=0), final dp(start=0), final allowFlowReversal=false); parameter Modelica.Units.SI.Pressure dp_nominal(displayUnit="Pa") = 30000 "Pressure difference at nominal flow rate"; Modelica.Blocks.Interfaces.RealOutput PPum(unit="W") "Electrical power consumed by pump"; parameter Real deltaM=0.1 "Fraction of nominal flow rate where flow transitions to laminar"; parameter Modelica.Units.SI.Time tau=30 "Time constant at nominal flow (if energyDynamics <> SteadyState)"; parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState "Type of energy balance: dynamic (3 initialization options) or steady state"; protected final parameter Medium.ThermodynamicState sta_default = Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, X=Medium.X_default[1:Medium.nXi]) "Medium state at default properties"; final parameter Modelica.Units.SI.SpecificHeatCapacity cp_default= Medium.specificHeatCapacityCp(sta_default) "Specific heat capacity of the fluid"; Buildings.Fluid.HeatExchangers.HeaterCooler_u hex( redeclare final package Medium = Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final from_dp=false, final linearizeFlowResistance=true, final show_T=false, final Q_flow_nominal=-1, final dp_nominal=dp_nominal, final deltaM=deltaM, final tau=tau, final energyDynamics=energyDynamics) "Component to remove heat from or add heat to fluid"; Buildings.Fluid.Movers.FlowControlled_m_flow pum( redeclare final package Medium = Medium, final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final inputType=Buildings.Fluid.Types.InputType.Continuous, final use_inputFilter=false) "Pump"; Modelica.Blocks.Math.Gain mPum_flow "Mass flow rate"; equation connect(port_a, pum.port_a); connect(pum.port_b,hex. port_a); connect(hex.port_b, port_b); connect(mPum_flow.y, pum.m_flow_in); connect(pum.P, PPum); end HeatingOrCooling;