Subscribe via feed.

Easy and True

Posted by ragknot on May 7, 2015 – 1:57 am

I did this easy and true computation about 3 years ago.
To compute X, when X is on both sides of the equation,
but one side, the X, and maybe other numbers are in a Log,
you can easily compute the X easy.

Example, find the X to several digits when X=10+Log(20*X).
Just guess an X and compute the =10+Log(20*X).
Then use the solution for the next X as a new loop.
Then if you guess the first X as 1 to 1000 the X can be
computed to many digits in about 8 loops.

So compute this X to about 10 digits.
Example: First use any number for the first X.
If you use X=1  for the first X the first loop will give 11.301029995664
If you use X=100  for the first X the first loop will give 13.301029995664
Then use the first loop X, for the next X loop.  After some loops the
X will stop changing. But if you need about 100 digits, it might take
about 30 loops

Tags:
This post is under “Tom” and has 7 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

7 Responds so far- Add one»

  1. 1. ragknot Said:

    The Easy and True computation is for when a X is on the left and right for and equation. Example: X=10+Log(20*X)
    First guess a number for X the first loop, and solve =10(Log(20*X). And it’s solution will be much closer for the right X. In Excel, just enter the guess and blow it type the equation, but for the X, just point to the guess. The format the equation to about 16 digits. Then copy the equation to about 20 loops below, and the right solution will stop changing, because each loop will use the previous number for the next X. Then change the top guess and the bottom solution will not change.

    The same thing will work for Colebrook-White equation. First type a guess number and below it type =-2*Log(Rr/3.7+2.51/Re+X), but enter the Rr and Re and for the X, just point the X to your guess number. the format the equation to about 16 digits, and copy the equation to about 20 loops, and the X will stop changing. The below this 20 loop enter =1/X/X but for both X’s, just point to the last loop. the =1/X/X will be the f.

    The to test it compute =1/sqrt(f) and it will be the X.
    The compute =-2*Log(Rr/3.7+2.51/(Re*sqrt(f)) and it will solve for the X also. So then solution of … 1/sqrt(f)=-2*Log(Rr/3.7+2.51/(Re*sqrt(f))
    will both give the X. This will be a right solution, not an approximation.

  2. 2. ragknot Said:

    Thousands of world engineers, have learn the “Easy and True” solution is right for the Colebrook-White equation. There are some approximation are not exactly right.

    See … keisan.casio.com/exec/system/1380521258
    that use the Easy and True solution for all six different types of the Colebrook-White equations. They have learned the Easy and True soluton for all six types of the Colebrook equations.

    They also entered my name and my web site that give the Easy and True solutions.

  3. 3. Chris Said:

    There is only one Colebrook-White equation. All the other (five) equations are only approximations to it and all were derived from it. They are NOT other types of Colebrook-White equation(s). That’s why they have different names. I have told you that many times. The approximations are elementary approximations to the non-elementary Colebrook-White equation.

    That has nothing to do with how you actually evaluate the Colebrook-White equation. The method you use works, but is horribly inefficient in terms of computer time. I have provided you with several more efficient algorithms. The best one is based on work by Prof. Didier Clamond and is fourth order and so quadruples the number of digits per iteration. The one you use is first order and so it’s no surprise that in only generates 1 to 3 extra digits per iteration.

    http://math.unice.fr/~didierc/ and for the paper:
    http://math.unice.fr/~didierc/DidPublis/ICR_2009.pdf

    It’s only fault is absolutely trivial. Rounding errors cause the very last digit to be unreliable. 0n 32 bit platform only the last digit of about 15 digits would be unreliable. That’s about a trillion times higher than the highest precision that pipe engineers require.

  4. 4. ragknot Said:

    No, there are about 6 different Colebrook equations depending on different types of pipes. Japan posted all of them.

    Also if a same number to compute is own both sides and the equation, but on side is an a Log, it might be able to compute. If you guess a number and use it, the Log will make it much close for each loop.
    Example Compute X=10+Log(20*X)
    In Excel enter a guess, and below it enter the equation, but for the X, just use Excel to point to the guess. Then copy that equation to 20 loops below it, and the answer for the X will stop changing.

  5. 5. Chris Said:

    You are nit-picking and failing to see the bigger picture.
    OK if you have to be pedantic, then there is more than one (in detail) Colebrook-White equation. They differ trivially in the value of the constants e.g. 3.7 vs 3.71. There are some trivial rewrites based on using the properties of logarithms – those rewrites wittingly introduce some rounding errors.

    However the other equations that you refer to ARE NOT Colebrook-White equations – the are APPROXIMATIONS to it.

    Haaland: is an approximation
    Swamee-Jain: is an approximation
    Serghides: is an approximation
    Goudar–Sonnad: is an approximation
    Brkić: is an approximation

    The approximations will only agree accurately with the correct equation in special cases – by luck. They exist to enable relatively simple evaluation on a non-programmable calculator.

    You fail to distinguish between approximating functions and the numerical methods that are used to evaluate the Colebrook-White equation. As far as I am aware, those named approximations are easily calculated without requiring iterative procedures. The Colebrook-White equation is non-elementary and has to be calculated iteratively. If the math library includes the Lambert-W function (aka ProductLog function) or similar, then the iteration will be hidden inside the library routine.

  6. 6. ragknot Said:

    Here is a Easy and True solution in Module1, enter in into Excel and try it.
    You can just enter =Easy(Rr,Re) to compute it, or you can enter =Easy(Rr,Re,1.74)
    for the 1.74 mode. It is… 1/sqrt(f)=1.74-2*Log(2*Rr+18.7/Re*1/sqrt(f)) and
    the Excel will give the right f that you can test in late long equation.
    See below for the function, and the last function for Log10

    Function Easy(Rr As Double, Re As Double, Optional mode, Optional Find As String) As Double
    ‘mode 2.51 1/sqrt(f)=-2*Log(Rr/3.7+2.51/Re*1/sqrt(f))
    ‘mode 1.74 1/sqrt(f)=1.74-2*Log(2*Rr+18.7/Re*1/sqrt(f))
    ‘mode 1.14 1/sqrt(f)=1.14+2*Log(1/Rr)-2*Log(1+(9.3/(Re*Rr)*1/sqrt(f)))
    ‘mode 9.35 1/sqrt(f)=1.14-2*Log(Rr+9.35/Re*1/sqrt(f))
    ‘mode 3.71 1/sqrt(f)=-2*Log(Rr/3.71+2.51/Re*1/sqrt(f))
    ‘mode 3.72 1/sqrt(f)=-2*Log(Rr/3.72+2.51/Re*1/sqrt(f))
    Dim A As Double, B As Double, D As Double, X As Double, f As Double, Left As Double, Right As Double
    If IsMissing(mode) Then mode = 2.51
    If IsMissing(Find) Then Find = “”
    If Rr > Re Then Exit Function
    If Re < 2000 Then
    Easy = 64 / Re
    Exit Function
    End If
    L = 0
    D = 3
    Select Case mode
    Case 2.51
    A = 2.51 / Re
    B = Rr / 3.7
    While X D
    X = -2 * Log10(B + A * D)
    D = -2 * Log10(B + A * X)
    L = L + 1: If L > 20 Then X = D ‘Excel can’t go to more digits, each loop adds about two more correct digits
    Wend
    f = 1 / X / X
    Easy = f
    If Find = “Left” Then Easy = 1 / Sqr(f)
    If Find = “Right” Then Easy = -2 * Log10(Rr / 3.7 + 2.51 / Re * 1 / Sqr(f))
    Case 1.74
    A = 18.7 / Re
    B = 2 * Rr
    While X D
    X = 1.74 – 2 * Log10(B + A * D)
    D = 1.74 – 2 * Log10(B + A * X)
    L = L + 1: If L > 20 Then X = D
    Wend
    f = 1 / X / X
    Easy = f
    If Find = “Left” Then Easy = 1 / Sqr(f)
    If Find = “Right” Then Easy = 1.74 – 2 * Log10(2 * Rr + 18.7 / Re * 1 / Sqr(f))
    Case 1.14:
    A = 9.3 / (Re * Rr)
    B = 1.14 + 2 * Log10(1 / Rr)
    While X D
    X = B – 2 * Log10(1 + (A * D))
    D = B – 2 * Log10(1 + (A * X))
    L = L + 1: If L > 20 Then X = D
    Wend
    f = 1 / X / X
    Easy = f
    If Find = “Left” Then Easy = 1 / Sqr(f)
    If Find = “Right” Then Easy = 1.14 + 2 * Log10(1 / Rr) – 2 * Log10(1 + (9.3 / (Re * Rr) * 1 / Sqr(f)))
    Case 9.35
    A = 9.35 / Re
    B = Rr
    While X D
    X = Abs(1.14 – 2 * Log10(B + A * D))
    D = Abs(1.14 – 2 * Log10(B + A * X))
    L = L + 1: If L > 20 Then X = D
    Wend
    f = 1 / X / X
    Easy = f
    If Find = “Left” Then Easy = 1 / Sqr(f)
    If Find = “Right” Then Easy = 1.14 – 2 * Log10(Rr + 9.35 / Re * 1 / Sqr(f))
    Case 3.71
    A = 2.51 / Re
    B = Rr / 3.71
    While X D
    X = -2 * Log10(B + A * D)
    D = -2 * Log10(B + A * X)
    L = L + 1: If L > 20 Then X = D
    Wend
    f = 1 / X / X
    Easy = f
    If Find = “Left” Then Easy = 1 / Sqr(f)
    If Find = “Right” Then Easy = -2 * Log10(Rr / 3.71 + 2.51 / Re * 1 / Sqr(f))
    Case 3.72
    A = 2.51 / Re
    B = Rr / 3.72
    While X D
    X = -2 * Log10(B + A * D)
    D = -2 * Log10(B + A * X)
    L = L + 1: If L > 20 Then X = D
    Wend
    f = 1 / X / X
    Easy = f
    If Find = “Left” Then Easy = 1 / Sqr(f)
    If Find = “Right” Then Easy = -2 * Log10(Rr / 3.72 + 2.51 / Re * 1 / Sqr(f))
    Case Else
    Easy = 0
    End Select
    End Function

    Static Function Log10(X)
    Log10 = Log(X) / Log(10#)
    End Function

  7. 7. DP Said:

    Chris,
    On one hand, Ragknot is actually adding some activity to this site. Regardless of the content being valid, credible, or otherwise truthful.
    On the other.. We have been made aware of some personal information regarding the mental capacities of certain individuals that may limit their productive contributions to this site.
    It is unfortunate because Ragknot was one of the original members of this site, with very much contribution.

    Perhaps a private conversation is in order here, but I have a couple of proposals.
    1) I know that you were elevated to site moderator (by Rajesh) and subsequently gave my account rights as well. I do not see the option to “de-authorize” someone from posting new threads, but rather only to edit the content or delete them in their entirety. The same applies to individual responses within each post. Maybe a conversation with Rajesh is in order, if still available.
    2) Maybe a refresh on this site would be helpful. If we want this to be an active site with the core values of Puzzles that are Creative, Inventive, and Fun Loving (Found on the FAQ page) – then maybe we should consider recruiting some help to re-create that atmosphere with great new puzzles and riddles.

    Thoughts?

Post a reply




PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0