LBL logo

Buildings.Fluid.BaseClasses.FlowModels

Flow models for pressure drop calculations

Information

This package contains a basic flow model that is used by the various models that compute pressure drop. Because the density does not change signficantly in heating, ventilation and air conditioning systems for buildings, this model computes the pressure drop based on the mass flow rate and not the volume flow rate. This typically leads to simpler equations because it does not require the mass density, which changes when the flow is reversed. Although, for conceptual design of building energy system, there is in general not enough information available that would warrant a more detailed pressure drop calculation. If a more detailed computation of the flow resistance is needed, then a user can use models from the Modelica.Fluid library.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

NameDescription
Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp basicFlowFunction_dp Basic class for flow models
Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow basicFlowFunction_m_flow Basic class for flow models
Buildings.Fluid.BaseClasses.FlowModels.Examples Examples Collection of models that illustrate model use and test models


Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp

Basic class for flow models

Information

Function that computes the pressure drop of flow elements as

m = sign(Δp) k √ Δp  

with regularization near the origin. Therefore, the flow coefficient is

k = m ⁄ √ Δp  

The input m_flow_turbulent determines the location of the regularization.

Inputs

TypeNameDefaultDescription
Pressuredp Pressure difference between port_a and port_b (= port_a.p - port_b.p) [Pa]
Realk Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2)
MassFlowRatem_flow_turbulent Mass flow rate [kg/s]

Outputs

TypeNameDescription
MassFlowRatem_flowMass flow rate in design flow direction [kg/s]

Modelica definition

function basicFlowFunction_dp "Basic class for flow models"

  input Modelica.SIunits.Pressure dp(displayUnit="Pa") 
    "Pressure difference between port_a and port_b (= port_a.p - port_b.p)";
  input Real k(min=0, unit="") 
    "Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2)";
  input Modelica.SIunits.MassFlowRate m_flow_turbulent(min=0) "Mass flow rate";
  output Modelica.SIunits.MassFlowRate m_flow 
    "Mass flow rate in design flow direction";
protected 
  Modelica.SIunits.Pressure dp_turbulent(displayUnit="Pa") 
    "Turbulent flow if |dp| >= dp_small, not a parameter because k can be a function of time";
protected 
 Real kSqu(unit="kg.m") "Flow coefficient, kSqu=k^2=m_flow^2/|dp|";
algorithm 
 kSqu:=k*k;
 dp_turbulent :=m_flow_turbulent^2/kSqu;
 m_flow :=Modelica.Fluid.Utilities.regRoot2(x=dp, x_small=dp_turbulent, k1=kSqu, k2=kSqu);

end basicFlowFunction_dp;

Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow

Basic class for flow models

Information

Function that computes the pressure drop of flow elements as

Δp = sign(m) (m ⁄ k)2

with regularization near the origin. Therefore, the flow coefficient is

k = m ⁄ √ Δp  

The input m_flow_turbulent determines the location of the regularization.

Inputs

TypeNameDefaultDescription
MassFlowRatem_flow Mass flow rate in design flow direction [kg/s]
Realk Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2)
MassFlowRatem_flow_turbulent Mass flow rate [kg/s]

Outputs

TypeNameDescription
PressuredpPressure difference between port_a and port_b (= port_a.p - port_b.p) [Pa]

Modelica definition

function basicFlowFunction_m_flow "Basic class for flow models"

  input Modelica.SIunits.MassFlowRate m_flow 
    "Mass flow rate in design flow direction";
  input Real k(unit="") 
    "Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2)";
  input Modelica.SIunits.MassFlowRate m_flow_turbulent(min=0) "Mass flow rate";
  output Modelica.SIunits.Pressure dp(displayUnit="Pa") 
    "Pressure difference between port_a and port_b (= port_a.p - port_b.p)";
protected 
 Real kSquInv(unit="1/(kg.m)") "Flow coefficient";
algorithm 
 kSquInv:=1/k^2;
 dp :=Modelica.Fluid.Utilities.regSquare2(x=m_flow, x_small=m_flow_turbulent, k1=kSquInv, k2=kSquInv);

end basicFlowFunction_m_flow;

Automatically generated Wed May 15 11:56:39 2013.