Modelica.Fluid.Dissipation.PressureLoss.General

Package for generic pressure loss calculations

Information


General

General pressure loss for ideal gas

Calculation of a generic pressure loss for an ideal gas using mean density. See more information.

Generic pressure loss depending on density and viscosity

Calculation of a generic pressure loss in dependence of nominal fluid variables (e.g., nominal density, nominal dynamic viscosity) at an operation point via interpolation. This generic function considers the pressure loss law via a pressure loss exponent and the influence of density and dynamic viscosity on pressure loss. See more information.

Generic pressure loss depending on density

Calculation of a generic pressure loss in dependence of nominal fluid variables (e.g., nominal density) via interpolation from an operation point. See more information.

Generic pressure loss depending on pressure loss coefficient

Calculation of a generic pressure loss in dependence of a pressure loss coefficient. See more information.

Generic pressure loss depending on volume flow rate

Calculation of a generic pressure loss with linear or quadratic dependence on volume flow rate. See more information.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

NameDescription
Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_DP dp_idealGas_DP Generic pressure loss | calculate pressure loss | ideal gas | mean density
Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_MFLOW dp_idealGas_MFLOW Generic pressure loss | calculate mass flow rate | ideal gas | mean density
Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_con dp_idealGas_IN_con Input record for function dp_idealGas_DP and dp_idealGas_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_var dp_idealGas_IN_var Input record for function dp_idealGas_DP and dp_idealGas_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_DP dp_nominalDensityViscosity_DP Generic pressure loss | calculate mass flow rate | nominal operation point | pressure loss law (exponent) | density and dynamic viscosity dependence
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_MFLOW dp_nominalDensityViscosity_MFLOW Generic pressure loss | calculate M_FLOW (compressible) | nominal operation point | pressure loss law (exponent) | density and dynamic viscosity dependence
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_con dp_nominalDensityViscosity_IN_con Output record for function dp_nominalDensityViscosity_DP and dp_nominalDensityViscosity_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_var dp_nominalDensityViscosity_IN_var Output record for function dp_nominalDensityViscosity_DP and dp_nominalDensityViscosity_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_DP dp_nominalPressureLossLawDensity_DP Generic pressure loss | calculate pressure loss | nominal operation point | pressure loss law (coefficient and exponent) | density dependence
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_MFLOW dp_nominalPressureLossLawDensity_MFLOW Generic pressure loss | calculate mass flow rate | nominal operation point | pressure loss law (coefficient and exponent) | density dependence
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_con dp_nominalPressureLossLawDensity_IN_con Input record for function dp_nominalPressureLossLawDensity_DP and dp_nominalPressureLossLawDensity_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_var dp_nominalPressureLossLawDensity_IN_var Input record for function dp_nominalPressureLossLawDensity_DP and dp_nominalPressureLossLawDensity_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_DP dp_pressureLossCoefficient_DP Generic pressure loss | calculate pressure loss | pressure loss coefficient (zeta_TOT)
Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_MFLOW dp_pressureLossCoefficient_MFLOW Generic pressure loss | calculate mass flow rate | pressure loss coefficient (zeta_TOT)
Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_con dp_pressureLossCoefficient_IN_con Input record for function dp_pressureLossCoefficient_DP and dp_pressureLossCoefficient_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_var dp_pressureLossCoefficient_IN_var Input record for function dp_pressureLossCoefficient_DP and dp_pressureLossCoefficient_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_DP dp_volumeFlowRate_DP Generic pressure loss | calculate pressure loss | quadratic function (dp=a*V_flow^2 + b*V_flow)
Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_MFLOW dp_volumeFlowRate_MFLOW Generic pressure loss | calculate mass flow rate | quadratic function (dp=a*V_flow^2 + b*V_flow)
Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_con dp_volumeFlowRate_IN_con Input record for function dp_volumeFlowRate_DP and dp_volumeFlowRate_MFLOW
Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_var dp_volumeFlowRate_IN_var Input record for function dp_volumeFlowRate_DP and dp_volumeFlowRate_MFLOW


Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_DP

Generic pressure loss | calculate pressure loss | ideal gas | mean density

Information


Calculation of a generic pressure loss for an ideal gas using mean density.

Generally this function is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. On the other hand the function dp_idealGas_MFLOW is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_idealGas_IN_conIN_con Input record for function dp_idealGas_DP
Variable inputs
dp_idealGas_IN_varIN_var Input record for function dp_idealGas_DP
Input
MassFlowRatem_flow Mass flow rate [kg/s]

Outputs

TypeNameDescription
PressureDPOutput for function dp_idealGas_DP [Pa]

Modelica definition

