You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For #428 we effectively need a condition on a dynamic flow boundary. The way this is implemented now (see #446) is that the flow of this flow boundary is given by a timeseries which is interpolated using forward fill, and control listens to the edge out of this flow boundary. This makes the flow over this edge discontinuous in time, which means that the rootfinder for finding changes in conditions cannot detect a crossing (see #456). In general the forward fill interpolation is desirable because of conservation considerations (see #188).
Proposed solution
We keep the forward fill interpolation for the time series for the flow boundary (for conservation purposes), but fool the VectorContinousCallback into thinking it is continuous by giving it a linearly interpolated version of the flow boundary value. This brings in a discrepancy between what the model does and what the control responds to, but this discrepancy is probably small in practice.
The condition is changed from a condition on the edge to a condition on the flow boundary node itself. This is because a condition on an arbitrary edge is still problematic, because discontinuities in flow can propagate from further in the model to this edge.
This proposed solution is only reasonable if conditions on arbitrary edges are not desired (@gijsber?).
The text was updated successfully, but these errors were encountered:
Discussed a way forward with @SouthEndMusic. We can remove listening to flow for now. For the case of listening to Lobith inflow, we can listen to the FlowBoundary. The FlowBoundary time update then needs to support linearly interpolating between data points.
'Fooling' VectorContinousCallback by only presenting a continuous variable to it and nowhere else has not been implemented, the solution proposed by @visr was implemented.
Conditions on discontinuous parameters will still in general not work with VectorContinuousCallback, but could work with DiscreteCallback (see #455) with some loss of accuracy.
Motivation
For #428 we effectively need a condition on a dynamic flow boundary. The way this is implemented now (see #446) is that the flow of this flow boundary is given by a timeseries which is interpolated using forward fill, and control listens to the edge out of this flow boundary. This makes the flow over this edge discontinuous in time, which means that the rootfinder for finding changes in conditions cannot detect a crossing (see #456). In general the forward fill interpolation is desirable because of conservation considerations (see #188).
Proposed solution
We keep the forward fill interpolation for the time series for the flow boundary (for conservation purposes), but fool the
VectorContinousCallback
into thinking it is continuous by giving it a linearly interpolated version of the flow boundary value. This brings in a discrepancy between what the model does and what the control responds to, but this discrepancy is probably small in practice.The condition is changed from a condition on the edge to a condition on the flow boundary node itself. This is because a condition on an arbitrary edge is still problematic, because discontinuities in flow can propagate from further in the model to this edge.
This proposed solution is only reasonable if conditions on arbitrary edges are not desired (@gijsber?).
The text was updated successfully, but these errors were encountered: