Closed InvncibiltyCloak closed 5 years ago
See pull request for fix: #28
So, there is no error resulting from this bug to this because the two just get multiplied together in the final flow_meter_discharge function. The 1% error I mentioned above must have been from plugging in slightly different numbers.
Still, it would be best to fix this. I was confused when I was stepping through and the solver had different values for epsilon on each iteration, when it should be constant.
Hi Mark,
Thank you for the pull request! I appreciate it. A little embarrassing, but I'm extra glad the results for the function was always correct in the end. I can't remember now but I think when I first coded the function differential_pressure_meter_C_epsilon, I might have been returning them in the order (epsilon, C); then I changed it, but didn't change the place calling it. Because all the results were still the same, the unit tests didn't show any errors and I didn't notice.
Nice work! I hope fluids has been helpful for you.
Cheers, Caleb
In the differential_pressure_meter_solver function, the return from differential_pressure_meter_C_epsilon is assigned to (epsilon, C) while the return from the function is the same order as the function's title, which is (C, epsilon).
This could lead to large error in the calculated flow rate across the orifice plate. (The error was only 1% in my test case)