Skip to content

Commit

Permalink
introduce default value for new input crossArea introduced in r8037 t…
Browse files Browse the repository at this point in the history
…o functions with static head (#1656)

git-svn-id: https://svn.modelica.org/projects/Modelica/branches/maintenance/3.2.1@8086 7ce873d0-865f-4ce7-a662-4bb36ea78beb
  • Loading branch information
rfranke committed Feb 10, 2015
1 parent fad2b11 commit 33953f5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Modelica/Fluid/Pipes.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1316,8 +1316,8 @@ specified nominal values for given geometry parameters <code>crossAreas</code>,
mus[2:n],
pathLengths_internal,
diameters,
(crossAreas[1:n-1]+crossAreas[2:n])/2,
g*dheights,
(crossAreas[1:n-1]+crossAreas[2:n])/2,
(roughnesses[1:n-1]+roughnesses[2:n])/2,
dp_small/(n-1),
Res_turbulent_internal)*nParallel,
Expand All @@ -1332,8 +1332,8 @@ specified nominal values for given geometry parameters <code>crossAreas</code>,
mus[2:n],
pathLengths_internal,
diameters,
(crossAreas[1:n-1]+crossAreas[2:n])/2,
g*dheights,
(crossAreas[1:n-1]+crossAreas[2:n])/2,
(roughnesses[1:n-1]+roughnesses[2:n])/2,
m_flow_small/nParallel,
Res_turbulent_internal),
Expand Down Expand Up @@ -1838,7 +1838,7 @@ See also <a href=\"modelica://Modelica.Fluid.Pipes.BaseClasses.CharacteristicNum
partial package PartialWallFriction
"Partial wall friction characteristic (base package of all wall friction characteristics)"
extends Modelica.Icons.Package;
import Modelica.Constants.pi;
import Modelica.Constants.pi;

// Constants to be set in subpackages
constant Boolean use_mu = true
Expand Down Expand Up @@ -1895,9 +1895,9 @@ See also <a href=\"modelica://Modelica.Fluid.Pipes.BaseClasses.CharacteristicNum
"Dynamic viscosity at port_b (dummy if use_mu = false)";
input SI.Length length "Length of pipe";
input SI.Diameter diameter "Inner (hydraulic) diameter of pipe";
input SI.Area crossArea "Inner cross section area";
input Real g_times_height_ab
"Gravity times (Height(port_b) - Height(port_a))";
input SI.Area crossArea = pi*diameter^2/4 "Inner cross section area";
input SI.Length roughness(min=0) = 2.5e-5
"Absolute roughness of pipe, with a default for a smooth steel pipe (dummy if use_roughness = false)";
input SI.AbsolutePressure dp_small=1
Expand Down Expand Up @@ -1952,9 +1952,9 @@ See also <a href=\"modelica://Modelica.Fluid.Pipes.BaseClasses.CharacteristicNum
"Dynamic viscosity at port_b (dummy if use_mu = false)";
input SI.Length length "Length of pipe";
input SI.Diameter diameter "Inner (hydraulic) diameter of pipe";
input SI.Area crossArea "Inner cross section area";
input Real g_times_height_ab
"Gravity times (Height(port_b) - Height(port_a))";
input SI.Area crossArea = pi*diameter^2/4 "Inner cross section area";
input SI.Length roughness(min=0) = 2.5e-5
"Absolute roughness of pipe, with a default for a smooth steel pipe (dummy if use_roughness = false)";
input SI.MassFlowRate m_flow_small = 0.01
Expand Down Expand Up @@ -3592,11 +3592,11 @@ b has the same sign of the change of density.</p>

equation
if from_dp and not WallFriction.dp_is_zero then
m_flow = WallFriction.massFlowRate_dp_staticHead(dp, rho_a, rho_b, mu_a, mu_b, length, diameter, crossArea,
g_times_height_ab, roughness, if use_x_small_staticHead then dp_small_staticHead else dp_small);
m_flow = WallFriction.massFlowRate_dp_staticHead(dp, rho_a, rho_b, mu_a, mu_b, length, diameter,
g_times_height_ab, crossArea, roughness, if use_x_small_staticHead then dp_small_staticHead else dp_small);
else
dp = WallFriction.pressureLoss_m_flow_staticHead(m_flow, rho_a, rho_b, mu_a, mu_b, length, diameter, crossArea,
g_times_height_ab, roughness, if use_x_small_staticHead then m_flow_small_staticHead else m_flow_small);
dp = WallFriction.pressureLoss_m_flow_staticHead(m_flow, rho_a, rho_b, mu_a, mu_b, length, diameter,
g_times_height_ab, crossArea, roughness, if use_x_small_staticHead then m_flow_small_staticHead else m_flow_small);
end if;

// Energy balance, considering change of potential energy
Expand Down

0 comments on commit 33953f5

Please sign in to comment.