function dp_idealGas_DP 
  "Generic pressure loss | calculate pressure loss | ideal gas | mean density"

  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;
  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_con
    IN_con "Input record for function dp_idealGas_DP";
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_var
    IN_var "Input record for function dp_idealGas_DP";
  input SI.MassFlowRate m_flow "Mass flow rate";

  //output variables
  output SI.Pressure DP "Output for function dp_idealGas_DP";

protected 
  Real Km_internal=IN_con.Km "Coefficient for pressure loss";

  SI.Density rho_internal=IN_var.p_m/(IN_con.R_s*IN_var.T_m) "Mean density";
  SI.VolumeFlowRate V_flow=m_flow/rho_internal "Volume flow rate [m3/s]";
  SI.VolumeFlowRate V_flow_min=(IN_con.R_s/Km_internal)^(1/IN_con.exp)*
      rho_internal^(1/IN_con.exp - 1)*IN_con.dp_smooth^(1/IN_con.exp) 
    "Start of approximation for decreasing volume flow rate";

  //Documentation

algorithm 
  DP := (Km_internal/IN_con.R_s)*(rho_internal)^(IN_con.exp - 1)*
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          V_flow,
          V_flow_min,
          IN_con.exp);
end dp_idealGas_DP;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_MFLOW

Generic pressure loss | calculate mass flow rate | ideal gas | mean density

Information


Calculation of a generic pressure loss for an ideal gas using mean density.

Generally this function is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. On the other hand the function dp_idealGas_DP is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_idealGas_IN_conIN_con Input record for function dp_idealGas_MFLOW
Variable inputs
dp_idealGas_IN_varIN_var Input record for function dp_idealGas_MFLOW
Input
Pressuredp Pressure loss [Pa]

Outputs

TypeNameDescription
MassFlowRateM_FLOWOutput for function dp_idealGas_MFLOW [kg/s]

Modelica definition

function dp_idealGas_MFLOW 
  "Generic pressure loss | calculate mass flow rate | ideal gas | mean density"

  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;
  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_con
    IN_con "Input record for function dp_idealGas_MFLOW";
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_var
    IN_var "Input record for function dp_idealGas_MFLOW";
  input SI.Pressure dp "Pressure loss";

  //output variables
  output SI.MassFlowRate M_FLOW "Output for function dp_idealGas_MFLOW";

protected 
  Real Km_internal=IN_con.Km "Coefficient for pressure loss";

  SI.Density rho_internal=IN_var.p_m/(IN_con.R_s*IN_var.T_m) "Mean density";

  //Documentation

algorithm 
  M_FLOW := (IN_con.R_s/Km_internal)^(1/IN_con.exp)*(rho_internal)^(1/
    IN_con.exp)*Dissipation.Utilities.Functions.General.SmoothPower(
          dp,
          IN_con.dp_smooth,
          1/IN_con.exp);
end dp_idealGas_MFLOW;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_con Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_con

Input record for function dp_idealGas_DP and dp_idealGas_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_idealGas_DP  and
 dp_idealGas_MFLOW .

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.IdealGas_con (Base record for generic pressure loss function | ideal gas | mean density).

Parameters

TypeNameDefaultDescription
Generic variables
Realexp2Exponent of pressure loss law
RealKm6824.86Coefficient for pressure loss law [(Pa)^2/{(kg/s)^exp*K}]
Fluid properties
SpecificHeatCapacityR_s Specific gas constant of ideal gas [J/(kg.K)]
Linearisation
Pressuredp_smooth1Start linearisation for smaller pressure loss [Pa]

Modelica definition

record dp_idealGas_IN_con 
  "Input record for function dp_idealGas_DP and dp_idealGas_MFLOW"

  //generic variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.IdealGas_con;

  //linearisation
  SI.Pressure dp_smooth(min=Modelica.Constants.eps) = 1 
    "Start linearisation for smaller pressure loss";


end dp_idealGas_IN_con;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_var Modelica.Fluid.Dissipation.PressureLoss.General.dp_idealGas_IN_var

Input record for function dp_idealGas_DP and dp_idealGas_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_idealGas_DP and
 dp_idealGas_MFLOW.

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.IdealGas_var (Base record for generic pressure loss function | ideal gas | mean density).

Parameters

TypeNameDefaultDescription
Fluid properties
Densityrho_m Mean density of ideal gas [kg/m3]
Temp_KT_m Mean temperature of ideal gas [K]
Pressurep_m Mean pressure of ideal gas [Pa]

Modelica definition

record dp_idealGas_IN_var 
  "Input record for function dp_idealGas_DP and dp_idealGas_MFLOW"

  //generic variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.IdealGas_var;


