Buildings.DHC.Plants.Cooling.Subsystems.Examples.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the classes in Buildings.DHC.Plants.

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

Package Content

Name Description
Buildings.DHC.Plants.Cooling.Subsystems.Examples.BaseClasses.PartialCoolingTowersSubsystem PartialCoolingTowersSubsystem Partial class for test models of subsystems

Buildings.DHC.Plants.Cooling.Subsystems.Examples.BaseClasses.PartialCoolingTowersSubsystem Buildings.DHC.Plants.Cooling.Subsystems.Examples.BaseClasses.PartialCoolingTowersSubsystem

Partial class for test models of subsystems

Buildings.DHC.Plants.Cooling.Subsystems.Examples.BaseClasses.PartialCoolingTowersSubsystem

Information

Partial model to test cooling tower models that are connected to a weather data reader and a simple fluid loop to which a constant amount of heat is added. The pump in the cooling tower loop is switched on and off depending on the temperature of the control volume to which the heat is added.

Parameters

TypeNameDefaultDescription
PartialTwoPortInterfacetowredeclare Buildings.Fluid.In...Cooling tower
Nominal condition
MassFlowRatem_flow_nominal0.5Design water flow rate [kg/s]

Connectors

TypeNameDescription
BusweaBusWeather data bus

Modelica definition

partial model PartialCoolingTowersSubsystem "Partial class for test models of subsystems" package Medium_W = Buildings.Media.Water "Medium model for water"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.5 "Design water flow rate"; replaceable Buildings.Fluid.Interfaces.PartialTwoPortInterface tow constrainedby Buildings.Fluid.Interfaces.PartialTwoPortInterface( redeclare package Medium = Medium_W, m_flow_nominal=m_flow_nominal, show_T=true) "Cooling tower"; Buildings.Fluid.Movers.FlowControlled_m_flow pum( redeclare package Medium = Medium_W, m_flow_nominal=m_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nominalValuesDefineDefaultPressureCurve=true, use_inputFilter=false) "Pump for condenser water loop"; Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam= Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")); Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; Buildings.Controls.OBC.CDL.Reals.Switch swi "Control switch for chilled water pump"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSwi( k=273.15 + 22, y(unit="K", displayUnit="degC")) "Switch temperature for switching tower pump on"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(k=0) "Zero flow rate"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant m_flow(k=m_flow_nominal) "Water flow rate"; Buildings.Fluid.MixingVolumes.MixingVolume vol(nPorts=3, redeclare package Medium = Medium_W, m_flow_nominal=m_flow_nominal, V=0.5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Fluid.Sources.Boundary_pT exp( redeclare package Medium = Medium_W, nPorts=1) "Expansion vessel"; Modelica.Thermal.HeatTransfer.Sources.FixedHeatFlow fixHeaFlo( Q_flow=0.5*m_flow_nominal*4200*5) "Fixed heat flow rate"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TVol "Water temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort TEnt( redeclare package Medium = Medium_W, m_flow_nominal=m_flow_nominal) "Water entering temperature"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys( final uLow=-1, final uHigh=1) "Pump on-off control"; Buildings.Controls.OBC.CDL.Reals.Subtract sub "Inputs different"; equation connect(weaDat.weaBus, weaBus); connect(zer.y, swi.u3); connect(m_flow.y, swi.u1); connect(vol.ports[1], pum.port_a); connect(fixHeaFlo.port, vol.heatPort); connect(vol.heatPort, TVol.port); connect(tow.port_b, vol.ports[2]); connect(swi.y, pum.m_flow_in); connect(exp.ports[1], vol.ports[3]); connect(pum.port_b, TEnt.port_a); connect(TEnt.port_b, tow.port_a); connect(sub.y, hys.u); connect(TVol.T, sub.u1); connect(TSwi.y, sub.u2); connect(hys.y, swi.u2); end PartialCoolingTowersSubsystem;