Skip to content
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

Add annotation "unbounded" to 1D mechanical sources #3635

Open
markusandres3DS opened this issue Oct 1, 2020 · 4 comments
Open

Add annotation "unbounded" to 1D mechanical sources #3635

markusandres3DS opened this issue Oct 1, 2020 · 4 comments
Assignees
Labels
duplicate Duplicate issue L: Mechanics.Rotational Issue addresses Modelica.Mechanics.Rotational

Comments

@markusandres3DS
Copy link

I did some investigation on the unbounded annotation in Dymola and found that it would likely be a good addition for some MSL components.

The tests were carried out using Modelica.Mechanics.Rotational.Sources.Speed, with focus on the behavior when angles get relatively big (but still reasonable). This results in numerical issues pretty quickly, as shown below:

Result_BasicTest

There are three variables plotted:

  • unbounded=false: based on Modelica.Mechanics.Rotational.Sources.Speed
  • unbounded=true: based on a modified version on Modelica.Mechanics.Rotational.Sources.Speed setting a unbounded = true
  • Reference (hidden behind the curve for unbounded=true): based on the orignal version Modelica.Mechanics.Rotational.Sources.Speed, but the offset in the angle is added by a block after the actual integration instead of an initial value. This makes the state itself have small values.

Due to the above observations, I think it would be good to add the annotation to the MSL. Of the top of my head, I think this should be done for a couple of elements in the MSL:

  • Modelica.Mechanics.Rotational.Sources.Position
  • Modelica.Mechanics.Rotational.Sources.Speed
  • Modelica.Mechanics.Translational.Sources.Position
  • Modelica.Mechanics.Translational.Sources.Speed
  • ...

The results can be reproduced using Dymola 2021 with this package. A quick test done with MSL 4.0.0 shows that there is no change regarding this property.

@beutlich
Copy link
Member

beutlich commented Oct 1, 2020

Duplicate of #3545 and also mentioned in #2946.

@markusandres3DS
Copy link
Author

@beutlich seems my search wasn't very successful. So this basically adds an example to #3545.

@tobolar tobolar added duplicate Duplicate issue L: Mechanics.Rotational Issue addresses Modelica.Mechanics.Rotational labels Oct 2, 2020
@MartinOtter
Copy link
Member

MartinOtter commented Oct 18, 2020

unbounded=true means to switch relative error control off. This is meaningful, if the variable is a state variable and grows forever, or in other words, if it is not possible to define a meaningful nominal value.

Whether or not this is the case, depends heavily on the application: If in a library component unbounded=true is set, then it is highly likely that there are usages of the component, where unbounded=false yields better simulation results. Note, the same holds for nominal, where it seems also not possible to provide a meaningful value for all applications in a library component.

So to summarize, nominal and unbounded should be set by the user of a library component and should not be defined in the library component.

@markusandres3DS
Copy link
Author

@MartinOtter I fully agree.

Therefore, the question to me is: Would it make sense to have parameters for both unbounded and nominal, probably in an "Advanced" tab? Currently they can only be set manually using modifiers for the components from the Standard Library, which is not very comfortable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Duplicate issue L: Mechanics.Rotational Issue addresses Modelica.Mechanics.Rotational
Projects
None yet
Development

No branches or pull requests

5 participants