end dp_idealGas_IN_var;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_DP

Generic pressure loss | calculate mass flow rate | nominal operation point | pressure loss law (exponent) | density and dynamic viscosity dependence

Information


Calculation of a generic pressure loss in dependence of nominal fluid variables (e.g., nominal density, nominal dynamic viscosity) at an operation point via interpolation. This generic function considers the pressure loss law via a pressure loss exponent and the influence of density and dynamic viscosity on pressure loss.

Generally this function is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. On the other hand the function dp_nominalDensityViscosity_MFLOW is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_nominalDensityViscosity_IN_conIN_con Input record for function dp_nominalDensityViscosity_DP
Variable inputs
dp_nominalDensityViscosity_IN_varIN_var Input record for function dp_nominalDensityViscosity_DP
Input
MassFlowRatem_flow Mass flow rate [kg/s]

Outputs

TypeNameDescription
PressureDPOutput for function dp_nominalDensityViscosity_DP [Pa]

Modelica definition

function dp_nominalDensityViscosity_DP 
  "Generic pressure loss | calculate mass flow rate | nominal operation point | pressure loss law (exponent) | density and dynamic viscosity dependence"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_con
    IN_con "Input record for function dp_nominalDensityViscosity_DP";
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_var
    IN_var "Input record for function dp_nominalDensityViscosity_DP";
  input SI.MassFlowRate m_flow "Mass flow rate";

  //output variables
  output SI.Pressure DP "Output for function dp_nominalDensityViscosity_DP";

protected 
  SI.MassFlowRate m_flow_smooth=(max(1, 0.01*IN_con.dp_nom)*IN_var.rho/IN_con.rho_nom
      *(1/IN_var.eta*IN_con.eta_nom)^(IN_con.exp_eta)*(1/IN_con.m_flow_nom))^(1
      /IN_con.exp) "Start of approximation for decreasing mass flow rate";

  //Documentation

algorithm 
  DP := if IN_con.exp > 1.0 or IN_con.exp < 1.0 then 
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          m_flow,
          m_flow_smooth,
          IN_con.exp)*(IN_var.eta/IN_con.eta_nom)^IN_con.exp_eta*IN_con.rho_nom
    /IN_var.rho*IN_con.dp_nom*(1/IN_con.m_flow_nom)^(IN_con.exp) else 
    m_flow/IN_con.m_flow_nom*(IN_var.eta/IN_con.eta_nom)^IN_con.exp_eta*
    IN_con.rho_nom/IN_var.rho*IN_con.dp_nom;
end dp_nominalDensityViscosity_DP;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_MFLOW

Generic pressure loss | calculate M_FLOW (compressible) | nominal operation point | pressure loss law (exponent) | density and dynamic viscosity dependence

Information


Calculation of a generic pressure loss in dependence of nominal fluid variables (e.g., nominal density, nominal dynamic viscosity) at an operation point via interpolation. This generic function considers the pressure loss law via a pressure loss exponent and the influence of density and dynamic viscosity on pressure loss.

Generally this function is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. On the other hand the function dp_genericDensityViscosity_DP is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_nominalDensityViscosity_IN_conIN_con Input record for function dp_nominalDensityViscosity_MFLOW
Variable inputs
dp_nominalDensityViscosity_IN_varIN_var Input record for function dp_nominalDensityViscosity_MFLOW
Input
Pressuredp Pressure loss [Pa]

Outputs

TypeNameDescription
MassFlowRateM_FLOWOutput for function dp_nominalDensityViscosity_MFLOW [kg/s]

Modelica definition

function dp_nominalDensityViscosity_MFLOW 
  "Generic pressure loss | calculate M_FLOW (compressible) | nominal operation point | pressure loss law (exponent) | density and dynamic viscosity dependence"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_con
    IN_con "Input record for function dp_nominalDensityViscosity_MFLOW";

  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_var
    IN_var "Input record for function dp_nominalDensityViscosity_MFLOW";

  input SI.Pressure dp "Pressure loss";

  //output variables
  output SI.MassFlowRate M_FLOW 
    "Output for function dp_nominalDensityViscosity_MFLOW";

  //Documentation

algorithm 
  M_FLOW := if IN_con.exp > 1.0 or IN_con.exp < 1.0 then 
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          dp,
          0.01*IN_con.dp_nom,
          1/IN_con.exp)*(IN_con.eta_nom/IN_var.eta)^(IN_con.exp_eta/
    IN_con.exp)*(1/IN_con.dp_nom*IN_var.rho/IN_con.rho_nom)^(1/IN_con.exp)
    *IN_con.m_flow_nom else dp/IN_con.dp_nom*(IN_con.eta_nom/IN_var.eta)^
    (IN_con.exp_eta)*IN_var.rho/IN_con.rho_nom*IN_con.m_flow_nom;
