Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in the Hooper method for conical diffuser/expansion #60

Closed
AllanBjerg opened this issue Jun 8, 2023 · 3 comments
Closed

Error in the Hooper method for conical diffuser/expansion #60

AllanBjerg opened this issue Jun 8, 2023 · 3 comments

Comments

@AllanBjerg
Copy link

Dear Caleb,

It is a great tool that you have developed!

I am currently working with the Hooper method for a conical diffuser/expansion from the fluids.fittings library. I think there is a small error for the case of Re_1 < 4000 and angle < 45°. It returns K = K_sharp while it should return K = K_sharp2.6sin(angle/2).

Code is stated below:
elif method == 'Hooper':
if Re is None:
raise ValueError("Method Hooper requires Reynolds number")
if Re < 4000.0:
return 2.0*(1.0 - betabetabetabeta) # Not the same formula as Rennels
if fd is None:
fd = Clamond(Re=Re, eD=roughness/Di1)
x = 1.0 - beta
beta
K = (1.0 + 0.8fd)xx
if angle_rad > 0.25
pi:
return K
return K2.6sin(0.5*angle_rad)

Best regards,
Allan

@CalebBell
Copy link
Owner

Hi Allan,
I took a quick look and here is the original formula from the paper:

image

These look to me to be the formulas I've implemented.
Can you clarify what you are asking? I don't understand.

@AllanBjerg
Copy link
Author

Hi Caleb,

I agree that these formulas are implemented correct but I am talking about the diffuser and not the reduction.
Expansion_Hooper

When I run the code for an expansion the result for K for a conical expansion at Re < 4000 and angle < 45° is the same as for a sharp expansion. As per the Hooper paper for these conditions the expression for K should be multiplied by: 2.6 x sin(angle/2). I don't think this happens in the code. See example of calculation below:
Expansion_Hooper_fluids_example
Since we are in the range Re < 4000 and angle < 45° for the conical expansion, the K value should not be the same as for the sharp expansion. If the value is multiplied with 2.6 x sin(angle/2) the resulting K = 1.2617.

I hope that this clarifies my question.

Best regards,
Allan

@CalebBell
Copy link
Owner

CalebBell commented Oct 18, 2024

Hi Allan,
I see the error now. It was the darn return statement. The bug has been there since I wrote the code in the first place. Thank you for pointing it out. It has been fixed and will be in the next release of fluids.
Sincerely,
Caleb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants