-
Notifications
You must be signed in to change notification settings - Fork 63
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
add friction model "Hofer" #683
base: develop
Are you sure you want to change the base?
Conversation
Looks interesting. I just thought that the transition area is relevant for different models. Maybe we should think about how to correct equations for laminar / turbulent flow. I think there is an issue on this topic and this implementation could be a nice approach. |
Thanks @dlohmeier! (analogously for np.abs and np.power) |
As far as I can recall, numba was good at exactly this: identify numpy code within jit-decorated functions and compile them correctly. I always found it more readable and wrt. timings I remember that I found no difference or a slight advantage of the numpy ufuncs over native code. It might have changed with newer numba versions. |
The friction factor "Hofer" is introduced. It is an explicit implementation of Colebrook, used by some established Gas Grid Simulation tools.
Please refer to the added paragraph in the docs for more details.