Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have implemented the physical interpolation (as proposed in #225). I have not checked whether this implementation is exactly what we want for extrapolation (#279), but this implementation assumes that the storage is 0 at the lowest level and does linear extrapolation of the area as a function of the level based on the last 2 values.
This does not solve the problem of high oscillating flows produced by the ManningResistance node as hoped (#80). I think the problem there is that the calculated flows are way to large, and therefore the equilibrium is overshooted at every time step.
I cannot wrap my head around the current ManningResistance implementation. I understand that flow occurs due to a difference in level, but I do not understand why that means that all the water comes in motion, not just the bit at the top (which is why I find LinearResistance more intuitive). Is anyone familiar with a ManningResistance being used for flow that can go both directions, or is it only used for flow that goes one direction due to gravity? In that last case I understand better why all water is in motion.
Also, the current implementation assumes the presence of a lot of water in the channel itself, which fluctuates with the level in the upstream basin with no regard for (local) water preservation (by which I do not mean that the ManningResistance node is not preserving but it is less physical).