Skip to content

Commit

Permalink
Remove trailing white space
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed May 7, 2014
1 parent 81bcc88 commit 2e4c72c
Show file tree
Hide file tree
Showing 38 changed files with 186 additions and 197 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.jpg binary
24 changes: 12 additions & 12 deletions OpenHydraulics/Basic/BaseClasses/LossFactorData.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ record LossFactorData
This record defines the pressure loss factors of a pipe
segment (orifice, bending etc.) with a minimum amount of data.
If available, data should be provided for <b>both flow directions</b>,
i.e., flow from port_a to port_b and from port_b to port_a,
i.e., flow from port_a to port_b and from port_b to port_a,
as well as for the <b>laminar</b> and the <b>turbulent</b> region.
It is also an option to provide the loss factor <b>only</b> for the
<b>turbulent</b> region for a flow from port_a to port_b.
Expand Down Expand Up @@ -59,29 +59,29 @@ where
&zeta; is constant and is given by \"zeta1\" and
\"zeta2\" depending on the flow direction.<br>
When the Reynolds number Re is below \"Re_turbulent\", the
flow is laminar for small flow velocities. For higher
velocities there is a transition region from
flow is laminar for small flow velocities. For higher
velocities there is a transition region from
laminar to turbulent flow. The loss factor for
laminar flow at small velocities is defined by the often occuring
approximation c0/Re. If c0 is different for the two
flow directions, the mean value has to be used
flow directions, the mean value has to be used
(c0 = (c0_ab + c0_ba)/2).<li>
<li> The equation \"&Delta;p = 0.5*&zeta;*&rho;*v*|v|\" is either with
respect to port_a or to port_b, depending on the definition
of the particular loss factor &zeta; (in some references loss
factors are defined with respect to port_a, in other references
with respect to port_b).</li>
<li> Re = |v|*D_Re*&rho;/&eta; = |m_flow|*D_Re/(A_Re*&eta;)

<li> Re = |v|*D_Re*&rho;/&eta; = |m_flow|*D_Re/(A_Re*&eta;)
is the Reynolds number at the smallest cross
section area. This is often at port_a or at port_b, but can
also be between the two ports. In the record, the diameter
D_Re of this smallest cross section area has to be provided, as
well, as Re_turbulent, the absolute value of the
well, as Re_turbulent, the absolute value of the
Reynolds number at which
the turbulent flow starts. If Re_turbulent is different for
the two flow directions, use the smaller value as Re_turbulent.</li>
<li> D is the diameter of the pipe. If the pipe has not a
<li> D is the diameter of the pipe. If the pipe has not a
circular cross section, D = 4*A/P, where A is the cross section
area and P is the wetted perimeter.</li>
<li> A is the cross section area with A = &pi;(D/2)^2.
Expand All @@ -92,8 +92,8 @@ The laminar and the transition region is usually of
not much technical interest because the operating point is
mostly in the turbulent regime. For simplification and for
numercial reasons, this whole region is described by two
polynomials of third order, one polynomial for m_flow &ge; 0
and one for m_flow &lt; 0. The polynomials start at
polynomials of third order, one polynomial for m_flow &ge; 0
and one for m_flow &lt; 0. The polynomials start at
Re = |m_flow|*4/(&pi;*D_Re*&eta;), where D_Re is the
smallest diameter between port_a and port_b.
The common derivative
Expand All @@ -109,12 +109,12 @@ are identical at Re = 0. The polynomials are constructed, such that
they smoothly touch the characteristic curves in the turbulent
regions. The whole characteristic is therefore <b>continuous</b>
and has a <b>finite</b>, <b>continuous first derivative everywhere</b>.
In some cases, the constructed polynomials would \"vibrate\". This is
In some cases, the constructed polynomials would \"vibrate\". This is
avoided by reducing the derivative at Re=0 in such a way that
the polynomials are guaranteed to be monotonically increasing.
The used sufficient criteria for monotonicity follows from:
</p>

