Configurable FlowBoundary interpolation#2285
Conversation
|
This looks nice! Do you have any benchmark numbers that compare these three options, linear, stepwise hard, stepwise smooth? |
|
While making the benchmarks I came across a DataInterpolations bug: SciML/DataInterpolations.jl#432 We need this to add the right tstops to our integrator if we use |
|
Benchmarks:
Notes:
|
| ## Interpolation settings | ||
| There are the following interpolation settings: | ||
| - `flow_boundary`: The interpolation type of flow boundary timeseries. This is `linear` by default, but can also be set to `stepwise`. | ||
| - `stepwise_smoothing`: When an interpolation type is set to `stepwise`, this parameter determines an interval in time on either side of each data point which is used to smooth the transition between data points. See also the [documentation](https://docs.sciml.ai/DataInterpolations/dev/methods/#Smoothed-Constant-Interpolation) for this interpolation type. |
There was a problem hiding this comment.
Ideally we keep the configuration as small/simple as possible, but if we need different interpolation types, are they global (all nodes), configurable per nodetype (all flowboundaries are stepwise) or configurable per node (😱)?
If per node(type), then we should have a config group with specific settings per nodetype. Otherwise we have a breaking change once we introduce this. Or, we determine stepwise_smoothing automatically and don't leave it up to the user.
|
As discussed today, we'll go with block interpolation with 0 smoothing as a default. This PR needs to be updated to reflect that. |
Fixes #2281. Also fixes #2244.
Results with schematizations that look like this:
Old behavior:
New behavior with a smoothing period of 2 hours on either side of each data point:
New behavior without smoothing: