Ex-Mente / auxi.0

GNU Lesser General Public License v3.0
8 stars 8 forks source link

Changing the units of returned values #112

Closed MarnoGrewar closed 7 years ago

MarnoGrewar commented 8 years ago

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.

johanzietsman-em commented 8 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.

MarnoGrewar commented 8 years ago

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.

johanzietsman-em commented 8 years ago

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:

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:

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.

johanzietsman-em commented 8 years ago

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.