modelPartialWaterToWater
Partial model for water to water heat pumps and chillers
Extends from Buildings.Fluid.Interfaces.PartialFourPortInterface (Partial model with four ports and declaration of quantities that are used by many models), Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters (Parameters for flow resistance for models with four ports).
Information
Partial model for a water to water heat pump, as detailed in Jin (2002). The model for the compressor is a partial model and needs to be replaced by one of the compressor models in Buildings.Fluid.HeatPumps.Compressors.
References
H. Jin. Parameter estimation based models of water source heat pumps. PhD Thesis. Oklahoma State University. Stillwater, Oklahoma, USA. 2002.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Boolean | enable_variable_speed | true | Set to true to allow modulating of compressor speed |
| Real | scaling_factor | 1.0 | Scaling factor for heat pump capacity |
| Modelica.Units.SI.ThermalConductance | UACon | Thermal conductance of condenser | |
| Modelica.Units.SI.ThermalConductance | UAEva | Thermal conductance of evaporator | |
| Assumptions | |||
| Boolean | allowFlowReversal1 (from PartialFourPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1 |
| Boolean | allowFlowReversal2 (from PartialFourPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2 |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m1_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m2_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp1_nominal (from FourPortFlowResistanceParameters) | Pressure difference | |
| Modelica.Units.SI.PressureDifference | dp2_nominal (from FourPortFlowResistanceParameters) | Pressure difference | |
| Advanced | |||
| Medium1.MassFlowRate | m1_flow_small (from PartialFourPortInterface) | 1E-4*abs(m1_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Medium2.MassFlowRate | m2_flow_small (from PartialFourPortInterface) | 1E-4*abs(m2_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialFourPortInterface) | false | = true, if actual temperature at port is computed |
| Flow resistance › Medium 1 | |||
| Boolean | computeFlowResistance1 (from FourPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp1 (from FourPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n1 (from FourPortFlowResistanceParameters) | 2 | Flow exponent for side 1, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance1 (from FourPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM1 (from FourPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Medium 2 | |||
| Boolean | computeFlowResistance2 (from FourPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp2 (from FourPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n2 (from FourPortFlowResistanceParameters) | 2 | Flow exponent for side 2, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance2 (from FourPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM2 (from FourPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Dynamics › Condenser | |||
| Modelica.Units.SI.Time | tau1 | 60 | Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Modelica.Units.SI.Temperature | T1_start | Medium1.T_default | Initial or guess value of set point |
| Dynamics › Evaporator | |||
| Modelica.Units.SI.Time | tau2 | 60 | Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Modelica.Units.SI.Temperature | T2_start | Medium2.T_default | Initial or guess value of set point |
| Dynamics › Evaporator and condenser | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Temperature protection | |||
| Boolean | enable_temperature_protection | true | Enable temperature protection |
| Modelica.Units.SI.Temperature | TConMax | ref.TCri - 5 | Upper bound for condenser temperature |
| Modelica.Units.SI.Temperature | TEvaMin | 275.15 | Lower bound for evaporator temperature |
| Real | dTHys | 5 | Hysteresis interval width |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a1 (from PartialFourPort) | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b1 (from PartialFourPort) | Fluid connector b1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a2 (from PartialFourPort) | Fluid connector a2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b2 (from PartialFourPort) | Fluid connector b2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Blocks.Interfaces.BooleanOutput | errLowPre | if true, compressor disabled since evaporator temperature is above upper bound | |
| Modelica.Blocks.Interfaces.BooleanOutput | errHigPre | if true, compressor disabled since condenser temperature is below lower bound | |
| Modelica.Blocks.Interfaces.BooleanOutput | errNegTemDif | if true, compressor disabled since condenser temperature is below evaporator temperature | |
| Modelica.Blocks.Interfaces.RealInput | y | Modulating signal for compressor frequency, equal to 1 at full load condition | |
| Modelica.Blocks.Interfaces.IntegerInput | stage | Current stage of the heat pump, equal to 1 at full load condition | |
| Modelica.Blocks.Interfaces.RealOutput | QCon_flow | Actual heating heat flow rate added to fluid 1 | |
| Modelica.Blocks.Interfaces.RealOutput | P | Electric power consumed by compressor | |
| Modelica.Blocks.Interfaces.RealOutput | QEva_flow | Actual cooling heat flow rate removed from fluid 2 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium1.MassFlowRate | m1_flow (from PartialFourPortInterface) | 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 (from PartialFourPortInterface) | port_a1.p - port_b1.p | Pressure difference between port_a1 and port_b1 |
| Medium2.MassFlowRate | m2_flow (from PartialFourPortInterface) | 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 (from PartialFourPortInterface) | port_a2.p - port_b2.p | Pressure difference between port_a2 and port_b2 |
| Medium1.ThermodynamicState | sta_a1 (from PartialFourPortInterface) | if allowFlowReversal1 then Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) else Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow), inStream(port_a1.Xi_outflow)) | Medium properties in port_a1 |
| Medium1.ThermodynamicState | sta_b1 (from PartialFourPortInterface) | if allowFlowReversal1 then Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) else Medium1.setState_phX(port_b1.p, port_b1.h_outflow, port_b1.Xi_outflow) | Medium properties in port_b1 |
| Medium2.ThermodynamicState | sta_a2 (from PartialFourPortInterface) | if allowFlowReversal2 then Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) else Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow), inStream(port_a2.Xi_outflow)) | Medium properties in port_a2 |
| Medium2.ThermodynamicState | sta_b2 (from PartialFourPortInterface) | if allowFlowReversal2 then Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) else Medium2.setState_phX(port_b2.p, port_b2.h_outflow, port_b2.Xi_outflow) | Medium properties in port_b2 |
| Buildings.Fluid.HeatExchangers.EvaporatorCondenser | con | Condenser | |
| Buildings.Fluid.HeatExchangers.EvaporatorCondenser | eva | Evaporator | |
| Buildings.Fluid.HeatPumps.Compressors.BaseClasses.PartialCompressor | com | Compressor |
Contents
| Name | Description |
|---|---|
| Refrigerant in the component |
Revisions
-
April 14, 2020, by Michael Wetter:
ChangedhomotopyInitializationto a constant.
This is for IBPSA, #1341. -
May 30, 2017, by Filip Jorissen:
Added temperature protection block and setenergyDynamics=DynamicFreeInitial. See #769. -
October 17, 2016, by Massimo Cimmino:
First implementation.