Buildings.Media.Conversions.FlowResistanceFlowWork

Package with functions that convert between flow resistance coefficients

Information

Package with functions that convert between different representations of flow resistances.

Package Content

Name Description
Buildings.Media.Conversions.FlowResistanceFlowWork.MediumOri MediumOri Medium for which flow resistances are declared
Buildings.Media.Conversions.FlowResistanceFlowWork.MediumNew MediumNew New medium for which flow resistances will be computed
TOri=MediumOri.T_default Temperature of original medium at default state
pOri=MediumOri.p_default Pressure of original medium at default state
XOri=MediumOri.X_default Mass fractions of original medium at default state
staOri_default=MediumOri.setState_pTX(T=TOri, p=pOri, X=XOri) Default thermodynamic state of original medium
etaOri=MediumOri.dynamicViscosity(staOri_default) Dynamic viscosity of original medium at default state
rhoOri=MediumOri.density(staOri_default) Mass density of original medium at default state
TNew=MediumNew.T_default Temperature of new medium at default state
pNew=MediumNew.p_default Pressure of new medium at default state
XNew=MediumNew.X_default Mass fractions of new medium at default state
staNew_default=MediumNew.setState_pTX(T=TNew, p=pNew, X=XNew) Default thermodynamic state of new medium
etaNew=MediumNew.dynamicViscosity(staNew_default) Dynamic viscosity of new medium at default state
rhoNew=MediumNew.density(staNew_default) Mass density of new medium at default state
cpOri=MediumOri.specificHeatCapacityCp(staOri_default) Specific heat capacity of original medium at default state
cpNew=MediumNew.specificHeatCapacityCp(staNew_default) Specific heat capacity of new medium at default state
Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_massFlowRate pressureDrop_massFlowRate Function that returns the pressure drop ratio due to a change in medium properties for a given mass flow rate ratio
Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_volumeFlowRate pressureDrop_volumeFlowRate Function that returns the pressure drop ratio due to a change in medium properties for a given volume flow rate ratio
Buildings.Media.Conversions.FlowResistanceFlowWork.flowWork_equalHeatFlowRate flowWork_equalHeatFlowRate Function that returns the flow work ratio for equal heat flow rate
Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_equalHeatFlowRate pressureDrop_equalHeatFlowRate Function that returns the pressure drop ratio for equal heat flow rate

Types and constants

  constant Modelica.Units.SI.Temperature TOri=MediumOri.T_default
    "Temperature of original medium at default state";
  constant Modelica.Units.SI.AbsolutePressure pOri=MediumOri.p_default
    "Pressure of original medium at default state";
  constant MediumOri.MassFraction XOri[MediumOri.nX]=MediumOri.X_default
    "Mass fractions of original medium at default state";
  constant MediumOri.ThermodynamicState staOri_default=
    MediumOri.setState_pTX(
      T=TOri,
      p=pOri,
      X=XOri)
    "Default thermodynamic state of original medium";
  constant Modelica.Units.SI.DynamicViscosity etaOri=
    MediumOri.dynamicViscosity(staOri_default)
    "Dynamic viscosity of original medium at default state";
  constant Modelica.Units.SI.Density rhoOri=
    MediumOri.density(staOri_default)
    "Mass density of original medium at default state";
  constant Modelica.Units.SI.Temperature TNew=MediumNew.T_default
    "Temperature of new medium at default state";
  constant Modelica.Units.SI.AbsolutePressure pNew=MediumNew.p_default
    "Pressure of new medium at default state";
  constant MediumNew.MassFraction XNew[MediumNew.nX]=MediumNew.X_default
    "Mass fractions of new medium at default state";
  constant MediumNew.ThermodynamicState staNew_default=
    MediumNew.setState_pTX(
      T=TNew,
      p=pNew,
      X=XNew)
    "Default thermodynamic state of new medium";
  constant Modelica.Units.SI.DynamicViscosity etaNew=
    MediumNew.dynamicViscosity(staNew_default)
    "Dynamic viscosity of new medium at default state";
  constant Modelica.Units.SI.Density rhoNew=
    MediumNew.density(staNew_default)
    "Mass density of new medium at default state";
  constant Modelica.Units.SI.SpecificHeatCapacity cpOri=
    MediumOri.specificHeatCapacityCp(staOri_default)
    "Specific heat capacity of original medium at default state";
  constant Modelica.Units.SI.SpecificHeatCapacity cpNew=
    MediumNew.specificHeatCapacityCp(staNew_default)
    "Specific heat capacity of new medium at default state";

Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_massFlowRate Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_massFlowRate