end dp_nominalDensityViscosity_MFLOW;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_con Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_con

Output record for function dp_nominalDensityViscosity_DP and dp_nominalDensityViscosity_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_nominalDensityViscosity_DP and
 dp_nominalDensityViscosity_MFLOW.

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.NominalDensityViscosity (Base record for generic pressure loss function).

Parameters

TypeNameDefaultDescription
Generic variables
Pressuredp_nom2Nominal pressure loss (at nominal values of mass flow rate and density) [Pa]
Realexp2Exponent of pressure loss law
MassFlowRatem_flow_nom1Nominal mass flow rate (at nominal values of pressure loss and density) [kg/s]
Densityrho_nom Nominal density (at nominal values of mass flow rate and pressure loss) [kg/m3]
Realexp_eta1Exponent for dynamic viscosity dependence
DynamicViscosityeta_nom Dynamic viscosity at nominal pressure loss [Pa.s]

Modelica definition

record dp_nominalDensityViscosity_IN_con 
  "Output record for function dp_nominalDensityViscosity_DP and dp_nominalDensityViscosity_MFLOW"

  //generic variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.NominalDensityViscosity;

end dp_nominalDensityViscosity_IN_con;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_var Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalDensityViscosity_IN_var

Output record for function dp_nominalDensityViscosity_DP and dp_nominalDensityViscosity_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_nominalDensityViscosity_DP and
 dp_nominalDensityViscosity_MFLOW.

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.PressureLoss (Base record for fluid properties for pressure loss).

Parameters

TypeNameDefaultDescription
Fluid properties
DynamicViscosityeta Dynamic viscosity of fluid [Pa.s]
Densityrho Density of fluid [kg/m3]

Modelica definition

record dp_nominalDensityViscosity_IN_var 
  "Output record for function dp_nominalDensityViscosity_DP and dp_nominalDensityViscosity_MFLOW"

  //fluid property variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.PressureLoss;

end dp_nominalDensityViscosity_IN_var;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_DP

Generic pressure loss | calculate pressure loss | nominal operation point | pressure loss law (coefficient and exponent) | density dependence

Information


Calculation of a generic pressure loss in dependence of nominal fluid variables (e.g., nominal density) via interpolation from an operation point. This generic function considers the pressure loss law via a nominal pressure loss (dp_nom), a pressure loss coefficient (zeta_TOT) and a pressure loss law exponent (exp) as well as the influence of density on pressure loss.

Generally this function is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. On the other hand the function dp_nominalPressureLossLawDensity_MFLOW is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_nominalPressureLossLawDensity_IN_conIN_con Input record for function dp_nominalPressureLossLawDensity_DP
Variable inputs
dp_nominalPressureLossLawDensity_IN_varIN_var Input record for function dp_nominalPressureLossLawDensity_DP
Input
MassFlowRatem_flow Mass flow rate [kg/s]

Outputs

TypeNameDescription
PressureDPOutput for function dp_nominalPressureLossLawDensity_yesAJac_DP [Pa]

Modelica definition

function dp_nominalPressureLossLawDensity_DP 
  "Generic pressure loss | calculate pressure loss | nominal operation point | pressure loss law (coefficient and exponent) | density dependence"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_con
    IN_con "Input record for function dp_nominalPressureLossLawDensity_DP";
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_var
    IN_var "Input record for function dp_nominalPressureLossLawDensity_DP";
  input SI.MassFlowRate m_flow "Mass flow rate";

  //output variables
  output SI.Pressure DP 
    "Output for function dp_nominalPressureLossLawDensity_yesAJac_DP";

protected 
  Real exp_density=if IN_con.target ==Dissipation.Utilities.Types.MassOrVolumeFlowRate.MassFlowRate then 
            1 - IN_con.exp else 1 "Exponent of density fraction (rho/rho_nom)";
  SI.MassFlowRate m_flow_nom=if IN_con.target ==Dissipation.Utilities.Types.MassOrVolumeFlowRate.MassFlowRate then 
            IN_con.m_flow_nom else IN_var.rho*IN_con.V_flow_nom 
    "Nominal mean flow velocity at operation point";

  SI.MassFlowRate m_flow_linear=(0.01*(IN_con.zeta_TOT_nom/IN_var.zeta_TOT)*(
      IN_con.rho_nom/IN_var.rho)^(exp_density)*(IN_con.A_cross/IN_con.A_cross_nom)
      ^(IN_con.exp)*IN_con.m_flow_nom)^(1/IN_con.exp) 
    "Start of approximation for decreasing mass flow rate";

  //Documentation

algorithm 
  DP := if IN_con.exp > 1.0 or IN_con.exp < 1.0 then 
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          m_flow,
          m_flow_linear,
          IN_con.exp)*IN_con.dp_nom*(IN_var.zeta_TOT/IN_con.zeta_TOT_nom)
    *(IN_var.rho/IN_con.rho_nom)^(exp_density)*(IN_con.A_cross_nom/IN_con.A_cross)
    ^(IN_con.exp)*(1/IN_con.m_flow_nom)^(IN_con.exp) else IN_con.dp_nom*(
    IN_var.zeta_TOT/IN_con.zeta_TOT_nom)*(IN_var.rho/IN_con.rho_nom)^(
    exp_density)*(IN_con.A_cross_nom/IN_con.A_cross)^(1)*(m_flow/IN_con.m_flow_nom)
    ^(1);

end dp_nominalPressureLossLawDensity_DP;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_MFLOW

Generic pressure loss | calculate mass flow rate | nominal operation point | pressure loss law (coefficient and exponent) | density dependence

Information


Calculation of a generic pressure loss in dependence of nominal fluid variables (e.g., nominal density) via interpolation from an operation point. This generic function considers the pressure loss law via a nominal pressure loss (dp_nom), a pressure loss coefficient (zeta_TOT) and a pressure loss law exponent (exp) as well as the influence of density on pressure loss.

Generally this function is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. On the other hand the function dp_nominalPressurelosslawDensity_DP is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_nominalPressureLossLawDensity_IN_conIN_con Input record for function dp_nominalPressureLossLawDensity_MFLOW
Variable inputs
dp_nominalPressureLossLawDensity_IN_varIN_var Input record for function dp_nominalPressureLossLawDensity_MFLOW
Input
Pressuredp Pressure loss [Pa]

Outputs

TypeNameDescription
MassFlowRateM_FLOWOutput for function dp_nominalPressurelosslawDensity_MFLOW [kg/s]

Modelica definition

function dp_nominalPressureLossLawDensity_MFLOW 
  "Generic pressure loss | calculate mass flow rate | nominal operation point | pressure loss law (coefficient and exponent) | density dependence"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_con
    IN_con "Input record for function dp_nominalPressureLossLawDensity_MFLOW";
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_var
    IN_var "Input record for function dp_nominalPressureLossLawDensity_MFLOW";
  input SI.Pressure dp "Pressure loss";

  //output variables
  output SI.MassFlowRate M_FLOW 
    "Output for function dp_nominalPressurelosslawDensity_MFLOW";

protected 
  Real exp_density=if IN_con.target ==Dissipation.Utilities.Types.MassOrVolumeFlowRate.MassFlowRate then 
            1 - IN_con.exp else 1 "Exponent of density fraction (rho/rho_nom)";
  SI.MassFlowRate m_flow_nom=if IN_con.target ==Dissipation.Utilities.Types.MassOrVolumeFlowRate.MassFlowRate then 
            IN_con.m_flow_nom else IN_var.rho*IN_con.V_flow_nom 
    "Nominal mean flow velocity at operation point";

  //Documentation

algorithm 
  M_FLOW := if IN_con.exp > 1.0 or IN_con.exp < 1.0 then 
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          dp,
          0.01*IN_con.dp_nom,
          1/IN_con.exp)*IN_con.m_flow_nom*(IN_con.A_cross/IN_con.A_cross_nom)
    *(IN_con.rho_nom/IN_var.rho)^(exp_density/IN_con.exp)*((1/IN_con.dp_nom)
    *(IN_con.zeta_TOT_nom/IN_var.zeta_TOT))^(1/IN_con.exp) else IN_con.m_flow_nom
    *(IN_con.A_cross/IN_con.A_cross_nom)*(IN_con.rho_nom/IN_var.rho)^(
    exp_density/1)*((dp/IN_con.dp_nom)*(IN_con.zeta_TOT_nom/IN_var.zeta_TOT))
    ^(1/1);
end dp_nominalPressureLossLawDensity_MFLOW;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_con Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_con

Input record for function dp_nominalPressureLossLawDensity_DP and dp_nominalPressureLossLawDensity_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_nominalPressureLosslawDensity_DP and
 dp_nominalPressureLosslawDensity_MFLOW.

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.NominalPressureLossLawDensity_con (Base record for generic pressure loss function).

Parameters

