mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2116 Convert the PLT plot gas rate from RFT file to oil equivalents
This commit is contained in:
parent
161690d9c8
commit
dfa0ade9fe
@ -84,3 +84,27 @@ RiaDefines::DepthUnitType RiaEclipseUnitTools::depthUnit(UnitSystem unit)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Convert Gas to oil equivalents
|
||||
/// If field unit, the Gas is in Mega ft^3 while the others are in [stb] (barrel)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents(UnitSystem caseUnitSystem, double eclGasFlowRate)
|
||||
{
|
||||
/// Unused Gas to Barrel conversion :
|
||||
/// we convert gas to stb as well. Based on
|
||||
/// 1 [stb] = 0.15898729492800007 [m^3]
|
||||
/// 1 [ft] = 0.3048 [m]
|
||||
/// megaFt3ToStbFactor = 1.0 / (1.0e-6 * 0.15898729492800007 * ( 1.0 / 0.3048 )^3 )
|
||||
/// double megaFt3ToStbFactor = 178107.60668;
|
||||
|
||||
double fieldGasToOilEquivalent = 1.0e6/5800; // Mega ft^3 to BOE
|
||||
double metricGasToOilEquivalent = 1.0/1.0e3; // Sm^3 Gas to Sm^3 oe
|
||||
|
||||
double oilEquivalentGasRate = HUGE_VAL;
|
||||
|
||||
if (caseUnitSystem == RiaEclipseUnitTools::UNITS_FIELD) oilEquivalentGasRate = fieldGasToOilEquivalent * eclGasFlowRate;
|
||||
if (caseUnitSystem == RiaEclipseUnitTools::UNITS_METRIC) oilEquivalentGasRate = metricGasToOilEquivalent * eclGasFlowRate;
|
||||
|
||||
return oilEquivalentGasRate;
|
||||
}
|
||||
|
||||
|
@ -47,5 +47,7 @@ public:
|
||||
static double darcysConstant(UnitSystem unitSystem);
|
||||
|
||||
static RiaDefines::DepthUnitType depthUnit(UnitSystem unit);
|
||||
|
||||
static double convertSurfaceGasFlowRateToOilEquivalents(UnitSystem, double eclGasFlowRate);
|
||||
};
|
||||
|
||||
|
@ -1139,25 +1139,8 @@ RigWellResultPoint RifReaderEclipseOutput::createWellResultPoint(const RigGridBa
|
||||
resultPoint.m_flowRate = volumeRate;
|
||||
resultPoint.m_oilRate = oilRate;
|
||||
resultPoint.m_waterRate = waterRate;
|
||||
|
||||
/// Unit conversion for use with Well Allocation plots
|
||||
// Convert Gas to oil equivalents
|
||||
// If field unit, the Gas is in Mega ft^3 while the others are in [stb] (barrel)
|
||||
|
||||
// Unused Gas to Barrel conversion
|
||||
// we convert gas to stb as well. Based on
|
||||
// 1 [stb] = 0.15898729492800007 [m^3]
|
||||
// 1 [ft] = 0.3048 [m]
|
||||
// megaFt3ToStbFactor = 1.0 / (1.0e-6 * 0.15898729492800007 * ( 1.0 / 0.3048 )^3 )
|
||||
// double megaFt3ToStbFactor = 178107.60668;
|
||||
|
||||
double fieldGasToOilEquivalent = 1.0e6/5800; // Mega ft^3 to BOE
|
||||
double metricGasToOilEquivalent = 1.0/1.0e3; // Sm^3 Gas to Sm^3 oe
|
||||
|
||||
if (m_eclipseCase->unitsType() == RiaEclipseUnitTools::UNITS_FIELD) gasRate = fieldGasToOilEquivalent * gasRate;
|
||||
if (m_eclipseCase->unitsType() == RiaEclipseUnitTools::UNITS_METRIC) gasRate = metricGasToOilEquivalent * gasRate;
|
||||
|
||||
resultPoint.m_gasRate = gasRate;
|
||||
|
||||
resultPoint.m_gasRate = RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents(m_eclipseCase->unitsType(), gasRate);
|
||||
}
|
||||
|
||||
return resultPoint;
|
||||
|
@ -668,11 +668,12 @@ public:
|
||||
|
||||
RigWellResultPoint resPoint;
|
||||
resPoint.m_isOpen = true;
|
||||
resPoint.m_gridIndex = 0; // Always main grod
|
||||
resPoint.m_gridIndex = 0; // Always main grid
|
||||
resPoint.m_gridCellIndex = globCellIdx; // Shortcut, since we only have main grid results from RFT
|
||||
|
||||
resPoint.m_oilRate = gasRates[it->second];
|
||||
resPoint.m_gasRate = oilRates[it->second];
|
||||
resPoint.m_gasRate = RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents(eclCase->eclipseCaseData()->unitsType(),
|
||||
gasRates[it->second]);
|
||||
resPoint.m_oilRate = oilRates[it->second];
|
||||
resPoint.m_waterRate = watRates[it->second];
|
||||
|
||||
m_pipeBranchWellResultPoints.push_back(resPoint);
|
||||
|
Loading…
Reference in New Issue
Block a user