Search:

Type: Posts; User: mcjeff

Search: Search took 0.00 seconds.

  1. Replies
    13
    Views
    7,885

    All, I have now been trying to use the MatLab...

    All, I have now been trying to use the MatLab code in C++, I get a result, a subsequent iterations change the values, I believe the result is still in correct-- perhaps not, I will check.

    ...
  2. Replies
    13
    Views
    7,885

    Changed the '

    Changed the '<' sign as suggested and the result is the same: -1 for the friction coefficient.


    //TURBULENT
    if (rnum > 4000) {

    do
    {
    ...
  3. Replies
    13
    Views
    7,885

    I have tried your method and came up with: ...

    I have tried your method and came up with:


    do
    {
    tpfc = pow ( -2 * log10 (rrough / 3.7 + 2.51 / ( rnum * sqrt (tpfc2 + 1e - 300 ))), -2);
    }
    ...
  4. Replies
    13
    Views
    7,885

    Indeed you are all correct. I would prefer...

    Indeed you are all correct.



    I would prefer a tolerance of 1-E6. But am still unsure as to how to make that happen. The goal of the formula is to use iteration to solve for the factor (f) until...
  5. Replies
    13
    Views
    7,885

    So I would need to use a "Do" statement? From...

    So I would need to use a "Do" statement?

    From MSDN:

    do
    {
    tpfc = pow ( -2 * log10 (rrough / 3.7 + 2.51 / ( rnum * sqrt (tpfc2 + 1e - 300 ))), -2);;
    } while (tpfc = tpfc2);
  6. Replies
    13
    Views
    7,885

    Interesting, it looks like I have done a bunch of...

    Interesting, it looks like I have done a bunch of defining variables when that was un-needed. Just another thing to put down for the ol'learning curve.

    Now when you mention a big-loop, I am...
  7. Replies
    13
    Views
    7,885

    Iteration and the Colebrook-White Formula

    Howdy all,

    I just started programming some 1 days ago, I have the program complete except for the following problem-- iteration. I consider myself pretty engineering savy when it comes to Excel...
Results 1 to 7 of 7