-
Notifications
You must be signed in to change notification settings - Fork 175
Add starting point for figures in Mechanics.Translational. #4675
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
base: master
Are you sure you want to change the base?
Add starting point for figures in Mechanics.Translational. #4675
Conversation
These originate from figures created for Wolfram System Modeler, and are likely to need cleanup and improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just adding starting point for figures - thx @maltelenz - fine with me!
See also #4674: Many models work fine. Yet there are some models which fail in Dymola2025x under Linux. The failing models are:
Example error message caused by Dymola2025x:
This somehow seems to be a table issue. |
Shall this not be an another issue? |
I will create a different ticket for this issue. For now it "just" prevents me from testing. |
On more thing, that I consider more relevant, is: ![]() The three physical quantities in this graph have all different SI units. But no units are displayed at all. @maltelenz How do other tools hande such figures? I suspect this is a Dymola related issue as units shall be added automatically in the legend by the tool. The Figure specification does not indicate any display unit.
If the |
I assume that either the table-functions library wasn't recompiled for MSL 4.1.0 on Linux, or the new library wasn't used (the Advanced.Translation.PlaceDymolaSourceFirst setting). |
Yes, adding the unit in the legend seems like the usual approach here. |
The plot is older than the strong support for units in System Modeler; I don't think anyone would have created the plot this way today. This could be an indication that some sort of style guide for figures in the MSL would be handy. I think it could help us arrive faster at first collection of nice figures which will then also serve as good examples when more figures are added in the future. Some ideas for initial content of a figure style guide for the MSL:
I am hesitant to add a recommendation that a multi-plot figure's caption should mention each of the plots, as this can degrade a good caption by inclusion of too many obvious sentences. |
I created #4696 for handling this Linux specific issue |
Co-authored-by: Hans Olsson <HansOlsson@users.noreply.github.com>
Co-authored-by: Hans Olsson <HansOlsson@users.noreply.github.com>
I think we shall not manually add units to the curve legend, as the tools are free to chose for example MJ (Megajoule) instead of 1E6 in scaling. The unit shall be added by the tool automatically. So not mixing variables makes a lot more sense to me. |
For cases where an explicit legend is specified (like in this case) System Modeler does the same thing (don't show units in the legend). You can see the unit in tooltips and in the measurement view: ![]() As others before me have said, mixing units in a single plot like this is probably a bad idea in general. If the curves are split, the units appear in the y axis label: ![]() |
One case where units are yet not derived correctly in Dymola2025x is described in #4676 (comment) referring to example Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.PolyphaseTwoLevel_RL: ![]() I tested this case in Dymola2025x. For some reason the unit of the rms current and voltage are not determine correctly in |
@christiankral System Modeler also fails to propagate the unit information to the output of the
At least in System Modeler, this will make the unit appear in the plot as expected. |
Same issue with Dymola 2025x Refresh 1 under Windows 11 24H2: |
These originate from figures created for Wolfram System Modeler, and are likely to need cleanup and improvement.
Our one existing figure in MSL is probably a good style to follow:
ModelicaStandardLibrary/Modelica/Blocks/package.mo
Lines 159 to 180 in 3f72865
Creating as Draft to indicate that library officer(s) probably want/should improve them before merging.