Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses

Package with base classes for Buildings.Applications.DataCenters.ChillerCooled

Information

This package contains base classes that are used to construct the models in Buildings.Applications.DataCenters.ChillerCooled.

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

Package Content

Name Description
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.AHUParameters AHUParameters Essential parameters for air handling unit
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE PartialChillerWSE Partial model for chiller and WSE package
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSEInterface PartialChillerWSEInterface Partial model that defines the interface for chiller and WSE package
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface PartialControllerInterface Partial interface model for waterside economizer temperature controller
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialCoolingCoilHumidifyingHeating PartialCoolingCoilHumidifyingHeating Partial AHU model
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialHeatExchanger PartialHeatExchanger Partial model for heat exchangers
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialIntegratedPrimary PartialIntegratedPrimary Integrated water-side economizer for primary-only chilled water system
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialOperationSequenceInterface PartialOperationSequenceInterface Partial interface for operation sequence
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialParallelElectricEIR PartialParallelElectricEIR Partial model for electric chiller parallel
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel PartialPlantParallel Partial source plant model with associated valves
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallelInterface PartialPlantParallelInterface Partial model that implements the interface for parallel plants
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPumpParallel PartialPumpParallel Partial model for pump parallel
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilter SignalFilter Partial model that implements the filtered opening for valves and dampers
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters ThreeWayValveParameters Model with parameters for a three-way valve
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ValvesParameters ValvesParameters Model with parameters for multiple valves
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.FourPortResistanceChillerWSE FourPortResistanceChillerWSE Flow resistance model for the chiller and WSE package
Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters SignalFilterParameters Record that contains the parameters of the filtered opening for multiple valves and dampers

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.AHUParameters

Essential parameters for air handling unit

Information

This block declares parameters that are required by most classes in the package Buildings.Applications.DataCenters.ChillerCooled.Equipment.

Parameters

TypeNameDefaultDescription
Cooling coil
ThermalConductanceUA_nominal Thermal conductance at nominal flow for sensible heat, used to compute time constant [W/K]
Realr_nominal2/3Ratio between air-side and water-side convective heat transfer coefficient
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Modelica definition

partial model AHUParameters "Essential parameters for air handling unit" parameter Modelica.Units.SI.ThermalConductance UA_nominal "Thermal conductance at nominal flow for sensible heat, used to compute time constant"; parameter Real r_nominal=2/3 "Ratio between air-side and water-side convective heat transfer coefficient"; parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; end AHUParameters;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE

Partial model for chiller and WSE package

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE

Information

Partial model that can be extended to different configurations inclduing chillers and integrated/non-integrated water-side economizers.

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSEInterface (Partial model that defines the interface for chiller and WSE package), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.FourPortResistanceChillerWSE (Flow resistance model for the chiller and WSE package), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface (Partial interface model for waterside economizer temperature controller), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ValvesParameters (Model with parameters for multiple valves), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters (Record that contains the parameters of the filtered opening for multiple valves and dampers), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters (Model with parameters for a three-way valve).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
IntegernumnumChi + 1Total number of chillers and waterside economizer
Booleanuse_controllertrueSet to ture if the built-in controller is enabled to maintain the outlet temperature on the load side of a heat exchanger
IntegernumVal4Number of valves
IntegernumFil1Number of filters
Booleanactivate_ThrWayValuse_controllerActivate the use of three-way valve: True-use three-way valve; False-not use the three-way valve
Chiller
MassFlowRatem1_flow_chi_nominal Nominal mass flow rate on the medium 1 side in the chiller [kg/s]
MassFlowRatem2_flow_chi_nominal Nominal mass flow rate on the medium 2 side in the chiller [kg/s]
PressureDifferencedp1_chi_nominal Pressure difference on medium 1 side in the chillers [Pa]
PressureDifferencedp2_chi_nominal Pressure difference on medium 2 side in the chillers [Pa]
IntegernumChi Number of chillers
GenericperChi[numChi]redeclare parameter Building...Performance data for chillers
Waterside economizer
MassFlowRatem1_flow_wse_nominal Nominal mass flow rate on the medium 1 side in the waterside economizer [kg/s]
MassFlowRatem2_flow_wse_nominal Nominal mass flow rate on the medium 2 side in the waterside economizer [kg/s]
PressureDifferencedp1_wse_nominal Pressure difference on medium 1 side in the waterside economizer [Pa]
PressureDifferencedp2_wse_nominal Pressure difference on medium 2 side in the waterside economizer [Pa]
Efficiencyeta0.8Heat exchange effectiveness [1]
Two-way valve
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv[numVal] Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv[numVal] Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv[numVal] Av (metric) flow coefficient [m2]
MassFlowRatem_flow_nominal[numVal] Nominal mass flow rate [kg/s]
PressureDifferencedpValve_nominal[numVal]fill(6000, numVal)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
ReallValChi[2]{0.0001,0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
ReallValWSE[2]{0.0001,0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
Pressure-flow linearization
RealdeltaMdeltaM1Fraction of nominal flow rate where linearization starts, if y=1
Three-way Valve
PressureDifferencedpThrWayVal_nominal6000Nominal pressure drop of fully open valve [Pa]
RealfraK_ThrWayVal0.7Fraction Kv(port_3→port_2)/Kv(port_1→port_2)for the three-way valve
Reall_ThrWayVal[2]{0.0001,0.0001}Bypass valve leakage, l=Kv(y=0)/Kv(y=1)
RealR50Rangeability, R=50...100 typically for the three-way valve
Realdelta00.01Range of significant deviation from equal percentage law for the three-way valve
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_chi_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_chi_nominal)Small mass flow rate for regularization of zero flow [kg/s]
PortFlowDirectionportFlowDirection_1Modelica.Fluid.Types.PortFlo...Flow direction for port_1 in the three-way valve
PortFlowDirectionportFlowDirection_2Modelica.Fluid.Types.PortFlo...Flow direction for port_2 in the three-way valve
PortFlowDirectionportFlowDirection_3Modelica.Fluid.Types.PortFlo...Flow direction for port_3 in the three-way valve
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Two-way valve
DensityrhoStd[numVal] Inlet density for which valve coefficients are defined [kg/m3]
Flow resistance
Medium 1
BooleancomputeFlowResistance1true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
BooleancomputeFlowResistance2true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Controller
SimpleControllercontrollerTypeModelica.Blocks.Types.Simple...Type of controller
Realk1Gain of controller [1]
TimeTi0.5Time constant of integrator block [s]
TimeTd0.1Time constant of derivative block [s]
RealyMax1Upper limit of output
RealyMin0Lower limit of output
Realwp1Set-point weight for Proportional block (0..1)
Realwd0Set-point weight for Derivative block (0..1)
RealNi0.9Ni*Ti is time constant of anti-windup compensation
RealNd10The higher Nd, the more ideal the derivative block
BooleanreverseActingfalseSet to true for throttling the water flow rate through a cooling coil controller
Initialization
InitinitTypeModelica.Blocks.Types.Init.I...Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realxi_start0Initial or guess value value for integrator output (= integrator state)
Realxd_start0Initial or guess value for state of derivative block
RealyCon_start0Initial value of output from the controller
Integrator reset
ResetresetBuildings.Types.Reset.DisabledType of controller output reset
Realy_resetxi_startValue to which the controller output is reset if the boolean trigger has a rising edge, used if reset == Buildings.Types.Reset.Parameter
Dynamics
Filtered opening
Booleanuse_inputFilterfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTimeValve30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValve_start[numFil]{yValWSE_start}Initial value of output:0-closed, 1-fully opened
RealyValChi_start[numChi]fill(0, numChi)Initial value of output from on/off valves in chillers
RealyValWSE_start0Initial value of output from on/off valve in WSE
RealyThrWayValWSE_start0Initial value of output from three-way bypass valve in WSE
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Chiller
TimetauChi130Time constant at nominal flow in chillers [s]
TimetauChi230Time constant at nominal flow in chillers [s]
Waterside economizer
TimetauWSE10Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve [s]
Temperature Sensor
TimetauSenT1Time constant at nominal flow rate (use tau=0 for steady-state sensor, but see user guide for potential problems) [s]
InitinitTSenorModelica.Blocks.Types.Init.I...Type of initialization of the temperature sensor (InitialState and InitialOutput are identical)
Initialization
Medium 1
AbsolutePressurep1_startMedium1.p_defaultStart value of pressure [Pa]
TemperatureT1_startMedium1.T_defaultStart value of temperature [K]
MassFractionX1_start[Medium1.nX]Medium1.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC1_start[Medium1.nC]fill(0, Medium1.nC)Start value of trace substances
ExtraPropertyC1_nominal[Medium1.nC]fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurep2_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT2_startMedium2.T_defaultStart value of temperature [K]
MassFractionX2_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC2_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC2_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input RealInputTSetSet point for leaving water temperature [K]
input BooleanInputon[num]Set to true to enable equipment, or false to disable equipment
input BooleanInputtriggerResets the controller output when trigger becomes true
input RealInputy_reset_inInput signal for state to which integrator is reset, enabled if reset = Buildings.Types.Reset.Input
output RealOutputTCHWSupWSEChilled water supply temperature in the waterside economizer [K]
output RealOutputpowChi[numChi]Electric power consumed by chiller compressor [W]

Modelica definition

partial model PartialChillerWSE "Partial model for chiller and WSE package" extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSEInterface (final num=numChi+1); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.FourPortResistanceChillerWSE (final computeFlowResistance1=true, final computeFlowResistance2=true); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface (final reverseActing=false); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ValvesParameters (numVal=4, final deltaM=deltaM1); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters (final numFil=1, final yValve_start={yValWSE_start}); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters (final activate_ThrWayVal=use_controller); constant Boolean homotopyInitialization = true "= true, use homotopy method"; //Chiller parameter Integer numChi(min=1) "Number of chillers"; replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic perChi[numChi] "Performance data for chillers"; parameter Real[2] lValChi(each min=1e-10, each max=1) = {0.0001,0.0001} "Valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Real[numChi] yValChi_start=fill(0,numChi) "Initial value of output from on/off valves in chillers"; //WSE parameter Modelica.Units.SI.Efficiency eta( min=0, max=1) = 0.8 "Heat exchange effectiveness"; parameter Real[2] lValWSE(each min=1e-10, each max=1) = {0.0001,0.0001} "Valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Real yValWSE_start=0 "Initial value of output from on/off valve in WSE"; parameter Real yThrWayValWSE_start=0 "Initial value of output from three-way bypass valve in WSE"; // Dynamics parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; parameter Modelica.Units.SI.Time tauChi1=30 "Time constant at nominal flow in chillers"; parameter Modelica.Units.SI.Time tauChi2=30 "Time constant at nominal flow in chillers"; parameter Modelica.Units.SI.Time tauWSE=10 "Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve"; // Initialization parameter Medium1.AbsolutePressure p1_start = Medium1.p_default "Start value of pressure"; parameter Medium1.Temperature T1_start = Medium1.T_default "Start value of temperature"; parameter Medium1.MassFraction X1_start[Medium1.nX] = Medium1.X_default "Start value of mass fractions m_i/m"; parameter Medium1.ExtraProperty C1_start[Medium1.nC]( final quantity=Medium1.extraPropertiesNames)=fill(0, Medium1.nC) "Start value of trace substances"; parameter Medium1.ExtraProperty C1_nominal[Medium1.nC]( final quantity=Medium1.extraPropertiesNames) = fill(1E-2, Medium1.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; parameter Medium2.AbsolutePressure p2_start = Medium2.p_default "Start value of pressure"; parameter Medium2.Temperature T2_start = Medium2.T_default "Start value of temperature"; parameter Medium2.MassFraction X2_start[Medium2.nX] = Medium2.X_default "Start value of mass fractions m_i/m"; parameter Medium2.ExtraProperty C2_start[Medium2.nC]( final quantity=Medium2.extraPropertiesNames)=fill(0, Medium2.nC) "Start value of trace substances"; parameter Medium2.ExtraProperty C2_nominal[Medium2.nC]( final quantity=Medium2.extraPropertiesNames) = fill(1E-2, Medium2.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; // Temperature sensor parameter Modelica.Units.SI.Time tauSenT=1 "Time constant at nominal flow rate (use tau=0 for steady-state sensor, but see user guide for potential problems)"; parameter Modelica.Blocks.Types.Init initTSenor = Modelica.Blocks.Types.Init.InitialState "Type of initialization of the temperature sensor (InitialState and InitialOutput are identical)"; Modelica.Blocks.Interfaces.RealOutput TCHWSupWSE( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC", min=200, start=T2_start) "Chilled water supply temperature in the waterside economizer"; Modelica.Blocks.Interfaces.RealOutput powChi[numChi]( each final quantity="Power", each final unit="W") "Electric power consumed by chiller compressor"; Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel chiPar( redeclare final replaceable package Medium1 = Medium1, redeclare final replaceable package Medium2 = Medium2, final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, final allowFlowReversal1=allowFlowReversal1, final allowFlowReversal2=allowFlowReversal2, final m1_flow_small=m1_flow_small, final m2_flow_small=m2_flow_small, final show_T=show_T, final from_dp1=from_dp1, final linearizeFlowResistance1=linearizeFlowResistance1, final deltaM1=deltaM1, final from_dp2=from_dp2, final linearizeFlowResistance2=linearizeFlowResistance2, final deltaM2=deltaM2, final num=numChi, final per=perChi, final homotopyInitialization=homotopyInitialization, final use_inputFilter=use_inputFilter, final riseTimeValve=riseTimeValve, final initValve=initValve, final m1_flow_nominal=m1_flow_chi_nominal, final m2_flow_nominal=m2_flow_chi_nominal, final dp1_nominal=dp1_chi_nominal, final tau1=tauChi1, final tau2=tauChi2, final energyDynamics=energyDynamics, final p1_start=p1_start, final T1_start=T1_start, final X1_start=X1_start, final C1_start=C1_start, final C1_nominal=C1_nominal, final p2_start=p2_start, final T2_start=T2_start, final X2_start=X2_start, final C2_start=C2_start, final C2_nominal=C2_nominal, final l=lValChi, final dp2_nominal=dp2_chi_nominal, final dpValve_nominal=dpValve_nominal[1:2], final rhoStd=rhoStd[1:2], final yValve_start=yValChi_start) "Chillers with identical nominal parameters but different performance curves"; Buildings.Applications.DataCenters.ChillerCooled.Equipment.WatersideEconomizer wse( redeclare final replaceable package Medium1 = Medium1, redeclare final replaceable package Medium2 = Medium2, final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, final allowFlowReversal1=allowFlowReversal1, final allowFlowReversal2=allowFlowReversal2, final m1_flow_nominal=m1_flow_wse_nominal, final m2_flow_nominal=m2_flow_wse_nominal, final m1_flow_small=m1_flow_small, final m2_flow_small=m2_flow_small, final from_dp1=from_dp1, final dp1_nominal=dp1_wse_nominal, final linearizeFlowResistance1=linearizeFlowResistance1, final deltaM1=deltaM1, final from_dp2=from_dp2, final dp2_nominal=dp2_wse_nominal, final linearizeFlowResistance2=linearizeFlowResistance2, final deltaM2=deltaM2, final homotopyInitialization=homotopyInitialization, final l=lValWSE, final use_inputFilter=use_inputFilter, final riseTimeValve=riseTimeValve, final initValve=initValve, final energyDynamics=energyDynamics, final p_start=p2_start, final T_start=T2_start, final X_start=X2_start, final C_start=C2_start, final C_nominal=C2_nominal, final controllerType=controllerType, final k=k, final Ti=Ti, final Td=Td, final yMax=yMax, final yMin=yMin, final wp=wp, final wd=wd, final Ni=Ni, final Nd=Nd, final initType=initType, final xi_start=xi_start, final xd_start=xd_start, final yCon_start=yCon_start, final reset=reset, final y_reset=y_reset, final eta=eta, final fraK_ThrWayVal=fraK_ThrWayVal, final l_ThrWayVal=l_ThrWayVal, final R=R, final delta0=delta0, final dpValve_nominal=dpValve_nominal[3:4], final rhoStd=rhoStd[3:4], final yThrWayVal_start=yThrWayValWSE_start, final yValWSE_start=yValWSE_start, final tauThrWayVal=tauWSE, final use_controller=use_controller, final reverseActing=reverseActing, final show_T=show_T, final portFlowDirection_1=portFlowDirection_1, final portFlowDirection_2=portFlowDirection_2, final portFlowDirection_3=portFlowDirection_3) "Waterside economizer"; Buildings.Fluid.Sensors.TemperatureTwoPort senTem( redeclare final replaceable package Medium = Medium2, final m_flow_nominal=m2_flow_wse_nominal, final tau=tauSenT, final initType=initTSenor, final T_start=T2_start, final allowFlowReversal=allowFlowReversal2, final m_flow_small=m2_flow_small) "Temperature sensor"; Fluid.FixedResistances.Junction spl1( redeclare package Medium = Medium1, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal={numChi*m1_flow_chi_nominal,-m1_flow_wse_nominal,-numChi* m1_flow_chi_nominal}, dp_nominal={0,0,0}) "Splitter"; Fluid.FixedResistances.Junction jun1( redeclare package Medium = Medium1, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal={numChi*m1_flow_chi_nominal,-numChi*m1_flow_chi_nominal, m1_flow_wse_nominal}, dp_nominal={0,0,0}) "Junction"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation for i in 1:numChi loop connect(chiPar.on[i], on[i]); end for; connect(on[numChi+1], wse.on[1]); connect(chiPar.TSet, TSet); connect(TSet, wse.TSet); connect(y_reset_in, wse.y_reset_in); connect(trigger, wse.trigger); connect(senTem.T,TCHWSupWSE); connect(wse.port_b2, senTem.port_a); connect(chiPar.P, powChi); connect(port_a1, spl1.port_1); connect(spl1.port_3, chiPar.port_a1); connect(spl1.port_2, wse.port_a1); connect(port_b1, jun1.port_2); connect(jun1.port_3, wse.port_b1); connect(chiPar.port_b1, jun1.port_1); end PartialChillerWSE;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSEInterface Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSEInterface

Partial model that defines the interface for chiller and WSE package

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSEInterface

Information

This model implements an interface for chillers and integrated/nonitegrated water-side economizers.

Extends from Buildings.Fluid.Interfaces.PartialFourPort (Partial model with four ports).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Integernum2Total number of chillers and waterside economizer
Chiller
MassFlowRatem1_flow_chi_nominal Nominal mass flow rate on the medium 1 side in the chiller [kg/s]
MassFlowRatem2_flow_chi_nominal Nominal mass flow rate on the medium 2 side in the chiller [kg/s]
Waterside economizer
MassFlowRatem1_flow_wse_nominal Nominal mass flow rate on the medium 1 side in the waterside economizer [kg/s]
MassFlowRatem2_flow_wse_nominal Nominal mass flow rate on the medium 2 side in the waterside economizer [kg/s]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_chi_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_chi_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input RealInputTSetSet point for leaving water temperature [K]
input BooleanInputon[num]Set to true to enable equipment, or false to disable equipment

Modelica definition

partial model PartialChillerWSEInterface "Partial model that defines the interface for chiller and WSE package" extends Buildings.Fluid.Interfaces.PartialFourPort; // Nominal conditions parameter Modelica.Units.SI.MassFlowRate m1_flow_chi_nominal(min=0) "Nominal mass flow rate on the medium 1 side in the chiller"; parameter Modelica.Units.SI.MassFlowRate m2_flow_chi_nominal(min=0) "Nominal mass flow rate on the medium 2 side in the chiller"; parameter Modelica.Units.SI.MassFlowRate m1_flow_wse_nominal(min=0) "Nominal mass flow rate on the medium 1 side in the waterside economizer"; parameter Modelica.Units.SI.MassFlowRate m2_flow_wse_nominal(min=0) "Nominal mass flow rate on the medium 2 side in the waterside economizer"; // Advanced parameter Medium1.MassFlowRate m1_flow_small(min=0) = 1E-4*abs(m1_flow_chi_nominal) "Small mass flow rate for regularization of zero flow"; parameter Medium2.MassFlowRate m2_flow_small(min=0) = 1E-4*abs(m2_flow_chi_nominal) "Small mass flow rate for regularization of zero flow"; // Diagnostics parameter Boolean show_T = false "= true, if actual temperature at port is computed"; parameter Integer num(min=1)=2 "Total number of chillers and waterside economizer"; Modelica.Blocks.Interfaces.RealInput TSet( final unit="K", final quantity="ThermodynamicTemperature", displayUnit="degC") "Set point for leaving water temperature"; Modelica.Blocks.Interfaces.BooleanInput on[num] "Set to true to enable equipment, or false to disable equipment"; Medium1.MassFlowRate m1_flow = port_a1.m_flow "Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction)"; Modelica.Units.SI.PressureDifference dp1(displayUnit="Pa") = port_a1.p - port_b1.p "Pressure difference between port_a1 and port_b1"; Medium2.MassFlowRate m2_flow = port_a2.m_flow "Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction)"; Modelica.Units.SI.PressureDifference dp2(displayUnit="Pa") = port_a2.p - port_b2.p "Pressure difference between port_a2 and port_b2"; Medium1.ThermodynamicState sta_a1= Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) if show_T "Medium properties in port_a1"; Medium1.ThermodynamicState sta_b1= Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) if show_T "Medium properties in port_b1"; Medium2.ThermodynamicState sta_a2= Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) if show_T "Medium properties in port_a2"; Medium2.ThermodynamicState sta_b2= Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) if show_T "Medium properties in port_b2"; protected Medium1.ThermodynamicState state_a1_inflow= Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow), inStream(port_a1.Xi_outflow)) "state for medium inflowing through port_a1"; Medium1.ThermodynamicState state_b1_inflow= Medium1.setState_phX(port_b1.p, inStream(port_b1.h_outflow), inStream(port_b1.Xi_outflow)) "state for medium inflowing through port_b1"; Medium2.ThermodynamicState state_a2_inflow= Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow), inStream(port_a2.Xi_outflow)) "state for medium inflowing through port_a2"; Medium2.ThermodynamicState state_b2_inflow= Medium2.setState_phX(port_b2.p, inStream(port_b2.h_outflow), inStream(port_b2.Xi_outflow)) "state for medium inflowing through port_b2"; end PartialChillerWSEInterface;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface

Partial interface model for waterside economizer temperature controller

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface

Information

This module implements a PID controller interface.

Parameters

TypeNameDefaultDescription
Booleanuse_controllertrueSet to ture if the built-in controller is enabled to maintain the outlet temperature on the load side of a heat exchanger
Controller
SimpleControllercontrollerTypeModelica.Blocks.Types.Simple...Type of controller
Realk1Gain of controller [1]
TimeTi0.5Time constant of integrator block [s]
TimeTd0.1Time constant of derivative block [s]
RealyMax1Upper limit of output
RealyMin0Lower limit of output
Realwp1Set-point weight for Proportional block (0..1)
Realwd0Set-point weight for Derivative block (0..1)
RealNi0.9Ni*Ti is time constant of anti-windup compensation
RealNd10The higher Nd, the more ideal the derivative block
BooleanreverseActingfalseSet to true for throttling the water flow rate through a cooling coil controller
Initialization
InitinitTypeModelica.Blocks.Types.Init.I...Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realxi_start0Initial or guess value value for integrator output (= integrator state)
Realxd_start0Initial or guess value for state of derivative block
RealyCon_start0Initial value of output from the controller
Integrator reset
ResetresetBuildings.Types.Reset.DisabledType of controller output reset
Realy_resetxi_startValue to which the controller output is reset if the boolean trigger has a rising edge, used if reset == Buildings.Types.Reset.Parameter

Connectors

TypeNameDescription
input BooleanInputtriggerResets the controller output when trigger becomes true
input RealInputy_reset_inInput signal for state to which integrator is reset, enabled if reset = Buildings.Types.Reset.Input

Modelica definition

partial model PartialControllerInterface "Partial interface model for waterside economizer temperature controller" parameter Boolean use_controller=true "Set to ture if the built-in controller is enabled to maintain the outlet temperature on the load side of a heat exchanger"; // Controller parameter Modelica.Blocks.Types.SimpleController controllerType= Modelica.Blocks.Types.SimpleController.PID "Type of controller"; parameter Real k(min=0, unit="1") = 1 "Gain of controller"; parameter Modelica.Units.SI.Time Ti(min=Modelica.Constants.small) = 0.5 "Time constant of integrator block"; parameter Modelica.Units.SI.Time Td(min=0) = 0.1 "Time constant of derivative block"; parameter Real yMax(start=1)=1 "Upper limit of output"; parameter Real yMin=0 "Lower limit of output"; parameter Real wp(min=0) = 1 "Set-point weight for Proportional block (0..1)"; parameter Real wd(min=0) = 0 "Set-point weight for Derivative block (0..1)"; parameter Real Ni(min=100*Modelica.Constants.eps) = 0.9 "Ni*Ti is time constant of anti-windup compensation"; parameter Real Nd(min=100*Modelica.Constants.eps) = 10 "The higher Nd, the more ideal the derivative block"; parameter Modelica.Blocks.Types.Init initType=Modelica.Blocks.Types.Init.InitialState "Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)"; parameter Real xi_start=0 "Initial or guess value value for integrator output (= integrator state)"; parameter Real xd_start=0 "Initial or guess value for state of derivative block"; parameter Real yCon_start=0 "Initial value of output from the controller"; parameter Boolean reverseActing=false "Set to true for throttling the water flow rate through a cooling coil controller"; parameter Buildings.Types.Reset reset = Buildings.Types.Reset.Disabled "Type of controller output reset"; parameter Real y_reset=xi_start "Value to which the controller output is reset if the boolean trigger has a rising edge, used if reset == Buildings.Types.Reset.Parameter"; Modelica.Blocks.Interfaces.BooleanInput trigger if reset <> Buildings.Types.Reset.Disabled "Resets the controller output when trigger becomes true"; Modelica.Blocks.Interfaces.RealInput y_reset_in if reset == Buildings.Types.Reset.Input "Input signal for state to which integrator is reset, enabled if reset = Buildings.Types.Reset.Input"; end PartialControllerInterface;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialCoolingCoilHumidifyingHeating Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialCoolingCoilHumidifyingHeating

Partial AHU model

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialCoolingCoilHumidifyingHeating

Information

This model describes a partial air handling unit model, which contains a water-side valve, a cooling coil and a fan model.

The valve and fan are partial models, and should be redeclared when used in the air handling unit model.

Extends from Buildings.Fluid.Interfaces.PartialFourPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.AHUParameters (Essential parameters for air handling unit), Buildings.Fluid.Actuators.BaseClasses.ValveParameters (Model with parameters for valves), Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters (Parameters for flow resistance for models with four ports).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
GenericperFanredeclare parameter Building...Performance data for the fan
PartialFlowMachinefanredeclare Buildings.Fluid.Mo...Fan
PartialTwoWayValveKvwatValredeclare Buildings.Fluid.Ac...Two-way valve
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem_flow_nominalm1_flow_nominalNominal mass flow rate [kg/s]
PressureDifferencedpValve_nominal Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Cooling coil
ThermalConductanceUA_nominal Thermal conductance at nominal flow for sensible heat, used to compute time constant [W/K]
Realr_nominal2/3Ratio between air-side and water-side convective heat transfer coefficient
Flow Coefficient
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv Av (metric) flow coefficient [m2]
Pressure-flow linearization
RealdeltaMdeltaM2Fraction of nominal flow rate where linearization starts, if y=1
Valve
Reall0.0001Valve leakage, l=Kv(y=0)/Kv(y=1)
Fan
InputTypeinputTypeBuildings.Fluid.Types.InputT...Control input type
BooleanaddPowerToMediumtrueSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Ttrue= true, if actual temperature at port is computed
Nominal condition
DensityrhoStdMedium1.density_pTX(101325, ...Inlet density for which valve coefficients are defined [kg/m3]
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Valve
Booleanuse_inputFilterValvefalse= true, if opening is filtered with a 2nd order CriticalDamping filter for the water-side valve
TimeriseTimeValve120Rise time of the filter for the water-side valve (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValve_start1Initial value of output
Fan
TimetauFan1Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
Booleanuse_inputFilterFantrue= true, if speed is filtered with a 2nd order CriticalDamping filter
TimeriseTimeFan30Rise time of the filter (time to reach 99.6 % of the speed) [s]
InitinitFanModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyFan_start0Initial value of speed [1]
Flow resistance
Medium 1
BooleancomputeFlowResistance1true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
BooleancomputeFlowResistance2true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Initialization
AbsolutePressurep_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium2.T_defaultStart value of temperature [K]
MassFractionX_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input RealInputuValActuator position (0: closed, 1: open) on water side [1]
input RealInputuFanContinuous input signal for the fan
output RealOutputPFanElectrical power consumed by the fan [W]
output RealOutputyValActual valve position [1]
input IntegerInputstageStage input signal for the pressure head

Modelica definition

partial model PartialCoolingCoilHumidifyingHeating "Partial AHU model " extends Buildings.Fluid.Interfaces.PartialFourPortInterface( final show_T=true); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.AHUParameters; extends Buildings.Fluid.Actuators.BaseClasses.ValveParameters( final m_flow_nominal=m1_flow_nominal, final rhoStd=Medium1.density_pTX(101325, 273.15+4, Medium1.X_default), final deltaM = deltaM2); extends Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters( final computeFlowResistance1=true, final computeFlowResistance2=true); constant Boolean homotopyInitialization = true "= true, use homotopy method"; // Initialization of the fan parameter Medium2.AbsolutePressure p_start = Medium2.p_default "Start value of pressure"; parameter Medium2.Temperature T_start=Medium2.T_default "Start value of temperature"; parameter Medium2.MassFraction X_start[Medium2.nX]( quantity=Medium2.substanceNames) = Medium2.X_default "Start value of mass fractions m_i/m"; parameter Medium2.ExtraProperty C_start[Medium2.nC]( quantity=Medium2.extraPropertiesNames)=fill(0, Medium2.nC) "Start value of trace substances"; parameter Medium2.ExtraProperty C_nominal[Medium2.nC]( quantity=Medium2.extraPropertiesNames) = fill(1E-2, Medium2.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; // valve parameters parameter Real l(min=1e-10, max=1) = 0.0001 "Valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Boolean use_inputFilterValve=false "= true, if opening is filtered with a 2nd order CriticalDamping filter for the water-side valve"; parameter Modelica.Units.SI.Time riseTimeValve=120 "Rise time of the filter for the water-side valve (time to reach 99.6 % of an opening step)"; parameter Modelica.Blocks.Types.Init initValve=Modelica.Blocks.Types.Init.InitialOutput "Type of initialization (no init/steady state/initial state/initial output)"; parameter Real yValve_start=1 "Initial value of output"; // fan parameters parameter Buildings.Fluid.Types.InputType inputType = Buildings.Fluid.Types.InputType.Continuous "Control input type"; parameter Boolean addPowerToMedium=true "Set to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)"; parameter Modelica.Units.SI.Time tauFan=1 "Time constant at nominal flow (if energyDynamics <> SteadyState)"; parameter Boolean use_inputFilterFan=true "= true, if speed is filtered with a 2nd order CriticalDamping filter"; parameter Modelica.Units.SI.Time riseTimeFan=30 "Rise time of the filter (time to reach 99.6 % of the speed)"; parameter Modelica.Blocks.Types.Init initFan=Modelica.Blocks.Types.Init.InitialOutput "Type of initialization (no init/steady state/initial state/initial output)"; parameter Real yFan_start(min=0, max=1, unit="1")=0 "Initial value of speed"; replaceable parameter Buildings.Fluid.Movers.Data.Generic perFan "Performance data for the fan"; Modelica.Blocks.Interfaces.RealInput uVal(min=0,max=1,unit="1") "Actuator position (0: closed, 1: open) on water side"; Modelica.Blocks.Interfaces.RealInput uFan if not inputType == Buildings.Fluid.Types.InputType.Stages "Continuous input signal for the fan"; Modelica.Blocks.Interfaces.RealOutput PFan( final quantity="Power", final unit="W") "Electrical power consumed by the fan"; Modelica.Blocks.Interfaces.RealOutput yVal( min=0, max=1, final unit="1") "Actual valve position"; Modelica.Blocks.Interfaces.IntegerInput stage if inputType == Buildings.Fluid.Types.InputType.Stages "Stage input signal for the pressure head"; Fluid.HeatExchangers.WetCoilEffectivenessNTU cooCoi( redeclare final package Medium1 = Medium1, redeclare final package Medium2 = Medium2, final UA_nominal=UA_nominal, final r_nominal=r_nominal, final allowFlowReversal1=allowFlowReversal1, final allowFlowReversal2=allowFlowReversal2, final show_T=show_T, final m1_flow_small=m1_flow_small, final m2_flow_small=m2_flow_small, final energyDynamics=energyDynamics, final m1_flow_nominal=m1_flow_nominal, final m2_flow_nominal=m2_flow_nominal, final dp1_nominal=0, final dp2_nominal=dp2_nominal) "Cooling coil"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine fan constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( redeclare final package Medium = Medium2, final per=perFan, final allowFlowReversal=allowFlowReversal2, final show_T=show_T, final energyDynamics=energyDynamics, final inputType=inputType, final tau=tauFan, final addPowerToMedium=addPowerToMedium, final use_inputFilter=use_inputFilterFan, final riseTime=riseTimeFan, final init=initFan, final p_start=p_start, final T_start=T_start, final X_start=X_start, final C_start=C_start, final C_nominal=C_nominal, final m_flow_small=m2_flow_small) "Fan"; replaceable Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValveKv watVal constrainedby Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValveKv( redeclare final package Medium = Medium1, final allowFlowReversal=allowFlowReversal1, final show_T=show_T, final l=l, final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, final from_dp=from_dp1, final homotopyInitialization=homotopyInitialization, final linearized=linearizeFlowResistance1, final rhoStd=rhoStd, final use_inputFilter=use_inputFilterValve, final riseTime=riseTimeValve, final init=initValve, final y_start=yValve_start, final dpValve_nominal=dpValve_nominal, final m_flow_nominal=m_flow_nominal, final deltaM=deltaM1, final dpFixed_nominal=dp1_nominal) "Two-way valve"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation connect(port_a1, cooCoi.port_a1); connect(cooCoi.port_a2, port_a2); connect(cooCoi.port_b1, watVal.port_a); connect(watVal.port_b, port_b1); connect(fan.P, PFan); connect(watVal.y, uVal); connect(port_b2, fan.port_b); connect(fan.stage, stage); connect(yVal, watVal.y_actual); end PartialCoolingCoilHumidifyingHeating;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialHeatExchanger Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialHeatExchanger

Partial model for heat exchangers

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialHeatExchanger

Information

This module simulates a heat exchanger with a three-way bypass used to modulate water flow rate.

Extends from Buildings.Fluid.Interfaces.PartialFourPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters (Parameters for flow resistance for models with four ports), Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters (Model with parameters for a three-way valve).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
replaceable package MediumPartialMediumMedium in the component
Booleanactivate_ThrWayVal Activate the use of three-way valve: True-use three-way valve; False-not use the three-way valve
Efficiencyeta constant effectiveness [1]
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Three-way Valve
PressureDifferencedpThrWayVal_nominal6000Nominal pressure drop of fully open valve [Pa]
RealfraK_ThrWayVal0.7Fraction Kv(port_3&rarr;port_2)/Kv(port_1&rarr;port_2)for the three-way valve
Reall_ThrWayVal[2]{0.0001,0.0001}Bypass valve leakage, l=Kv(y=0)/Kv(y=1)
RealR50Rangeability, R=50...100 typically for the three-way valve
Realdelta00.01Range of significant deviation from equal percentage law for the three-way valve
PressureDifferencedpValve_nominal6000Nominal pressure drop of fully open valve [Pa]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
PortFlowDirectionportFlowDirection_1Modelica.Fluid.Types.PortFlo...Flow direction for port_1 in the three-way valve
PortFlowDirectionportFlowDirection_2Modelica.Fluid.Types.PortFlo...Flow direction for port_2 in the three-way valve
PortFlowDirectionportFlowDirection_3Modelica.Fluid.Types.PortFlo...Flow direction for port_3 in the three-way valve
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Dynamics
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state
Nominal condition
DensityrhoStdMedium2.density_pTX(101325, ...Inlet density for which valve coefficients are defined [kg/m3]
Flow resistance
Medium 1
BooleancomputeFlowResistance1(dp1_nominal > Modelica.Cons...=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
BooleancomputeFlowResistance2(dp2_nominal > Modelica.Cons...=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
RealmSenFac1Factor for scaling the sensible thermal mass of the volume
Filtered opening
Booleanuse_inputFiltertrue= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTime30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyThrWayVal_start1Initial value of output from the filter in the bypass valve
Nominal condition
TimetauThrWayVal10Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve [s]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
replaceable package MediumMedium in the component

Modelica definition

partial model PartialHeatExchanger "Partial model for heat exchangers " extends Buildings.Fluid.Interfaces.PartialFourPortInterface; extends Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters( final computeFlowResistance1=(dp1_nominal > Modelica.Constants.eps), final computeFlowResistance2=(dp2_nominal > Modelica.Constants.eps)); extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations( final massDynamics=energyDynamics, final mSenFac=1, redeclare final package Medium=Medium2); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters; constant Boolean homotopyInitialization = true "= true, use homotopy method"; parameter Modelica.Units.SI.Efficiency eta( min=0, max=1, start=0.8) "constant effectiveness"; // Filter opening parameter Boolean use_inputFilter=true "= true, if opening is filtered with a 2nd order CriticalDamping filter"; parameter Modelica.Units.SI.Time riseTime=30 "Rise time of the filter (time to reach 99.6 % of an opening step)"; parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput "Type of initialization (no init/steady state/initial state/initial output)"; parameter Real yThrWayVal_start=1 "Initial value of output from the filter in the bypass valve"; parameter Modelica.Units.SI.PressureDifference dpValve_nominal( displayUnit="Pa", min=0, fixed=true) = 6000 "Nominal pressure drop of fully open valve"; // Time constant parameter Modelica.Units.SI.Time tauThrWayVal=10 "Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve"; // Advanced parameter Modelica.Units.SI.Density rhoStd=Medium2.density_pTX( 101325, 273.15 + 4, Medium2.X_default) "Inlet density for which valve coefficients are defined"; Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear thrWayVal( redeclare package Medium = Medium2, final from_dp=from_dp2, final linearized={linearizeFlowResistance2,linearizeFlowResistance2}, final rhoStd=rhoStd, final homotopyInitialization=homotopyInitialization, final use_inputFilter=use_inputFilter, final riseTime=riseTime, final init=init, final R=R, final delta0=delta0, final fraK=fraK_ThrWayVal, final dpFixed_nominal={dp2_nominal,0}, final energyDynamics=energyDynamics, final p_start=p_start, final T_start=T_start, final C_start=C_start, final C_nominal=C_nominal, final X_start=X_start, final y_start=yThrWayVal_start, final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, final l=l_ThrWayVal, final dpValve_nominal=dpValve_nominal, final deltaM=deltaM2, final m_flow_nominal=m2_flow_nominal, final portFlowDirection_1=portFlowDirection_1, final portFlowDirection_2=portFlowDirection_2, final portFlowDirection_3=portFlowDirection_3, final tau=tauThrWayVal) if activate_ThrWayVal "Three-way valve used to control the outlet temperature "; Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, final allowFlowReversal1=allowFlowReversal1, final allowFlowReversal2=allowFlowReversal2, final m1_flow_nominal=m1_flow_nominal, final m2_flow_nominal=m2_flow_nominal, final m1_flow_small=m1_flow_small, final m2_flow_small=m2_flow_small, final show_T=show_T, final from_dp1=from_dp1, final dp1_nominal=dp1_nominal, final linearizeFlowResistance1=linearizeFlowResistance1, final deltaM1=deltaM1, final from_dp2=from_dp2, final linearizeFlowResistance2=linearizeFlowResistance2, final deltaM2=deltaM2, final eps=eta, final homotopyInitialization=homotopyInitialization, final dp2_nominal=if activate_ThrWayVal then 0 else dp2_nominal) "Heat exchanger"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation connect(port_a1, hex.port_a1); connect(hex.port_b1, port_b1); connect(hex.port_a2, port_a2); if activate_ThrWayVal then connect(hex.port_b2, thrWayVal.port_1); connect(port_a2, thrWayVal.port_3); connect(thrWayVal.port_2, port_b2); else connect(port_b2, hex.port_b2); end if; end PartialHeatExchanger;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialIntegratedPrimary Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialIntegratedPrimary

Integrated water-side economizer for primary-only chilled water system

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialIntegratedPrimary

Information

Partial model that implements integrated waterside economizer in primary-ony chilled water system.

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE (Partial model for chiller and WSE package).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Booleanuse_controllertrueSet to ture if the built-in controller is enabled to maintain the outlet temperature on the load side of a heat exchanger
IntegernumVal6Number of valves
Chiller
MassFlowRatem1_flow_chi_nominal Nominal mass flow rate on the medium 1 side in the chiller [kg/s]
MassFlowRatem2_flow_chi_nominal Nominal mass flow rate on the medium 2 side in the chiller [kg/s]
PressureDifferencedp1_chi_nominal Pressure difference on medium 1 side in the chillers [Pa]
PressureDifferencedp2_chi_nominal Pressure difference on medium 2 side in the chillers [Pa]
IntegernumChi Number of chillers
GenericperChi[numChi]redeclare parameter Building...Performance data for chillers
Waterside economizer
MassFlowRatem1_flow_wse_nominal Nominal mass flow rate on the medium 1 side in the waterside economizer [kg/s]
MassFlowRatem2_flow_wse_nominal Nominal mass flow rate on the medium 2 side in the waterside economizer [kg/s]
PressureDifferencedp1_wse_nominal Pressure difference on medium 1 side in the waterside economizer [Pa]
PressureDifferencedp2_wse_nominal Pressure difference on medium 2 side in the waterside economizer [Pa]
Efficiencyeta0.8Heat exchange effectiveness [1]
Two-way valve
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv[numVal] Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv[numVal] Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv[numVal] Av (metric) flow coefficient [m2]
MassFlowRatem_flow_nominal[numVal] Nominal mass flow rate [kg/s]
PressureDifferencedpValve_nominal[numVal]fill(6000, numVal)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
ReallValChi[2]{0.0001,0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
ReallValWSE[2]{0.0001,0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
ReallVal50.0001Valve leakage, l=Kv(y=0)/Kv(y=1)
ReallVal60.0001Valve leakage, l=Kv(y=0)/Kv(y=1)
Three-way Valve
PressureDifferencedpThrWayVal_nominal6000Nominal pressure drop of fully open valve [Pa]
RealfraK_ThrWayVal0.7Fraction Kv(port_3&rarr;port_2)/Kv(port_1&rarr;port_2)for the three-way valve
Reall_ThrWayVal[2]{0.0001,0.0001}Bypass valve leakage, l=Kv(y=0)/Kv(y=1)
RealR50Rangeability, R=50...100 typically for the three-way valve
Realdelta00.01Range of significant deviation from equal percentage law for the three-way valve
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_chi_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_chi_nominal)Small mass flow rate for regularization of zero flow [kg/s]
PortFlowDirectionportFlowDirection_1Modelica.Fluid.Types.PortFlo...Flow direction for port_1 in the three-way valve
PortFlowDirectionportFlowDirection_2Modelica.Fluid.Types.PortFlo...Flow direction for port_2 in the three-way valve
PortFlowDirectionportFlowDirection_3Modelica.Fluid.Types.PortFlo...Flow direction for port_3 in the three-way valve
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Two-way valve
DensityrhoStd[numVal] Inlet density for which valve coefficients are defined [kg/m3]
Flow resistance
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Controller
SimpleControllercontrollerTypeModelica.Blocks.Types.Simple...Type of controller
Realk1Gain of controller [1]
TimeTi0.5Time constant of integrator block [s]
TimeTd0.1Time constant of derivative block [s]
RealyMax1Upper limit of output
RealyMin0Lower limit of output
Realwp1Set-point weight for Proportional block (0..1)
Realwd0Set-point weight for Derivative block (0..1)
RealNi0.9Ni*Ti is time constant of anti-windup compensation
RealNd10The higher Nd, the more ideal the derivative block
Initialization
InitinitTypeModelica.Blocks.Types.Init.I...Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realxi_start0Initial or guess value value for integrator output (= integrator state)
Realxd_start0Initial or guess value for state of derivative block
RealyCon_start0Initial value of output from the controller
Integrator reset
ResetresetBuildings.Types.Reset.DisabledType of controller output reset
Realy_resetxi_startValue to which the controller output is reset if the boolean trigger has a rising edge, used if reset == Buildings.Types.Reset.Parameter
Dynamics
Filtered opening
Booleanuse_inputFilterfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTimeValve30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValChi_start[numChi]fill(0, numChi)Initial value of output from on/off valves in chillers
RealyValWSE_start0Initial value of output from on/off valve in WSE
RealyThrWayValWSE_start0Initial value of output from three-way bypass valve in WSE
RealyVal5_start0Initial value of output:0-closed, 1-fully opened
RealyVal6_start1 - yVal5_startInitial value of output:0-closed, 1-fully opened
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Chiller
TimetauChi130Time constant at nominal flow in chillers [s]
TimetauChi230Time constant at nominal flow in chillers [s]
Waterside economizer
TimetauWSE10Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve [s]
Temperature Sensor
TimetauSenT1Time constant at nominal flow rate (use tau=0 for steady-state sensor, but see user guide for potential problems) [s]
InitinitTSenorModelica.Blocks.Types.Init.I...Type of initialization of the temperature sensor (InitialState and InitialOutput are identical)
Initialization
Medium 1
AbsolutePressurep1_startMedium1.p_defaultStart value of pressure [Pa]
TemperatureT1_startMedium1.T_defaultStart value of temperature [K]
MassFractionX1_start[Medium1.nX]Medium1.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC1_start[Medium1.nC]fill(0, Medium1.nC)Start value of trace substances
ExtraPropertyC1_nominal[Medium1.nC]fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurep2_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT2_startMedium2.T_defaultStart value of temperature [K]
MassFractionX2_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC2_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC2_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input RealInputTSetSet point for leaving water temperature [K]
input BooleanInputon[num]Set to true to enable equipment, or false to disable equipment
input BooleanInputtriggerResets the controller output when trigger becomes true
input RealInputy_reset_inInput signal for state to which integrator is reset, enabled if reset = Buildings.Types.Reset.Input
output RealOutputTCHWSupWSEChilled water supply temperature in the waterside economizer [K]
output RealOutputpowChi[numChi]Electric power consumed by chiller compressor [W]
input RealInputyVal6Actuator position for valve 6 (0: closed, 1: open) [1]
input RealInputyVal5Actuator position for valve 5(0: closed, 1: open) [1]

Modelica definition

model PartialIntegratedPrimary "Integrated water-side economizer for primary-only chilled water system" extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE ( final numVal=6); //Parameters for the valve used in free cooling mode parameter Real lVal5(min=1e-10,max=1) = 0.0001 "Valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Real lVal6(min=1e-10,max=1) = 0.0001 "Valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Real yVal5_start(min=0,max=1) = 0 "Initial value of output:0-closed, 1-fully opened"; parameter Real yVal6_start(min=0,max=1) = 1-yVal5_start "Initial value of output:0-closed, 1-fully opened"; Modelica.Blocks.Interfaces.RealInput yVal6( final unit = "1", min=0, max=1) "Actuator position for valve 6 (0: closed, 1: open)"; Modelica.Blocks.Interfaces.RealInput yVal5( final unit= "1", min=0, max=1) "Actuator position for valve 5(0: closed, 1: open)"; Buildings.Fluid.Actuators.Valves.TwoWayLinear val5( redeclare final package Medium = Medium2, final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, final allowFlowReversal=allowFlowReversal2, final m_flow_nominal=numChi*m2_flow_chi_nominal, final show_T=show_T, final from_dp=from_dp2, final homotopyInitialization=homotopyInitialization, final linearized=linearizeFlowResistance2, final deltaM=deltaM2, final use_inputFilter=use_inputFilter, final riseTime=riseTimeValve, final init=initValve, final dpFixed_nominal=0, final dpValve_nominal=dpValve_nominal[5], final l=lVal5, final rhoStd=rhoStd[5], final y_start=yVal5_start) "Bypass valve: closed when fully mechanic cooling is activated; open when fully mechanic cooling is activated"; Buildings.Fluid.Actuators.Valves.TwoWayLinear val6( redeclare final package Medium = Medium2, final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, final m_flow_nominal=m2_flow_wse_nominal, final allowFlowReversal=allowFlowReversal2, final show_T=show_T, final from_dp=from_dp2, final homotopyInitialization=homotopyInitialization, final linearized=linearizeFlowResistance2, final deltaM=deltaM2, final use_inputFilter=use_inputFilter, final riseTime=riseTimeValve, final init=initValve, final dpFixed_nominal=0, final dpValve_nominal=dpValve_nominal[6], final l=lVal6, final rhoStd=rhoStd[6], final y_start=yVal6_start) "Bypass valve: closed when free cooling mode is deactivated; open when free cooling is activated"; Fluid.FixedResistances.Junction spl2( redeclare package Medium = Medium2, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal={numChi*m2_flow_chi_nominal,-numChi*m2_flow_chi_nominal, -m2_flow_wse_nominal}, dp_nominal={0,0,0}) "Splitter"; Fluid.FixedResistances.Junction jun2( redeclare package Medium = Medium2, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal={m2_flow_wse_nominal,-numChi*m2_flow_chi_nominal,numChi* m2_flow_chi_nominal}, dp_nominal={0,0,0}) "Junction"; equation connect(val5.y, yVal5); connect(yVal6, val6.y); connect(port_a2, spl2.port_1); connect(spl2.port_3, wse.port_a2); connect(spl2.port_2, val5.port_a); connect(val6.port_b, jun2.port_1); connect(jun2.port_2, port_b2); connect(chiPar.port_b2, jun2.port_3); end PartialIntegratedPrimary;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialOperationSequenceInterface

Partial interface for operation sequence

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialOperationSequenceInterface

Information

Partial model that transforms the valve signal.

Modelica definition

partial model PartialOperationSequenceInterface "Partial interface for operation sequence " Modelica.Blocks.Math.BooleanToReal booToRea( final realTrue=1, final realFalse=0) "Boolean to real (if true then 1 else 0)"; Modelica.Blocks.Math.Feedback inv "Inversion of the control signal"; protected Modelica.Blocks.Sources.Constant uni(final k=1) "Unitary signal"; equation connect(uni.y, inv.u1); connect(booToRea.y, inv.u2); end PartialOperationSequenceInterface;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialParallelElectricEIR Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialParallelElectricEIR

Partial model for electric chiller parallel

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialParallelElectricEIR

Information

Partial model that implements parallel electric chillers with associated valves. The model has num identical chillers.

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel (Partial source plant model with associated valves).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Integernum2Number of equipment
PartialElectricchi[num]redeclare Buildings.Fluid.Ch...Chillers with identical nominal parameters but different performance curves
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Two-way valve
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv[numVal] Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv[numVal] Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv[numVal] Av (metric) flow coefficient [m2]
PressureDifferencedpValve_nominal[numVal]fill(6000, numVal)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
Reall[2]{0.0001,0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Two-way valve
DensityrhoStd[numVal]{Medium1.density_pTX(101325,...Inlet density for which valve coefficients are defined [kg/m3]
Flow resistance
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Filtered opening
Booleanuse_inputFilterfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTimeValve30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValve_start[numFil]fill(1, numFil)Initial value of output:0-closed, 1-fully opened
Nominal condition
Timetau130Time constant at nominal flow in chillers [s]
Timetau230Time constant at nominal flow in chillers [s]
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Initialization
Medium 1
AbsolutePressurep1_startMedium1.p_defaultStart value of pressure [Pa]
TemperatureT1_startMedium1.T_defaultStart value of temperature [K]
MassFractionX1_start[Medium1.nX]Medium1.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC1_start[Medium1.nC]fill(0, Medium1.nC)Start value of trace substances
ExtraPropertyC1_nominal[Medium1.nC]fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurep2_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT2_startMedium2.T_defaultStart value of temperature [K]
MassFractionX2_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC2_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC2_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input BooleanInputon[num]Set to true to enable equipment, or false to disable equipment
input RealInputTSetSet point for leaving water temperature [K]
output RealOutputP[num]Electric power consumed by chiller compressor [W]

Modelica definition

partial model PartialParallelElectricEIR "Partial model for electric chiller parallel" extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel ( val2(each final dpFixed_nominal=dp2_nominal), val1(each final dpFixed_nominal=dp1_nominal)); parameter Modelica.Units.SI.Time tau1=30 "Time constant at nominal flow in chillers"; parameter Modelica.Units.SI.Time tau2=30 "Time constant at nominal flow in chillers"; // Assumptions parameter Modelica.Fluid.Types.Dynamics energyDynamics= Modelica.Fluid.Types.Dynamics.FixedInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; // Initialization parameter Medium1.AbsolutePressure p1_start = Medium1.p_default "Start value of pressure"; parameter Medium1.Temperature T1_start = Medium1.T_default "Start value of temperature"; parameter Medium1.MassFraction X1_start[Medium1.nX] = Medium1.X_default "Start value of mass fractions m_i/m"; parameter Medium1.ExtraProperty C1_start[Medium1.nC]( final quantity=Medium1.extraPropertiesNames)=fill(0, Medium1.nC) "Start value of trace substances"; parameter Medium1.ExtraProperty C1_nominal[Medium1.nC]( final quantity=Medium1.extraPropertiesNames) = fill(1E-2, Medium1.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; parameter Medium2.AbsolutePressure p2_start = Medium2.p_default "Start value of pressure"; parameter Medium2.Temperature T2_start = Medium2.T_default "Start value of temperature"; parameter Medium2.MassFraction X2_start[Medium2.nX] = Medium2.X_default "Start value of mass fractions m_i/m"; parameter Medium2.ExtraProperty C2_start[Medium2.nC]( final quantity=Medium2.extraPropertiesNames)=fill(0, Medium2.nC) "Start value of trace substances"; parameter Medium2.ExtraProperty C2_nominal[Medium2.nC]( final quantity=Medium2.extraPropertiesNames) = fill(1E-2, Medium2.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; Modelica.Blocks.Interfaces.BooleanInput on[num] "Set to true to enable compressor, or false to disable compressor"; Modelica.Blocks.Interfaces.RealInput TSet( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Set point for leaving water temperature"; Modelica.Blocks.Interfaces.RealOutput P[num]( each final quantity="Power", each final unit="W") "Electric power consumed by chiller compressor"; replaceable Buildings.Fluid.Chillers.BaseClasses.PartialElectric chi[num] constrainedby Buildings.Fluid.Chillers.BaseClasses.PartialElectric( redeclare each final package Medium1 = Medium1, redeclare each final package Medium2 = Medium2, each final allowFlowReversal1=allowFlowReversal1, each final allowFlowReversal2=allowFlowReversal2, each final show_T=show_T, each final from_dp1=from_dp1, each final dp1_nominal=0, each final linearizeFlowResistance1=linearizeFlowResistance1, each final deltaM1=deltaM1, each final from_dp2=from_dp2, each final dp2_nominal=0, each final linearizeFlowResistance2=linearizeFlowResistance2, each final deltaM2=deltaM2, each final homotopyInitialization=homotopyInitialization, each final m1_flow_nominal=m1_flow_nominal, each final m2_flow_nominal=m2_flow_nominal, each final m1_flow_small=m1_flow_small, each final m2_flow_small=m2_flow_small, each final tau1=tau1, each final tau2=tau2, each final energyDynamics=energyDynamics, each final p1_start=p1_start, each final T1_start=T1_start, each final X1_start=X1_start, each final C1_start=C1_start, each final C1_nominal=C1_nominal, each final p2_start=p2_start, each final T2_start=T2_start, each final X2_start=X2_start, each final C2_start=C2_start, each final C2_nominal=C2_nominal) "Chillers with identical nominal parameters but different performance curves"; equation for i in 1:num loop connect(TSet, chi[i].TSet); connect(chi[i].port_a1, port_a1); connect(chi[i].port_a2, port_a2); end for; connect(chi.port_b2, val2.port_a); connect(chi.port_b1, val1.port_a); connect(on, chi.on); connect(chi.P, P); end PartialParallelElectricEIR;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel

Partial source plant model with associated valves

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel

Information

Partial model that can be extended to construct parallel chillers such as Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel and water-side economizers Buildings.Applications.DataCenters.ChillerCooled.Equipment.WatersideEconomizer.

The associated valve group val1 and val2 on medium 1 and medium 2 side are for on/off use only. The number of valves in each group is specified by the parameter n. The valve parameters can be specified differently.

The signal filter is used to smoothe the on/off signal for the valves.

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallelInterface (Partial model that implements the interface for parallel plants), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ValvesParameters (Model with parameters for multiple valves), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilter (Partial model that implements the filtered opening for valves and dampers).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Integernum2Number of equipment
IntegernumVal2Number of valves
IntegernumFilnumNumber of filters
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Two-way valve
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv[numVal] Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv[numVal] Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv[numVal] Av (metric) flow coefficient [m2]
MassFlowRatem_flow_nominal[numVal]{m1_flow_nominal,m2_flow_nom...Nominal mass flow rate [kg/s]
PressureDifferencedpValve_nominal[numVal]fill(6000, numVal)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
Reall[2]{0.0001,0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
Pressure-flow linearization
RealdeltaMdeltaM1Fraction of nominal flow rate where linearization starts, if y=1
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Two-way valve
DensityrhoStd[numVal]{Medium1.density_pTX(101325,...Inlet density for which valve coefficients are defined [kg/m3]
Flow resistance
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Filtered opening
Booleanuse_inputFilterfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTimeValve30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValve_start[numFil]fill(1, numFil)Initial value of output:0-closed, 1-fully opened

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input BooleanInputon[num]Set to true to enable equipment, or false to disable equipment

Modelica definition

partial model PartialPlantParallel "Partial source plant model with associated valves" extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallelInterface; extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ValvesParameters ( final numVal = 2, final m_flow_nominal = {m1_flow_nominal,m2_flow_nominal}, rhoStd = {Medium1.density_pTX(101325, 273.15+4, Medium1.X_default), Medium2.density_pTX(101325, 273.15+4, Medium2.X_default)}, final deltaM=deltaM1); extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilter ( final numFil=num); constant Boolean homotopyInitialization = true "= true, use homotopy method"; // Isolation valve parameters parameter Real l[2](each min=1e-10, each max=1) = {0.0001,0.0001} "Valve leakage, l=Kv(y=0)/Kv(y=1)"; Buildings.Fluid.Actuators.Valves.TwoWayLinear val2[num]( redeclare each replaceable package Medium = Medium2, each final allowFlowReversal=allowFlowReversal2, each final m_flow_nominal=m2_flow_nominal, each dpFixed_nominal=dp2_nominal, each final show_T=show_T, each final homotopyInitialization=homotopyInitialization, each final riseTime=riseTimeValve, each final init=initValve, each final use_inputFilter=false, each final deltaM=deltaM2, each final l=l[2], final y_start=yValve_start, each final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, each final from_dp=from_dp2, each final linearized=linearizeFlowResistance2, each final rhoStd=rhoStd[2], each final dpValve_nominal=dpValve_nominal[2]) "Isolation valves on medium 2 side for on/off use"; Buildings.Fluid.Actuators.Valves.TwoWayLinear val1[num]( redeclare each replaceable package Medium = Medium1, each final allowFlowReversal=allowFlowReversal1, each final m_flow_nominal=m1_flow_nominal, each dpFixed_nominal=dp1_nominal, each final show_T=show_T, each final homotopyInitialization=homotopyInitialization, each final use_inputFilter=false, each final riseTime=riseTimeValve, each final init=initValve, final y_start=yValve_start, each final deltaM=deltaM1, each final l=l[1], each final dpValve_nominal=dpValve_nominal[1], each final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, each final from_dp=from_dp1, each final linearized=linearizeFlowResistance1, each final rhoStd=rhoStd[1]) "Isolation valves on medium 1 side for on/off use"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation for i in 1:num loop connect(val1[i].port_b, port_b1); connect(val2[i].port_b, port_b2); end for; if use_inputFilter then connect(booToRea.y, filter.u); else connect(booToRea.y, y_actual); end if; connect(on, booToRea.u); connect(y_actual, val1.y); connect(y_actual, val2.y); end PartialPlantParallel;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallelInterface Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallelInterface

Partial model that implements the interface for parallel plants

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallelInterface

Information

This model implements the interface for the parallel plants in the Buildings.Applications.DataCenters.ChillerCooled package. The parallel plants contain num identical plants that share the same temperature setpoint at port_b2. These plants can be operated individually by specifying different on/off signals.

Extends from Buildings.Fluid.Interfaces.PartialFourPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters (Parameters for flow resistance for models with four ports).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Integernum2Number of equipment
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_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
Medium 1
BooleancomputeFlowResistance1true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
BooleancomputeFlowResistance2true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input BooleanInputon[num]Set to true to enable equipment, or false to disable equipment

Modelica definition

partial model PartialPlantParallelInterface "Partial model that implements the interface for parallel plants" extends Buildings.Fluid.Interfaces.PartialFourPortInterface; extends Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters( final computeFlowResistance1=true, final computeFlowResistance2=true); parameter Integer num(min=1)=2 "Number of equipment"; Modelica.Blocks.Math.BooleanToReal booToRea[num]( each final realTrue=1, each final realFalse=0) "Boolean to real (if true then 1 else 0)"; Modelica.Blocks.Interfaces.BooleanInput on[num] "Set to true to enable equipment, or false to disable equipment"; equation connect(on, booToRea.u); end PartialPlantParallelInterface;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPumpParallel Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPumpParallel

Partial model for pump parallel

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPumpParallel

Information

Partial model for num parallel pumps, each with an isolation valve to avoid recirculation.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Buildings.Fluid.Actuators.BaseClasses.ValveParameters (Model with parameters for valves).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Genericper[num]per(each motorCooledByFluid=...Record with performance data
Integernum2The number of pumps
Realthreshold0.05Hysteresis threshold
PartialFlowMachinepum[num]redeclare Buildings.Fluid.Mo...Pumps
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedpValve_nominal Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
Flow Coefficient
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv Av (metric) flow coefficient [m2]
Pressure-flow linearization
RealdeltaM0.02Fraction of nominal flow rate where linearization starts, if y=1
Pump
BooleanaddPowerToMediumfalseSet to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)
Two-way valve
Reall0.0001Valve leakage, l=Kv(y=0)/Kv(y=1)
Assumptions
BooleanallowFlowReversaltrue= 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
Nominal condition
DensityrhoStd Inlet density for which valve coefficients are defined [kg/m3]
Dynamics
Pump
Timetau1Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
Booleanuse_inputFiltertrue= true, if speed is filtered with a 2nd order CriticalDamping filter
TimeriseTimePump30Rise time of the filter (time to reach 99.6 % of the speed) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyPump_start[num]fill(0, num)Initial value of pump signals
Valve
TimeriseTimeValveriseTimePumpRise time of the filter (time to become 99.6 % open) [s]
RealyValve_start[num]fill(1, num)Initial value of valve signals
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Flow resistance
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate

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)
input RealInputu[num]Continuous input signal for the flow machine [1]
output RealOutputP[num]Electrical power consumed by the pumps [W]

Modelica definition

partial model PartialPumpParallel "Partial model for pump parallel" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface; extends Buildings.Fluid.Actuators.BaseClasses.ValveParameters; replaceable parameter Buildings.Fluid.Movers.Data.Generic per[num]( each motorCooledByFluid=false) constrainedby Buildings.Fluid.Movers.Data.Generic "Record with performance data"; constant Boolean homotopyInitialization = true "= true, use homotopy method"; // Pump parameters parameter Integer num=2 "The number of pumps"; parameter Boolean addPowerToMedium=false "Set to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)"; parameter Modelica.Units.SI.Time tau=1 "Time constant at nominal flow (if energyDynamics <> SteadyState)"; parameter Boolean use_inputFilter=true "= true, if speed is filtered with a 2nd order CriticalDamping filter"; parameter Modelica.Units.SI.Time riseTimePump=30 "Rise time of the filter (time to reach 99.6 % of the speed)"; parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput "Type of initialization (no init/steady state/initial state/initial output)"; parameter Real[num] yPump_start=fill(0,num) "Initial value of pump signals"; // Valve parameters parameter Real l=0.0001 "Valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Modelica.Units.SI.Time riseTimeValve=riseTimePump "Rise time of the filter (time to become 99.6 % open)"; parameter Real[num] yValve_start = fill(1,num) "Initial value of valve signals"; // Dynamics parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; // Initialization parameter Medium.AbsolutePressure p_start = Medium.p_default "Start value of pressure"; parameter Medium.Temperature T_start = Medium.T_default "Start value of temperature"; parameter Medium.MassFraction X_start[Medium.nX] = Medium.X_default "Start value of mass fractions m_i/m"; parameter Medium.ExtraProperty C_start[Medium.nC]( final quantity=Medium.extraPropertiesNames)=fill(0, Medium.nC) "Start value of trace substances"; parameter Medium.ExtraProperty C_nominal[Medium.nC]( final quantity=Medium.extraPropertiesNames) = fill(1E-2, Medium.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; parameter Boolean from_dp = false "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Boolean linearizeFlowResistance = false "= true, use linear relation between m_flow and dp for any flow rate"; parameter Real threshold(min = 0.01) = 0.05 "Hysteresis threshold"; Modelica.Blocks.Interfaces.RealInput u[num]( each final unit="1", each max=1, each min=0) "Continuous input signal for the flow machine"; Modelica.Blocks.Interfaces.RealOutput P[num]( each final quantity="Power", each final unit="W") "Electrical power consumed by the pumps"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine pum[num] constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( redeclare each final replaceable package Medium = Medium, each final inputType=Buildings.Fluid.Types.InputType.Continuous, final per=per, each final addPowerToMedium=addPowerToMedium, each final allowFlowReversal=allowFlowReversal, each final m_flow_small=m_flow_small, each final show_T=show_T, each final tau=tau, each final use_inputFilter=use_inputFilter, each final riseTime=riseTimePump, each final init=init, each final energyDynamics=energyDynamics, each final p_start=p_start, each final T_start=T_start, each final X_start=X_start, each final C_start=C_start, each final C_nominal=C_nominal) "Pumps"; Buildings.Fluid.Actuators.Valves.TwoWayLinear val[num]( redeclare each final replaceable package Medium = Medium, each final dpFixed_nominal=0, each final l=l, each final CvData=Buildings.Fluid.Types.CvTypes.OpPoint, each final allowFlowReversal=allowFlowReversal, each final show_T=show_T, each final rhoStd=rhoStd, each final use_inputFilter=use_inputFilter, each final riseTime=riseTimeValve, each final init=init, final y_start=yValve_start, each final dpValve_nominal=dpValve_nominal, each final m_flow_nominal=m_flow_nominal, each final deltaM=deltaM, each final from_dp=from_dp, each final linearized=linearizeFlowResistance, each final homotopyInitialization=homotopyInitialization) "Isolation valves"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys[num]( each final uLow=threshold, each final uHigh=2*threshold) "Hysteresis for isolation valves"; Buildings.Controls.OBC.CDL.Reals.Switch swi[num] "Switch to enable pump only once the valve is commanded open"; protected Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer[num]( each final k=0.0) "Outputs 0 as the control signal"; protected Buildings.Controls.OBC.CDL.Reals.Sources.Constant one[num](each final k= 1.0) "Outputs 1 as the control signal"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation connect(pum.port_b, val.port_a); for i in 1:num loop connect(val[i].port_b, port_b); connect(port_a, pum[i].port_a); end for; connect(pum.P, P); connect(hys.u, u); connect(hys.y, swi.u2); connect(zer.y, swi.u3); connect(one.y, swi.u1); connect(swi.y, val.y); end PartialPumpParallel;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilter

Partial model that implements the filtered opening for valves and dampers

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilter

Information

Partial model that implements the filters that are used to approximate the travel time of the actuators. The signal y_actual is used to obtain the current position of the actuators.

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters (Record that contains the parameters of the filtered opening for multiple valves and dampers).

Parameters

TypeNameDefaultDescription
IntegernumFil4Number of filters
Dynamics
Filtered opening
Booleanuse_inputFilterfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTimeValve30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValve_start[numFil]fill(1, numFil)Initial value of output:0-closed, 1-fully opened

Modelica definition

partial model SignalFilter "Partial model that implements the filtered opening for valves and dampers" extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters; protected Modelica.Blocks.Interfaces.RealOutput[numFil] y_actual "Actual valve position"; Modelica.Blocks.Continuous.Filter[numFil] filter( each order=2, each f_cut=5/(2*Modelica.Constants.pi*riseTimeValve), each final init=initValve, final y_start=yValve_start, each final analogFilter=Modelica.Blocks.Types.AnalogFilter.CriticalDamping, each final filterType=Modelica.Blocks.Types.FilterType.LowPass, x(each stateSelect=StateSelect.always)) if use_inputFilter "Second order filters to approximate valve opening time, and to improve numerics"; Modelica.Blocks.Interfaces.RealOutput[numFil] y_filtered if use_inputFilter "Filtered valve positions in the range 0..1"; equation connect(filter.y,y_filtered); if use_inputFilter then connect(filter.y, y_actual); end if; end SignalFilter;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters

Model with parameters for a three-way valve

Information

Partial model that decribes the parameters of a three-way valve.

Parameters

TypeNameDefaultDescription
Booleanactivate_ThrWayVal Activate the use of three-way valve: True-use three-way valve; False-not use the three-way valve
Three-way Valve
PressureDifferencedpThrWayVal_nominal6000Nominal pressure drop of fully open valve [Pa]
RealfraK_ThrWayVal0.7Fraction Kv(port_3&rarr;port_2)/Kv(port_1&rarr;port_2)for the three-way valve
Reall_ThrWayVal[2]{0.0001,0.0001}Bypass valve leakage, l=Kv(y=0)/Kv(y=1)
RealR50Rangeability, R=50...100 typically for the three-way valve
Realdelta00.01Range of significant deviation from equal percentage law for the three-way valve
Advanced
PortFlowDirectionportFlowDirection_1Modelica.Fluid.Types.PortFlo...Flow direction for port_1 in the three-way valve
PortFlowDirectionportFlowDirection_2Modelica.Fluid.Types.PortFlo...Flow direction for port_2 in the three-way valve
PortFlowDirectionportFlowDirection_3Modelica.Fluid.Types.PortFlo...Flow direction for port_3 in the three-way valve

Modelica definition

partial model ThreeWayValveParameters "Model with parameters for a three-way valve" parameter Boolean activate_ThrWayVal "Activate the use of three-way valve: True-use three-way valve; False-not use the three-way valve"; parameter Modelica.Units.SI.PressureDifference dpThrWayVal_nominal( displayUnit="Pa", min=0, fixed=true) = 6000 "Nominal pressure drop of fully open valve"; parameter Real fraK_ThrWayVal( min=0, max=1) = 0.7 "Fraction Kv(port_3&rarr;port_2)/Kv(port_1&rarr;port_2)for the three-way valve"; parameter Real l_ThrWayVal[2]( each min=1e-10, each max=1) = {0.0001,0.0001} "Bypass valve leakage, l=Kv(y=0)/Kv(y=1)"; parameter Real R=50 "Rangeability, R=50...100 typically for the three-way valve"; parameter Real delta0=0.01 "Range of significant deviation from equal percentage law for the three-way valve"; //Advanced parameter Modelica.Fluid.Types.PortFlowDirection portFlowDirection_1= Modelica.Fluid.Types.PortFlowDirection.Bidirectional "Flow direction for port_1 in the three-way valve"; parameter Modelica.Fluid.Types.PortFlowDirection portFlowDirection_2= Modelica.Fluid.Types.PortFlowDirection.Bidirectional "Flow direction for port_2 in the three-way valve"; parameter Modelica.Fluid.Types.PortFlowDirection portFlowDirection_3= Modelica.Fluid.Types.PortFlowDirection.Bidirectional "Flow direction for port_3 in the three-way valve"; end ThreeWayValveParameters;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ValvesParameters

Model with parameters for multiple valves

Information

Model that computes the flow coefficients of vectored valves. The number of vectored valves is defined by the parameter numVal.

Note that the numVal valves have the same modelling option that can specify the valve flow coefficient in fully open conditions. Details can be found in Buildings.Fluid.Actuators.BaseClasses.ValveParameters.

Parameters

TypeNameDefaultDescription
IntegernumVal Number of valves
Two-way valve
CvTypesCvDataBuildings.Fluid.Types.CvType...Selection of flow coefficient
RealKv[numVal] Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv[numVal] Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAv[numVal] Av (metric) flow coefficient [m2]
MassFlowRatem_flow_nominal[numVal] Nominal mass flow rate [kg/s]
PressureDifferencedpValve_nominal[numVal]fill(6000, numVal)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint [Pa]
Pressure-flow linearization
RealdeltaM0.02Fraction of nominal flow rate where linearization starts, if y=1
Advanced
Two-way valve
DensityrhoStd[numVal] Inlet density for which valve coefficients are defined [kg/m3]

Modelica definition

partial model ValvesParameters "Model with parameters for multiple valves" parameter Integer numVal "Number of valves"; parameter Buildings.Fluid.Types.CvTypes CvData=Buildings.Fluid.Types.CvTypes.OpPoint "Selection of flow coefficient"; parameter Real[numVal] Kv( each fixed= if CvData==Buildings.Fluid.Types.CvTypes.Kv then true else false) "Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]"; parameter Real[numVal] Cv( each fixed= if CvData==Buildings.Fluid.Types.CvTypes.Cv then true else false) "Cv (US) flow coefficient [USG/min/(psi)^(1/2)]"; parameter Modelica.Units.SI.Area[numVal] Av(each fixed=if CvData == Buildings.Fluid.Types.CvTypes.Av then true else false) "Av (metric) flow coefficient"; parameter Real deltaM = 0.02 "Fraction of nominal flow rate where linearization starts, if y=1"; parameter Modelica.Units.SI.MassFlowRate[numVal] m_flow_nominal "Nominal mass flow rate"; parameter Modelica.Units.SI.PressureDifference[numVal] dpValve_nominal( each displayUnit="Pa", each min=0, each fixed=if CvData == Buildings.Fluid.Types.CvTypes.OpPoint then true else false) = fill(6000, numVal) "Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint"; parameter Modelica.Units.SI.Density[numVal] rhoStd "Inlet density for which valve coefficients are defined"; protected parameter Real[numVal] Kv_SI( each min=0, each fixed= false) "Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)]"; initial equation if CvData == Buildings.Fluid.Types.CvTypes.OpPoint then Kv_SI = m_flow_nominal./sqrt(dpValve_nominal); Kv = Kv_SI./(rhoStd/3600/sqrt(1E5)); Cv = Kv_SI./(rhoStd*0.0631/1000/sqrt(6895)); Av = Kv_SI./sqrt(rhoStd); elseif CvData == Buildings.Fluid.Types.CvTypes.Kv then Kv_SI = Kv.*rhoStd/3600/sqrt(1E5) "Unit conversion m3/(h*sqrt(bar)) to kg/(s*sqrt(Pa))"; Cv = Kv_SI./(rhoStd*0.0631/1000/sqrt(6895)); Av = Kv_SI./sqrt(rhoStd); dpValve_nominal = (m_flow_nominal./Kv_SI).^2; elseif CvData == Buildings.Fluid.Types.CvTypes.Cv then Kv_SI = Cv.*rhoStd*0.0631/1000/sqrt(6895) "Unit conversion USG/(min*sqrt(psi)) to kg/(s*sqrt(Pa))"; Kv = Kv_SI./(rhoStd/3600/sqrt(1E5)); Av = Kv_SI./sqrt(rhoStd); dpValve_nominal = (m_flow_nominal./Kv_SI).^2; else assert(CvData == Buildings.Fluid.Types.CvTypes.Av, "Invalid value for CvData. Obtained CvData = " + String(CvData) + "."); Kv_SI = Av.*sqrt(rhoStd); Kv = Kv_SI./(rhoStd/3600/sqrt(1E5)); Cv = Kv_SI./(rhoStd*0.0631/1000/sqrt(6895)); dpValve_nominal = (m_flow_nominal./Kv_SI).^2; end if; end ValvesParameters;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.FourPortResistanceChillerWSE

Flow resistance model for the chiller and WSE package

Information

This class contains parameters that are used to compute the pressure drop in the Buildings.Applications.DataCenters.ChillerCooled package.

Parameters

TypeNameDefaultDescription
Chiller
PressureDifferencedp1_chi_nominal Pressure difference on medium 1 side in the chillers [Pa]
PressureDifferencedp2_chi_nominal Pressure difference on medium 2 side in the chillers [Pa]
Waterside economizer
PressureDifferencedp1_wse_nominal Pressure difference on medium 1 side in the waterside economizer [Pa]
PressureDifferencedp2_wse_nominal Pressure difference on medium 2 side in the waterside economizer [Pa]
Flow resistance
Medium 1
BooleancomputeFlowResistance1true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
BooleancomputeFlowResistance2true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar

Modelica definition

record FourPortResistanceChillerWSE "Flow resistance model for the chiller and WSE package" parameter Boolean computeFlowResistance1 = true "=true, compute flow resistance. Set to false to assume no friction"; parameter Boolean from_dp1 = false "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Modelica.Units.SI.PressureDifference dp1_chi_nominal(min=0, displayUnit="Pa") "Pressure difference on medium 1 side in the chillers"; parameter Modelica.Units.SI.PressureDifference dp1_wse_nominal(min=0, displayUnit="Pa") "Pressure difference on medium 1 side in the waterside economizer"; parameter Boolean linearizeFlowResistance1 = false "= true, use linear relation between m_flow and dp for any flow rate"; parameter Real deltaM1 = 0.1 "Fraction of nominal flow rate where flow transitions to laminar"; parameter Boolean computeFlowResistance2 = true "=true, compute flow resistance. Set to false to assume no friction"; parameter Boolean from_dp2 = false "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Modelica.Units.SI.PressureDifference dp2_chi_nominal(min=0, displayUnit="Pa") "Pressure difference on medium 2 side in the chillers"; parameter Modelica.Units.SI.PressureDifference dp2_wse_nominal(min=0, displayUnit="Pa") "Pressure difference on medium 2 side in the waterside economizer"; parameter Boolean linearizeFlowResistance2 = false "= true, use linear relation between m_flow and dp for any flow rate"; parameter Real deltaM2 = 0.1 "Fraction of nominal flow rate where flow transitions to laminar"; end FourPortResistanceChillerWSE;

Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters

Record that contains the parameters of the filtered opening for multiple valves and dampers

Information

Record that contains essential parameters for the vectored signal filters. The number of filters is specified by nFilter.

Note that all the signal filters have the same on/off control signal, rising time, and initialization type, which are specified by use_inputFilter, riseTimeValve and initValve respectively. However, they can have different initial valves, specified by yValve_start.

Parameters

TypeNameDefaultDescription
IntegernumFil4Number of filters
Dynamics
Filtered opening
Booleanuse_inputFilterfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
TimeriseTimeValve30Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitValveModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
RealyValve_start[numFil]fill(1, numFil)Initial value of output:0-closed, 1-fully opened

Modelica definition

record SignalFilterParameters "Record that contains the parameters of the filtered opening for multiple valves and dampers" parameter Integer numFil(min=1)=4 "Number of filters"; parameter Boolean use_inputFilter=false "= true, if opening is filtered with a 2nd order CriticalDamping filter"; parameter Modelica.Units.SI.Time riseTimeValve=30 "Rise time of the filter (time to reach 99.6 % of an opening step)"; parameter Modelica.Blocks.Types.Init initValve=Modelica.Blocks.Types.Init.InitialOutput "Type of initialization (no init/steady state/initial state/initial output)"; parameter Real[numFil] yValve_start=fill(1,numFil) "Initial value of output:0-closed, 1-fully opened"; end SignalFilterParameters;