You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should discuss how to automatically simplify composing units:
Scalar(1, 'kg') * Scalar(1, 'm3') / Scalar(1, 'm3') should return a scalar with Quantity('kg').
This implies that we should not have simple units in our database which are actually composed: for example, Quantity("kg/m3") should really be handled as Quantity([("kg", 1), ("m3", 1)]) internally.
This simplification process needs to make sure to not throw away all units and get a Quantity("unitless") back, as an important feature is to have units like "m3/m3" or "g/kg" in our systems.
This also implies that scalar.GetValue("kg/m3") will need to parse "kg/m3" properly into the respective exponents [("kg", 1), ("m3", -1)], as "kg/m3" as a single unit will no longer exist.
@fabioz please let me know if I'm missing something.
Follow up: #15 (comment)
We should discuss how to automatically simplify composing units:
Scalar(1, 'kg') * Scalar(1, 'm3') / Scalar(1, 'm3')
should return a scalar withQuantity('kg')
.This implies that we should not have simple units in our database which are actually composed: for example,
Quantity("kg/m3")
should really be handled asQuantity([("kg", 1), ("m3", 1)])
internally.This simplification process needs to make sure to not throw away all units and get a
Quantity("unitless")
back, as an important feature is to have units like"m3/m3"
or"g/kg"
in our systems.This also implies that
scalar.GetValue("kg/m3")
will need to parse"kg/m3"
properly into the respective exponents[("kg", 1), ("m3", -1)]
, as"kg/m3"
as a single unit will no longer exist.@fabioz please let me know if I'm missing something.
cc @igortg @kfasolin @tadeu @damianimc @arthursoprana
The text was updated successfully, but these errors were encountered: