OPM / opm-common

Common components for OPM, in particular build system (cmake).
http://www.opm-project.org
GNU General Public License v3.0
30 stars 111 forks source link

Reafctor unit system? #950

Open joakim-hove opened 5 years ago

joakim-hove commented 5 years ago

We have started a long haul to add all the missing Eclipse100 keywords, and in that process things pop up - of course. Right now is the WAPIkeyword where specific gravity of the injection stream can be set with API Units - that relationship totally breaks the current unit system.

The unit system has always felt a bit klunky, so this could be seen as an opportunity to refactor it? For now the density item in the WAPI keyword is just entered without dimension: https://github.com/OPM/opm-common/pull/945

atgeirr commented 5 years ago

I think refactoring to take into account the utterly weird API units should only be done if considered mission critical. Unfortunately, it looks to me like the only way to input data for using API tracking (which is essentially "choose PVT table depending on the average surface density of the oil present in the cell") requires this. On the other side, it seems to be somewhat isolated, so treating it as a separate dimension (i.e. not converting to SI densities) may be possible?

joakim-hove commented 5 years ago

On the other side, it seems to be somewhat isolated, so treating it as a separate dimension (i.e. not converting to SI densities) may be possible?

Yes - or doing unit conversion manually in the EclipseState layer. Will not do anything right away at least.