modelIdealSource
Base class for pressure and mass flow source with optional power input
Extends from Annex60.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy).
Information
Model of a fictitious pipe that is used as a base class for a pressure source or to prescribe a mass flow rate.
Note that for fans and pumps with dynamic balance, both the heat and the flow work are added to the volume of air or water. This simplifies the equations compared to adding heat to the volume, and flow work to this model.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | control_m_flow | = false to control dp instead of m_flow | |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Advanced | |||
| Modelica.SIunits.PressureDifference | dp_start (from PartialTwoPortTransport) | 0 | Guess value of dp = port_a.p - port_b.p |
| Medium.MassFlowRate | m_flow_start (from PartialTwoPortTransport) | 0 | Guess value of m_flow = port_a.m_flow |
| Medium.MassFlowRate | m_flow_small (from PartialTwoPortTransport) | Small mass flow rate for regularization of zero flow | |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortTransport) | true | = true, if temperatures at port_a and port_b are computed |
| Boolean | show_V_flow (from PartialTwoPortTransport) | true | = true, if volume flow rate at inflowing 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) | |
| Modelica.Blocks.Interfaces.RealInput | m_flow_in | Prescribed mass flow rate | |
| Modelica.Blocks.Interfaces.RealInput | dp_in | Prescribed pressure difference port_a.p-port_b.p |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.MassFlowRate | m_flow (from PartialTwoPortTransport) | Mass flow rate in design flow direction | |
| Modelica.SIunits.PressureDifference | dp (from PartialTwoPortTransport) | Pressure difference between port_a and port_b (= port_a.p - port_b.p) | |
| Modelica.SIunits.VolumeFlowRate | V_flow (from PartialTwoPortTransport) | m_flow/Modelica.Fluid.Utilities.regStep(m_flow, Medium.density(Medium.setState_phX(p = port_a.p, h = inStream(port_a.h_outflow), X = inStream(port_a.Xi_outflow))), Medium.density(Medium.setState_phX(p = port_b.p, h = inStream(port_b.h_outflow), X = inStream(port_b.Xi_outflow))), m_flow_small) | Volume flow rate at inflowing port (positive when flow from port_a to port_b) |
| Medium.Temperature | port_a_T (from PartialTwoPortTransport) | Modelica.Fluid.Utilities.regStep(port_a.m_flow, Medium.temperature(Medium.setState_phX(p = port_a.p, h = inStream(port_a.h_outflow), X = inStream(port_a.Xi_outflow))), Medium.temperature(Medium.setState_phX(port_a.p, port_a.h_outflow, port_a.Xi_outflow)), m_flow_small) | Temperature close to port_a, if show_T = true |
| Medium.Temperature | port_b_T (from PartialTwoPortTransport) | Modelica.Fluid.Utilities.regStep(port_b.m_flow, Medium.temperature(Medium.setState_phX(p = port_b.p, h = inStream(port_b.h_outflow), X = inStream(port_b.Xi_outflow))), Medium.temperature(Medium.setState_phX(port_b.p, port_b.h_outflow, port_b.Xi_outflow)), m_flow_small) | Temperature close to port_b, if show_T = true |
Revisions
-
March 20, 2016, by Michael Wetter:
Corrected documentation fordp_in. -
January 22, 2016, by Michael Wetter:
Added units to the signal connectors. This is for #404. -
October 8, 2013, by Michael Wetter:
Removed parametershow_V_flow. -
May 25, 2011 by Michael Wetter:
Removed the option to add power to the medium, as this is dealt with in the volume that is used in the mover model. -
July 27, 2010 by Michael Wetter:
Redesigned model to fix bug in medium balance. -
April 13, 2010 by Michael Wetter:
Made heat connector optional. -
March 23, 2010 by Michael Wetter:
First implementation.