mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2215 Plt Plot : Extract unit string text generation
This commit is contained in:
@@ -669,48 +669,51 @@ QString RimWellPlotTools::flowPlotAxisTitle(RimWellLogFile::WellFlowCondition co
|
|||||||
|
|
||||||
if (condition == RimWellLogFile::WELL_FLOW_COND_RESERVOIR)
|
if (condition == RimWellLogFile::WELL_FLOW_COND_RESERVOIR)
|
||||||
{
|
{
|
||||||
QString unitText;
|
QString unitText = RimWellPlotTools::flowUnitText(condition, unitSystem);
|
||||||
switch ( unitSystem )
|
|
||||||
{
|
|
||||||
case RiaEclipseUnitTools::UNITS_METRIC:
|
|
||||||
unitText = "[m<sup>3</sup>/day]";
|
|
||||||
break;
|
|
||||||
case RiaEclipseUnitTools::UNITS_FIELD:
|
|
||||||
unitText = "[Brl/day]";
|
|
||||||
break;
|
|
||||||
case RiaEclipseUnitTools::UNITS_LAB:
|
|
||||||
unitText = "[cm<sup>3</sup>/hr]";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
axisTitle = "Reservoir Flow Rate " + unitText;
|
axisTitle = "Reservoir Flow Rate " + unitText;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString unitText;
|
QString unitText = RimWellPlotTools::flowUnitText(condition, unitSystem);
|
||||||
switch ( unitSystem )
|
|
||||||
{
|
|
||||||
case RiaEclipseUnitTools::UNITS_METRIC:
|
|
||||||
unitText = "[Liquid Sm<sup>3</sup>/day], [Gas kSm<sup>3</sup>/day]";
|
|
||||||
break;
|
|
||||||
case RiaEclipseUnitTools::UNITS_FIELD:
|
|
||||||
unitText = "[Liquid BBL/day], [Gas BOE/day]";
|
|
||||||
break;
|
|
||||||
case RiaEclipseUnitTools::UNITS_LAB:
|
|
||||||
unitText = "[cm<sup>3</sup>/hr]";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
axisTitle = "Surface Flow Rate " + unitText;
|
axisTitle = "Surface Flow Rate " + unitText;
|
||||||
}
|
}
|
||||||
|
|
||||||
return axisTitle;
|
return axisTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimWellPlotTools::flowUnitText(RimWellLogFile::WellFlowCondition condition, RiaEclipseUnitTools::UnitSystem unitSystem)
|
||||||
|
{
|
||||||
|
QString unitText;
|
||||||
|
|
||||||
|
if (condition == RimWellLogFile::WELL_FLOW_COND_RESERVOIR)
|
||||||
|
{
|
||||||
|
switch (unitSystem)
|
||||||
|
{
|
||||||
|
case RiaEclipseUnitTools::UNITS_METRIC: unitText = "[m<sup>3</sup>/day]"; break;
|
||||||
|
case RiaEclipseUnitTools::UNITS_FIELD: unitText = "[Brl/day]"; break;
|
||||||
|
case RiaEclipseUnitTools::UNITS_LAB: unitText = "[cm<sup>3</sup>/hr]"; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (unitSystem)
|
||||||
|
{
|
||||||
|
case RiaEclipseUnitTools::UNITS_METRIC: unitText = "[Liquid Sm<sup>3</sup>/day], [Gas kSm<sup>3</sup>/day]"; break;
|
||||||
|
case RiaEclipseUnitTools::UNITS_FIELD: unitText = "[Liquid BBL/day], [Gas BOE/day]"; break;
|
||||||
|
case RiaEclipseUnitTools::UNITS_LAB: unitText = "[cm<sup>3</sup>/hr]"; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return unitText;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -96,6 +96,9 @@ public:
|
|||||||
|
|
||||||
static QString flowPlotAxisTitle(RimWellLogFile::WellFlowCondition condition,
|
static QString flowPlotAxisTitle(RimWellLogFile::WellFlowCondition condition,
|
||||||
RiaEclipseUnitTools::UnitSystem unitSystem);
|
RiaEclipseUnitTools::UnitSystem unitSystem);
|
||||||
|
|
||||||
|
static QString flowUnitText(RimWellLogFile::WellFlowCondition condition,
|
||||||
|
RiaEclipseUnitTools::UnitSystem unitSystem);
|
||||||
private:
|
private:
|
||||||
friend class StaticFieldsInitializer;
|
friend class StaticFieldsInitializer;
|
||||||
static const std::set<QString> PRESSURE_DATA_NAMES;
|
static const std::set<QString> PRESSURE_DATA_NAMES;
|
||||||
|
|||||||
Reference in New Issue
Block a user