mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7765 Well Log Curves : Improve handling of units
This commit is contained in:
@@ -194,6 +194,52 @@ QString RiaDefines::mockModelBasicInputCase()
|
||||
return "Input Mock Debug Model Simple";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::DepthUnitType RiaDefines::fromEclipseUnit( EclipseUnitSystem eclipseUnit )
|
||||
{
|
||||
switch ( eclipseUnit )
|
||||
{
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return DepthUnitType::UNIT_METER;
|
||||
break;
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return DepthUnitType::UNIT_FEET;
|
||||
break;
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_LAB:
|
||||
break;
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return DepthUnitType::UNIT_NONE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::EclipseUnitSystem RiaDefines::fromDepthUnit( DepthUnitType depthUnit )
|
||||
{
|
||||
switch ( depthUnit )
|
||||
{
|
||||
case RiaDefines::DepthUnitType::UNIT_METER:
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
break;
|
||||
case RiaDefines::DepthUnitType::UNIT_FEET:
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
break;
|
||||
case RiaDefines::DepthUnitType::UNIT_NONE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -94,6 +94,9 @@ enum class DepthUnitType
|
||||
UNIT_NONE
|
||||
};
|
||||
|
||||
DepthUnitType fromEclipseUnit( EclipseUnitSystem eclipseUnit );
|
||||
EclipseUnitSystem fromDepthUnit( DepthUnitType depthUnit );
|
||||
|
||||
// Depth types used for well log plots
|
||||
enum class DepthTypeEnum
|
||||
{
|
||||
|
@@ -46,31 +46,6 @@ double RiaEclipseUnitTools::darcysConstant( RiaDefines::EclipseUnitSystem unitSy
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::DepthUnitType RiaEclipseUnitTools::depthUnit( RiaDefines::EclipseUnitSystem unit )
|
||||
{
|
||||
switch ( unit )
|
||||
{
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return RiaDefines::DepthUnitType::UNIT_METER;
|
||||
break;
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return RiaDefines::DepthUnitType::UNIT_FEET;
|
||||
break;
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_LAB:
|
||||
return RiaDefines::DepthUnitType::UNIT_NONE;
|
||||
break;
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN:
|
||||
return RiaDefines::DepthUnitType::UNIT_NONE;
|
||||
break;
|
||||
default:
|
||||
return RiaDefines::DepthUnitType::UNIT_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Convert Gas to oil equivalents
|
||||
/// If field unit, the Gas is in Mega ft^3 while the others are in [stb] (barrel)
|
||||
|
@@ -44,8 +44,6 @@ public:
|
||||
|
||||
static double darcysConstant( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
static RiaDefines::DepthUnitType depthUnit( RiaDefines::EclipseUnitSystem unit );
|
||||
|
||||
static double convertSurfaceGasFlowRateToOilEquivalents( RiaDefines::EclipseUnitSystem, double eclGasFlowRate );
|
||||
|
||||
static QString unitStringPressure( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
Reference in New Issue
Block a user