cadet / CADET-Core

A modular, fast, and accurate simulation framework for (bio)chemical processes
Other
54 stars 26 forks source link

Alternative units #51

Open lieres opened 4 years ago

lieres commented 4 years ago

CADET is currently based on the SI unit system and this should always be the deafult standard. However, it might be convenient for many users to be able to specify different units for each individual parameter, e.g. from the CGS system.

This could be implemented by adding an additonal field to the HDF5 file that specifies the unit and converting the corresponding values upon read/ write. If the unit field is missing, SI units are used.

sleweke commented 3 years ago

CADET is fully unit-agnostic. That is, you can use any unit system you want as long as you are consistent. For example, you can use cm instead of m everywhere, or g instead of mol.

Immudzen commented 3 years ago

I think we would have to work out other unit systems to tell people what a fully consistent unit system is because it is not that simple. If you use g instead of mol you also change the SMA neutrality condition to grams instead of countable numbers and that is going to give some weird numbers. If you write your flow in L/min then your dispersion is in decimeter^2/min. Producing a completely consistent unit system that works with the binding models is not going to be trivial and encouraging this is going to end up with a lot of failed simulations due to non-obvious unit problems.

lieres commented 3 years ago

Even though that is generally possible, I would refrain from using g in the units. However, I agree that it might be helpful to demonstrate computations in a different unit system. I would suggest to use dimensionless groups as an example, i.e. Peclet number in place of the dispersion coefficient, etc.

ronald-jaepel commented 3 months ago

Can this be closed?

lieres commented 3 months ago

I would leave it open. There are packages that would allow us to associate input and output values with units, so users can easily convert between unit systems.

schmoelder commented 3 months ago

Maybe this would be better suited for CADET-Process.