<dl>
<dt> Fritsch F.N. and Carlson R.E. (1980):</dt>
<dd> <b>Monotone piecewise cubic interpolation</b>.
Expand Down
4 changes: 2 additions & 2 deletions OpenHydraulics/Basic/BaseClasses/massFlowRate_dp.mo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ algorithm
dp = 0.5*zeta*d*v*|v|
= 0.5*zeta*d*1/(d*A)^2 * m_flow * |m_flow|
= 0.5*zeta/A^2 *1/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
k = 0.5*zeta/A^2
= 0.5*zeta/(pi*(D/2)^2)^2
= 8*zeta/(pi*D^2)^2
Expand All @@ -28,7 +28,7 @@ m_flow := OpenHydraulics.Utilities.regRoot2(
annotation (smoothOrder=1, Documentation(info="<html>
<p>
Compute mass flow rate from constant loss factor and pressure drop (m_flow = f(dp)).
For small pressure drops (dp &lt; dp_small), the characteristic is approximated by
For small pressure drops (dp &lt; dp_small), the characteristic is approximated by
a polynomial in order to have a finite derivative at zero mass flow rate.
</p>
</html>"));
Expand Down
24 changes: 12 additions & 12 deletions OpenHydraulics/Basic/BaseClasses/massFlowRate_dp_and_Re.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ protected
algorithm
/*
Turbulent region:
Re = m_flow*(4/pi)/(D_Re*eta)
Re = m_flow*(4/pi)/(D_Re*eta)
dp = 0.5*zeta*d*v*|v|
= 0.5*zeta*d*1/(d*A)^2 * m_flow * |m_flow|
= 0.5*zeta/A^2 *1/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
k = 0.5*zeta/A^2
= 0.5*zeta/(pi*(D/2)^2)^2
= 8*zeta/(pi*D^2)^2
m_flow_turbulent = (pi/4)*D_Re*eta*Re_turbulent
dp_turbulent = k/d *(D_Re*eta*pi/4)^2 * Re_turbulent^2
The start of the turbulent region is computed with mean values
of dynamic viscosity eta and density rho. Otherwise, one has
to introduce different "delta" values for both flow directions.
In order to simplify the approach, only one delta is used.
In order to simplify the approach, only one delta is used.
Laminar region:
dp = 0.5*zeta/(A^2*d) * m_flow * |m_flow|
= 0.5 * c0/(|m_flow|*(4/pi)/(D_Re*eta)) / ((pi*(D_Re/2)^2)^2*d) * m_flow*|m_flow|
= 0.5 * c0*(pi/4)*(D_Re*eta) * 16/(pi^2*D_Re^4*d) * m_flow*|m_flow|
= 2*c0/(pi*D_Re^3) * eta/d * m_flow
= k0 * eta/d * m_flow
k0 = 2*c0/(pi*D_Re^3)
In order that the derivative of dp=f(m_flow) is continuous
In order that the derivative of dp=f(m_flow) is continuous
at m_flow=0, the mean values of eta and d are used in the
laminar region: eta/d = (eta_a + eta_b)/(d_a + d_b)
If data.zetaLaminarKnown = false then eta_a and eta_b are potentially zero
Expand All @@ -70,11 +70,11 @@ is treated as a turbulent flow with constant loss factor zeta.
If the Reynolds-number Re &lt; data.Re_turbulent, the flow
is laminar and/or in a transition region between laminar and
turbulent. This region is approximated by two
polynomials of third order, one polynomial for m_flow &ge; 0
and one for m_flow &lt; 0.
polynomials of third order, one polynomial for m_flow &ge; 0
and one for m_flow &lt; 0.
The common derivative
of the two polynomials at Re = 0 is
computed from the equation \"data.c0/Re\".
computed from the equation \"data.c0/Re\".
</p>
<p>
If no data for c0 is available, the derivative at Re = 0 is computed in such
Expand All @@ -83,12 +83,12 @@ are identical at Re = 0. The polynomials are constructed, such that
they smoothly touch the characteristic curves in the turbulent
regions. The whole characteristic is therefore <b>continuous</b>
and has a <b>finite</b>, <b>continuous first derivative everywhere</b>.
In some cases, the constructed polynomials would \"vibrate\". This is
In some cases, the constructed polynomials would \"vibrate\". This is
avoided by reducing the derivative at Re=0 in such a way that
the polynomials are guaranteed to be monotonically increasing.
The used sufficient criteria for monotonicity follows from:
</p>

<dl>
<dt> Fritsch F.N. and Carlson R.E. (1980):</dt>
<dd> <b>Monotone piecewise cubic interpolation</b>.
Expand Down
4 changes: 2 additions & 2 deletions OpenHydraulics/Basic/BaseClasses/pressureLoss_m_flow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ algorithm
dp = 0.5*zeta*d*v*|v|
= 0.5*zeta*d*1/(d*A)^2 * m_flow * |m_flow|
= 0.5*zeta/A^2 *1/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
k = 0.5*zeta/A^2
= 0.5*zeta/(pi*(D/2)^2)^2
= 8*zeta/(pi*D^2)^2
Expand All @@ -28,7 +28,7 @@ dp := OpenHydraulics.Utilities.regSquare2(
annotation (smoothOrder=1, Documentation(info="<html>
<p>
Compute pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)).
For small mass flow rates(|m_flow| &lt; m_flow_small), the characteristic is approximated by
For small mass flow rates(|m_flow| &lt; m_flow_small), the characteristic is approximated by
a polynomial in order to have a finite derivative at zero mass flow rate.
</p>
</html>"));
Expand Down
24 changes: 12 additions & 12 deletions OpenHydraulics/Basic/BaseClasses/pressureLoss_m_flow_and_Re.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ protected
algorithm
/*
Turbulent region:
Re = m_flow*(4/pi)/(D_Re*eta)
Re = m_flow*(4/pi)/(D_Re*eta)
dp = 0.5*zeta*d*v*|v|
= 0.5*zeta*d*1/(d*A)^2 * m_flow * |m_flow|
= 0.5*zeta/A^2 *1/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
= k/d * m_flow * |m_flow|
k = 0.5*zeta/A^2
= 0.5*zeta/(pi*(D/2)^2)^2
= 8*zeta/(pi*D^2)^2
m_flow_turbulent = (pi/4)*D_Re*eta*Re_turbulent
dp_turbulent = k/d *(D_Re*eta*pi/4)^2 * Re_turbulent^2
The start of the turbulent region is computed with mean values
of dynamic viscosity eta and density rho. Otherwise, one has
to introduce different "delta" values for both flow directions.
In order to simplify the approach, only one delta is used.
In order to simplify the approach, only one delta is used.
Laminar region:
dp = 0.5*zeta/(A^2*d) * m_flow * |m_flow|
= 0.5 * c0/(|m_flow|*(4/pi)/(D_Re*eta)) / ((pi*(D_Re/2)^2)^2*d) * m_flow*|m_flow|
= 0.5 * c0*(pi/4)*(D_Re*eta) * 16/(pi^2*D_Re^4*d) * m_flow*|m_flow|
= 2*c0/(pi*D_Re^3) * eta/d * m_flow
= k0 * eta/d * m_flow
k0 = 2*c0/(pi*D_Re^3)
In order that the derivative of dp=f(m_flow) is continuous
In order that the derivative of dp=f(m_flow) is continuous
at m_flow=0, the mean values of eta and d are used in the
laminar region: eta/d = (eta_a + eta_b)/(d_a + d_b)
If data.zetaLaminarKnown = false then eta_a and eta_b are potentially zero
Expand All @@ -67,11 +67,11 @@ is treated as a turbulent flow with constant loss factor zeta.
If the Reynolds-number Re &lt; data.Re_turbulent, the flow
is laminar and/or in a transition region between laminar and
turbulent. This region is approximated by two
polynomials of third order, one polynomial for m_flow &ge; 0
and one for m_flow &lt; 0.
polynomials of third order, one polynomial for m_flow &ge; 0
and one for m_flow &lt; 0.
The common derivative
of the two polynomials at Re = 0 is
computed from the equation \"data.c0/Re\".
computed from the equation \"data.c0/Re\".
</p>
<p>
If no data for c0 is available, the derivative at Re = 0 is computed in such
Expand All @@ -80,12 +80,12 @@ are identical at Re = 0. The polynomials are constructed, such that
they smoothly touch the characteristic curves in the turbulent
regions. The whole characteristic is therefore <b>continuous</b>
and has a <b>finite</b>, <b>continuous first derivative everywhere</b>.
In some cases, the constructed polynomials would \"vibrate\". This is
In some cases, the constructed polynomials would \"vibrate\". This is
avoided by reducing the derivative at Re=0 in such a way that
the polynomials are guaranteed to be monotonically increasing.
The used sufficient criteria for monotonicity follows from:
</p>

<dl>
<dt> Fritsch F.N. and Carlson R.E. (1980):</dt>
<dd> <b>Monotone piecewise cubic interpolation</b>.
Expand Down
4 changes: 2 additions & 2 deletions OpenHydraulics/Basic/WallFriction.mo
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ The details are described in the
The functional relationship of the friction loss factor &lambda; is
displayed in the next figure. Function massFlowRate_dp() defines the \"red curve\"
(\"Swamee and Jain\"), where as function pressureLoss_m_flow() defines the
\"blue curve\" (\"Colebrook-White\"). The two functions are inverses from
\"blue curve\" (\"Colebrook-White\"). The two functions are inverses from
each other and give slightly different results in the transition region
between Re = 1500 .. 4000, in order to get explicit equations without
solving a non-linear equation.
</p>
<img src=\"../Images/Components/PipeFriction1.png\">
</html>"));
end WallFriction;
17 changes: 8 additions & 9 deletions OpenHydraulics/Basic/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ package Basic "Models of basic physical phenomena relevant to the hydraulics dom


annotation (Documentation(info="<html>
<h4><font color=\"#008000\" size=5>Overview</font></h4>
<p>The OpenHydraulics/Basic package includes models of basic physical phenomena relevant to the hydraulics domain.
<h4><font color=\"#008000\" size=5>Overview</font></h4>
<p>The OpenHydraulics/Basic package includes models of basic physical phenomena relevant to the hydraulics domain.
These basic models are used in the components package to model actual hydraulic components.</p>
<h4><font color=\"#008000\" size=5>Licensing</font></h4>
<p>
The OpenHydraulics/Basic package is licensed by Georgia Institute of Technology under the
<a href=\"http://www.modelica.org/licenses/ModelicaLicense2\"><b>Modelica License 2</b></a>.</p>
<a href=\"http://www.modelica.org/licenses/ModelicaLicense2\"><b>Modelica License 2</b></a>.</p>
<p><b>Copyright &copy; 2008-2013, Georgia Insitute of Technology</b>
</p>
<p>
This Modelica package is free software and the use is completely at your own risk;
it can be redistributed and/or modified under the terms of the Modelica License 2.
For license conditions (including the disclaimer of warranty) see
<a href=\"modelica://Hydraulics.UsersGuide.ModelicaLicense2\">Hydraulics.UsersGuide.ModelicaLicense2</a> or visit
This Modelica package is free software and the use is completely at your own risk;
it can be redistributed and/or modified under the terms of the Modelica License 2.
For license conditions (including the disclaimer of warranty) see
<a href=\"modelica://Hydraulics.UsersGuide.ModelicaLicense2\">Hydraulics.UsersGuide.ModelicaLicense2</a> or visit
<a href=\"http://www.modelica.org/licenses/ModelicaLicense2\">http://www.modelica.org/licenses/ModelicaLicense2</a>.
</p>
</html>
"));
</html>"));
end Basic;
15 changes: 7 additions & 8 deletions OpenHydraulics/Circuits/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ package Circuits "A collection of simple and complex hydraulic circuits"


annotation (Documentation(info="<html>
<h4><font color=\"#008000\" size=5>Overview</font></h4>
<h4><font color=\"#008000\" size=5>Overview</font></h4>
<p>The OpenHydraulics/Circuits package includes a collection of simple and complex hydraulic circuits.</p>
<h4><font color=\"#008000\" size=5>Licensing</font></h4>
<p>
The OpenHydraulics/Circuits package is licensed by Georgia Institute of Technology under the
<a href=\"http://www.modelica.org/licenses/ModelicaLicense2\"><b>Modelica License 2</b></a>.</p>
<a href=\"http://www.modelica.org/licenses/ModelicaLicense2\"><b>Modelica License 2</b></a>.</p>
<p><b>Copyright &copy; 2008-2013, Georgia Insitute of Technology</b>
</p>
<p>
This Modelica package is free software and the use is completely at your own risk;
it can be redistributed and/or modified under the terms of the Modelica License 2.
For license conditions (including the disclaimer of warranty) see
<a href=\"modelica://Hydraulics.UsersGuide.ModelicaLicense2\">Hydraulics.UsersGuide.ModelicaLicense2</a> or visit
This Modelica package is free software and the use is completely at your own risk;
it can be redistributed and/or modified under the terms of the Modelica License 2.
For license conditions (including the disclaimer of warranty) see
<a href=\"modelica://Hydraulics.UsersGuide.ModelicaLicense2\">Hydraulics.UsersGuide.ModelicaLicense2</a> or visit
<a href=\"http://www.modelica.org/licenses/ModelicaLicense2\">http://www.modelica.org/licenses/ModelicaLicense2</a>.
</p>
</html>
"));
</html>"));
end Circuits;
2 changes: 1 addition & 1 deletion OpenHydraulics/Components/Cylinders/BaseClasses/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within OpenHydraulics.Components.Cylinders;
package BaseClasses
package BaseClasses
extends Modelica.Icons.BasesPackage;
end BaseClasses;
2 changes: 1 addition & 1 deletion OpenHydraulics/Components/Cylinders/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within OpenHydraulics.Components;
package Cylinders
package Cylinders
extends OpenHydraulics.Interfaces.VariantLibrary;

end Cylinders;
2 changes: 1 addition & 1 deletion OpenHydraulics/Components/Lines/Line.mo
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ equation
fillPattern=FillPattern.Solid,
textString="A")}), Documentation(info="<html>
<p>
Simple pipe model consisting of one volume,
Simple pipe model consisting of one volume,
wall friction (with different friction correlations)
and gravity effect. This model is mostly used to demonstrate how
to build up more detailed models from the basic components.
Expand Down
2 changes: 1 addition & 1 deletion OpenHydraulics/Components/Lines/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within OpenHydraulics.Components;
package Lines
package Lines
extends OpenHydraulics.Interfaces.VariantLibrary;

end Lines;
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ Part B, Vol. 198, No. 10, 1984, pp 165-174.
The model implementation is derived from the bearing friction
model in the standard Modelica library.
</p>
</HTML>
"), Window(
</html>"), Window(
x=0.25,
y=0.01,
width=0.53,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within OpenHydraulics.Components.MotorsPumps;
package BaseClasses
package BaseClasses
extends Modelica.Icons.BasesPackage;
end BaseClasses;
2 changes: 1 addition & 1 deletion OpenHydraulics/Components/MotorsPumps/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within OpenHydraulics.Components;
package MotorsPumps
package MotorsPumps
extends OpenHydraulics.Interfaces.VariantLibrary;

end MotorsPumps;
2 changes: 1 addition & 1 deletion OpenHydraulics/Components/Sensors/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within OpenHydraulics.Components;
package Sensors
package Sensors
extends OpenHydraulics.Interfaces.VariantLibrary;

end Sensors;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within OpenHydraulics.Components.Valves.DirectionalValves;
package BaseClasses
package BaseClasses
extends Modelica.Icons.BasesPackage;


Expand Down
Loading

0 comments on commit 2e4c72c

Please sign in to comment.