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

Brackets missing when there are multiple denominators in units string #1349

Open
glyn-horsham opened this issue Jan 3, 2024 · 1 comment
Labels

Comments

@glyn-horsham
Copy link

According to the BODMAS mathematical convention, division comes before multiplication, therefore, the unit definitions where there are multiple denominators should be in brackets to avoid confusion between, say, W/m^2·C and (W/m^2)·C

For example, for heat transfer coefficients:
"Abbreviations": [ "kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C" ]
should be
"Abbreviations": [ "kcal/(h·m²·°C)", "kcal/(m²·h·°C)", "kcal/(hr·m²·°C)", "kcal/(m²·hr·°C)" ]

This applies to multiple units in the code, from glancing though, I have found HeatTransferComponents and VolumetricHeatCapacity, but there maybe others.

@angularsen
Copy link
Owner

Thank you for reporting, would you be interested in attempting a pull request?

We can't remove abbreviations, it would be a breaking change on parsing and should be done as part of #1200 , but we can safely add the new variations and we can also change which abbreviation is first in the list of abbreviations, which is used by ToString() by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants