Opened 5 years ago

Last modified 3 years ago

#5773 new enhancement

Correctly show resistance unit of measure

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: normal Milestone:
Component: OMEdit Version:
Keywords: Cc:

Description

Recently OMEdit has added unit of measure to shown component parameters.
For instance, inductances carry H, capacitances F, etc.
Resistances carry "Ohm".
I see no programming difficulty in using the correct value (uppercase greek omega).
I understand that it would enhance the visual quality of diagrams minimally but in case, as I expect, the programming effort is minimal as well, it is worthwhile.

Attachments (5)

OM.png (56.2 KB ) - added by massimo ceraolo 5 years ago.
Dym.png (42.4 KB ) - added by massimo ceraolo 5 years ago.
Dym.2.png (42.4 KB ) - added by massimo ceraolo 5 years ago.
dialog_DYM.png (31.8 KB ) - added by massimo ceraolo 5 years ago.
dialog_OM.png (32.2 KB ) - added by massimo ceraolo 5 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by Adeel Asghar, 5 years ago

Sorry I didn't get it. Can you elaborate a bit more?

comment:2 by massimo ceraolo, 5 years ago

consider the two pictures OM.png e DYM.png. the unit of measure shown in dymola is SI-compliant, the one shown by OM, i.e. "Ohm" is not.

by massimo ceraolo, 5 years ago

Attachment: OM.png added

by massimo ceraolo, 5 years ago

Attachment: Dym.png added

by massimo ceraolo, 5 years ago

Attachment: Dym.2.png added

comment:3 by Adeel Asghar, 5 years ago

Aha I see.

Actually I just use whatever is defined in MSL e.g.,

type Inductance = Real (
    final quantity="Inductance",
    final unit="H");
type Resistance = Real (
    final quantity="Resistance",
    final unit="Ohm");

What you want is very much possible I just need to check whenver unit is Ohm use omega for display. I believe we could build up a small database in OMEdit as there might be more units like this but I am not sure.

in reply to:  3 comment:4 by massimo ceraolo, 5 years ago

What you want is very much possible I just need to check whenever unit is Ohm use omega for display.

It is what I expected. when you do this, consider to do this also in the dialog box: check dialog_dym.png and dialog_OM.png.
Finally, this could even appear in the Variable Browser as unit of measure of resistors: in this case beating Dymola 2020, which still shows "Ohm" (maybe they'll change in the future)

I believe we could build up a small database in OMEdit as there might be more units like this but I am not sure.

I'm not aware of similar cases. The unit of measure of resistance, instead, is a very well known case, since at least it is the only very commonly used unit having a Greek letter as a unit symbol. My guess is that this case a greek letter was chosen because the most natural candidate, the first letter of Mr. Ohm surname, was unusable because it could easily be confused with 0. And they chose the greek letter which mostly resembles an "O".

by massimo ceraolo, 5 years ago

Attachment: dialog_DYM.png added

by massimo ceraolo, 5 years ago

Attachment: dialog_OM.png added

comment:5 by Francesco Casella, 5 years ago

Please note that MSL only defines the SI units, but we also have derived units, such as milli-Ohms, kilo-Ohms, mega-Ohms.

There are other Greek letters involved in the derived units, for the "micro" prefix that uses the letter mu.

BTW, there are many very useful and obviously missing derived units in OMEdit, see #4796

comment:6 by massimo ceraolo, 5 years ago

To complete the info: the unit of measure or resistance should be with a greek letter also in plot legends (Dymola already does this). It is not common to have the need to plot a resistance, but in case of variable resistors we do.

Comment 5, for me, is important especially in conjunction with ticket #5447:
As that ticket shows, I'm strongly in favor of using prefixes along with a unit of measure, to enhance plot readability. If we have, for instance, microamperes or the Greek letter "mi" (or "mu" as someones call it) would be needed.

I understand that my ticket #5447 has not received a lot of comments from users, and therefore its priority has implicitly lowered.
But I'm pretty sure that its implementation would cause a big leap forward in OMEdit usability and ease to use, and surpass Dymola that still requires manual action to use prefixes.

comment:7 by Francesco Casella, 5 years ago

@adeas31, if you explain us where in the code we should add the information to get the new units, we can contribute ourselves!

comment:8 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:9 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:10 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.