Function that returns the pressure drop ratio due to a change in medium properties for a given mass flow rate ratio

Information

Function that converts a mass flow rate ratio to a pressure drop ratio due to a change in medium properties.

The flow coefficient is n=1 for laminar and n=1.688 for turbulent flow. Note that typical textbook equations use n=2. The value n=1.688 is based on a friction coefficient for a Reynolds number of Re=2,300...10,000, in which case the friction coefficient can be approximated as f1 = 0.2767 Re-0.312 with a maximum error or 0.8% (Melinder, 2010), and hence the pressure drop is proportional to v1.688, where v is the flow velocity.

The function assumes that the flow geometry and the flow regime (laminar or turbulent) do not change when the medium changes.

References

Melinder, Åke (2010a). Handbook on Indirect Refrigeration and Heat Pump Systems. Kullavik, Sverige: Svenska Kyltekniska Föreningen. https://varmtochkallt.se/wp-content/uploads/Projekt/Effsys2/P02/ke-Melinder-engelsk-handbok.pdf

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Realratio_m_flow Ratio of mass flow rates, m_flow_new/m_flow_ori [1]
Realn Flow coefficient n, n=1 for laminar, n=2 for fully turbulent [1]

Outputs

TypeNameDescription
Realratio_dpRatio of pressures, dp_new/dp_ori [1]

Modelica definition

function pressureDrop_massFlowRate "Function that returns the pressure drop ratio due to a change in medium properties for a given mass flow rate ratio" extends Modelica.Icons.Function; input Real ratio_m_flow(min=0, unit="1") "Ratio of mass flow rates, m_flow_new/m_flow_ori"; input Real n(min=1, max=2, unit="1") "Flow coefficient n, n=1 for laminar, n=2 for fully turbulent"; output Real ratio_dp(min=0, unit="1") "Ratio of pressures, dp_new/dp_ori"; algorithm ratio_dp := ratio_m_flow^n * (etaOri/etaNew)^(n-2) * (rhoOri/rhoNew); end pressureDrop_massFlowRate;

Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_volumeFlowRate Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_volumeFlowRate

Function that returns the pressure drop ratio due to a change in medium properties for a given volume flow rate ratio

Information

Function that converts a volume flow rate ratio to a pressure drop ratio due to a change in medium properties.

The flow coefficient is n=1 for laminar and n=1.688 for turbulent flow. Note that typical textbook equations use n=2. The value n=1.688 is based on a friction coefficient for a Reynolds number of Re=2,300...10,000, in which case the friction coefficient can be approximated as f1 = 0.2767 Re-0.312 with a maximum error or 0.8% (Melinder, 2010), and hence the pressure drop is proportional to v1.688, where v is the flow velocity.

The function assumes that the flow geometry and the flow regime (laminar or turbulent) do not change when the medium changes.

References

Melinder, Åke (2010a). Handbook on Indirect Refrigeration and Heat Pump Systems. Kullavik, Sverige: Svenska Kyltekniska Föreningen. https://varmtochkallt.se/wp-content/uploads/Projekt/Effsys2/P02/ke-Melinder-engelsk-handbok.pdf

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Realratio_V_flow Ratio of volume flow rates [1]
Realn Flow coefficient n, n=1 for laminar, n=2 for fully turbulent [1]

Outputs

TypeNameDescription
Realratio_dpRatio of pressures [1]

Modelica definition

function pressureDrop_volumeFlowRate "Function that returns the pressure drop ratio due to a change in medium properties for a given volume flow rate ratio" extends Modelica.Icons.Function; input Real ratio_V_flow(min=0, unit="1") "Ratio of volume flow rates"; input Real n(min=1, max=2, unit="1") "Flow coefficient n, n=1 for laminar, n=2 for fully turbulent"; output Real ratio_dp(min=0, unit="1") "Ratio of pressures"; protected Real ratio_m_flow(min=0, unit="1") "Ratio of mass flow rates"; algorithm ratio_m_flow := ratio_V_flow * rhoNew / rhoOri; ratio_dp := pressureDrop_massFlowRate( ratio_m_flow=ratio_m_flow, n=n); end pressureDrop_volumeFlowRate;

Buildings.Media.Conversions.FlowResistanceFlowWork.flowWork_equalHeatFlowRate Buildings.Media.Conversions.FlowResistanceFlowWork.flowWork_equalHeatFlowRate

