-
Notifications
You must be signed in to change notification settings - Fork 168
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
2D table extrapolation documentation clarification request #3793
Comments
In fact, the periodic extrapolation is independent of the continuity. There also is no assumption (by the Modelica simulation tool) on continuity. Take this example: model T3793
extends ModelicaTest.Tables.CombiTable2Ds.Test6(
t_new(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic));
annotation(experiment(StartTime=0, StopTime=60), uses(ModelicaTest(version="4.0.0")));
end T3793; The simulation shows the expected "jump" at t=50s for t_new.y. |
Hm, that's not what is given in the data: |
And that explanation is exactly what is missing from the documentation, I think. |
This one actually is by design as there is no guarantee that the interval boundary is hit. (FYI: CombiTimeTable has this feature (by means of time events).) |
Yeah, but time is only one of so many possible inputs of a table. The MWE was not representative with regards to that aspect of my actual model. |
Your assumption is not valid and bases on the idea of equvidistant sample points. However, there is no such concept of equvidistant sample points within the table blocks of MSL. Sample points can be arbitrary. Not sure how to proceed here. Feel free to open a PR against the documentation of the table blocks in master branch. Otherwise I prefer to close this issue as Edit: You might be interested in my notes on periodic extrapolation of the CombiTimeTable (with reliable time event detection) which does not work for the other table blocks (like CombiTable1D and CombiTable2D): https://2014.international.conference.modelica.org/proceedings/html/submissions/ECP14096893_BeutlichKurzbachSchnabel.pdf -> Section 2.2. |
I referenced this issue in my PR #4287 |
Hello,
I use the 2D table function in Dymola to lookup a periodic function in one direction.
The documentation simply states
extrapolation = 3: Periodically repeat the table data (periodical function).
This does not mention the fact that it is assumed (by dymola) that the first and last rows of the table are identical (for example, if the tabulated function is a cosine in the u1 direction, the table should cover the values from 0 up to and including 2pi). When the table is periodically extrapolated, these rows will be overlapping.
This is a problem since it is just as justifiable to implement the phase of the cosine as an array [pi/10, 2pi/10, 3pi/10, ..., 19pi/10, 20pi/10], thus excluding the 0 at the start. This kind of table can simply be concatenated, without overlap.
It seems openmodelica behaves the same as dymola. I don't know how other programs implement this.
I think the documentation should make the distinction clear, since making wrong assumptions will lead to errors.
Best regards,
Paul van der Hulst
The text was updated successfully, but these errors were encountered: