Question: I can't get an if then statement to execute in a proc when called by fsolve

I have a procedure for calculating flow through a control valve and part of the calculatiion requires an interative solution if the Reynolds number is less than 10000.  I wrote a little proc in Maple to house the calculation and then I am trying to call it from fsolve.  One of the conditions in the calculation is hat if the Re >= 10000 then just exit and return the input since no correction is necessary.  However, I can't get the Reynolds number to evaluate in the condition Reynolds >= 10000 it keeps returning this error.

Error, (in ValveLaminarMassFlow_proc) cannot determine if this expression is true or false: 10000.0 <= 8848.331994*x
 

where x is an input parameter in the procedure call.

I have tried everything I could think of and I just have to give up and I would appreciate any help with this.

 

fsolve_if_then_not_evaluating_in_proc.mw

Please Wait...