modelPartialResistance
Partial model for a hydraulic resistance
Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).
Information
Partial model for a flow resistance, possible with variable flow coefficient.
Models that extend this class need to implement an equation that relates
m_flow and dp, and they need to assign the parameter
m_flow_turbulent.
See for example Buildings.Fluid.FixedResistances.PressureDrop for a model that extends this base class.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Modelica.Units.SI.MassFlowRate | m_flow_turbulent | Turbulent flow if |m_flow| >= m_flow_turbulent | |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp_nominal | Pressure drop at nominal mass flow rate | |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | linearized | false | = true, use linear relation between m_flow and dp for any flow rate |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow))) | Medium properties in port_a |
| Medium.ThermodynamicState | sta_b (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow)) | Medium properties in port_b |
Revisions
-
April 14, 2020, by Michael Wetter:
ChangedhomotopyInitializationto a constant.
This is for IBPSA, #1341. -
February 26, 2020, by Michael Wetter:
Changed icon to display its operating state.
This is for #1294. -
October 25, 2019, by Jianjun Hu:
Improved icon graphics annotation. This is for #1225. -
November 3, 2016, by Michael Wetter:
Removed start value for pressure difference to simplify the parameter window.
This is for #552. -
January 26, 2016, by Michael Wetter:
Avoided assignment ofdp(nominal=0)ifdp_nominal_pos = 0and ofm_flow(nominal=0)ifm_flow_nominal_pos = 0as nominal values are not allowed to be zero. -
January 22, 2016, by Michael Wetter:
Corrected type declaration of pressure difference. This is for #404. -
August 15, 2015, by Filip Jorissen:
Implemented more efficient computation ofport_a.Xi_outflow,port_a.h_outflowandport_a.C_outflowwhenallowFlowReversal=false. This is for #281. -
January 13, 2015, by Marcus Fuchs:
Revised revisions section (there were two revisions statements) -
November 20, 2014 by Michael Wetter:
Removedstartattribute form_flowas this is already set in its base class. -
October 8, 2013 by Michael Wetter:
Removed propagation ofshow_V_flowto base class as it has no longer this parameter. -
December 14, 2012 by Michael Wetter:
Renamed protected parameters for consistency with the naming conventions. -
February 12, 2012, by Michael Wetter:
Removed duplicate declaration ofm_flow_nominal. -
February 3, 2012, by Michael Wetter:
Made assignment ofm_flow_smallfinalas it is no longer used in the base class. -
January 16, 2012, by Michael Wetter:
To simplify object inheritance tree, revised base classesBuildings.Fluid.BaseClasses.PartialResistance,Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve,Buildings.Fluid.Actuators.BaseClasses.PartialDamperExponential,Buildings.Fluid.Actuators.BaseClasses.PartialActuatorand modelBuildings.Fluid.FixedResistances.PressureDrop. -
August 5, 2011, by Michael Wetter:
Moved linearized pressure drop equation from the function body to the equation section. With the previous implementation, the symbolic processor may not rearrange the equations, which can lead to coupled equations instead of an explicit solution. -
June 20, 2011, by Michael Wetter:
Set start values form_flowanddpto zero, since most HVAC systems start at zero flow. With this change, the start values appear in the GUI and can be set by the user. -
April 2, 2011 by Michael Wetter:
Addedm_flow_nominal_posanddp_nominal_posto allow providing negative nominal values which will be used, for example, to set start values of flow splitters which may have negative flow rates and pressure drop at the initial condition. -
March 27, 2011, by Michael Wetter:
Addedhomotopyoperator. -
March 23, 2011 by Michael Wetter:
Added homotopy operator. -
March 30, 2010 by Michael Wetter:
Changed base classes to allow easier initialization. -
April 13, 2009, by Michael Wetter:
Extracted pressure drop computation and implemented it in the new model Buildings.Fluid.BaseClasses.FlowModels.BasicFlowModel. -
September 18, 2008, by Michael Wetter:
Added equations for the mass balance of extra species flow, i.e.,CandmC_flow. -
July 20, 2007 by Michael Wetter:
First implementation.