mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Moved UnitSystem from RiaEclipseUnitTools to RiaDefines. (#7225)
* Moved UnitSystem from RiaEclipseUnitTools to RiaDefines. - Renamed UnitSystem to EclipseUnitSystem - Replaced header includes and removed obsolete includes of RiaEclipseUnitTools.h * Moved result name functions into separate file. * Minor cleanup Co-authored-by: rubenthoms <rubenthoms@users.noreply.github.com> Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com> Co-authored-by: magnesj <magnesj@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaFeatureCommandContext.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStringListSerializer.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNncDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStimPlanModelDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaResultNames.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -43,6 +44,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaFeatureCommandContext.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStringListSerializer.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNncDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStimPlanModelDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaResultNames.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
@@ -86,7 +86,8 @@ void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAnd
|
||||
{
|
||||
eclipseCase->eclipseCaseData()
|
||||
->results( RiaDefines::PorosityModelType::MATRIX_MODEL )
|
||||
->clearScalarResult( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName() );
|
||||
->clearScalarResult( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
RiaResultNames::completionTypeResultName() );
|
||||
|
||||
// Delete virtual perforation transmissibilities, as these are the basis for the computation of completion type
|
||||
eclipseCase->eclipseCaseData()->setVirtualPerforationTransmissibilities( nullptr );
|
||||
|
||||
@@ -49,6 +49,16 @@ void caf::AppEnum<RiaDefines::DepthUnitType>::setUp()
|
||||
setDefault( RiaDefines::DepthUnitType::UNIT_METER );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RiaDefines::EclipseUnitSystem>::setUp()
|
||||
{
|
||||
addItem( RiaDefines::EclipseUnitSystem::UNITS_METRIC, "UNITS_METRIC", "Metric" );
|
||||
addItem( RiaDefines::EclipseUnitSystem::UNITS_FIELD, "UNITS_FIELD", "Field" );
|
||||
addItem( RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN, "UNITS_UNKNOWN", "Unknown" );
|
||||
|
||||
setDefault( RiaDefines::EclipseUnitSystem::UNITS_METRIC );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RiaDefines::DepthTypeEnum>::setUp()
|
||||
{
|
||||
@@ -126,55 +136,6 @@ void caf::AppEnum<RiaDefines::ThemeEnum>::setUp()
|
||||
|
||||
} // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaDefines::isPerCellFaceResult( const QString& resultName )
|
||||
{
|
||||
if ( resultName.compare( RiaDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedMultResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::ternarySaturationResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedRiTranResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedRiMultResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedWaterFluxResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedOilFluxResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaDefines::combinedGasFluxResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.endsWith( "IJK" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -183,248 +144,6 @@ bool RiaDefines::isNativeCategoryResult( const QString& resultName )
|
||||
return resultName.endsWith( "NUM" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::undefinedResultName()
|
||||
{
|
||||
const static QString undefResultName = "None";
|
||||
|
||||
return undefResultName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::undefinedGridFaultName()
|
||||
{
|
||||
return "Undefined Grid Faults";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::undefinedGridFaultWithInactiveName()
|
||||
{
|
||||
return "Undefined Grid Faults With Inactive";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedTransmissibilityResultName()
|
||||
{
|
||||
return "TRANXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedWaterFluxResultName()
|
||||
{
|
||||
return "FLRWATIJK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedOilFluxResultName()
|
||||
{
|
||||
return "FLROILIJK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedGasFluxResultName()
|
||||
{
|
||||
return "FLRGASIJK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::ternarySaturationResultName()
|
||||
{
|
||||
return "TERNARY";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedMultResultName()
|
||||
{
|
||||
return "MULTXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::eqlnumResultName()
|
||||
{
|
||||
return "EQLNUM";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riTranXResultName()
|
||||
{
|
||||
return "riTRANX";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riTranYResultName()
|
||||
{
|
||||
return "riTRANY";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riTranZResultName()
|
||||
{
|
||||
return "riTRANZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedRiTranResultName()
|
||||
{
|
||||
return "riTRANXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riMultXResultName()
|
||||
{
|
||||
return "riMULTX";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riMultYResultName()
|
||||
{
|
||||
return "riMULTY";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riMultZResultName()
|
||||
{
|
||||
return "riMULTZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedRiMultResultName()
|
||||
{
|
||||
return "riMULTXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riAreaNormTranXResultName()
|
||||
{
|
||||
return "riTRANXbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riAreaNormTranYResultName()
|
||||
{
|
||||
return "riTRANYbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riAreaNormTranZResultName()
|
||||
{
|
||||
return "riTRANZbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::combinedRiAreaNormTranResultName()
|
||||
{
|
||||
return "riTRANXYZbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riCellVolumeResultName()
|
||||
{
|
||||
return "riCELLVOLUME";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::riOilVolumeResultName()
|
||||
{
|
||||
return "riOILVOLUME";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::mobilePoreVolumeName()
|
||||
{
|
||||
return "MOBPORV";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::completionTypeResultName()
|
||||
{
|
||||
return "Completion Type";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::formationBinaryAllanResultName()
|
||||
{
|
||||
return "Binary Formation Allan";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::formationAllanResultName()
|
||||
{
|
||||
return "Formation Allan";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<QString> RiaDefines::nncResultNames()
|
||||
{
|
||||
return { combinedTransmissibilityResultName(),
|
||||
formationAllanResultName(),
|
||||
formationBinaryAllanResultName(),
|
||||
combinedWaterFluxResultName(),
|
||||
combinedGasFluxResultName(),
|
||||
combinedOilFluxResultName(),
|
||||
combinedRiAreaNormTranResultName(),
|
||||
combinedRiMultResultName(),
|
||||
combinedRiTranResultName() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -465,101 +184,6 @@ QString RiaDefines::mockModelBasicInputCase()
|
||||
return "Input Mock Debug Model Simple";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::activeFormationNamesResultName()
|
||||
{
|
||||
return "Active Formation Names";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsAzimuthResult()
|
||||
{
|
||||
return "Azimuth";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsInclinationResult()
|
||||
{
|
||||
return "Inclination";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsPPResult()
|
||||
{
|
||||
return "PP";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsSHResult()
|
||||
{
|
||||
return "SHMIN";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsSHMkResult()
|
||||
{
|
||||
return "SH_MK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsOBGResult()
|
||||
{
|
||||
return "OBG";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsFGResult()
|
||||
{
|
||||
return "FG";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::wbsSFGResult()
|
||||
{
|
||||
return "SFG";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaDefines::wbsAngleResultNames()
|
||||
{
|
||||
return { wbsAzimuthResult(), wbsInclinationResult() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaDefines::wbsDerivedResultNames()
|
||||
{
|
||||
return {
|
||||
wbsFGResult(),
|
||||
wbsOBGResult(),
|
||||
wbsPPResult(),
|
||||
wbsSFGResult(),
|
||||
wbsSHResult(),
|
||||
wbsSHMkResult(),
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -26,6 +26,14 @@
|
||||
|
||||
namespace RiaDefines
|
||||
{
|
||||
enum class EclipseUnitSystem
|
||||
{
|
||||
UNITS_METRIC,
|
||||
UNITS_FIELD,
|
||||
UNITS_LAB,
|
||||
UNITS_UNKNOWN,
|
||||
};
|
||||
|
||||
enum class ResultCatType
|
||||
{
|
||||
DYNAMIC_NATIVE,
|
||||
@@ -69,48 +77,8 @@ enum class MeshModeType
|
||||
NO_MESH
|
||||
};
|
||||
|
||||
bool isPerCellFaceResult( const QString& resultName );
|
||||
bool isNativeCategoryResult( const QString& resultName );
|
||||
|
||||
QString undefinedResultName();
|
||||
QString undefinedGridFaultName();
|
||||
QString undefinedGridFaultWithInactiveName();
|
||||
QString combinedTransmissibilityResultName();
|
||||
QString combinedWaterFluxResultName();
|
||||
QString combinedOilFluxResultName();
|
||||
QString combinedGasFluxResultName();
|
||||
|
||||
QString ternarySaturationResultName();
|
||||
QString combinedMultResultName();
|
||||
|
||||
QString eqlnumResultName();
|
||||
|
||||
QString riTranXResultName();
|
||||
QString riTranYResultName();
|
||||
QString riTranZResultName();
|
||||
QString combinedRiTranResultName();
|
||||
|
||||
QString riMultXResultName();
|
||||
QString riMultYResultName();
|
||||
QString riMultZResultName();
|
||||
QString combinedRiMultResultName();
|
||||
|
||||
QString riAreaNormTranXResultName();
|
||||
QString riAreaNormTranYResultName();
|
||||
QString riAreaNormTranZResultName();
|
||||
QString combinedRiAreaNormTranResultName();
|
||||
|
||||
QString riCellVolumeResultName();
|
||||
QString riOilVolumeResultName();
|
||||
QString mobilePoreVolumeName();
|
||||
|
||||
QString completionTypeResultName();
|
||||
|
||||
// Fault results
|
||||
QString formationBinaryAllanResultName();
|
||||
QString formationAllanResultName();
|
||||
std::set<QString> nncResultNames();
|
||||
|
||||
// Mock model text identifiers
|
||||
QString mockModelBasic();
|
||||
QString mockModelBasicWithResults();
|
||||
@@ -118,22 +86,6 @@ QString mockModelLargeWithResults();
|
||||
QString mockModelCustomized();
|
||||
QString mockModelBasicInputCase();
|
||||
|
||||
QString activeFormationNamesResultName();
|
||||
|
||||
// Well path derived results
|
||||
QString wbsAzimuthResult();
|
||||
QString wbsInclinationResult();
|
||||
QString wbsPPResult();
|
||||
QString wbsSHResult();
|
||||
QString wbsSHMkResult();
|
||||
QString wbsOBGResult();
|
||||
QString wbsFGResult();
|
||||
QString wbsSFGResult();
|
||||
|
||||
// List of well path derived results
|
||||
std::vector<QString> wbsAngleResultNames();
|
||||
std::vector<QString> wbsDerivedResultNames();
|
||||
|
||||
// Units and conversions
|
||||
enum class DepthUnitType
|
||||
{
|
||||
|
||||
@@ -29,13 +29,13 @@ QString RiaDefines::conductivityResultName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::unitStringConductivity( RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
QString RiaDefines::unitStringConductivity( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
switch ( unitSystem )
|
||||
{
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_METRIC:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return "md-m";
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_FIELD:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return "md-ft";
|
||||
default:
|
||||
return "";
|
||||
@@ -45,15 +45,15 @@ QString RiaDefines::unitStringConductivity( RiaEclipseUnitTools::UnitSystem unit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaDefines::nonDarcyFlowAlpha( RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
double RiaDefines::nonDarcyFlowAlpha( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
switch ( unitSystem )
|
||||
{
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_METRIC:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return 2.24460e-10;
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_FIELD:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return 6.83352e-8;
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_LAB:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_LAB:
|
||||
return 5.41375E-11;
|
||||
// case RiaEclipseUnitTools::PVT_METRIC: return 2.25533E-10;
|
||||
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace RiaDefines
|
||||
{
|
||||
QString conductivityResultName();
|
||||
QString unitStringConductivity( RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
QString unitStringConductivity( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
double nonDarcyFlowAlpha( RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
double nonDarcyFlowAlpha( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
QString faciesColorLegendName();
|
||||
QString rockTypeColorLegendName();
|
||||
|
||||
409
ApplicationLibCode/Application/RiaResultNames.cpp
Normal file
409
ApplicationLibCode/Application/RiaResultNames.cpp
Normal file
@@ -0,0 +1,409 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
// Copyright (C) 2011-2012 Ceetron AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaResultNames::isPerCellFaceResult( const QString& resultName )
|
||||
{
|
||||
if ( resultName.compare( RiaResultNames::combinedTransmissibilityResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedMultResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::ternarySaturationResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedRiTranResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedRiMultResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedWaterFluxResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedOilFluxResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.compare( RiaResultNames::combinedGasFluxResultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( resultName.endsWith( "IJK" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::activeFormationNamesResultName()
|
||||
{
|
||||
return "Active Formation Names";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::undefinedResultName()
|
||||
{
|
||||
const static QString undefResultName = "None";
|
||||
|
||||
return undefResultName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::undefinedGridFaultName()
|
||||
{
|
||||
return "Undefined Grid Faults";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::undefinedGridFaultWithInactiveName()
|
||||
{
|
||||
return "Undefined Grid Faults With Inactive";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedTransmissibilityResultName()
|
||||
{
|
||||
return "TRANXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedWaterFluxResultName()
|
||||
{
|
||||
return "FLRWATIJK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedOilFluxResultName()
|
||||
{
|
||||
return "FLROILIJK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedGasFluxResultName()
|
||||
{
|
||||
return "FLRGASIJK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::ternarySaturationResultName()
|
||||
{
|
||||
return "TERNARY";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedMultResultName()
|
||||
{
|
||||
return "MULTXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::eqlnumResultName()
|
||||
{
|
||||
return "EQLNUM";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riTranXResultName()
|
||||
{
|
||||
return "riTRANX";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riTranYResultName()
|
||||
{
|
||||
return "riTRANY";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riTranZResultName()
|
||||
{
|
||||
return "riTRANZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedRiTranResultName()
|
||||
{
|
||||
return "riTRANXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riMultXResultName()
|
||||
{
|
||||
return "riMULTX";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riMultYResultName()
|
||||
{
|
||||
return "riMULTY";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riMultZResultName()
|
||||
{
|
||||
return "riMULTZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedRiMultResultName()
|
||||
{
|
||||
return "riMULTXYZ";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riAreaNormTranXResultName()
|
||||
{
|
||||
return "riTRANXbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riAreaNormTranYResultName()
|
||||
{
|
||||
return "riTRANYbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riAreaNormTranZResultName()
|
||||
{
|
||||
return "riTRANZbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::combinedRiAreaNormTranResultName()
|
||||
{
|
||||
return "riTRANXYZbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riCellVolumeResultName()
|
||||
{
|
||||
return "riCELLVOLUME";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::riOilVolumeResultName()
|
||||
{
|
||||
return "riOILVOLUME";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::mobilePoreVolumeName()
|
||||
{
|
||||
return "MOBPORV";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::completionTypeResultName()
|
||||
{
|
||||
return "Completion Type";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::formationBinaryAllanResultName()
|
||||
{
|
||||
return "Binary Formation Allan";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::formationAllanResultName()
|
||||
{
|
||||
return "Formation Allan";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsAzimuthResult()
|
||||
{
|
||||
return "Azimuth";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsInclinationResult()
|
||||
{
|
||||
return "Inclination";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsPPResult()
|
||||
{
|
||||
return "PP";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsSHResult()
|
||||
{
|
||||
return "SHMIN";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsSHMkResult()
|
||||
{
|
||||
return "SH_MK";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsOBGResult()
|
||||
{
|
||||
return "OBG";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsFGResult()
|
||||
{
|
||||
return "FG";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::wbsSFGResult()
|
||||
{
|
||||
return "SFG";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<QString> RiaResultNames::nncResultNames()
|
||||
{
|
||||
return { combinedTransmissibilityResultName(),
|
||||
formationAllanResultName(),
|
||||
formationBinaryAllanResultName(),
|
||||
combinedWaterFluxResultName(),
|
||||
combinedGasFluxResultName(),
|
||||
combinedOilFluxResultName(),
|
||||
combinedRiAreaNormTranResultName(),
|
||||
combinedRiMultResultName(),
|
||||
combinedRiTranResultName() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaResultNames::wbsAngleResultNames()
|
||||
{
|
||||
return { wbsAzimuthResult(), wbsInclinationResult() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaResultNames::wbsDerivedResultNames()
|
||||
{
|
||||
return {
|
||||
wbsFGResult(),
|
||||
wbsOBGResult(),
|
||||
wbsPPResult(),
|
||||
wbsSFGResult(),
|
||||
wbsSHResult(),
|
||||
wbsSHMkResult(),
|
||||
};
|
||||
}
|
||||
86
ApplicationLibCode/Application/RiaResultNames.h
Normal file
86
ApplicationLibCode/Application/RiaResultNames.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
// Copyright (C) 2011-2012 Ceetron AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
namespace RiaResultNames
|
||||
{
|
||||
bool isPerCellFaceResult( const QString& resultName );
|
||||
|
||||
QString undefinedResultName();
|
||||
QString undefinedGridFaultName();
|
||||
QString undefinedGridFaultWithInactiveName();
|
||||
QString combinedTransmissibilityResultName();
|
||||
QString combinedWaterFluxResultName();
|
||||
QString combinedOilFluxResultName();
|
||||
QString combinedGasFluxResultName();
|
||||
|
||||
QString ternarySaturationResultName();
|
||||
QString combinedMultResultName();
|
||||
|
||||
QString eqlnumResultName();
|
||||
|
||||
QString riTranXResultName();
|
||||
QString riTranYResultName();
|
||||
QString riTranZResultName();
|
||||
QString combinedRiTranResultName();
|
||||
|
||||
QString riMultXResultName();
|
||||
QString riMultYResultName();
|
||||
QString riMultZResultName();
|
||||
QString combinedRiMultResultName();
|
||||
|
||||
QString riAreaNormTranXResultName();
|
||||
QString riAreaNormTranYResultName();
|
||||
QString riAreaNormTranZResultName();
|
||||
QString combinedRiAreaNormTranResultName();
|
||||
|
||||
QString riCellVolumeResultName();
|
||||
QString riOilVolumeResultName();
|
||||
QString mobilePoreVolumeName();
|
||||
|
||||
QString completionTypeResultName();
|
||||
|
||||
// Well path derived results
|
||||
QString wbsAzimuthResult();
|
||||
QString wbsInclinationResult();
|
||||
QString wbsPPResult();
|
||||
QString wbsSHResult();
|
||||
QString wbsSHMkResult();
|
||||
QString wbsOBGResult();
|
||||
QString wbsFGResult();
|
||||
QString wbsSFGResult();
|
||||
|
||||
// Fault results
|
||||
QString formationBinaryAllanResultName();
|
||||
QString formationAllanResultName();
|
||||
std::set<QString> nncResultNames();
|
||||
|
||||
// List of well path derived results
|
||||
std::vector<QString> wbsAngleResultNames();
|
||||
std::vector<QString> wbsDerivedResultNames();
|
||||
|
||||
QString activeFormationNamesResultName();
|
||||
|
||||
}; // namespace RiaResultNames
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace RiaDefines
|
||||
|
||||
@@ -23,23 +23,10 @@
|
||||
#include "cvfAssert.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void RiaEclipseUnitTools::UnitSystemType::setUp()
|
||||
{
|
||||
addItem( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC, "UNITS_METRIC", "Metric" );
|
||||
addItem( RiaEclipseUnitTools::UnitSystem::UNITS_FIELD, "UNITS_FIELD", "Field" );
|
||||
addItem( RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN, "UNITS_UNKNOWN", "Unknown" );
|
||||
|
||||
setDefault( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC );
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaEclipseUnitTools::darcysConstant( UnitSystem unitSystem )
|
||||
double RiaEclipseUnitTools::darcysConstant( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
// See "Cartesian transmissibility calculations" in the "Eclipse Technical Description"
|
||||
// CDARCY Darcys constant
|
||||
@@ -49,9 +36,9 @@ double RiaEclipseUnitTools::darcysConstant( UnitSystem unitSystem )
|
||||
// = 0.00864 (PVT - M)
|
||||
switch ( unitSystem )
|
||||
{
|
||||
case UnitSystem::UNITS_FIELD:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return 0.001127;
|
||||
case UnitSystem::UNITS_METRIC:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return 0.008527;
|
||||
default:
|
||||
CVF_ASSERT( false );
|
||||
@@ -62,20 +49,20 @@ double RiaEclipseUnitTools::darcysConstant( UnitSystem unitSystem )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::DepthUnitType RiaEclipseUnitTools::depthUnit( UnitSystem unit )
|
||||
RiaDefines::DepthUnitType RiaEclipseUnitTools::depthUnit( RiaDefines::EclipseUnitSystem unit )
|
||||
{
|
||||
switch ( unit )
|
||||
{
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_METRIC:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return RiaDefines::DepthUnitType::UNIT_METER;
|
||||
break;
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_FIELD:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return RiaDefines::DepthUnitType::UNIT_FEET;
|
||||
break;
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_LAB:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_LAB:
|
||||
return RiaDefines::DepthUnitType::UNIT_NONE;
|
||||
break;
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN:
|
||||
return RiaDefines::DepthUnitType::UNIT_NONE;
|
||||
break;
|
||||
default:
|
||||
@@ -88,7 +75,8 @@ 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 )
|
||||
double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( RiaDefines::EclipseUnitSystem caseUnitSystem,
|
||||
double eclGasFlowRate )
|
||||
{
|
||||
/// Unused Gas to Barrel conversion :
|
||||
/// we convert gas to stb as well. Based on
|
||||
@@ -102,9 +90,9 @@ double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( UnitSyste
|
||||
|
||||
double oilEquivalentGasRate = HUGE_VAL;
|
||||
|
||||
if ( caseUnitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
oilEquivalentGasRate = fieldGasToOilEquivalent * eclGasFlowRate;
|
||||
if ( caseUnitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
oilEquivalentGasRate = metricGasToOilEquivalent * eclGasFlowRate;
|
||||
|
||||
return oilEquivalentGasRate;
|
||||
@@ -113,17 +101,17 @@ double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( UnitSyste
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaEclipseUnitTools::unitStringPressure( UnitSystem unitSystem )
|
||||
QString RiaEclipseUnitTools::unitStringPressure( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
switch ( unitSystem )
|
||||
{
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_METRIC:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
|
||||
return "barsa";
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_FIELD:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
|
||||
return "psia";
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_LAB:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_LAB:
|
||||
return "atma";
|
||||
case RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN:
|
||||
case RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN:
|
||||
return "";
|
||||
default:
|
||||
return "";
|
||||
|
||||
@@ -24,16 +24,6 @@
|
||||
class RiaEclipseUnitTools
|
||||
{
|
||||
public:
|
||||
enum class UnitSystem
|
||||
{
|
||||
UNITS_METRIC,
|
||||
UNITS_FIELD,
|
||||
UNITS_LAB,
|
||||
UNITS_UNKNOWN,
|
||||
};
|
||||
|
||||
typedef caf::AppEnum<RiaEclipseUnitTools::UnitSystem> UnitSystemType;
|
||||
|
||||
static double feetPerMeter() { return 3.2808399; }
|
||||
static double meterPerFeet() { return 0.3048000; }
|
||||
|
||||
@@ -52,13 +42,13 @@ public:
|
||||
static double barPerMeterToPsiPerFeet( double barPerMeter ) { return barPerMeter * 4.42075; }
|
||||
static double gigaPascalToPascal( double gigaPascal ) { return gigaPascal * 1.0e9; }
|
||||
|
||||
static double darcysConstant( UnitSystem unitSystem );
|
||||
static double darcysConstant( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
static RiaDefines::DepthUnitType depthUnit( UnitSystem unit );
|
||||
static RiaDefines::DepthUnitType depthUnit( RiaDefines::EclipseUnitSystem unit );
|
||||
|
||||
static double convertSurfaceGasFlowRateToOilEquivalents( UnitSystem, double eclGasFlowRate );
|
||||
static double convertSurfaceGasFlowRateToOilEquivalents( RiaDefines::EclipseUnitSystem, double eclGasFlowRate );
|
||||
|
||||
static QString unitStringPressure( UnitSystem unitSystem );
|
||||
static QString unitStringPressure( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
static double convertToMeter( double sourceValue, const QString& unitText );
|
||||
static double convertToFeet( double sourceValue, const QString& unitText );
|
||||
|
||||
@@ -275,7 +275,7 @@ bool RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QString
|
||||
|
||||
if ( !riv->cellResult()->hasResult() )
|
||||
{
|
||||
riv->cellResult()->setResultVariable( RiaDefines::undefinedResultName() );
|
||||
riv->cellResult()->setResultVariable( RiaResultNames::undefinedResultName() );
|
||||
}
|
||||
|
||||
analysisModels->updateConnectedEditors();
|
||||
@@ -342,7 +342,7 @@ int RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( const QStr
|
||||
|
||||
if ( !riv->cellResult()->hasResult() )
|
||||
{
|
||||
riv->cellResult()->setResultVariable( RiaDefines::undefinedResultName() );
|
||||
riv->cellResult()->setResultVariable( RiaResultNames::undefinedResultName() );
|
||||
}
|
||||
|
||||
analysisModels->updateConnectedEditors();
|
||||
|
||||
Reference in New Issue
Block a user