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:
parent
c4c6eb75f2
commit
bc81437435
@ -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();
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RicWellPathFractureReportItem.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
|
@ -209,7 +209,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
RicMswExportInfo exportInfo =
|
||||
RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( settings.caseToApply(), wellPath, false );
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseData->unitsType();
|
||||
RiaDefines::EclipseUnitSystem unitSystem = caseData->unitsType();
|
||||
bool isMainBore = false;
|
||||
|
||||
for ( std::shared_ptr<RicMswSegment> location : exportInfo.segments() )
|
||||
@ -284,7 +284,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||
RiaDefines::EclipseUnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
if ( !wellPath ) return;
|
||||
if ( !wellPath->wellPathGeometry() ) return;
|
||||
|
@ -32,7 +32,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswExportInfo::RicMswExportInfo( const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
RiaDefines::EclipseUnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText )
|
||||
@ -117,7 +117,7 @@ double RicMswExportInfo::initialTVD() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RicMswExportInfo::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RicMswExportInfo::unitSystem() const
|
||||
{
|
||||
return m_unitSystem;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "RicMswSegment.h"
|
||||
|
||||
@ -36,7 +36,7 @@ class RicMswExportInfo
|
||||
{
|
||||
public:
|
||||
RicMswExportInfo( const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
RiaDefines::EclipseUnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText );
|
||||
@ -49,7 +49,7 @@ public:
|
||||
void sortSegments();
|
||||
|
||||
const RimWellPath* wellPath() const;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const;
|
||||
double initialMD() const;
|
||||
double initialTVD() const;
|
||||
double topWellBoreVolume() const;
|
||||
@ -65,7 +65,7 @@ public:
|
||||
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
RiaDefines::EclipseUnitSystem m_unitSystem;
|
||||
double m_initialMD;
|
||||
double m_topWellBoreVolume;
|
||||
double m_linerDiameter;
|
||||
|
@ -27,7 +27,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswICDAccumulator::RicMswICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
RicMswICDAccumulator::RicMswICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaDefines::EclipseUnitSystem unitSystem )
|
||||
: RicMswValveAccumulator( valve, unitSystem )
|
||||
, m_areaSum( 0.0 )
|
||||
{
|
||||
@ -84,7 +84,7 @@ void RicMswICDAccumulator::applyToSuperValve()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswAICDAccumulator::RicMswAICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
RicMswAICDAccumulator::RicMswAICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaDefines::EclipseUnitSystem unitSystem )
|
||||
: RicMswValveAccumulator( valve, unitSystem )
|
||||
, m_deviceOpen( false )
|
||||
, m_accumulatedLength( 0.0 )
|
||||
|
@ -17,7 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaWeightedMeanCalculator.h"
|
||||
#include "RimWellPathAicdParameters.h"
|
||||
|
||||
@ -33,7 +33,7 @@ class RicMswValve;
|
||||
class RicMswValveAccumulator
|
||||
{
|
||||
public:
|
||||
RicMswValveAccumulator( std::shared_ptr<RicMswValve> valve, RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
RicMswValveAccumulator( std::shared_ptr<RicMswValve> valve, RiaDefines::EclipseUnitSystem unitSystem )
|
||||
: m_valve( valve )
|
||||
, m_unitSystem( unitSystem )
|
||||
, m_valid( false )
|
||||
@ -48,7 +48,7 @@ public:
|
||||
|
||||
protected:
|
||||
std::shared_ptr<RicMswValve> m_valve;
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
RiaDefines::EclipseUnitSystem m_unitSystem;
|
||||
bool m_valid;
|
||||
};
|
||||
|
||||
@ -58,7 +58,7 @@ protected:
|
||||
class RicMswICDAccumulator : public RicMswValveAccumulator
|
||||
{
|
||||
public:
|
||||
RicMswICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
RicMswICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaDefines::EclipseUnitSystem unitSystem );
|
||||
bool accumulateValveParameters( const RimWellPathValve* wellPathValve,
|
||||
double overlapLength,
|
||||
double perforationCompsegsLength ) override;
|
||||
@ -75,7 +75,7 @@ private:
|
||||
class RicMswAICDAccumulator : public RicMswValveAccumulator
|
||||
{
|
||||
public:
|
||||
RicMswAICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
RicMswAICDAccumulator( std::shared_ptr<RicMswValve> valve, RiaDefines::EclipseUnitSystem unitSystem );
|
||||
bool accumulateValveParameters( const RimWellPathValve* wellPathValve,
|
||||
double overlapLength,
|
||||
double perforationCompsegsLength ) override;
|
||||
|
@ -1155,7 +1155,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
const std::vector<const RimPerforationInterval*>& intervals,
|
||||
const RicExportCompletionDataSettingsUi& settings )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||
RiaDefines::EclipseUnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
std::vector<RigCompletionData> completionData;
|
||||
|
||||
@ -1608,7 +1608,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
|
||||
double permy = permyAccessObject->cellScalarGlobIdx( globalCellIndex );
|
||||
double permz = permzAccessObject->cellScalarGlobIdx( globalCellIndex );
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem units = eclipseCaseData->unitsType();
|
||||
RiaDefines::EclipseUnitSystem units = eclipseCaseData->unitsType();
|
||||
double darcy = RiaEclipseUnitTools::darcysConstant( units );
|
||||
|
||||
double trans = cvf::UNDEFINED_DOUBLE;
|
||||
|
@ -843,7 +843,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs,
|
||||
bool enableSegmentSplitting )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||
RiaDefines::EclipseUnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
RicMswExportInfo exportInfo( wellPath,
|
||||
unitSystem,
|
||||
@ -937,7 +937,7 @@ RicMswExportInfo
|
||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||
RiaDefines::EclipseUnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
@ -1058,7 +1058,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generatePerforationsMswExp
|
||||
int timeStep,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = eclipseCase->eclipseCaseData()->unitsType();
|
||||
RiaDefines::EclipseUnitSystem unitSystem = eclipseCase->eclipseCaseData()->unitsType();
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
@ -1329,7 +1329,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
for ( size_t nMainSegment = 0u; nMainSegment < mainBoreSegments.size(); ++nMainSegment )
|
||||
{
|
||||
@ -1477,7 +1477,7 @@ void RicWellPathExportMswCompletionsImpl::assignValveContributionsToSuperICDsOrA
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
ValveContributionMap assignedRegularValves;
|
||||
|
||||
@ -1586,7 +1586,7 @@ void RicWellPathExportMswCompletionsImpl::assignValveContributionsToSuperICDsOrA
|
||||
void RicWellPathExportMswCompletionsImpl::moveIntersectionsToICVs(
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
std::map<const RimWellPathValve*, std::shared_ptr<RicMswPerforationICV>> icvCompletionMap;
|
||||
|
||||
|
@ -154,18 +154,18 @@ private:
|
||||
static void createValveCompletions( std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
static void
|
||||
assignValveContributionsToSuperICDsOrAICDs( const std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
static void moveIntersectionsToICVs( const std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
static void moveIntersectionsToSuperICDsOrAICDs( MainBoreSegments mainBoreSegments );
|
||||
|
||||
|
@ -117,7 +117,7 @@ QString RicWellPathFractureReportItem::fractureTemplateName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathFractureReportItem::setUnitSystem( RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
void RicWellPathFractureReportItem::setUnitSystem( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
m_unitSystem = unitSystem;
|
||||
}
|
||||
@ -145,7 +145,7 @@ void RicWellPathFractureReportItem::setPressureDepletionParameters( bool
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RicWellPathFractureReportItem::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RicWellPathFractureReportItem::unitSystem() const
|
||||
{
|
||||
return m_unitSystem;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
@ -37,7 +37,7 @@ public:
|
||||
void setWidthAndConductivity( double width, double conductivity );
|
||||
void setHeightAndHalfLength( double height, double halfLength );
|
||||
void setAreaWeightedPermeability( double permeability );
|
||||
void setUnitSystem( RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
void setUnitSystem( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
void setPressureDepletionParameters( bool performPressureDepletionScaling,
|
||||
const QString& timeStepString,
|
||||
const QString& wbhpString,
|
||||
@ -50,7 +50,7 @@ public:
|
||||
QString fractureName() const;
|
||||
QString fractureTemplateName() const;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const;
|
||||
|
||||
double transmissibility() const;
|
||||
size_t connectionCount() const;
|
||||
@ -77,7 +77,7 @@ public:
|
||||
bool operator<( const RicWellPathFractureReportItem& other ) const;
|
||||
|
||||
private:
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
RiaDefines::EclipseUnitSystem m_unitSystem;
|
||||
QString m_wellPathNameForExport;
|
||||
QString m_wellPathFracture;
|
||||
QString m_wellPathFractureTemplate;
|
||||
|
@ -313,8 +313,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createStimPlanFractureText(
|
||||
|
||||
QString tableText;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = stimPlanTemplates.front()->fractureTemplateUnit();
|
||||
bool isFieldUnits = unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
RiaDefines::EclipseUnitSystem unitSystem = stimPlanTemplates.front()->fractureTemplateUnit();
|
||||
bool isFieldUnits = unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
|
||||
QTextStream stream( &tableText );
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
@ -365,8 +365,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createEllipseFractureText(
|
||||
|
||||
QString tableText;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = ellipseTemplates.front()->fractureTemplateUnit();
|
||||
bool isFieldUnits = unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
RiaDefines::EclipseUnitSystem unitSystem = ellipseTemplates.front()->fractureTemplateUnit();
|
||||
bool isFieldUnits = unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
|
||||
QTextStream stream( &tableText );
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
@ -512,8 +512,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureInstancesText(
|
||||
{
|
||||
if ( fractures.empty() ) return "";
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = fractures.front()->fractureUnit(); // Fix
|
||||
bool isFieldUnits = unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
RiaDefines::EclipseUnitSystem unitSystem = fractures.front()->fractureUnit(); // Fix
|
||||
bool isFieldUnits = unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
|
||||
QString tableText;
|
||||
|
||||
@ -621,8 +621,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
|
||||
{
|
||||
QString tableText;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = wellPathFractureReportItems.front().unitSystem();
|
||||
bool isFieldUnits = unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
RiaDefines::EclipseUnitSystem unitSystem = wellPathFractureReportItems.front().unitSystem();
|
||||
bool isFieldUnits = unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
|
||||
QTextStream stream( &tableText );
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "RicEclipsePropertyFilterFeatureImpl.h"
|
||||
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
@ -120,7 +122,7 @@ void RicEclipsePropertyFilterFeatureImpl::setDefaults( RimEclipsePropertyFilter*
|
||||
|
||||
propertyFilter->resultDefinition()->setEclipseCase( reservoirView->eclipseCase() );
|
||||
|
||||
if ( !RiaDefines::isPerCellFaceResult( reservoirView->cellResult()->resultVariable() ) )
|
||||
if ( !RiaResultNames::isPerCellFaceResult( reservoirView->cellResult()->resultVariable() ) )
|
||||
{
|
||||
propertyFilter->resultDefinition()->simpleCopy( reservoirView->cellResult() );
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "RicEclipsePropertyFilterNewExec.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@ -48,7 +49,7 @@ bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled()
|
||||
RimEclipseCellColors* cellColors = eclView->cellResult();
|
||||
if ( !cellColors ) return false;
|
||||
|
||||
if ( RiaDefines::isPerCellFaceResult( cellColors->resultVariable() ) ) return false;
|
||||
if ( RiaResultNames::isPerCellFaceResult( cellColors->resultVariable() ) ) return false;
|
||||
|
||||
RimEclipsePropertyFilterCollection* filterCollection = eclView->eclipsePropertyFilterCollection();
|
||||
if ( filterCollection )
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "RicExportEclipseSectorModelUi.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
@ -507,7 +509,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<QString> RicExportEclipseSectorModelUi::mainKeywords()
|
||||
{
|
||||
return { RiaDefines::eqlnumResultName(), "FIPNUM", "NTG", "PERMX", "PERMY", "PERMZ", "PORO", "PVTNUM", "SATNUM", "SWATINIT" };
|
||||
return { RiaResultNames::eqlnumResultName(), "FIPNUM", "NTG", "PERMX", "PERMY", "PERMZ", "PORO", "PVTNUM", "SATNUM", "SWATINIT" };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFault.h"
|
||||
@ -85,8 +86,8 @@ void RicExportFaultsFeature::onActionTriggered( bool isChecked )
|
||||
QString caseName = eclCase->caseUserDescription();
|
||||
|
||||
QString faultName = rimFault->name();
|
||||
if ( faultName == RiaDefines::undefinedGridFaultName() ) faultName = "UNDEF";
|
||||
if ( faultName == RiaDefines::undefinedGridFaultWithInactiveName() ) faultName = "UNDEF_IA";
|
||||
if ( faultName == RiaResultNames::undefinedGridFaultName() ) faultName = "UNDEF";
|
||||
if ( faultName == RiaResultNames::undefinedGridFaultWithInactiveName() ) faultName = "UNDEF_IA";
|
||||
|
||||
QString baseFilename = "Fault_" + faultName + "_" + caseName;
|
||||
baseFilename = caf::Utils::makeValidFileBasename( baseFilename );
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "RicConvertAllFractureTemplatesToFieldFeature.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@ -59,7 +59,7 @@ void RicConvertAllFractureTemplatesToFieldFeature::onActionTriggered( bool isChe
|
||||
|
||||
for ( auto ellipseFracTemplate : ellipseFracTemplates )
|
||||
{
|
||||
if ( ellipseFracTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( ellipseFracTemplate->fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
ellipseFracTemplate->changeUnits();
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "RicConvertAllFractureTemplatesToMetricFeature.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@ -60,7 +60,7 @@ void RicConvertAllFractureTemplatesToMetricFeature::onActionTriggered( bool isCh
|
||||
|
||||
for ( auto ellipseFracTemplate : ellipseFracTemplates )
|
||||
{
|
||||
if ( ellipseFracTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( ellipseFracTemplate->fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
ellipseFracTemplate->changeUnits();
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "RicCreateDuplicateTemplateInOtherUnitSystemFeature.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "RicNewEllipseFractureTemplateFeature.h"
|
||||
|
||||
@ -66,13 +66,13 @@ void RicCreateDuplicateTemplateInOtherUnitSystemFeature::onActionTriggered( bool
|
||||
fractureTemplateCollection->addFractureTemplate( copyOfTemplate );
|
||||
|
||||
auto currentUnit = copyOfTemplate->fractureTemplateUnit();
|
||||
if ( currentUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( currentUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
copyOfTemplate->convertToUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_FIELD );
|
||||
copyOfTemplate->convertToUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
||||
}
|
||||
else
|
||||
{
|
||||
copyOfTemplate->convertToUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC );
|
||||
copyOfTemplate->convertToUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_METRIC );
|
||||
}
|
||||
|
||||
QString name = copyOfTemplate->name();
|
||||
@ -98,11 +98,11 @@ void RicCreateDuplicateTemplateInOtherUnitSystemFeature::setupActionLook( QActio
|
||||
if ( !fractureTemplate ) return;
|
||||
|
||||
QString destinationUnit;
|
||||
if ( fractureTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( fractureTemplate->fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
destinationUnit += "Field";
|
||||
}
|
||||
else if ( fractureTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( fractureTemplate->fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
destinationUnit += "Metric";
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
fracture->setName( QString( "Fracture_" ) + fracNum );
|
||||
|
||||
auto unitSet = RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
auto unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
{
|
||||
RimEclipseResultCase* eclipseCase = nullptr;
|
||||
simWell->firstAncestorOrThisOfType( eclipseCase );
|
||||
|
@ -78,7 +78,7 @@ void RicNewSimWellFractureFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
fracture->setName( RicFractureNameGenerator::nameForNewFracture() );
|
||||
|
||||
auto unitSet = RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
auto unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
{
|
||||
RimEclipseResultCase* eclipseCase = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType( eclipseCase );
|
||||
|
@ -19,12 +19,18 @@
|
||||
#include "RicImportFormationNamesFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendCollection.h"
|
||||
#include "RimColorLegendItem.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -35,12 +41,6 @@
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendCollection.h"
|
||||
#include "RimColorLegendItem.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
@ -218,7 +218,7 @@ void RicImportFormationNamesFeature::setFormationCellResultAndLegend( Rim3dView*
|
||||
if ( eclView )
|
||||
{
|
||||
eclView->cellResult()->setResultType( RiaDefines::ResultCatType::FORMATION_NAMES );
|
||||
eclView->cellResult()->setResultVariable( RiaDefines::activeFormationNamesResultName() );
|
||||
eclView->cellResult()->setResultVariable( RiaResultNames::activeFormationNamesResultName() );
|
||||
|
||||
legendConfig = eclView->cellResult()->legendConfig();
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RicNewWellLogCurveExtractionFeature.h"
|
||||
#include "RicNewWellLogFileCurveFeature.h"
|
||||
@ -313,7 +314,7 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
|
||||
stabilityCurvesTrack->setAnnotationDisplay( RiuPlotAnnotationTool::LIGHT_LINES );
|
||||
stabilityCurvesTrack->setShowRegionLabels( false );
|
||||
|
||||
std::vector<QString> resultNames = RiaDefines::wbsDerivedResultNames();
|
||||
std::vector<QString> resultNames = RiaResultNames::wbsDerivedResultNames();
|
||||
|
||||
std::vector<cvf::Color3f> colors = { cvf::Color3f::BLUE,
|
||||
cvf::Color3f::BROWN,
|
||||
@ -341,7 +342,7 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
|
||||
curve->loadDataAndUpdate( false );
|
||||
curve->setSmoothCurve( true );
|
||||
curve->setSmoothingThreshold( 0.002 );
|
||||
if ( resultNames[i] == RiaDefines::wbsSHMkResult() )
|
||||
if ( resultNames[i] == RiaResultNames::wbsSHMkResult() )
|
||||
{
|
||||
curve->setCurveVisibility( false );
|
||||
}
|
||||
@ -380,7 +381,7 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
|
||||
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Well Path Angles", plot );
|
||||
double minValue = 360.0, maxValue = 0.0;
|
||||
const double angleIncrement = 90.0;
|
||||
std::vector<QString> resultNames = RiaDefines::wbsAngleResultNames();
|
||||
std::vector<QString> resultNames = RiaResultNames::wbsAngleResultNames();
|
||||
|
||||
std::vector<cvf::Color3f> colors = { cvf::Color3f::GREEN, cvf::Color3f::DARK_ORANGE };
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem( RimWellPath* wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() != RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
if ( wellPath->unitSystem() != RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
//==================================================================================================
|
||||
|
@ -40,12 +40,12 @@ QList<caf::PdmOptionItemInfo>
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if ( fieldNeedingOptions == &unitSystem )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( RiaEclipseUnitTools::UnitSystemType::uiText(
|
||||
RiaEclipseUnitTools::UnitSystem::UNITS_METRIC ),
|
||||
RiaEclipseUnitTools::UnitSystem::UNITS_METRIC ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( RiaEclipseUnitTools::UnitSystemType::uiText(
|
||||
RiaEclipseUnitTools::UnitSystem::UNITS_FIELD ),
|
||||
RiaEclipseUnitTools::UnitSystem::UNITS_FIELD ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RiaDefines::EclipseUnitSystem>::uiText(
|
||||
RiaDefines::EclipseUnitSystem::UNITS_METRIC ),
|
||||
RiaDefines::EclipseUnitSystem::UNITS_METRIC ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RiaDefines::EclipseUnitSystem>::uiText(
|
||||
RiaDefines::EclipseUnitSystem::UNITS_FIELD ),
|
||||
RiaDefines::EclipseUnitSystem::UNITS_FIELD ) );
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
@ -34,7 +34,7 @@ class RicWellPathsUnitSystemSettingsUi : public caf::PdmObject
|
||||
public:
|
||||
RicWellPathsUnitSystemSettingsUi();
|
||||
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> unitSystem;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> unitSystem;
|
||||
|
||||
protected:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
@ -135,9 +135,9 @@ std::string RifColumnBasedUserData::unitName( const RifEclipseSummaryAddress& re
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifColumnBasedUserData::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifColumnBasedUserData::unitSystem() const
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const override;
|
||||
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
void buildTimeStepsAndMappings();
|
||||
|
@ -140,9 +140,9 @@ std::string RifCsvUserData::unitName( const RifEclipseSummaryAddress& resultAddr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifCsvUserData::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifCsvUserData::unitSystem() const
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
void buildTimeStepsAndMappings();
|
||||
|
@ -98,7 +98,7 @@ std::string RifDerivedEnsembleReader::unitName( const RifEclipseSummaryAddress&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifDerivedEnsembleReader::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifDerivedEnsembleReader::unitSystem() const
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
const std::vector<time_t>& timeSteps( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const override;
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
RimDerivedSummaryCase* m_derivedCase;
|
||||
|
@ -120,8 +120,8 @@ bool RifEclipseInputFileTools::openGridFile( const QString& fileName,
|
||||
QFile gridFile( fileName );
|
||||
if ( gridFile.open( QFile::ReadOnly ) )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem units = readUnitSystem( gridFile, gridunitPos );
|
||||
if ( units != RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
RiaDefines::EclipseUnitSystem units = readUnitSystem( gridFile, gridunitPos );
|
||||
if ( units != RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
{
|
||||
eclipseCase->setUnitsType( units );
|
||||
}
|
||||
@ -417,9 +417,9 @@ bool RifEclipseInputFileTools::exportGrid( const QString& fileName,
|
||||
}
|
||||
|
||||
ert_ecl_unit_enum ecl_units = ECL_METRIC_UNITS;
|
||||
if ( eclipseCase->unitsType() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( eclipseCase->unitsType() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
ecl_units = ECL_FIELD_UNITS;
|
||||
else if ( eclipseCase->unitsType() == RiaEclipseUnitTools::UnitSystem::UNITS_LAB )
|
||||
else if ( eclipseCase->unitsType() == RiaDefines::EclipseUnitSystem::UNITS_LAB )
|
||||
ecl_units = ECL_LAB_UNITS;
|
||||
|
||||
ecl_grid_fprintf_grdecl2( mainEclGrid, filePtr, ecl_units );
|
||||
@ -751,8 +751,8 @@ void RifEclipseInputFileTools::saveFaults( QTextStream& stream,
|
||||
const cvf::Collection<RigFault>& faults = mainGrid->faults();
|
||||
for ( const auto& fault : faults )
|
||||
{
|
||||
if ( fault->name() != RiaDefines::undefinedGridFaultName() &&
|
||||
fault->name() != RiaDefines::undefinedGridFaultWithInactiveName() )
|
||||
if ( fault->name() != RiaResultNames::undefinedGridFaultName() &&
|
||||
fault->name() != RiaResultNames::undefinedGridFaultWithInactiveName() )
|
||||
{
|
||||
saveFault( stream, mainGrid, fault->faultFaces(), fault->name(), min, max, refinement );
|
||||
}
|
||||
@ -1662,7 +1662,7 @@ void RifEclipseInputFileTools::readKeywordDataContent( QFile& data,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifEclipseInputFileTools::readUnitSystem( QFile& file, qint64 gridunitPos )
|
||||
RiaDefines::EclipseUnitSystem RifEclipseInputFileTools::readUnitSystem( QFile& file, qint64 gridunitPos )
|
||||
{
|
||||
bool stopParsing = false;
|
||||
QStringList unitText;
|
||||
@ -1671,18 +1671,18 @@ RiaEclipseUnitTools::UnitSystem RifEclipseInputFileTools::readUnitSystem( QFile&
|
||||
{
|
||||
if ( unitString.contains( "FEET", Qt::CaseInsensitive ) )
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
}
|
||||
else if ( unitString.contains( "CM", Qt::CaseInsensitive ) )
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_LAB;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_LAB;
|
||||
}
|
||||
else if ( unitString.contains( "MET", Qt::CaseInsensitive ) )
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
}
|
||||
}
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "cvfCollection.h"
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RifReaderInterface.h"
|
||||
#include "RigFault.h"
|
||||
|
||||
@ -142,7 +142,7 @@ public:
|
||||
);
|
||||
|
||||
static void readKeywordDataContent( QFile& data, qint64 filePos, QStringList* textContent, bool* isEditKeywordDetected );
|
||||
static RiaEclipseUnitTools::UnitSystem readUnitSystem( QFile& file, qint64 gridunitPos );
|
||||
static RiaDefines::EclipseUnitSystem readUnitSystem( QFile& file, qint64 gridunitPos );
|
||||
|
||||
static cvf::StructGridInterface::FaceEnum faceEnumFromText( const QString& faceString );
|
||||
|
||||
|
@ -143,7 +143,8 @@ bool RifEclipseInputPropertyLoader::importFaultsFromFile( RigEclipseCaseData* ec
|
||||
for ( size_t i = 0; i < faultCollection.size(); i++ )
|
||||
{
|
||||
RigFault* f = faultCollection.at( i );
|
||||
if ( f->name() == RiaDefines::undefinedGridFaultName() || f->name() == RiaDefines::undefinedGridFaultName() )
|
||||
if ( f->name() == RiaResultNames::undefinedGridFaultName() ||
|
||||
f->name() == RiaResultNames::undefinedGridFaultName() )
|
||||
{
|
||||
// Do not include undefined grid faults, as these are recomputed based on the imported faults from filesa
|
||||
continue;
|
||||
|
@ -104,7 +104,7 @@ std::string RifEnsembleStatisticsReader::unitName( const RifEclipseSummaryAddres
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifEnsembleStatisticsReader::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifEnsembleStatisticsReader::unitSystem() const
|
||||
{
|
||||
return m_ensembleStatCase->unitSystem();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const override;
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
bool validateAddress( const RifEclipseSummaryAddress& address ) const;
|
||||
|
@ -230,9 +230,9 @@ std::string RifKeywordVectorUserData::unitName( const RifEclipseSummaryAddress&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifKeywordVectorUserData::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifKeywordVectorUserData::unitSystem() const
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const override;
|
||||
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
static bool isTimeHeader( const std::map<QString, QString>& header );
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaCellDividingTools.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -1023,7 +1024,7 @@ void RifReaderEclipseOutput::buildMetaData( ecl_grid_type* grid )
|
||||
// Unit system
|
||||
{
|
||||
// Default units type is METRIC
|
||||
RiaEclipseUnitTools::UnitSystem unitsType = RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
RiaDefines::EclipseUnitSystem unitsType = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
int unitsTypeValue;
|
||||
|
||||
if ( m_dynamicResultsAccess.notNull() )
|
||||
@ -1044,11 +1045,11 @@ void RifReaderEclipseOutput::buildMetaData( ecl_grid_type* grid )
|
||||
|
||||
if ( unitsTypeValue == 2 )
|
||||
{
|
||||
unitsType = RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
unitsType = RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
}
|
||||
else if ( unitsTypeValue == 3 )
|
||||
{
|
||||
unitsType = RiaEclipseUnitTools::UnitSystem::UNITS_LAB;
|
||||
unitsType = RiaDefines::EclipseUnitSystem::UNITS_LAB;
|
||||
}
|
||||
m_eclipseCase->setUnitsType( unitsType );
|
||||
}
|
||||
|
@ -60,19 +60,19 @@ std::vector<time_t> getTimeSteps( ecl_sum_type* ecl_sum )
|
||||
return timeSteps;
|
||||
}
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem readUnitSystem( ecl_sum_type* ecl_sum )
|
||||
RiaDefines::EclipseUnitSystem readUnitSystem( ecl_sum_type* ecl_sum )
|
||||
{
|
||||
ert_ecl_unit_enum eclUnitEnum = ecl_sum_get_unit_system( ecl_sum );
|
||||
switch ( eclUnitEnum )
|
||||
{
|
||||
case ECL_METRIC_UNITS:
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
case ECL_FIELD_UNITS:
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
case ECL_LAB_UNITS:
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_LAB;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_LAB;
|
||||
default:
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ void closeEclSum( ecl_sum_type* ecl_sum )
|
||||
RifReaderEclipseSummary::RifReaderEclipseSummary()
|
||||
: m_ecl_sum( nullptr )
|
||||
, m_ecl_SmSpec( nullptr )
|
||||
, m_unitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
, m_unitSystem( RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_valuesCache.reset( new ValuesCache() );
|
||||
}
|
||||
@ -633,7 +633,7 @@ std::string RifReaderEclipseSummary::unitName( const RifEclipseSummaryAddress& r
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifReaderEclipseSummary::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifReaderEclipseSummary::unitSystem() const
|
||||
{
|
||||
return m_unitSystem;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
|
||||
bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const override;
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
QStringList warnings() const { return m_warnings; }
|
||||
|
||||
static std::string differenceIdentifier() { return "_DIFF"; }
|
||||
@ -96,7 +96,7 @@ private:
|
||||
const ecl_smspec_type* m_ecl_SmSpec;
|
||||
std::vector<time_t> m_timeSteps;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
RiaDefines::EclipseUnitSystem m_unitSystem;
|
||||
|
||||
std::map<RifEclipseSummaryAddress, int> m_resultAddressToErtNodeIdx;
|
||||
|
||||
|
@ -213,7 +213,7 @@ std::string RifReaderObservedData::unitName( const RifEclipseSummaryAddress& res
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RifReaderObservedData::unitSystem() const
|
||||
RiaDefines::EclipseUnitSystem RifReaderObservedData::unitSystem() const
|
||||
{
|
||||
return RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
|
||||
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const override;
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
RifEclipseSummaryAddress address( const QString& quantity,
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RifStimPlanModelAsymmetricFrkExporter.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimStimPlanModel.h"
|
||||
|
||||
#include <QFile>
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RifStimPlanModelDeviationFrkExporter.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimStimPlanModel.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "RifStimPlanModelPerfsFrkExporter.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RimStimPlanModel.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "RifStimPlanXmlReader.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
@ -36,14 +37,13 @@ bool hasNegativeValues( std::vector<double> xs );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigStimPlanFractureDefinition>
|
||||
RifStimPlanXmlReader::readStimPlanXMLFile( const QString& stimPlanFileName,
|
||||
cvf::ref<RigStimPlanFractureDefinition> RifStimPlanXmlReader::readStimPlanXMLFile( const QString& stimPlanFileName,
|
||||
double conductivityScalingFactor,
|
||||
double xScaleFactor,
|
||||
double yScaleFactor,
|
||||
double wellPathInterationY,
|
||||
MirrorMode mirrorMode,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
||||
RiaDefines::EclipseUnitSystem requiredUnit,
|
||||
QString* errorMessage )
|
||||
{
|
||||
RiaLogging::info( QString( "Starting to open StimPlan XML file: '%1'" ).arg( stimPlanFileName ) );
|
||||
@ -65,9 +65,9 @@ cvf::ref<RigStimPlanFractureDefinition>
|
||||
if ( xScaleFactor != 1.0 ) stimPlanFileData->scaleXs( xScaleFactor );
|
||||
if ( yScaleFactor != 1.0 ) stimPlanFileData->scaleYs( yScaleFactor, wellPathInterationY );
|
||||
|
||||
RiaEclipseUnitTools::UnitSystemType unitSystem = stimPlanFileData->unitSet();
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem = stimPlanFileData->unitSet();
|
||||
|
||||
if ( unitSystem != RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
if ( unitSystem != RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
RiaLogging::info( QString( "Setting unit system for StimPlan fracture template %1 to %2" )
|
||||
.arg( stimPlanFileName )
|
||||
.arg( unitSystem.uiText() ) );
|
||||
@ -181,7 +181,7 @@ cvf::ref<RigStimPlanFractureDefinition>
|
||||
void RifStimPlanXmlReader::readStimplanGridAndTimesteps( QXmlStreamReader& xmlStream,
|
||||
RigStimPlanFractureDefinition* stimPlanFileData,
|
||||
MirrorMode mirrorMode,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit )
|
||||
RiaDefines::EclipseUnitSystem requiredUnit )
|
||||
{
|
||||
size_t startNegValuesYs = 0;
|
||||
|
||||
@ -201,7 +201,7 @@ void RifStimPlanXmlReader::readStimplanGridAndTimesteps( QXmlStreamReader&
|
||||
|
||||
if ( xmlStream.isStartElement() )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem destinationUnit = requiredUnit;
|
||||
RiaDefines::EclipseUnitSystem destinationUnit = requiredUnit;
|
||||
|
||||
if ( xmlStream.name() == "grid" )
|
||||
{
|
||||
@ -211,13 +211,13 @@ void RifStimPlanXmlReader::readStimplanGridAndTimesteps( QXmlStreamReader&
|
||||
QString gridunit = getAttributeValueString( xmlStream, "uom" );
|
||||
|
||||
if ( gridunit == "m" )
|
||||
stimPlanFileData->m_unitSet = RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
stimPlanFileData->m_unitSet = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
else if ( gridunit == "ft" )
|
||||
stimPlanFileData->m_unitSet = RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
stimPlanFileData->m_unitSet = RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
else
|
||||
stimPlanFileData->m_unitSet = RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
stimPlanFileData->m_unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
|
||||
if ( destinationUnit == RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
if ( destinationUnit == RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
{
|
||||
// Use file unit set if requested unit is unknown
|
||||
destinationUnit = stimPlanFileData->m_unitSet;
|
||||
@ -227,11 +227,11 @@ void RifStimPlanXmlReader::readStimplanGridAndTimesteps( QXmlStreamReader&
|
||||
double tvdToBotPerfFt = getAttributeValueDouble( xmlStream, "TVDToBottomPerfFt" );
|
||||
|
||||
tvdToTopPerf =
|
||||
RifStimPlanXmlReader::valueInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_FIELD,
|
||||
RifStimPlanXmlReader::valueInRequiredUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_FIELD,
|
||||
destinationUnit,
|
||||
tvdToTopPerfFt );
|
||||
tvdToBotPerf =
|
||||
RifStimPlanXmlReader::valueInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_FIELD,
|
||||
RifStimPlanXmlReader::valueInRequiredUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_FIELD,
|
||||
destinationUnit,
|
||||
tvdToBotPerfFt );
|
||||
}
|
||||
@ -387,12 +387,12 @@ std::vector<std::vector<double>> RifStimPlanXmlReader::getAllDepthDataAtTimeStep
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RifStimPlanXmlReader::valuesInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem sourceUnit,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
||||
std::vector<double> RifStimPlanXmlReader::valuesInRequiredUnitSystem( RiaDefines::EclipseUnitSystem sourceUnit,
|
||||
RiaDefines::EclipseUnitSystem requiredUnit,
|
||||
const std::vector<double>& values )
|
||||
{
|
||||
if ( sourceUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
requiredUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( sourceUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
requiredUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
std::vector<double> convertedValues;
|
||||
for ( const auto& valueInFeet : values )
|
||||
@ -402,8 +402,8 @@ std::vector<double> RifStimPlanXmlReader::valuesInRequiredUnitSystem( RiaEclipse
|
||||
|
||||
return convertedValues;
|
||||
}
|
||||
else if ( sourceUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
requiredUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( sourceUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
requiredUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
std::vector<double> convertedValues;
|
||||
for ( const auto& valueInMeter : values )
|
||||
@ -420,17 +420,17 @@ std::vector<double> RifStimPlanXmlReader::valuesInRequiredUnitSystem( RiaEclipse
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RifStimPlanXmlReader::valueInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem sourceUnit,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
||||
double RifStimPlanXmlReader::valueInRequiredUnitSystem( RiaDefines::EclipseUnitSystem sourceUnit,
|
||||
RiaDefines::EclipseUnitSystem requiredUnit,
|
||||
double value )
|
||||
{
|
||||
if ( sourceUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
requiredUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( sourceUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
requiredUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter( value );
|
||||
}
|
||||
else if ( sourceUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
requiredUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( sourceUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
requiredUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( value );
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cvfObject.h"
|
||||
|
||||
@ -45,14 +45,14 @@ public:
|
||||
double yScaleFactor,
|
||||
double wellPathIntersectionY,
|
||||
MirrorMode mirrorMode,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
||||
RiaDefines::EclipseUnitSystem requiredUnit,
|
||||
QString* errorMessage );
|
||||
|
||||
private:
|
||||
static void readStimplanGridAndTimesteps( QXmlStreamReader& xmlStream,
|
||||
RigStimPlanFractureDefinition* stimPlanFileData,
|
||||
MirrorMode mirrorMode,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit );
|
||||
RiaDefines::EclipseUnitSystem requiredUnit );
|
||||
|
||||
static double getAttributeValueDouble( QXmlStreamReader& xmlStream, const QString& parameterName );
|
||||
static QString getAttributeValueString( QXmlStreamReader& xmlStream, const QString& parameterName );
|
||||
@ -60,11 +60,11 @@ private:
|
||||
|
||||
static std::vector<std::vector<double>> getAllDepthDataAtTimeStep( QXmlStreamReader& xmlStream );
|
||||
|
||||
static std::vector<double> valuesInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem sourceUnit,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
||||
static std::vector<double> valuesInRequiredUnitSystem( RiaDefines::EclipseUnitSystem sourceUnit,
|
||||
RiaDefines::EclipseUnitSystem requiredUnit,
|
||||
const std::vector<double>& values );
|
||||
|
||||
static double valueInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem sourceUnit,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
||||
static double valueInRequiredUnitSystem( RiaDefines::EclipseUnitSystem sourceUnit,
|
||||
RiaDefines::EclipseUnitSystem requiredUnit,
|
||||
double value );
|
||||
};
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "cvfObject.h"
|
||||
@ -49,7 +49,7 @@ public:
|
||||
virtual bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const = 0;
|
||||
|
||||
virtual std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const = 0;
|
||||
virtual RiaEclipseUnitTools::UnitSystem unitSystem() const = 0;
|
||||
virtual RiaDefines::EclipseUnitSystem unitSystem() const = 0;
|
||||
|
||||
protected:
|
||||
std::set<RifEclipseSummaryAddress> m_allResultAddresses; // Result and error addresses
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#include "RigFemPartResultCalculatorInitialPorosity.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RigFemPart.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RifElementPropertyReader.h"
|
||||
#include "RifGeoMechReaderInterface.h"
|
||||
@ -796,12 +797,12 @@ std::map<std::string, std::vector<std::string>>
|
||||
}
|
||||
else if ( resPos == RIG_WELLPATH_DERIVED )
|
||||
{
|
||||
std::vector<QString> angles = RiaDefines::wbsAngleResultNames();
|
||||
std::vector<QString> angles = RiaResultNames::wbsAngleResultNames();
|
||||
for ( QString angle : angles )
|
||||
{
|
||||
fieldCompNames[angle.toStdString()];
|
||||
}
|
||||
std::vector<QString> derivedResults = RiaDefines::wbsDerivedResultNames();
|
||||
std::vector<QString> derivedResults = RiaResultNames::wbsDerivedResultNames();
|
||||
for ( QString result : derivedResults )
|
||||
{
|
||||
fieldCompNames[result.toStdString()];
|
||||
|
@ -171,7 +171,7 @@ void RivIntersectionResultsColoringTools::updateEclipseCellResultColors( const R
|
||||
|
||||
cvf::ref<RigResultAccessor> resultAccessor;
|
||||
|
||||
if ( !RiaDefines::isPerCellFaceResult( eclipseResDef->resultVariable() ) )
|
||||
if ( !RiaResultNames::isPerCellFaceResult( eclipseResDef->resultVariable() ) )
|
||||
|
||||
{
|
||||
resultAccessor =
|
||||
|
@ -175,11 +175,11 @@ void RivReservoirFaultsPartMgr::appendPartsToModel( cvf::ModelBasicList* model )
|
||||
}
|
||||
|
||||
{
|
||||
QStringList stringsToMatch{ RiaDefines::combinedRiTranResultName(),
|
||||
RiaDefines::combinedRiMultResultName(),
|
||||
RiaDefines::combinedRiAreaNormTranResultName(),
|
||||
RiaDefines::combinedTransmissibilityResultName(),
|
||||
RiaDefines::combinedMultResultName() };
|
||||
QStringList stringsToMatch{ RiaResultNames::combinedRiTranResultName(),
|
||||
RiaResultNames::combinedRiMultResultName(),
|
||||
RiaResultNames::combinedRiAreaNormTranResultName(),
|
||||
RiaResultNames::combinedTransmissibilityResultName(),
|
||||
RiaResultNames::combinedMultResultName() };
|
||||
|
||||
for ( const auto& s : stringsToMatch )
|
||||
{
|
||||
|
@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RimPlotDataFilterItem.h"
|
||||
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RimAnalysisPlot.h"
|
||||
#include "RimSummaryAddress.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
@ -288,7 +290,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
QVariant::fromValue( address ) ) );
|
||||
}
|
||||
|
||||
options.push_front( caf::PdmOptionItemInfo( RiaDefines::undefinedResultName(),
|
||||
options.push_front( caf::PdmOptionItemInfo( RiaResultNames::undefinedResultName(),
|
||||
QVariant::fromValue( RifEclipseSummaryAddress() ) ) );
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimAnnotationCollectionBase.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
@ -409,7 +409,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
|
||||
|
||||
setCategoryNames( fnVector );
|
||||
}
|
||||
else if ( m_resultDefinition->resultVariable() == RiaDefines::completionTypeResultName() )
|
||||
else if ( m_resultDefinition->resultVariable() == RiaResultNames::completionTypeResultName() )
|
||||
{
|
||||
std::vector<RiaDefines::WellPathComponentType> componentTypes =
|
||||
{ RiaDefines::WellPathComponentType::WELL_PATH,
|
||||
|
@ -127,7 +127,7 @@ bool RimEclipsePropertyFilterCollection::isUsingFormationNames() const
|
||||
{
|
||||
if ( propertyFilter->isActive() &&
|
||||
propertyFilter->resultDefinition()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES &&
|
||||
propertyFilter->resultDefinition()->resultVariable() != RiaDefines::undefinedResultName() )
|
||||
propertyFilter->resultDefinition()->resultVariable() != RiaResultNames::undefinedResultName() )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
@ -139,13 +139,13 @@ std::vector<cvf::Vec3f> RimEllipseFractureTemplate::fractureBorderPolygon() cons
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::changeUnits()
|
||||
{
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
convertToUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_FIELD );
|
||||
convertToUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
||||
}
|
||||
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
convertToUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC );
|
||||
convertToUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_METRIC );
|
||||
}
|
||||
|
||||
this->updateConnectedEditors();
|
||||
@ -282,7 +282,7 @@ const RigFractureGrid* RimEllipseFractureTemplate::fractureGrid() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::setDefaultValuesFromUnit()
|
||||
{
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_width = 0.5;
|
||||
m_permeability = 80000.0;
|
||||
@ -306,12 +306,12 @@ void RimEllipseFractureTemplate::setDefaultValuesFromUnit()
|
||||
double RimEllipseFractureTemplate::conductivity() const
|
||||
{
|
||||
double cond = cvf::UNDEFINED_DOUBLE;
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
// Conductivity should be md-m, width is in m
|
||||
cond = m_permeability * m_width;
|
||||
}
|
||||
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
// Conductivity should be md-ft, but width is in inches
|
||||
cond = m_permeability * RiaEclipseUnitTools::inchToFeet( m_width );
|
||||
@ -394,20 +394,20 @@ void RimEllipseFractureTemplate::onLoadDataAndUpdateGeometryHasChanged()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit )
|
||||
void RimEllipseFractureTemplate::convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit )
|
||||
{
|
||||
if ( m_fractureTemplateUnit() == neededUnit ) return;
|
||||
|
||||
setUnitSystem( neededUnit );
|
||||
RimFractureTemplate::convertToUnitSystem( neededUnit );
|
||||
|
||||
if ( neededUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_halfLength = RiaEclipseUnitTools::meterToFeet( m_halfLength );
|
||||
m_height = RiaEclipseUnitTools::meterToFeet( m_height );
|
||||
m_width = RiaEclipseUnitTools::meterToInch( m_width );
|
||||
}
|
||||
else if ( neededUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
else if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_halfLength = RiaEclipseUnitTools::feetToMeter( m_halfLength );
|
||||
m_height = RiaEclipseUnitTools::feetToMeter( m_height );
|
||||
@ -420,13 +420,13 @@ void RimEllipseFractureTemplate::convertToUnitSystem( RiaEclipseUnitTools::UnitS
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_halfLength.uiCapability()->setUiName( "Halflength X<sub>f</sub> [m]" );
|
||||
m_height.uiCapability()->setUiName( "Height [m]" );
|
||||
m_width.uiCapability()->setUiName( "Width [m]" );
|
||||
}
|
||||
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_halfLength.uiCapability()->setUiName( "Halflength X<sub>f</sub> [ft]" );
|
||||
m_height.uiCapability()->setUiName( "Height [ft]" );
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
MinMaxAccumulator& minMaxAccumulator,
|
||||
PosNegAccumulator& posNegAccumulator ) const override;
|
||||
|
||||
void convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit ) override;
|
||||
void convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit ) override;
|
||||
|
||||
void loadDataAndUpdate() override;
|
||||
std::vector<std::pair<QString, QString>> uiResultNamesWithUnit() const override;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
@ -47,7 +47,7 @@ public:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
std::vector<const RimFishboneWellPath*> wellPaths() const;
|
||||
double holeDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double holeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
return m_pipeProperties->holeDiameter( unitSystem );
|
||||
}
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
@ -116,12 +118,12 @@ void RimFishbonesCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiO
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName( "Start MD [m]" );
|
||||
m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [m]" );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName( "Start MD [ft]" );
|
||||
m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [ft]" );
|
||||
@ -283,17 +285,17 @@ double RimFishbonesCollection::startMD() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesCollection::mainBoreDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimFishbonesCollection::mainBoreDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter( m_mainBoreDiameter() );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_mainBoreDiameter() );
|
||||
}
|
||||
@ -309,7 +311,7 @@ void RimFishbonesCollection::setUnitSystemSpecificDefaults()
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_mainBoreDiameter = 0.216;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "RimMswCompletionParameters.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
@ -54,7 +54,7 @@ public:
|
||||
void recalculateStartMD();
|
||||
double startMD() const;
|
||||
double mainBoreSkinFactor() const { return m_skinFactor; }
|
||||
double mainBoreDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double mainBoreDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
|
@ -242,13 +242,13 @@ double RimFishbonesMultipleSubs::buildAngle() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::tubingDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimFishbonesMultipleSubs::tubingDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToMeter( m_lateralTubingDiameter() );
|
||||
}
|
||||
@ -257,9 +257,9 @@ double RimFishbonesMultipleSubs::tubingDiameter( RiaEclipseUnitTools::UnitSystem
|
||||
return m_lateralTubingDiameter() / 1000;
|
||||
}
|
||||
}
|
||||
else if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_lateralTubingDiameter() / 1000 );
|
||||
}
|
||||
@ -275,7 +275,7 @@ double RimFishbonesMultipleSubs::tubingDiameter( RiaEclipseUnitTools::UnitSystem
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::effectiveDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimFishbonesMultipleSubs::effectiveDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
double innerRadius = tubingDiameter( unitSystem ) / 2;
|
||||
double outerRadius = holeDiameter( unitSystem ) / 2;
|
||||
@ -292,17 +292,17 @@ double RimFishbonesMultipleSubs::effectiveDiameter( RiaEclipseUnitTools::UnitSys
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::openHoleRoughnessFactor( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimFishbonesMultipleSubs::openHoleRoughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter( m_lateralOpenHoleRoghnessFactor() );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_lateralOpenHoleRoghnessFactor() );
|
||||
}
|
||||
@ -312,7 +312,7 @@ double RimFishbonesMultipleSubs::openHoleRoughnessFactor( RiaEclipseUnitTools::U
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::icdOrificeDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimFishbonesMultipleSubs::icdOrificeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
@ -423,7 +423,7 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults()
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_lateralLength = "11";
|
||||
m_lateralBuildAngle = 6.0;
|
||||
@ -432,7 +432,7 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults()
|
||||
m_lateralTubingRoghnessFactor = 1e-05;
|
||||
m_icdOrificeDiameter = 7;
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_lateralLength = "36";
|
||||
m_lateralBuildAngle = 1.83;
|
||||
@ -560,7 +560,7 @@ void RimFishbonesMultipleSubs::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_lateralLength.uiCapability()->setUiName( "Length(s) [m]" );
|
||||
m_lateralBuildAngle.uiCapability()->setUiName( "Build Angle [deg/m]" );
|
||||
@ -570,7 +570,7 @@ void RimFishbonesMultipleSubs::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
|
||||
m_icdOrificeDiameter.uiCapability()->setUiName( "ICD Orifice Diameter [mm]" );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_lateralLength.uiCapability()->setUiName( "Length(s) [ft]" );
|
||||
m_lateralBuildAngle.uiCapability()->setUiName( "Build Angle [deg/ft]" );
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimCheckableNamedObject.h"
|
||||
@ -87,15 +87,15 @@ public:
|
||||
double exitAngle() const;
|
||||
double buildAngle() const;
|
||||
|
||||
double tubingDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double holeDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double tubingDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double holeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
return m_pipeProperties()->holeDiameter( unitSystem );
|
||||
}
|
||||
double effectiveDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double effectiveDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double skinFactor() const { return m_pipeProperties()->skinFactor(); }
|
||||
double openHoleRoughnessFactor( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double icdOrificeDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double openHoleRoughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double icdOrificeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double icdFlowCoefficient() const;
|
||||
size_t icdCount() const;
|
||||
std::vector<double> lateralLengths() const;
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include <cstdlib>
|
||||
@ -45,13 +47,13 @@ RimFishbonesPipeProperties::~RimFishbonesPipeProperties()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesPipeProperties::holeDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimFishbonesPipeProperties::holeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToMeter( m_lateralHoleDiameter() );
|
||||
}
|
||||
@ -60,9 +62,9 @@ double RimFishbonesPipeProperties::holeDiameter( RiaEclipseUnitTools::UnitSystem
|
||||
return m_lateralHoleDiameter() / 1000;
|
||||
}
|
||||
}
|
||||
else if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_lateralHoleDiameter() / 1000 );
|
||||
}
|
||||
@ -84,11 +86,11 @@ void RimFishbonesPipeProperties::setUnitSystemSpecificDefaults()
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_lateralHoleDiameter = 12.5;
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_lateralHoleDiameter = 0.5;
|
||||
}
|
||||
@ -105,11 +107,11 @@ void RimFishbonesPipeProperties::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_lateralHoleDiameter.uiCapability()->setUiName( "Hole Diameter [mm]" );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_lateralHoleDiameter.uiCapability()->setUiName( "Hole Diameter [in]" );
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cvfColor3.h"
|
||||
#include "cvfVector3.h"
|
||||
@ -42,7 +42,7 @@ public:
|
||||
~RimFishbonesPipeProperties() override;
|
||||
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
double holeDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double holeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
@ -138,7 +138,7 @@ RimFracture::RimFracture()
|
||||
|
||||
CAF_PDM_InitField( &m_fractureUnit,
|
||||
"FractureUnit",
|
||||
caf::AppEnum<RiaEclipseUnitTools::UnitSystem>( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC ),
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem>( RiaDefines::EclipseUnitSystem::UNITS_METRIC ),
|
||||
"Fracture Unit System",
|
||||
"",
|
||||
"",
|
||||
@ -230,7 +230,7 @@ void RimFracture::fieldChangedByUi( const caf::PdmFieldHandle* changedField, con
|
||||
{
|
||||
if ( fractureUnit() != m_fractureTemplate->fractureTemplateUnit() )
|
||||
{
|
||||
QString fractureUnitText = RiaEclipseUnitTools::UnitSystemType::uiText( fractureUnit() );
|
||||
QString fractureUnitText = caf::AppEnum<RiaDefines::EclipseUnitSystem>::uiText( fractureUnit() );
|
||||
|
||||
QString warningText =
|
||||
QString( "Using a fracture template defined in a different unit is not supported.\n\nPlease select a "
|
||||
@ -465,11 +465,11 @@ cvf::BoundingBox RimFracture::boundingBoxInDomainCoords() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFracture::wellRadius() const
|
||||
{
|
||||
if ( m_fractureUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( m_fractureUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return m_wellDiameter / 2.0;
|
||||
}
|
||||
else if ( m_fractureUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( m_fractureUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToFeet( m_wellDiameter / 2.0 );
|
||||
}
|
||||
@ -533,7 +533,7 @@ void RimFracture::setFractureTemplateNoUpdate( RimFractureTemplate* fractureTemp
|
||||
{
|
||||
if ( fractureTemplate && fractureTemplate->fractureTemplateUnit() != fractureUnit() )
|
||||
{
|
||||
QString fractureUnitText = RiaEclipseUnitTools::UnitSystemType::uiText( fractureUnit() );
|
||||
QString fractureUnitText = caf::AppEnum<RiaDefines::EclipseUnitSystem>::uiText( fractureUnit() );
|
||||
|
||||
QString warningText =
|
||||
QString( "Using a fracture template defined in a different unit is not supported.\n\nPlease select a "
|
||||
@ -641,12 +641,12 @@ QList<caf::PdmOptionItemInfo> RimFracture::calculateValueOptions( const caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
if ( m_fractureUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( m_fractureUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_wellDiameter.uiCapability()->setUiName( "Well Diameter [m]" );
|
||||
m_perforationLength.uiCapability()->setUiName( "Perforation Length [m]" );
|
||||
}
|
||||
else if ( m_fractureUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( m_fractureUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_wellDiameter.uiCapability()->setUiName( "Well Diameter [inches]" );
|
||||
m_perforationLength.uiCapability()->setUiName( "Perforation Length [ft]" );
|
||||
@ -776,7 +776,7 @@ void RimFracture::setAnchorPosition( const cvf::Vec3d& pos )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RimFracture::fractureUnit() const
|
||||
RiaDefines::EclipseUnitSystem RimFracture::fractureUnit() const
|
||||
{
|
||||
return m_fractureUnit();
|
||||
}
|
||||
@ -784,7 +784,7 @@ RiaEclipseUnitTools::UnitSystem RimFracture::fractureUnit() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::setFractureUnit( RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
void RimFracture::setFractureUnit( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
m_fractureUnit = unitSystem;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimCheckableNamedObject.h"
|
||||
@ -86,8 +86,8 @@ public:
|
||||
double wellRadius() const;
|
||||
cvf::Vec3d anchorPosition() const;
|
||||
void setAnchorPosition( const cvf::Vec3d& pos );
|
||||
RiaEclipseUnitTools::UnitSystem fractureUnit() const;
|
||||
void setFractureUnit( RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
RiaDefines::EclipseUnitSystem fractureUnit() const;
|
||||
void setFractureUnit( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
bool isEclipseCellOpenForFlow( const RigMainGrid* mainGrid,
|
||||
const std::set<size_t>& reservoirCellIndicesOpenForFlow,
|
||||
@ -154,7 +154,7 @@ protected:
|
||||
caf::PdmField<bool> m_createEllipseFractureTemplate;
|
||||
caf::PdmField<bool> m_createStimPlanFractureTemplate;
|
||||
caf::PdmProxyValueField<cvf::Vec3d> m_uiAnchorPosition;
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_fractureUnit;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_fractureUnit;
|
||||
|
||||
caf::PdmProxyValueField<QString> m_uiWellPathAzimuth;
|
||||
caf::PdmProxyValueField<QString> m_uiWellFractureAzimuthDiff;
|
||||
|
@ -18,7 +18,9 @@
|
||||
|
||||
#include "RimFractureTemplate.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
|
||||
#include "RigTesselatorTools.h"
|
||||
|
||||
#include "RimFracture.h"
|
||||
@ -120,7 +122,7 @@ RimFractureTemplate::RimFractureTemplate()
|
||||
|
||||
CAF_PDM_InitField( &m_fractureTemplateUnit,
|
||||
"UnitSystem",
|
||||
caf::AppEnum<RiaEclipseUnitTools::UnitSystem>( RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN ),
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem>( RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN ),
|
||||
"Units System",
|
||||
"",
|
||||
"",
|
||||
@ -252,7 +254,7 @@ void RimFractureTemplate::setName( const QString& name )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setUnitSystem( RiaEclipseUnitTools::UnitSystemType unitSystem )
|
||||
void RimFractureTemplate::setUnitSystem( caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem )
|
||||
{
|
||||
m_fractureTemplateUnit = unitSystem;
|
||||
}
|
||||
@ -276,7 +278,7 @@ RimFractureTemplate::FracOrientationEnum RimFractureTemplate::orientationType()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystemType RimFractureTemplate::fractureTemplateUnit() const
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> RimFractureTemplate::fractureTemplateUnit() const
|
||||
{
|
||||
return m_fractureTemplateUnit();
|
||||
}
|
||||
@ -475,13 +477,13 @@ void RimFractureTemplate::defineEditorAttribute( const caf::PdmFieldHandle* fiel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::prepareFieldsForUiDisplay()
|
||||
{
|
||||
if ( m_fractureTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( m_fractureTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_wellDiameter.uiCapability()->setUiName( "Well Diameter [m]" );
|
||||
m_perforationLength.uiCapability()->setUiName( "Perforation Length [m]" );
|
||||
m_fractureWidth.uiCapability()->setUiName( "Fracture Width [m]" );
|
||||
}
|
||||
else if ( m_fractureTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( m_fractureTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_wellDiameter.uiCapability()->setUiName( "Well Diameter [inches]" );
|
||||
m_perforationLength.uiCapability()->setUiName( "Perforation Length [ft]" );
|
||||
@ -752,15 +754,15 @@ double RimFractureTemplate::computeKh( const RimFracture* fractureInstance ) con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit )
|
||||
void RimFractureTemplate::convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit )
|
||||
{
|
||||
if ( neededUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_perforationLength = RiaEclipseUnitTools::feetToMeter( m_perforationLength );
|
||||
m_wellDiameter = RiaEclipseUnitTools::inchToMeter( m_wellDiameter );
|
||||
m_fractureWidth = RiaEclipseUnitTools::feetToMeter( m_fractureWidth );
|
||||
}
|
||||
else if ( neededUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_perforationLength = RiaEclipseUnitTools::meterToFeet( m_perforationLength );
|
||||
m_wellDiameter = RiaEclipseUnitTools::meterToInch( m_wellDiameter );
|
||||
@ -912,11 +914,11 @@ QString RimFractureTemplate::nameAndUnit() const
|
||||
{
|
||||
QString decoratedName;
|
||||
|
||||
if ( m_fractureTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( m_fractureTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
decoratedName += "[M] - ";
|
||||
}
|
||||
else if ( m_fractureTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( m_fractureTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
decoratedName += "[F] - ";
|
||||
}
|
||||
@ -979,11 +981,11 @@ float RimFractureTemplate::skinFactor() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setDefaultWellDiameterFromUnit()
|
||||
{
|
||||
if ( m_fractureTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( m_fractureTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_wellDiameter = 8.5;
|
||||
}
|
||||
else if ( m_fractureTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
else if ( m_fractureTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_wellDiameter = 0.216;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildField.h"
|
||||
@ -127,7 +127,7 @@ public:
|
||||
QString name() const;
|
||||
QString nameAndUnit() const;
|
||||
|
||||
RiaEclipseUnitTools::UnitSystemType fractureTemplateUnit() const;
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> fractureTemplateUnit() const;
|
||||
FracOrientationEnum orientationType() const;
|
||||
float azimuthAngle() const;
|
||||
float skinFactor() const;
|
||||
@ -149,12 +149,12 @@ public:
|
||||
virtual std::vector<std::pair<QString, QString>> uiResultNamesWithUnit() const = 0;
|
||||
|
||||
void setName( const QString& name );
|
||||
void setUnitSystem( RiaEclipseUnitTools::UnitSystemType unitSystem );
|
||||
void setUnitSystem( caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem );
|
||||
void setDefaultWellDiameterFromUnit();
|
||||
|
||||
bool isNonDarcyFlowEnabled() const;
|
||||
|
||||
virtual void convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit );
|
||||
virtual void convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit );
|
||||
|
||||
virtual void loadDataAndUpdate() = 0;
|
||||
|
||||
@ -200,7 +200,7 @@ protected:
|
||||
caf::PdmField<QString> m_name;
|
||||
caf::PdmProxyValueField<QString> m_nameAndUnit;
|
||||
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_fractureTemplateUnit;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_fractureTemplateUnit;
|
||||
caf::PdmField<caf::AppEnum<FracOrientationEnum>> m_orientationType;
|
||||
caf::PdmField<float> m_azimuthAngle;
|
||||
caf::PdmField<float> m_skinFactor;
|
||||
|
@ -54,7 +54,7 @@ RimFractureTemplateCollection::RimFractureTemplateCollection()
|
||||
|
||||
CAF_PDM_InitField( &m_defaultUnitsForFracTemplates,
|
||||
"DefaultUnitForTemplates",
|
||||
caf::AppEnum<RiaEclipseUnitTools::UnitSystem>( RiaEclipseUnitTools::UnitSystem::UNITS_METRIC ),
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem>( RiaDefines::EclipseUnitSystem::UNITS_METRIC ),
|
||||
"Default unit system for fracture templates",
|
||||
"",
|
||||
"",
|
||||
@ -128,7 +128,7 @@ void RimFractureTemplateCollection::addFractureTemplate( RimFractureTemplate* te
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystemType RimFractureTemplateCollection::defaultUnitSystemType() const
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> RimFractureTemplateCollection::defaultUnitSystemType() const
|
||||
{
|
||||
return m_defaultUnitsForFracTemplates;
|
||||
}
|
||||
@ -141,7 +141,7 @@ void RimFractureTemplateCollection::setDefaultUnitSystemBasedOnLoadedCases()
|
||||
RimProject* proj = RimProject::current();
|
||||
|
||||
auto commonUnitSystem = proj->commonUnitSystemForAllCases();
|
||||
if ( commonUnitSystem != RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
if ( commonUnitSystem != RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
{
|
||||
m_defaultUnitsForFracTemplates = commonUnitSystem;
|
||||
}
|
||||
@ -150,7 +150,7 @@ void RimFractureTemplateCollection::setDefaultUnitSystemBasedOnLoadedCases()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureTemplate* RimFractureTemplateCollection::firstFractureOfUnit( RiaEclipseUnitTools::UnitSystem unitSet ) const
|
||||
RimFractureTemplate* RimFractureTemplateCollection::firstFractureOfUnit( RiaDefines::EclipseUnitSystem unitSet ) const
|
||||
{
|
||||
for ( RimFractureTemplate* f : m_fractureDefinitions() )
|
||||
{
|
||||
@ -241,14 +241,14 @@ void RimFractureTemplateCollection::createAndAssignTemplateCopyForNonMatchingUni
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
auto currentUnit = fractureTemplate->fractureTemplateUnit();
|
||||
auto neededUnit = RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN;
|
||||
if ( currentUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
auto neededUnit = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
if ( currentUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
neededUnit = RiaEclipseUnitTools::UnitSystem::UNITS_FIELD;
|
||||
neededUnit = RiaDefines::EclipseUnitSystem::UNITS_FIELD;
|
||||
}
|
||||
else if ( currentUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( currentUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
neededUnit = RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
neededUnit = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
}
|
||||
|
||||
templateWithMatchingUnit->convertToUnitSystem( neededUnit );
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
@ -44,10 +44,10 @@ public:
|
||||
RimEllipseFractureTemplate* addDefaultEllipseTemplate();
|
||||
void addFractureTemplate( RimFractureTemplate* templ );
|
||||
|
||||
RiaEclipseUnitTools::UnitSystemType defaultUnitSystemType() const;
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> defaultUnitSystemType() const;
|
||||
void setDefaultUnitSystemBasedOnLoadedCases();
|
||||
|
||||
RimFractureTemplate* firstFractureOfUnit( RiaEclipseUnitTools::UnitSystem unitSet ) const;
|
||||
RimFractureTemplate* firstFractureOfUnit( RiaDefines::EclipseUnitSystem unitSet ) const;
|
||||
|
||||
std::vector<std::pair<QString, QString>> resultNamesAndUnits() const;
|
||||
void computeMinMax( const QString& uiResultName,
|
||||
@ -72,7 +72,7 @@ private:
|
||||
int nextFractureTemplateId();
|
||||
|
||||
caf::PdmChildArrayField<RimFractureTemplate*> m_fractureDefinitions;
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_defaultUnitsForFracTemplates;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_defaultUnitsForFracTemplates;
|
||||
caf::PdmField<int> m_nextValidFractureTemplateId; // Unique fracture template ID within a project, used to identify
|
||||
// a fracture template
|
||||
};
|
||||
|
@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RimMswCompletionParameters.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "cafPdmUiObjectEditorHandle.h"
|
||||
@ -123,17 +125,17 @@ double RimMswCompletionParameters::manualReferenceMD() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimMswCompletionParameters::linerDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimMswCompletionParameters::linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter( m_linerDiameter() );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_linerDiameter() );
|
||||
}
|
||||
@ -143,9 +145,9 @@ double RimMswCompletionParameters::linerDiameter( RiaEclipseUnitTools::UnitSyste
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimMswCompletionParameters::defaultLinerDiameter( RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
double RimMswCompletionParameters::defaultLinerDiameter( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return 0.152;
|
||||
}
|
||||
@ -158,17 +160,17 @@ double RimMswCompletionParameters::defaultLinerDiameter( RiaEclipseUnitTools::Un
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimMswCompletionParameters::roughnessFactor( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimMswCompletionParameters::roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter( m_roughnessFactor() );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_roughnessFactor() );
|
||||
}
|
||||
@ -178,9 +180,9 @@ double RimMswCompletionParameters::roughnessFactor( RiaEclipseUnitTools::UnitSys
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimMswCompletionParameters::defaultRoughnessFactor( RiaEclipseUnitTools::UnitSystem unitSystem )
|
||||
double RimMswCompletionParameters::defaultRoughnessFactor( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return 1.0e-5;
|
||||
}
|
||||
@ -292,12 +294,12 @@ void RimMswCompletionParameters::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_linerDiameter.uiCapability()->setUiName( "Liner Inner Diameter [m]" );
|
||||
m_roughnessFactor.uiCapability()->setUiName( "Roughness Factor [m]" );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_linerDiameter.uiCapability()->setUiName( "Liner Inner Diameter [ft]" );
|
||||
m_roughnessFactor.uiCapability()->setUiName( "Roughness Factor [ft]" );
|
||||
|
@ -17,7 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
@ -56,10 +56,10 @@ public:
|
||||
|
||||
ReferenceMDType referenceMDType() const;
|
||||
double manualReferenceMD() const;
|
||||
double linerDiameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
static double defaultLinerDiameter( RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
double roughnessFactor( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
static double defaultRoughnessFactor( RiaEclipseUnitTools::UnitSystem unitSystem );
|
||||
double linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
static double defaultLinerDiameter( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
double roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
static double defaultRoughnessFactor( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
PressureDropEnum pressureDrop() const;
|
||||
LengthAndDepthEnum lengthAndDepth() const;
|
||||
double maxSegmentLength() const;
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimWellPath.h"
|
||||
@ -225,14 +227,14 @@ void RimMultipleValveLocations::defineUiOrdering( QString uiConfigName, caf::Pdm
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_locationOfValves.uiCapability()->setUiName( "Measured Depths [m]" );
|
||||
m_rangeStart.uiCapability()->setUiName( "Start MD [m]" );
|
||||
m_rangeEnd.uiCapability()->setUiName( "End MD [m]" );
|
||||
m_rangeValveSpacing.uiCapability()->setUiName( "Spacing [m]" );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_locationOfValves.uiCapability()->setUiName( "Measured Depths [ft]" );
|
||||
m_rangeStart.uiCapability()->setUiName( "Start MD [ft]" );
|
||||
@ -326,7 +328,7 @@ void RimMultipleValveLocations::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
double minimumDistanceFeet = RiaEclipseUnitTools::meterToFeet( minimumDistanceMeter );
|
||||
m_rangeValveSpacing = cvf::Math::clamp( m_rangeValveSpacing(),
|
||||
|
@ -17,8 +17,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiGroup.h"
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "RimPerforationInterval.h"
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
@ -131,17 +133,17 @@ void RimPerforationInterval::setSkinFactor( double skinFactor )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::diameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const
|
||||
double RimPerforationInterval::diameter( RiaDefines::EclipseUnitSystem unitSystem ) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
|
||||
wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC &&
|
||||
wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter( m_diameter() );
|
||||
}
|
||||
else if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
else if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet( m_diameter() );
|
||||
}
|
||||
@ -198,11 +200,11 @@ void RimPerforationInterval::setUnitSystemSpecificDefaults()
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_diameter = 0.216;
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_diameter = 0.709;
|
||||
}
|
||||
@ -343,13 +345,13 @@ void RimPerforationInterval::defineUiOrdering( QString uiConfigName, caf::PdmUiO
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
if ( wellPath )
|
||||
{
|
||||
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName( "Start MD [m]" );
|
||||
m_endMD.uiCapability()->setUiName( "End MD [m]" );
|
||||
m_diameter.uiCapability()->setUiName( "Diameter [m]" );
|
||||
}
|
||||
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName( "Start MD [ft]" );
|
||||
m_endMD.uiCapability()->setUiName( "End MD [ft]" );
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "RimWellPathComponentInterface.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
@ -55,7 +55,7 @@ public:
|
||||
|
||||
void setDiameter( double diameter );
|
||||
void setSkinFactor( double skinFactor );
|
||||
double diameter( RiaEclipseUnitTools::UnitSystem unitSystem ) const;
|
||||
double diameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double skinFactor() const;
|
||||
|
||||
bool isActiveOnDate( const QDateTime& date ) const;
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaWeightedGeometricMeanCalculator.h"
|
||||
@ -292,7 +293,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
{
|
||||
setDefaultConductivityResultIfEmpty();
|
||||
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
{
|
||||
setUnitSystem( m_stimPlanFractureDefinitionData->unitSet() );
|
||||
}
|
||||
@ -306,7 +307,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
setUnitSystem( RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN );
|
||||
setUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN );
|
||||
m_readError = true;
|
||||
}
|
||||
|
||||
@ -432,11 +433,11 @@ void RimStimPlanFractureTemplate::computePerforationLength()
|
||||
}
|
||||
}
|
||||
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC && m_perforationLength < 10 )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC && m_perforationLength < 10 )
|
||||
{
|
||||
m_perforationLength = 10;
|
||||
}
|
||||
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
|
||||
else if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD &&
|
||||
m_perforationLength < RiaEclipseUnitTools::meterToFeet( 10 ) )
|
||||
{
|
||||
m_perforationLength = std::round( RiaEclipseUnitTools::meterToFeet( 10 ) );
|
||||
@ -450,19 +451,19 @@ std::vector<double>
|
||||
RimStimPlanFractureTemplate::fractureGridResultsForUnitSystem( const QString& resultName,
|
||||
const QString& unitName,
|
||||
size_t timeStepIndex,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnitSystem ) const
|
||||
RiaDefines::EclipseUnitSystem requiredUnitSystem ) const
|
||||
{
|
||||
auto resultValues =
|
||||
m_stimPlanFractureDefinitionData->fractureGridResults( resultName, unitName, m_activeTimeStepIndex );
|
||||
|
||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
for ( auto& v : resultValues )
|
||||
{
|
||||
v = RiaEclipseUnitTools::convertToMeter( v, unitName );
|
||||
}
|
||||
}
|
||||
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( fractureTemplateUnit() == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
for ( auto& v : resultValues )
|
||||
{
|
||||
@ -797,7 +798,7 @@ bool RimStimPlanFractureTemplate::showStimPlanMesh() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit )
|
||||
void RimStimPlanFractureTemplate::convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit )
|
||||
{
|
||||
if ( m_fractureTemplateUnit() == neededUnit ) return;
|
||||
|
||||
@ -809,11 +810,11 @@ void RimStimPlanFractureTemplate::convertToUnitSystem( RiaEclipseUnitTools::Unit
|
||||
|
||||
if ( m_stimPlanFractureDefinitionData.isNull() ) return;
|
||||
|
||||
if ( neededUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_wellPathDepthAtFracture = RiaEclipseUnitTools::meterToFeet( m_wellPathDepthAtFracture );
|
||||
}
|
||||
else if ( neededUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
else if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_wellPathDepthAtFracture = RiaEclipseUnitTools::feetToMeter( m_wellPathDepthAtFracture );
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
|
||||
bool showStimPlanMesh() const;
|
||||
|
||||
void convertToUnitSystem( RiaEclipseUnitTools::UnitSystem neededUnit ) override;
|
||||
void convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit ) override;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
@ -112,7 +112,7 @@ private:
|
||||
std::vector<double> fractureGridResultsForUnitSystem( const QString& resultName,
|
||||
const QString& unitName,
|
||||
size_t timeStepIndex,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnitSystem ) const;
|
||||
RiaDefines::EclipseUnitSystem requiredUnitSystem ) const;
|
||||
|
||||
WellFractureIntersectionData wellFractureIntersectionData( const RimFracture* fractureInstance ) const override;
|
||||
|
||||
|
@ -34,7 +34,7 @@ RimValveTemplate::RimValveTemplate()
|
||||
|
||||
CAF_PDM_InitField( &m_valveTemplateUnit,
|
||||
"UnitSystem",
|
||||
caf::AppEnum<RiaEclipseUnitTools::UnitSystem>( RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN ),
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem>( RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN ),
|
||||
"Units System",
|
||||
"",
|
||||
"",
|
||||
@ -73,7 +73,7 @@ void RimValveTemplate::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimValveTemplate::setUnitSystem( RiaEclipseUnitTools::UnitSystemType unitSystem )
|
||||
void RimValveTemplate::setUnitSystem( caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem )
|
||||
{
|
||||
m_valveTemplateUnit = unitSystem;
|
||||
}
|
||||
@ -83,11 +83,11 @@ void RimValveTemplate::setUnitSystem( RiaEclipseUnitTools::UnitSystemType unitSy
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimValveTemplate::setDefaultValuesFromUnits()
|
||||
{
|
||||
if ( m_valveTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( m_valveTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_orificeDiameter = 8;
|
||||
}
|
||||
else if ( m_valveTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( m_valveTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_orificeDiameter = 0.315;
|
||||
}
|
||||
@ -115,7 +115,7 @@ void RimValveTemplate::setType( RiaDefines::WellPathComponentType type )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystemType RimValveTemplate::templateUnits() const
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> RimValveTemplate::templateUnits() const
|
||||
{
|
||||
return m_valveTemplateUnit;
|
||||
}
|
||||
@ -200,11 +200,11 @@ void RimValveTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
uiOrdering.add( &m_valveTemplateUnit );
|
||||
if ( m_type() == RiaDefines::WellPathComponentType::ICV || m_type() == RiaDefines::WellPathComponentType::ICD )
|
||||
{
|
||||
if ( m_valveTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||
if ( m_valveTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
m_orificeDiameter.uiCapability()->setUiName( "Orifice Diameter [mm]" );
|
||||
}
|
||||
else if ( m_valveTemplateUnit == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||
else if ( m_valveTemplateUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
m_orificeDiameter.uiCapability()->setUiName( "Orifice Diameter [in]" );
|
||||
}
|
||||
|
@ -19,7 +19,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
@ -36,12 +35,12 @@ public:
|
||||
~RimValveTemplate() override;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
void setUnitSystem( RiaEclipseUnitTools::UnitSystemType unitSystem );
|
||||
void setUnitSystem( caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem );
|
||||
void setDefaultValuesFromUnits();
|
||||
|
||||
RiaDefines::WellPathComponentType type() const;
|
||||
void setType( RiaDefines::WellPathComponentType type );
|
||||
RiaEclipseUnitTools::UnitSystemType templateUnits() const;
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> templateUnits() const;
|
||||
double orificeDiameter() const;
|
||||
double flowCoefficient() const;
|
||||
const RimWellPathAicdParameters* aicdParameters() const;
|
||||
@ -59,7 +58,7 @@ protected:
|
||||
private:
|
||||
typedef caf::AppEnum<RiaDefines::WellPathComponentType> CompletionTypeEnum;
|
||||
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_valveTemplateUnit;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_valveTemplateUnit;
|
||||
|
||||
caf::PdmField<CompletionTypeEnum> m_type;
|
||||
caf::PdmField<QString> m_userLabel;
|
||||
|
@ -36,7 +36,7 @@ RimValveTemplateCollection::RimValveTemplateCollection()
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_defaultUnitsForValveTemplates = RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
m_defaultUnitsForValveTemplates = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
m_valveDefinitions.uiCapability()->setUiHidden( true );
|
||||
addDefaultValveTemplates();
|
||||
}
|
||||
@ -81,7 +81,7 @@ void RimValveTemplateCollection::removeAndDeleteValveTemplate( RimValveTemplate*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystemType RimValveTemplateCollection::defaultUnitSystemType() const
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> RimValveTemplateCollection::defaultUnitSystemType() const
|
||||
{
|
||||
return m_defaultUnitsForValveTemplates;
|
||||
}
|
||||
@ -94,7 +94,7 @@ void RimValveTemplateCollection::setDefaultUnitSystemBasedOnLoadedCases()
|
||||
RimProject* proj = RimProject::current();
|
||||
|
||||
auto commonUnitSystem = proj->commonUnitSystemForAllCases();
|
||||
if ( commonUnitSystem != RiaEclipseUnitTools::UnitSystem::UNITS_UNKNOWN )
|
||||
if ( commonUnitSystem != RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN )
|
||||
{
|
||||
m_defaultUnitsForValveTemplates = commonUnitSystem;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
@ -43,10 +43,10 @@ public:
|
||||
void removeAndDeleteValveTemplate( RimValveTemplate* valveTemplate );
|
||||
void addDefaultValveTemplates();
|
||||
|
||||
RiaEclipseUnitTools::UnitSystemType defaultUnitSystemType() const;
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> defaultUnitSystemType() const;
|
||||
void setDefaultUnitSystemBasedOnLoadedCases();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimValveTemplate*> m_valveDefinitions;
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_defaultUnitsForValveTemplates;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_defaultUnitsForValveTemplates;
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user