Conversation
This commit adds a new UnitSystem::measure for "foam density" quantities such as those entered in the WFOAM keyword. This is mainly intended for client code that wishes to tag output arrays appropriately for unit conversion in restart file output. While here, also add unit tests for the 'concentration' unit of measure that was introduced in commit d4e33a4 (PR OPM#4741).
|
jenkins build this please |
The FOAM result array should be treated as a "foamdensity" (PR OPM/opm-common#4842) instead of a saturation when converted to output units.
|
The PR looks good, while not directly related to this PR, from the manual I read, it looks like |
| "GPa", | ||
| "KJ/M/DAY/K", | ||
| "DAY/SM3", | ||
| "KG/SM3", |
There was a problem hiding this comment.
not all the units have that, but I do think a comment can help the readability and also you are here to adding a new one, since it is a relatively long list now.
"KG/SM3", /* foam density */ something like that.
GitPaean
left a comment
There was a problem hiding this comment.
Thanks for the PR, it looks good to me. A small comment regarding comment, I will leave it up to you whether to add it.
|
jenkins build this please |
Okay, I appreciate it, but this isn't ready yet. I'll reset it back to draft state. |
What remains before the PR can go in? |
A lot. The foam density unit generally depends on the injected phase. |
Sure. I guess it is related to FOAMOPTS. |
You're absolutely right. If we're going to solve this, we should have a general solution that accounts for all cases, not just the METRIC system. |
This commit adds a new
UnitSystem::measurefor "foam density" quantities such as those entered in theWFOAMkeyword. This is mainly intended for client code that wishes to tag output arrays appropriately for unit conversion in restart file output.While here, also add unit tests for the 'concentration' unit of measure that was introduced in commit d4e33a4 (PR #4749).