Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong calculation of Reynolds number for non-circular pipes #1601

Closed
modelica-trac-importer opened this issue Jan 15, 2017 · 9 comments
Closed
Assignees
Labels
bug Critical/severe issue L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) P: high High priority issue

Comments

@modelica-trac-importer
Copy link

Reported by A.Taeschner on 10 Nov 2014 12:13 UTC
I found a severe bug in the Fluid library when calculating the pressure drop of noncircular pipes where the cross area A is not given by A=pi/4*d*d anymore. The bug is in line 3422 of Modelica/Fluid/Pipes.mo:

Re :=(4/pi)*abs(m_flow)/(diameter*mu);

This equation is only correct for circular pipes, but for arbitrary pipes it has to be:

Re :=abs(m_flow)*diameter/(crossArea*mu);

This seems to be not the only line where the wrong assumption (A=pi/4*d*d) has been used, but I had no time to investigate this further.


Migrated-From: https://trac.modelica.org/Modelica/ticket/1601

@modelica-trac-importer modelica-trac-importer added bug Critical/severe issue L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) labels Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Modified by beutlich on 13 Nov 2014 11:35 UTC

@modelica-trac-importer
Copy link
Author

Modified by dietmarw on 17 Dec 2014 09:59 UTC

@modelica-trac-importer modelica-trac-importer added the P: high High priority issue label Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Comment by A.Taeschner on 5 Jan 2015 10:53 UTC
In the newly attached example two pipes are used to demonstrate the problem:
Both are connected to a pT source (water, 293.15 K, 10 bar) and a mass flow sink (0.1 kg/s inflow).
1.) circular pipe (100 m length, 10 mm diameter)
According to the site http://www.pressure-drop.com/ one would expect a pressure drop of 2.67576 bar leading to an outlet pressure of about 7.324 bar at the end of the pipe. This can be reproduced by the model.

2.) circular ring pipe (100 m length, 5 mm inner diameter, 15 mm outer diameter)
Here one would expect a pressure drop of 0.76932 bar leading to an outlet pressure of about 9.231 bar at the end of the pipe.
The current version of the library gives 7.324 bar and the patched one 9.231 bar.

@modelica-trac-importer
Copy link
Author

Comment by rfranke on 6 Jan 2015 14:39 UTC
Thank you for the patch and the example!

Would you mind to add some HTML docu and author info to NonCircularPipes.mo? I'd like to add it to Fluid under Modelica.Fluid.Examples.NonCircularPipes.

@modelica-trac-importer
Copy link
Author

Comment by Alexander Täschner on 6 Jan 2015 15:15 UTC
I added a new file with some documentation. Since I was not sure where to add the author info, I simply wrote them in the revision section. If there is another better location please feel free to move this info.

@modelica-trac-importer
Copy link
Author

Comment by rfranke on 6 Jan 2015 21:46 UTC
SVN 29a6741 introduces your example and the fix basing on your patch. The default DetailedPipeFlow model works for non-circular pipes now, besides the Laminar and the NoFriction model.

The (LaminarAnd)QuadraticTurbulent models still need to be fixed.

@modelica-trac-importer
Copy link
Author

Comment by rfranke on 7 Jan 2015 15:50 UTC
It appears not trivial to support non-circular tubes with the linear laminar and quadratic turbulent flow models. In particular the assumptions about laminar flow would require additional input.

This is why SVN dfd83ac adds assertions and clarifications to the doc strings.

Following the proposal in this ticket, non-circular tubes work with the default DetailedPipeFlow model now.

@modelica-trac-importer
Copy link
Author

Comment by beutlich on 7 Jan 2015 21:58 UTC
Ticket was fixed in trunk only but milestone is set to MSL 3.2.1+build.3. Either merge 29a6741, 8c23c5c and dfd83ac to MSL 3.2.1 maintenance branch or correct mileston to MSL 3.2.2. First option probably is the preferred one. Thanks.

@modelica-trac-importer
Copy link
Author

Comment by rfranke on 8 Jan 2015 15:20 UTC
see e0d5a19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) P: high High priority issue
Projects
None yet
Development

No branches or pull requests

3 participants