-
Notifications
You must be signed in to change notification settings - Fork 5
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 max_flow_rate to LinearResistance #1100
Conversation
core/test/equations_test.jl
Outdated
# TODO adapt for max_flow_rate of 6e-5 | ||
storage_analytic = | ||
@. limit_storage + (storage[1] - limit_storage) * exp.(decay_rate * t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SouthEndMusic it would be great if you could help updating this test value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solve for Q(level) == max_flow_rate
Find out at which times it switches from max_flow_rate to dynamic flow rate
Compute from there
DE for For simplicity we assume a constant area here, which is not the case in the current linear resistance test model but is now supported. Initial condition: We assume Hence for Substituting the above expression for and so Now we solve from here with which yields and so which gives This makes sense; Filling in our initial condition: yields We conclude: and where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I trust you can update the analytical test with the maximum flow 👍
4a468de
to
ae9d128
Compare
This is needed to be able to model structures that exchange flow based on a water level difference, but only up to a certain capacity.
Ref Deltares/Ribasim-NL#62
The updated test model now looks like this: