 
Modelica.Fluid library.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
| Name | Description | 
|---|---|
|  basicFlowFunction_dp | Basic class for flow models | 
|  basicFlowFunction_m_flow | Basic class for flow models | 
|  Examples | Collection of models that illustrate model use and test models | 
 Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
Function that computes the pressure drop of flow elements as
m = sign(Δp) k √ Δp
with regularization near the origin. Therefore, the flow coefficient isk = m ⁄ √ Δp
The inputm_flow_turbulent determines the location of the regularization.
| Type | Name | Default | Description | 
|---|---|---|---|
| Pressure | dp | Pressure difference between port_a and port_b (= port_a.p - port_b.p) [Pa] | |
| Real | k | Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2) | |
| MassFlowRate | m_flow_turbulent | Mass flow rate [kg/s] | 
| Type | Name | Description | 
|---|---|---|
| MassFlowRate | m_flow | Mass flow rate in design flow direction [kg/s] | 
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
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 isk = m ⁄ √ Δp
The inputm_flow_turbulent determines the location of the regularization.
| Type | Name | Default | Description | 
|---|---|---|---|
| MassFlowRate | m_flow | Mass flow rate in design flow direction [kg/s] | |
| Real | k | Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2) | |
| MassFlowRate | m_flow_turbulent | Mass flow rate [kg/s] | 
| Type | Name | Description | 
|---|---|---|
| Pressure | dp | Pressure difference between port_a and port_b (= port_a.p - port_b.p) [Pa] | 
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;