Function that returns the flow work ratio for equal heat flow rate

Information

Function that returns the ratio of flow work for equal heat flow rate.

If we want to operate the device such that the same amount of heat is transferred with the same inlet temperature, resulting in the same outlet temperatures, we can use for the same heat flow rate

Q̇ = ṁ cp ΔT,

adjust the mass flow rate according to

ṁ ⁄ ṁ0 = cp,0 ⁄ cp,

and use for the flow work the equation W = V̇ Δp / rho.

This function uses these equations to compute the ratio of the the flow work that results from a change in medium properties for the same heat flow rate.

The flow coefficient is n=1 for laminar and n=1.688 for turbulent flow. Note that typical textbook equations use n=2. The value n=1.688 is based on a friction coefficient for a Reynolds number of Re=2,300...10,000, in which case the friction coefficient can be approximated as f1 = 0.2767 Re-0.312 with a maximum error or 0.8% (Melinder, 2010), and hence the pressure drop is proportional to v1.688, where v is the flow velocity.

The function assumes that the flow geometry and the flow regime (laminar or turbulent) do not change when the medium changes.

References

Melinder, Åke (2010a). Handbook on Indirect Refrigeration and Heat Pump Systems. Kullavik, Sverige: Svenska Kyltekniska Föreningen. https://varmtochkallt.se/wp-content/uploads/Projekt/Effsys2/P02/ke-Melinder-engelsk-handbok.pdf

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Realn Flow coefficient n, n=1 for laminar, n=2 for fully turbulent [1]

Outputs

TypeNameDescription
Realratio_WFloRatio of flow work [1]

Modelica definition

function flowWork_equalHeatFlowRate "Function that returns the flow work ratio for equal heat flow rate" extends Modelica.Icons.Function; input Real n(min=1, max=2, unit="1") "Flow coefficient n, n=1 for laminar, n=2 for fully turbulent"; output Real ratio_WFlo(min=0, unit="1") "Ratio of flow work"; algorithm ratio_WFlo := rhoOri / rhoNew * cpOri / cpNew * pressureDrop_equalHeatFlowRate(n=n); end flowWork_equalHeatFlowRate;

Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_equalHeatFlowRate Buildings.Media.Conversions.FlowResistanceFlowWork.pressureDrop_equalHeatFlowRate

Function that returns the pressure drop ratio for equal heat flow rate

Information

Function that returns the pressure drop ratio for equal heat flow rate.

If we want to operate the device such that the same amount of heat is transferred with the same inlet temperature, resulting in the same outlet temperatures, we can use

Q̇ = ṁ cp ΔT,

and use

ṁ ⁄ ṁ0 = cp,0 ⁄ cp.

This function uses these equations to compute the ratio of the pressure drop that results from a change in medium properties for the same heat flow rate.

The flow coefficient is n=1 for laminar and n=1.688 for turbulent flow. Note that typical textbook equations use n=2. The value n=1.688 is based on a friction coefficient for a Reynolds number of Re=2,300...10,000, in which case the friction coefficient can be approximated as f1 = 0.2767 Re-0.312 with a maximum error or 0.8% (Melinder, 2010), and hence the pressure drop is proportional to v1.688, where v is the flow velocity.

The function assumes that the flow geometry and the flow regime (laminar or turbulent) do not change when the medium changes.

References

Melinder, Åke (2010a). Handbook on Indirect Refrigeration and Heat Pump Systems. Kullavik, Sverige: Svenska Kyltekniska Föreningen. https://varmtochkallt.se/wp-content/uploads/Projekt/Effsys2/P02/ke-Melinder-engelsk-handbok.pdf

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Realn Flow coefficient n, n=1 for laminar, n=2 for fully turbulent [1]

Outputs

TypeNameDescription
Realratio_dpRatio of pressures [1]

Modelica definition

function pressureDrop_equalHeatFlowRate "Function that returns the pressure drop ratio for equal heat flow rate" extends Modelica.Icons.Function; input Real n(min=1, max=2, unit="1") "Flow coefficient n, n=1 for laminar, n=2 for fully turbulent"; output Real ratio_dp(min=0, unit="1") "Ratio of pressures"; algorithm ratio_dp := pressureDrop_massFlowRate( ratio_m_flow=cpOri / cpNew, n=n); end pressureDrop_equalHeatFlowRate;