This package contains utility functions and records for the EdgedBend fitting component.
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
massFlowRate | Return mass flow rate m_flow as function of pressure loss dp for a curved bend |
pressureLoss | Return pressure loss dp as function of mass flow rate m_flow for a curved bend |
Geometry | Geometric data for a curved bend |
This function returns the mass flow rate m_flow as function of pressure loss dp for an edged bend. The details of the function are described here.
The bend characteristic is valid for constant density and constant dynamic viscosity. It can be approximately also used for compressible media. This is performed by providing the upstream density and upstream dynamic viscosity. In order to be able to regularize density and dynamic viscosity around zero mass flow rate, the two quantities have to be given if fluid flows from port_a to port_b (d_a, eta_a) and if fluid flows from port_b to port_a (d_b, eta_b).
Type | Name | Default | Description |
---|---|---|---|
Pressure | dp | Pressure loss [Pa] | |
Geometry | geometry | Geometry of bend | |
Density | d_a | Density at port_a when fluid is flowing from port_a to port_b [kg/m3] | |
Density | d_b | Density at port_b when fluid is flowing from port_b to port_a [kg/m3] | |
DynamicViscosity | eta_a | Dynamic viscosity at port_a when fluid is flowing from port_a to port_b [Pa.s] | |
DynamicViscosity | eta_b | Dynamic viscosity at port_b when fluid is flowing from port_b to port_a [Pa.s] | |
AbsolutePressure | dp_small | Small pressure drop used for regularization if m_flow=f(...,dp_small,..,dp) [Pa] | |
MassFlowRate | m_flow_small | Small mass flow rate used for regularization if dp=f_inv(...,m_flow_small,m_flow) [kg/s] |
Type | Name | Description |
---|---|---|
MassFlowRate | m_flow | Mass flow rate (= port_a.m_flow) [kg/s] |
function massFlowRate "Return mass flow rate m_flow as function of pressure loss dp for a curved bend" import SI = Modelica.SIunits; input SI.Pressure dp "Pressure loss"; input Geometry geometry "Geometry of bend"; input SI.Density d_a "Density at port_a when fluid is flowing from port_a to port_b"; input SI.Density d_b "Density at port_b when fluid is flowing from port_b to port_a"; input SI.DynamicViscosity eta_a "Dynamic viscosity at port_a when fluid is flowing from port_a to port_b"; input SI.DynamicViscosity eta_b "Dynamic viscosity at port_b when fluid is flowing from port_b to port_a"; input SI.AbsolutePressure dp_small "Small pressure drop used for regularization if m_flow=f(...,dp_small,..,dp)"; input SI.MassFlowRate m_flow_small "Small mass flow rate used for regularization if dp=f_inv(...,m_flow_small,m_flow)"; output SI.MassFlowRate m_flow "Mass flow rate (= port_a.m_flow)"; algorithm m_flow := Modelica.Fluid.Dissipation.PressureLoss.Bend.dp_edgedOverall_MFLOW( Modelica.Fluid.Dissipation.PressureLoss.Bend.dp_edgedOverall_IN_con( d_hyd=geometry.d_hyd, delta=geometry.delta, K=geometry.K), Modelica.Fluid.Dissipation.PressureLoss.Bend.dp_edgedOverall_IN_var( rho=Modelica.Fluid.Utilities.regStep(dp, d_a, d_b, dp_small), eta=Modelica.Fluid.Utilities.regStep(dp, eta_a, eta_b, dp_small)), dp);end massFlowRate;
This function returns the pressure loss dp as function of mass flow rate m_flow for an edged bend. The details of the function are described here.
The bend characteristic is valid for constant density and constant dynamic viscosity. It can be approximately also used for compressible media. This is performed by providing the upstream density and upstream dynamic viscosity. In order to be able to regularize density and dynamic viscosity around zero mass flow rate, the two quantities have to be given if fluid flows from port_a to port_b (d_a, eta_a) and if fluid flows from port_b to port_a (d_b, eta_b).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow | Mass flow rate (= port_a.m_flow) [kg/s] | |
Geometry | geometry | Geometry of bend | |
Density | d_a | Density at port_a when fluid is flowing from port_a to port_b [kg/m3] | |
Density | d_b | Density at port_b when fluid is flowing from port_b to port_a [kg/m3] | |
DynamicViscosity | eta_a | Dynamic viscosity at port_a when fluid is flowing from port_a to port_b [Pa.s] | |
DynamicViscosity | eta_b | Dynamic viscosity at port_b when fluid is flowing from port_b to port_a [Pa.s] | |
AbsolutePressure | dp_small | Small pressure drop used for regularization if m_flow=f(...,dp_small,..,dp) [Pa] | |
MassFlowRate | m_flow_small | Small mass flow rate used for regularization if dp=f_inv(...,m_flow_small,m_flow) [kg/s] |
Type | Name | Description |
---|---|---|
Pressure | dp | Pressure loss [Pa] |
function pressureLoss "Return pressure loss dp as function of mass flow rate m_flow for a curved bend" import SI = Modelica.SIunits; input SI.MassFlowRate m_flow "Mass flow rate (= port_a.m_flow)"; input Geometry geometry "Geometry of bend"; input SI.Density d_a "Density at port_a when fluid is flowing from port_a to port_b"; input SI.Density d_b "Density at port_b when fluid is flowing from port_b to port_a"; input SI.DynamicViscosity eta_a "Dynamic viscosity at port_a when fluid is flowing from port_a to port_b"; input SI.DynamicViscosity eta_b "Dynamic viscosity at port_b when fluid is flowing from port_b to port_a"; input SI.AbsolutePressure dp_small "Small pressure drop used for regularization if m_flow=f(...,dp_small,..,dp)"; input SI.MassFlowRate m_flow_small "Small mass flow rate used for regularization if dp=f_inv(...,m_flow_small,m_flow)"; output SI.Pressure dp "Pressure loss"; algorithm dp := Modelica.Fluid.Dissipation.PressureLoss.Bend.dp_edgedOverall_DP( Modelica.Fluid.Dissipation.PressureLoss.Bend.dp_edgedOverall_IN_con( d_hyd=geometry.d_hyd, delta=geometry.delta, K=geometry.K), Modelica.Fluid.Dissipation.PressureLoss.Bend.dp_edgedOverall_IN_var( rho=Modelica.Fluid.Utilities.regStep(m_flow, d_a, d_b, m_flow_small), eta=Modelica.Fluid.Utilities.regStep(m_flow, eta_a, eta_b, m_flow_small)), m_flow);end pressureLoss;
This record is used to define the geometric (constant) data of an edged bend. The details of the record are described here.
Extends from Modelica.Icons.Record (Icon for records).
Type | Name | Default | Description |
---|---|---|---|
Diameter | d_hyd | Hydraulic diameter [m] | |
Angle | delta | Angle of turning [rad] | |
Roughness | K | 2.5e-5 | Absolute roughness, with a default for a smooth steel pipe [m] |
record Geometry "Geometric data for a curved bend" import SI = Modelica.SIunits; extends Modelica.Icons.Record; SI.Diameter d_hyd "Hydraulic diameter"; SI.Angle delta "Angle of turning"; Modelica.Fluid.Types.Roughness K=2.5e-5 "Absolute roughness, with a default for a smooth steel pipe";end Geometry;