TypeNameDefaultDescription
Generic variables
MassOrVolumeFlowRatetargetDissipation.Utilities.Types....1 == use nominal mass flow rate | 2 == use nominal volume flow rate
AreaA_crossA_cross_nomCross sectional area [m2]
AreaA_cross_nomModelica.Constants.pi*0.1^2/4Nominal cross sectional area [m2]
Pressuredp_nom2Nominal pressure loss (at nominal values of mass flow rate and density) [Pa]
MassFlowRatem_flow_nom1Nominal mass flow rate (at nominal values of pressure loss and density) [kg/s]
Realexp2Exponent of pressure loss law
VolumeFlowRateV_flow_nomm_flow_nom/rho_nomNominal volume flow rate (at nominal values of pressure loss and density) [m3/s]
Densityrho_nom Nominal density (at nominal values of mass flow rate and pressure loss) [kg/m3]
PressureLossCoefficientzeta_TOT_nom0.02*1/0.1Nominal pressure loss coefficient (for nominal values) [1]

Modelica definition

record dp_nominalPressureLossLawDensity_IN_con 
  "Input record for function dp_nominalPressureLossLawDensity_DP and dp_nominalPressureLossLawDensity_MFLOW"

  //generic variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.NominalPressureLossLawDensity_con;

end dp_nominalPressureLossLawDensity_IN_con;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_var Modelica.Fluid.Dissipation.PressureLoss.General.dp_nominalPressureLossLawDensity_IN_var

Input record for function dp_nominalPressureLossLawDensity_DP and dp_nominalPressureLossLawDensity_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_nominalPressureLosslawDensity_DP and
 dp_nominalPressureLosslawDensity_MFLOW.

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.NominalPressureLossLawDensity_var (Base record for generic pressure loss function).

Parameters

TypeNameDefaultDescription
Generic variables
PressureLossCoefficientzeta_TOT0.2Pressure loss coefficient [1]
Fluid properties
Densityrho Density of fluid [kg/m3]

Modelica definition

record dp_nominalPressureLossLawDensity_IN_var 
  "Input record for function dp_nominalPressureLossLawDensity_DP and dp_nominalPressureLossLawDensity_MFLOW"

  //generic variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.NominalPressureLossLawDensity_var;

  //fluid property variables
  SI.Density rho "Density of fluid";

end dp_nominalPressureLossLawDensity_IN_var;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_DP

Generic pressure loss | calculate pressure loss | pressure loss coefficient (zeta_TOT)

Information


Calculation of a generic pressure loss in dependence of a pressure loss coefficient.

Generally this function is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. On the other hand the function dp_pressureLossCoefficient_MFLOW is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_pressureLossCoefficient_IN_conIN_con Input record for dp_pressureLossCoefficient_DP
Variable inputs
dp_pressureLossCoefficient_IN_varIN_var Input record for dp_pressureLossCoefficient_DP
Input
MassFlowRatem_flow Mass flow rate [kg/s]

Outputs

TypeNameDescription
PressureDPOutput for function dp_pressureLossCoefficient_DP [Pa]

Modelica definition

function dp_pressureLossCoefficient_DP 
  "Generic pressure loss | calculate pressure loss | pressure loss coefficient (zeta_TOT)"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_con
    IN_con "Input record for dp_pressureLossCoefficient_DP";
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_var
    IN_var "Input record for dp_pressureLossCoefficient_DP";
  input SI.MassFlowRate m_flow "Mass flow rate";

  //output variables
  output SI.Pressure DP "Output for function dp_pressureLossCoefficient_DP";

  //Documentation

algorithm 
  DP := 0.5*IN_var.zeta_TOT*
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          m_flow,
          (IN_con.dp_smooth/(0.5*IN_var.zeta_TOT*IN_var.rho))^0.5*IN_var.rho
      *IN_con.A_cross,
          2)/(IN_var.rho*(IN_con.A_cross)^2);
end dp_pressureLossCoefficient_DP;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_MFLOW

Generic pressure loss | calculate mass flow rate | pressure loss coefficient (zeta_TOT)

Information


Calculation of a generic pressure loss in dependence of a pressure loss coefficient.

Generally this function is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. On the other hand the function dp_pressureLossCoefficient_DP is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_pressureLossCoefficient_IN_conIN_con Input record for function dp_pressureLossCoefficient_MFLOW
Variable inputs
dp_pressureLossCoefficient_IN_varIN_var Input record for function dp_pressureLossCoefficient_MFLOW
Input
Pressuredp Pressure loss [Pa]

Outputs

TypeNameDescription
MassFlowRateM_FLOWOutput for function dp_pressureLossCoefficientt_MFLOW [kg/s]

Modelica definition

