modelPartialTwoPortInterface
Partial model transporting fluid between two ports without storing mass or energy
Information
This partial class implements the same functionality as
Buildings.Fluid.Interfaces.PartialTwoPortInterface,
except that port_a and port_b are placed at the top and bottom
of the component.
Implementation
The implementation is done in this package as opposed to Buildings.Fluid.Interfaces as it is only used by the storage model, and may be removed when the tool limitations that are discussed in IBPSA, #1794. are removed.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Assumptions | |||
| Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal | Nominal mass flow rate | |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T | false | = true, if actual temperature at port is computed |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Units.SI.MassFlowRate | m_flow | 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 | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a | 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 | 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 |
Contents
| Name | Description |
|---|---|
| Medium | Medium in the component |
Revisions
-
September 20, 2023, by Michael Wetter:
First implementation to address IBPSA, #1794.