-
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
Initialization of Polyphase.Basic.{Capacitor, Inductor} #4488
Conversation
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.
In the example, it looks fine in System Modeler, same as screenshots in #4457 (comment)
However, if I drag out a new Inductor
, I don't get to edit i
easily in System Modeler. I guess the heuristics of when to show variable start attributes when there are no annotations can be discussed, but should we add showStartAttribute
explicitly in TwoPlug
, to make the intention very clear from the library?
SI.Current i[m] "Currents flowing into positive polyphase plugs" annotation(Dialog(showStartAttribute=true));
Good idea in some form, but I don't think that should be in the base-class |
I agree, as we sometimes have initial currents (in coils) and voltages (in capacitors), depending on the component state variables. |
I guess another choice is to "lift" |
@maltelenz that's what we wanted to avoid: an additional alias variable. |
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.
It now shows up nicely in System Modeler.
I agree it's a shame that an alias variable is needed, but I see no other deterministic way to make this work cross-tool.
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.
Looks good to me.
I would prefer the each, but either works.
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.
LGTM
As I wrote in the comment, writing |
This is to test the support of tools for proper initialization menu of arrays, as discussed in #4457 .
See
Modelica.Electrical.PolyPhase.Examples.TransformerYY
If this works well, the same style of initialization will be implemented for other polyphase models and machines.