Back to Topic List
Hi Kevin!
I am a bit confused about this problem. If you have a little time, could you please validate my logic described below? I think I am on the right track...
So: I convert the inputs to SI units: - D (diameter) -> inch to meters - L (length of pipe) -> feet to meters - Q (fluid flow rate) -> feet^3/min to meter^3/seconds
Then I calculate A (cross-sectional area of pipe) -> (D/2)^2 * Pi calculating average velocity from Q and A (so I get m/s unit) I leave nu (dynamic viscosity) as it is in Pa*s
Then calculate Reynold's number. My first problem that it seems that my Reynold's number is not the same as the checker calculates because there are cases when I get "X" as result and the checker gives valid number and vice versa. The second interesting thing that every time when both of us has a valid result for pressure difference they differ in a mulitplier. Which is about 7.4805 and as far as I know this the factor to multiply when converting cubic feet to gallons (U.S.).
Could you please give me a little hint what I may understand incorrectly?
Thank you very much!
Hi Adam,
It looks like this is the result of a typo in the prompt -
Q should indeed be in units of gallons per minute instead of
cubic feet per minute. That's likely the reason for the Reynold's
Number issues as well - I'm not seeing any actual errors in your code logic :)
The prompt should have the correct units for Q now - thanks for pointing that out!
I suspected something like that :) I do believe everything is fine now, just a fatal error came to my face :) (like the one I sent to you for "Blocked view" problem recently)
Fatal error: Uncaught ValueError: bcsub(): Argument #1 ($num1) is not well-formed in /home/theathen/public_html/module/service/TaskService.php:267 Stack trace:
Hi Adam!
Ah, I see what the issue was here - I was trying to auto-compare the errors in the answer values provided, but it was crashing when trying to round a string value of "X"... A bit of a silly mistake, but it should be fixed now!
Yes, now it is working! Thank you.