.OpenHydraulics.Basic.BaseClasses.pressureLoss_m_flow_and_Re

Information

Compute pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)). If the Reynolds-number Re ≥ data.Re_turbulent, the flow is treated as a turbulent flow with constant loss factor zeta. If the Reynolds-number Re < data.Re_turbulent, the flow is laminar and/or in a transition region between laminar and turbulent. This region is approximated by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The common derivative of the two polynomials at Re = 0 is computed from the equation "data.c0/Re".

If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:

Fritsch F.N. and Carlson R.E. (1980):
Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246

Interface

function pressureLoss_m_flow_and_Re
  extends Modelica.Icons.Function;
  input SI.MassFlowRate m_flow "Mass flow rate from port_a to port_b";
  input SI.Density d_a "Density at port_a";
  input SI.Density d_b "Density at port_b";
  input SI.DynamicViscosity eta_a "Dynamic viscosity at port_a";
  input SI.DynamicViscosity eta_b "Dynamic viscosity at port_b";
  input LossFactorData data "Constant loss factors for both flow directions";
  output SI.Pressure dp "Pressure drop (dp = port_a.p - port_b.p)";
  import Modelica.Constants.pi;
end pressureLoss_m_flow_and_Re;

Generated at 2024-12-21T19:25:56Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos