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

Names of quantities in MSL description; unit of resistance #2142

Closed
modelica-trac-importer opened this issue Nov 4, 2018 · 9 comments
Closed
Assignees
Labels
bug Something isn't working decided A decision has been made (label added before the spec is changed)

Comments

@modelica-trac-importer
Copy link
Collaborator

Reported by massimo.ceraolo on 28 Dec 2016 09:05 UTC
I think that publication:
https://www.nist.gov/sites/default/files/documents/pml/div684/fcdc/sp330-2.pdf
is a good summary of ISO standards regarding units of measure.

According to this document the unit of measure for resistance is "ohm", not "Ohm". and for magnetic flux density is "tesla", not "Tesla".
(I could not check with ISO standard at the moment, but I'm pretty sure that this document is perfectly ISO-compliant, since both stem from CGPM documents).

_Therefore I think a correction should be made in specification at sect. 19.1 and 19.2 where "Ohm" and "Tesla" are used respectively.
_
There is one important implication of switching to the correct unit names. MSL 19.1 reads:
"In the base version greek letters is not supported, but full names must then be written, for example "Ohm"".

This means that either "ohm" or "Ω" should be used as unit of measure of resistance, i.e., the current unit is erroneous.

_I propose, in the next version of Modelica Specs, to allow "Ω" as unit of measure, while still accepting, for some time, "Ohm" for compatibility reasons.
I jointly propose to use for unit of resistance in the next version of MSL "Ω"
_
I made a check, and it resulted to me that at present the only non-ISO compliant unit in Modelica SIunits is exactly the unit used for resistance.


Migrated-From: https://trac.modelica.org/Modelica/ticket/2142

@modelica-trac-importer
Copy link
Collaborator Author

Comment by stefanv on 28 Dec 2016 13:12 UTC
Unfortunately, the current Modelica specification would not allow "Ω" to be used. According to Appendix B.1 (emphasis mine),

  • Description strings (= production “string_comment” in the grammar) and strings in annotations (= STRING with production annotation in the grammar) may contain any member of the Unicode character set. All other strings have to contain only the sub-set of Unicode characters identical with the 7-bit US-ASCII character set.

Thus, "Ω" cannot appear in a unit string, since "Ω" is not part of the 7-bit US-ASCII character set.

Besides not being allowed, I also object to the use of "Ω" on the grounds that it is difficult to type into a source file, unless you happen to be using a Greek keyboard.

In the interests of ISO-compatibility, I agree that we should use "ohm" and not "Ohm", however I've always found it disrespectful on the part of the ISO that they decided to spell it (and "tesla") that way.

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 2 Jan 2017 13:58 UTC
This is almost a duplicate of your earlier ticket #2054 - and using "ohm" would not fully work, since a non-abbreviated name cannot be combined with an abbreviated name, i.e. ohm-meter the unit of resistivity) cannot be written as "ohm.m".

However, what is new is that Stefan V. recognized that "Ω" currently cannot be used in unit-strings. A simple solution would be to allow Unicode for unit-strings.

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 3 Jan 2017 11:23 UTC
Replying to [comment:1 stefanv]:

Besides not being allowed, I also object to the use of "Ω" on the grounds that it is difficult to type into a source file, unless you happen to be using a Greek keyboard.

Having a Greek keyboard would be a false friend, since you don't find the correct symbols:
The ohm-symbol is "Ω" (2126) as in this document - not the Greek Omega "Ω" (03A9).
The micro-symbol is "µ" (00B5) - not Greek small mu "μ" (03BC).

@modelica-trac-importer
Copy link
Collaborator Author

Comment by ceraolo on 3 Jan 2017 11:49 UTC
About ticket #2054. I'm sorry for the duplication. I really forgot that I had already risen the question. Should I now close that ticket?

To stefanv. I think when people at GCPM decided for ampere, tesla, ohm, volt, watt, ecc. wanted in this way to mark the difference between scientists' personal names and common names such as units of measure. This way this decision could also be seen as a form of respect, indeed.
About writing "Ω", I note that the majority of users would not have to write it; but a lot of them will read it often on plot axes, variable lists, etc.

To Hansolsson.
I strongly support the idea of allow Unicode for unit-strings. I think that when the sentence quoted with emphasis by stefanv was written in the specification, nobody thought that this would hinder full usage of SI units!

@modelica-trac-importer
Copy link
Collaborator Author

Comment by leo.gall on 3 Jan 2017 13:30 UTC
Just two side notes:

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 12 Oct 2017 10:02 UTC
To discuss at meeting. Some should be possible to trivially close.

@modelica-trac-importer modelica-trac-importer added this to the Design95 milestone Nov 4, 2018
@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 19 Oct 2017 10:09 UTC
Allowing Unicode means that we need to consider the cases with different inputs (including the wrong Unicode-symbol) - and possibly map them to the same internal representation.
Tools can already print "Ohm" as "Ω" in plot-heading.

Minimum: As a comment add that tool can present "Ohm" as "Ω" and "u" as "µ"; in Section 19.1.
Agreement by acclamation.

Adding Unicode for units, and deciding on the details (including problems of entering them):
Favor: 0
Against: 4
Abstain:

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 25 Oct 2017 07:58 UTC
To add comment.

@modelica-trac-importer
Copy link
Collaborator Author

Comment by massimo.ceraolo on 22 Nov 2017 13:14 UTC
Making somehow "official" the translation by tools of "Ohm" into "Ω" it is for me a very reasonable resolution of this ticket.

BTW, there exists already one (post-processing) tool which make this translation when resistances either as parameters of variables (when we have variable resistors: it is PlotXY, available from here:

https://www.modelica.org/tools/index_html#other-free-tools

I've checked with Dymola and OM outputs. Note that unit info has been added to OpenModelica outputs only recently. I checked with v1.13.0-dev-215.

@HansOlsson HansOlsson added the decided A decision has been made (label added before the spec is changed) label Jan 15, 2019
@HansOlsson HansOlsson modified the milestones: ModelicaSpecX, ModelicaSpec3.5 Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working decided A decision has been made (label added before the spec is changed)
Projects
None yet
Development

No branches or pull requests