function dp_pressureLossCoefficient_MFLOW 
  "Generic pressure loss | calculate mass flow rate | pressure loss coefficient (zeta_TOT)"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_con
    IN_con "Input record for function dp_pressureLossCoefficient_MFLOW";

  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_var
    IN_var "Input record for function dp_pressureLossCoefficient_MFLOW";
  input SI.Pressure dp "Pressure loss";

  //output variables
  output SI.MassFlowRate M_FLOW 
    "Output for function dp_pressureLossCoefficientt_MFLOW";

  //Documentation

algorithm 
  M_FLOW := IN_var.rho*IN_con.A_cross*
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          dp,
          IN_con.dp_smooth,
          0.5)/(0.5*IN_var.zeta_TOT*IN_var.rho)^0.5;
end dp_pressureLossCoefficient_MFLOW;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_con Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_con

Input record for function dp_pressureLossCoefficient_DP and dp_pressureLossCoefficient_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_pressureLossCoefficient_DP and
 dp_pressureLossCoefficient_MFLOW.

Extends from Modelica.Icons.Record (Icon for records).

Parameters

TypeNameDefaultDescription
Generic variables
AreaA_crossModelica.Constants.pi*0.1^2/4Cross sectional area [m2]
Linearisation
Pressuredp_smooth1Start linearisation for decreasing pressure loss [Pa]

Modelica definition

record dp_pressureLossCoefficient_IN_con 
  "Input record for function dp_pressureLossCoefficient_DP and dp_pressureLossCoefficient_MFLOW"
  extends Modelica.Icons.Record;

  //generic variables
  SI.Area A_cross=Modelica.Constants.pi*0.1^2/4 "Cross sectional area";

  //linearisation
  SI.Pressure dp_smooth=1 "Start linearisation for decreasing pressure loss";

end dp_pressureLossCoefficient_IN_con;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_var Modelica.Fluid.Dissipation.PressureLoss.General.dp_pressureLossCoefficient_IN_var

Input record for function dp_pressureLossCoefficient_DP and dp_pressureLossCoefficient_MFLOW

Information


This record is used as  input record  for the pressure loss function
 dp_pressureLossCoefficient_DP and
 dp_pressureLossCoefficient_MFLOW.

Extends from Modelica.Icons.Record (Icon for records).

Parameters

TypeNameDefaultDescription
Generic variables
PressureLossCoefficientzeta_TOT0.02*1/0.1Pressure loss coefficient [1]
FluidProperties
Densityrho Density of fluid [kg/m3]

Modelica definition

record dp_pressureLossCoefficient_IN_var 
  "Input record for function dp_pressureLossCoefficient_DP and dp_pressureLossCoefficient_MFLOW"
  extends Modelica.Icons.Record;

  //generic variables
  TYP.PressureLossCoefficient zeta_TOT=0.02*1/0.1 "Pressure loss coefficient";

  //fluid property variables
  SI.Density rho "Density of fluid";

end dp_pressureLossCoefficient_IN_var;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_DP

Generic pressure loss | calculate pressure loss | quadratic function (dp=a*V_flow^2 + b*V_flow)

Information


Calculation of a generic pressure loss with linear or quadratic dependence on volume flow rate. The function can be used to calculate pressure loss at known mass flow rate or mass flow rate at known pressure loss.

Generally this function is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. On the other hand the function dp_volumeFlowRate_MFLOW is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_volumeFlowRate_IN_conIN_con Input record for function dp_volumeFlowRate_DP
Variable inputs
dp_volumeFlowRate_IN_varIN_var Input record for function dp_volumeFlowRate_DP
Input
MassFlowRatem_flow Mass flow rate [kg/s]

Outputs

TypeNameDescription
PressureDPOutput for function dp_volumeFlowRate_DP [Pa]

Modelica definition

function dp_volumeFlowRate_DP 
  "Generic pressure loss | calculate pressure loss | quadratic function (dp=a*V_flow^2 + b*V_flow)"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_con
    IN_con "Input record for function dp_volumeFlowRate_DP";

  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_var
    IN_var "Input record for function dp_volumeFlowRate_DP";
  input SI.MassFlowRate m_flow "Mass flow rate";

  //output variables
  output SI.Pressure DP "Output for function dp_volumeFlowRate_DP";

protected 
  Real a=max(Modelica.Constants.eps, abs(IN_con.a));
  Real b=max(Modelica.Constants.eps, abs(IN_con.b));

  SI.VolumeFlowRate V_flow=m_flow/max(Modelica.Constants.eps, IN_var.rho) 
    "Volume flow rate";
  SI.Pressure dp_min=IN_con.dp_min 
    "Start of approximation for decreasing pressure loss";
  SI.VolumeFlowRate V_flow_smooth=if IN_con.a > 0 then -(b/(2*a) + ((-b/(2*a))^
      2 + dp_min/a)^0.5) else dp_min/b 
    "Start of approximation for decreasing volume flow rate";

  //Documentation

algorithm 
  DP := a*Dissipation.Utilities.Functions.General.SmoothPower(
          V_flow,
          V_flow_smooth,
          2) + b*V_flow;
end dp_volumeFlowRate_DP;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_MFLOW

Generic pressure loss | calculate mass flow rate | quadratic function (dp=a*V_flow^2 + b*V_flow)

Information


Calculation of a generic pressure loss with linear or quadratic dependence on volume flow rate. The function can be used to calculate pressure loss at known mass flow rate or mass flow rate at known pressure loss.

Generally this function is numerically best used for the compressible case if the pressure loss (dp) is known (out of pressures as state variable) and the mass flow rate (M_FLOW) has to be calculated. On the other hand the function dp_volumeFlowRate_DP is numerically best used for the incompressible case , where the mass flow rate (m_flow) is known (as state variable) in the used model and the corresponding pressure loss (DP) has to be calculated. See more information.

Inputs

TypeNameDefaultDescription
Constant inputs
dp_volumeFlowRate_IN_conIN_con Input record for function dp_volumeFlowRate_MFLOW
Variable inputs
dp_volumeFlowRate_IN_varIN_var Input record for function dp_volumeFlowRate_MFLOW
Input
Pressuredp Pressure loss [Pa]

Outputs

TypeNameDescription
MassFlowRateM_FLOWOutput for function dp_volumeFlowRate_MFLOW [kg/s]

Modelica definition

function dp_volumeFlowRate_MFLOW 
  "Generic pressure loss | calculate mass flow rate | quadratic function (dp=a*V_flow^2 + b*V_flow)"
  import FD = Modelica.Fluid.Dissipation.PressureLoss.General;

  //input records
  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_con
    IN_con "Input record for function dp_volumeFlowRate_MFLOW";

  input Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_var
    IN_var "Input record for function dp_volumeFlowRate_MFLOW";
  input SI.Pressure dp "Pressure loss";

  //output variables
  output SI.MassFlowRate M_FLOW "Output for function dp_volumeFlowRate_MFLOW";

protected 
  Real a=max(Modelica.Constants.eps, abs(IN_con.a));
  Real b=max(Modelica.Constants.eps, abs(IN_con.b));

  SI.Pressure dp_min=IN_con.dp_min 
    "Start of approximation for decreasing pressure loss";

  //Documentation

algorithm 
  M_FLOW := IN_var.rho*(-b/(2*a) +
    Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower(
          (b/(2*a))^2 + (1/a)*dp,
          (b/(2*a))^2 + (1/a)*dp_min,
          0.5));
end dp_volumeFlowRate_MFLOW;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_con Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_con

Input record for function dp_volumeFlowRate_DP and dp_volumeFlowRate_MFLOW

Information


This record is used as  input record  for the pressure loss function
  dp_volumeFlowRate_DP and
  dp_volumeFlowRate_MFLOW.

Extends from Modelica.Fluid.Dissipation.Utilities.Records.General.QuadraticVFLOW (Base record for generic pressure loss function | quadratic function (dp=a*Vdot^2 + b*Vdot)).

Parameters

TypeNameDefaultDescription
Generic variables
Reala15Coefficient for quadratic term [(Pa.s2)/m6]
Realb0Coefficient for linear term [(Pa.s)/m3]

Modelica definition

record dp_volumeFlowRate_IN_con 
  "Input record for function dp_volumeFlowRate_DP and dp_volumeFlowRate_MFLOW"

  //generic variables
  extends Modelica.Fluid.Dissipation.Utilities.Records.General.QuadraticVFLOW;

  SI.Pressure dp_min=0.1 "Start of approximation for decreasing pressure loss";


end dp_volumeFlowRate_IN_con;

Modelica.Fluid.Dissipation.PressureLoss.General.dp_volumeFlowRate_IN_var

Input record for function dp_volumeFlowRate_DP and dp_volumeFlowRate_MFLOW

Information


This record is used as  input record  for the pressure loss function
  dp_volumeFlowRate_DP and
  dp_volumeFlowRate_MFLOW.

Parameters

TypeNameDefaultDescription
Fluid properties
Densityrho Density of fluid [kg/m3]

Modelica definition

record dp_volumeFlowRate_IN_var 
  "Input record for function dp_volumeFlowRate_DP and dp_volumeFlowRate_MFLOW"

  SI.Density rho "Density of fluid";

end dp_volumeFlowRate_IN_var;

Automatically generated Fri Nov 12 16:31:22 2010.