Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Is there a more efficient way to solve the Colebro...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
03:23 PM

05-15-2014
03:23 PM

Please see the attached MC Prime 3.0 worksheet (I also included a PDF copy for users of other versions of MC).

**Introduction **(for those who don't know the Colebrook White Equation)

The empirical Colebrook-White Equation (CW) is the standard way to estimate friction factors for use with the Darcy Equation for determining energy (head) loss in fluid flow. CW has three variables: the relative roughness (* k*), the Reynolds Number (

Instead of interating CW, it is possible to use the Moody Diagram to find ** f**. The Moody Diagram has

**The Problem**

I am working on plotting my own Moody Diagram in Mathcad. I have done this in Excel and CurveExpert Pro, but now I want to do it Mathcad. Also, I am comparing various explicit approximations to CW for accuracy (I have already completed the smooth pipe analysis for ** k**=0). For both tasks, I need an efficient way to solve CW over the ranges of

As you can see in the attached worksheet, I was able to solve CW. However, I am looking for a more efficient and more elegant method. I tried various combinations of subscripts, vectorize operations, etc. both inside and outside the solve block, but this is the best I was able to do. Any suggestions would be greatly appreciated.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
05:00 PM

05-15-2014
05:00 PM

If a 2D matrix is plotted the plot type in Prime 2 had to be set to waterfall plot explicitely to make it work the way we are used from older Mathcad. In Prime 3 waterfallplot is chosen automatically in that case.

7 REPLIES 7

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
04:25 PM

05-15-2014
04:25 PM

Re: Is there a more efficient way to solve the Colebrook-White Equation?

How about the attached? In MC15 format I'm afraid as I don't have Prime 3.

Alan

Edit: Just realised that, if Prime 3 is like Prime 2, the 2D plotting won't be possible using the *single* friction factor variable in the way that is possible in MC15.

Highlighted
If a 2D matrix is plotted the plot type in Prime 2 had to be set to waterfall plot explicitely to make it work the way we are used from older Mathcad. In Prime 3 waterfallplot is chosen automatically in that case.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
05:00 PM

05-15-2014
05:00 PM

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
05:01 PM

05-15-2014
05:01 PM

Re: Is there a more efficient way to solve the Colebrook-White Equation?

Thanks, Alan. That was the magic I was looking for. I got closer to the matrix I wanted with the augment command, but that was brute force. Your solution was simple and elegant.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
04:53 PM

05-15-2014
04:53 PM

Re: Is there a more efficient way to solve the Colebrook-White Equation?

Here is a bit late pretty much the same as Alan showed done in Prime with your data. MC15 plots just look better, though, and are much easier to format.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
05:02 PM

05-15-2014
05:02 PM

Re: Is there a more efficient way to solve the Colebrook-White Equation?

Thanks, Werner. Now to apply this to the bigger worksheet I am working on.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
05:37 PM

05-15-2014
05:37 PM

Re: Is there a more efficient way to solve the Colebrook-White Equation?

You are welcome.

In case you want to retain the alternating colors in your plot, you may consider using a routine to split the matrix f accordingly.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-15-2014
06:34 PM

05-15-2014
06:34 PM

Re: Is there a more efficient way to solve the Colebrook-White Equation?

That is a very clever program. However, for comparison purposes, I am going to be plotting a second data set from an explicit formula that attempts to approximate Colebrook-White, so having one data set in black and the other in red will actually work better for me. Actually, I am comparing 21 explicit formulas to Colebrook-White, so I will end up with 21 plots.