Skip to content

Is delayTime approaching zero really that problematic? #3726

@henrikt-ma

Description

@henrikt-ma

The specification non-normatively explains:

Furthermore, the maximum step size of the integrator is limited by this minimum delay time in order to avoid extrapolation in the delay buffer.

My interpretation is that the following model is expected to get stuck at time π/2:

model DelayTimeApproachingZero
  Real x = time;
  Real w(unit = "rad/s") = 1.0;
  Real delayTime(unit = "s") = cos(w * time)^4 + Modelica.Constants.small;
  Real pastTime = time - delayTime;
  Real y = delay(x, delayTime, 2.0);
  annotation(experiment(StopTime = 6.3));
end DelayTimeApproachingZero;

But would it really be so bad to make it through periods of very small delayTime by doing a tiny bit of extrapolation between the most recent accepted step and the current intermediate step of the integration method?

I would be interested in hearing how different tools deal with the model above.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions