Closed MarnoGrewar closed 7 years ago
Thanks for suggesting this Marno. It is an important aspect to address, and it would have a very wide impact within auxi
.
I changed the purpose statement to be more clear.
I don't understand your approach statement. Please clarify.
Johan thank for your feedback on my issue, and sorry for taking so long to respond. I edited my previous approach to be more clearly stated.
Thanks Marno. My suggestion would be that we add another package/module to address the dimension and unit infrastructure required in auxi
. Here are a few suggestions that have come to mind so far:
units.py
module into the auxi.tools
package. I don't see that units will require a package of its own. A module should be sufficient.I don't think we should build units directly into all auxi
calculations, since this will impair computational performance. We should do this as simply as possible through multiplication factors for unit conversions, and allowing users to ask auxi
which units it is using for a specific calculation. I am not certain how we should do this yet, but the following concepts may become part of the implementation:
auxi.tools.chemistry.thermochemistry
may have its own units set to specify in which units it should perform its calculations. Users can select different units into this unit set, or change to a different units set altogether, to modify the units used.units
module. It should list all the available dimensions, and all the available units for each dimension. Users can then select from the repository into units sets.Some more thinking is required, but this is a start. I am moving this issue to Ready status so that we can start tinkering with the ideas. I will create branches for you and me to work on.
After poking around on the internet, I found a wealth of resources about this issue.
Standards:
Here are some Python projects that already address the units issue:
Other languages:
Articles and posts:
A good start would be to see the principles behind what these guys have done. We should also create a bit of a requirement specification for our implementation. Since auxi
is a scientific and engineering tool, units of measure are fundamental to what we do. It should integrate well with the entire framework, especially the modelling and simulation parts.
Background
During the use of H, S and G functions thermochemistry module, it was found that if one can change the units of the return values, for example from kWh to Joules (J), would be helpful.
Purpose
This change to auxi's returned values would enable users to choose the units the return value of a function must be displayed in.
Approach
A possible approach is to provide a list generally used units for a specific functions. Another approach is to provide a unit converter function or package to aid in converting return values from functions to required units. Any other suggestions to approach this issue will be greatly appreciated.