Skip to content

Give the impedances and resistances in Electrical parameters a unit - #4819

Open
henrikt-ma wants to merge 1 commit into
modelica:masterfrom
henrikt-ma:units-of-machine-parameters
Open

henrikt-ma wants to merge 1 commit into
modelica:masterfrom
henrikt-ma:units-of-machine-parameters

Conversation

@henrikt-ma

Copy link
Copy Markdown
Contributor

Similar unit inconsistency fixes as in #4817, but for problems in Electrical which are not exposed only because pi carries a unit.

@henrikt-ma henrikt-ma added L: Electrical.Analog Issue addresses Modelica.Electrical.Analog L: Electrical.Machines Issue addresses Modelica.Electrical.Machines L: Electrical.Polyphase Issue addresses Modelica.Electrical.Polyhase L: Electrical.QuasiStatic Issue addresses Modelica.Electrical.QuasiStatic requires Modelica 3.7 Issue that requires Modelica Language Specification 3.7 labels Oct 5, 2026
@henrikt-ma
henrikt-ma requested a review from AHaumer October 5, 2026 07:59
@AHaumer
AHaumer requested a review from casella October 13, 2026 08:07
@AHaumer

AHaumer commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Why is the list of possible reviewers so short?

@christiankral
christiankral self-requested a review October 13, 2026 18:00
@henrikt-ma

Copy link
Copy Markdown
Contributor Author

Why is the list of possible reviewers so short?

Anyone in particular you couldn't add to the list?

…ters a unit

Inductances in the machine parameter records and several examples were
computed as a number divided by 2*pi*f, where the number is a reactance in ohm,
and some resistances were given as a number divided by a squared turns ratio.
These numbers are now unitful literals in ohm, such as
0.3'Ohm'/(2*pi*fsNominal) and 0.04'Ohm'/turnsRatio^2, and the locked-rotor
voltage of slip-ring machines is 100'V'*(...), so that the parameters have the
units they are declared with.  The values are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@beutlich
beutlich force-pushed the units-of-machine-parameters branch from 448c910 to c1dd2e2 Compare October 20, 2026 20:45
@AHaumer

AHaumer commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

See my comment in #4817:
Sorry, no I won't accept what is discussed here (and in other PRs touching that topic).
pi might be an angle, having the unit "rad" equivalent to "1".
pi might be just an irrational mumber, having no unit.
Tools should develop heuristics to decide whether to use "no unit" or "rad".
I will also not accept changes in the MSL like:
parameter SI.Inductance L1sigma=0.05'Ohm'/(2*pi*f);
That's horrible! Just spend 1 paramter and it looks nice:
parameter SI.Reactance X1sigma=0.05;
parameter SI.Inductance L1sigma=X1sigma/(2*pi*f);
It should be nice to read and easy to understand even for newcomers and students.

@AHaumer

AHaumer commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Full ack, we have some not clean code in MSL regarding units.
But: IMHO units should be handled this way.
Units.pdf

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: Electrical.Analog Issue addresses Modelica.Electrical.Analog L: Electrical.Machines Issue addresses Modelica.Electrical.Machines L: Electrical.Polyphase Issue addresses Modelica.Electrical.Polyhase L: Electrical.QuasiStatic Issue addresses Modelica.Electrical.QuasiStatic requires Modelica 3.7 Issue that requires Modelica Language Specification 3.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants