diff --git a/opm/input/eclipse/Units/UnitSystem.cpp b/opm/input/eclipse/Units/UnitSystem.cpp index eb1e0c9da26..af3feb977b9 100644 --- a/opm/input/eclipse/Units/UnitSystem.cpp +++ b/opm/input/eclipse/Units/UnitSystem.cpp @@ -1536,12 +1536,18 @@ namespace { for( const auto& x : dimensionList ) { auto dim = this->getDimension( x ); - // all constituing dimension must be compositable. The + // all constituting dimensions must be compositable. The // only exception is if there is the "composite" dimension // consists of exactly a single atomic dimension... - if (dimensionList.size() > 1 && !dim.isCompositable()) - throw std::invalid_argument("Composite dimensions currently cannot require a conversion offset"); - + if ( !dim.isCompositable() ) { + if (dimensionList.size() > 1) { + throw std::invalid_argument("Composite dimensions currently cannot handle conversion offsets"); + } else { + // If there is only one single dimension, and it's not compositable (involving conversion offsets), + // return it directly + return dim; + } + } SIfactor *= dim.getSIScaling(); } return Dimension( SIfactor ); @@ -1560,8 +1566,9 @@ namespace { Dimension dividend = this->parseFactor( parts[0] ); Dimension divisor = this->parseFactor( parts[1] ); - if (dividend.getSIOffset() != 0.0 || divisor.getSIOffset() != 0.0) - throw std::invalid_argument("Composite dimensions cannot currently require a conversion offset"); + if (!dividend.isCompositable() || !divisor.isCompositable()) { + throw std::invalid_argument("Composite dimensions currently cannot handle conversion offsets"); + } return Dimension( dividend.getSIScaling() / divisor.getSIScaling() ); } diff --git a/opm/input/eclipse/share/keywords/900_OPM/G/GASJT b/opm/input/eclipse/share/keywords/900_OPM/G/GASJT index af73f5185e4..ca56b322095 100644 --- a/opm/input/eclipse/share/keywords/900_OPM/G/GASJT +++ b/opm/input/eclipse/share/keywords/900_OPM/G/GASJT @@ -17,9 +17,9 @@ { "name": "JOULE_THOMSON_COEFFICIENT", "value_type": "DOUBLE", - "dimension": "Temperature/Pressure", + "dimension": "AbsoluteTemperature/Pressure", "default": 0, - "comment": "if defaulted the JT coefficient is calculated" + "comment": "if defaulted the JT coefficient is calculated. Unit Temperature can not be used due to conversion offset" } ] } diff --git a/opm/input/eclipse/share/keywords/900_OPM/O/OILJT b/opm/input/eclipse/share/keywords/900_OPM/O/OILJT index 1af3e280166..0f3657c4e48 100644 --- a/opm/input/eclipse/share/keywords/900_OPM/O/OILJT +++ b/opm/input/eclipse/share/keywords/900_OPM/O/OILJT @@ -17,9 +17,9 @@ { "name": "JOULE_THOMSON_COEFFICIENT", "value_type": "DOUBLE", - "dimension": "Temperature/Pressure", + "dimension": "AbsoluteTemperature/Pressure", "default": 0, - "comment": "if defaulted the JT coefficient is calculated" + "comment": "if defaulted the JT coefficient is calculated. Unit Temperature can not be used due to conversion offset" } ] } diff --git a/opm/input/eclipse/share/keywords/900_OPM/T/THERMEXR b/opm/input/eclipse/share/keywords/900_OPM/T/THERMEXR index 623371bc783..65d57de0c76 100644 --- a/opm/input/eclipse/share/keywords/900_OPM/T/THERMEXR +++ b/opm/input/eclipse/share/keywords/900_OPM/T/THERMEXR @@ -6,6 +6,7 @@ "description": "The THERMEXR item is used to set the thermal expansion ratio for a cell in mechanics models.", "data": { "value_type": "DOUBLE", - "dimension": "1/Temperature" + "dimension": "1/AbsoluteTemperature", + "comment": "Unit Temperature can not be used due to conversion offset" } } diff --git a/opm/input/eclipse/share/keywords/900_OPM/W/WATJT b/opm/input/eclipse/share/keywords/900_OPM/W/WATJT index 92111683cd7..bc0fa0861df 100644 --- a/opm/input/eclipse/share/keywords/900_OPM/W/WATJT +++ b/opm/input/eclipse/share/keywords/900_OPM/W/WATJT @@ -17,9 +17,9 @@ { "name": "JOULE_THOMSON_COEFFICIENT", "value_type": "DOUBLE", - "dimension": "Temperature/Pressure", + "dimension": "AbsoluteTemperature/Pressure", "default": 0, - "comment": "if defaulted the JT coefficient is calculated" + "comment": "if defaulted the JT coefficient is calculated. Unit Temperature can not be used due to conversion offset" } ] }