WBS LAS-parameter fixes to be more consistent

This commit is contained in:
Gaute Lindkvist 2020-02-14 11:39:47 +01:00
parent 4cf427ce69
commit 82263e9d6f
8 changed files with 56 additions and 12 deletions

View File

@ -80,6 +80,14 @@ QString RiaWellLogUnitTools::gPerCm3UnitString()
return "g/cm3";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaWellLogUnitTools::kgPerM3UnitString()
{
return "kg/m3";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -37,6 +37,7 @@ public:
static QString barX100UnitString();
static QString MPaUnitString();
static QString gPerCm3UnitString();
static QString kgPerM3UnitString();
static QString pascalUnitString();
public:

View File

@ -152,6 +152,7 @@ void RicExportToLasFileFeature::onActionTriggered( bool isChecked )
{
featureUi.filePrefix = "WBS_";
featureUi.capitalizeFileName = true;
featureUi.exportTvdrkb = true;
featureUi.setUnitConversionOptionEnabled( true );
}

View File

@ -252,9 +252,9 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
RimWellLogTrack* paramCurvesTrack =
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "WBS Parameters", plot );
paramCurvesTrack->setColSpan( RimPlot::TWO );
paramCurvesTrack->setVisibleXRange( 0.0, 1.0 );
paramCurvesTrack->setVisibleXRange( 0.0, 2.0 );
paramCurvesTrack->setAutoScaleXEnabled( true );
paramCurvesTrack->setTickIntervals( 0.5, 0.1 );
paramCurvesTrack->setTickIntervals( 1.0, 0.2 );
paramCurvesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
paramCurvesTrack->setFormationWellPath( wellPath );
paramCurvesTrack->setFormationCase( geoMechCase );
@ -271,6 +271,8 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
size_t i = 0;
for ( const RigWbsParameter& param : parameters )
{
if ( !param.hasExternalSource() || param == RigWbsParameter::waterDensity() ) continue;
RigFemResultAddress resAddr( RIG_WELLPATH_DERIVED, param.name().toStdString(), "" );
RimWellLogExtractionCurve* curve =
RicWellLogTools::addWellLogExtractionCurve( paramCurvesTrack, geoMechCase, nullptr, wellPath, nullptr, -1, false, false );

View File

@ -78,7 +78,7 @@ RimWbsParameters::RimWbsParameters()
"FG in shale = K0_FG * (OBG0-PP0)\nK0_FG = (FG-PP)/(OBG-PP)",
"" );
RICF_InitFieldNoDefault( &m_waterDensitySource, "WaterDensitySource", "Water Density", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_waterDensitySource, "WaterDensitySource", "Water Density", "", "", "" );
m_waterDensitySource.uiCapability()->setUiHidden( true );
RICF_InitField( &m_userDefinedPoissionRatio,

View File

@ -764,6 +764,14 @@ QString RigGeoMechWellLogExtractor::parameterInputUnits( const RigWbsParameter&
{
return RiaWellLogUnitTools::barUnitString();
}
else if ( parameter == RigWbsParameter::poissonRatio() || parameter == RigWbsParameter::DF() )
{
return RiaWellLogUnitTools::noUnitString();
}
else if ( parameter == RigWbsParameter::waterDensity() )
{
return RiaWellLogUnitTools::gPerCm3UnitString();
}
return RiaWellLogUnitTools::sg_emwUnitString();
}

View File

@ -96,6 +96,18 @@ std::vector<RigWbsParameter::Source> RigWbsParameter::sources() const
return allValidSources;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigWbsParameter::hasExternalSource() const
{
for ( auto sourcePair : m_sources )
{
if ( sourcePair.first != GRID ) return true;
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -227,8 +239,10 @@ bool RigWbsParameter::operator<( const RigWbsParameter& rhs ) const
RigWbsParameter RigWbsParameter::PP_Reservoir()
{
SourceVector sources = {{GRID, SourceAddress( "POR-Bar", "", RiaWellLogUnitTools::barUnitString() )},
{LAS_FILE, SourceAddress( "PP_RES_INP", "", RiaWellLogUnitTools::sg_emwUnitString() )},
{LAS_FILE, SourceAddress( "POR_RES_INP", "", RiaWellLogUnitTools::gPerCm3UnitString() )},
{ELEMENT_PROPERTY_TABLE, SourceAddress( "POR", "", RiaWellLogUnitTools::barUnitString() )}};
{ELEMENT_PROPERTY_TABLE, SourceAddress( "POR", "", RiaWellLogUnitTools::barUnitString() )},
{ELEMENT_PROPERTY_TABLE, SourceAddress( "PP", "", RiaWellLogUnitTools::sg_emwUnitString() )}};
return RigWbsParameter( "PP Reservoir", true, sources );
}
@ -239,7 +253,8 @@ RigWbsParameter RigWbsParameter::PP_NonReservoir()
{
return RigWbsParameter( "PP Non-Reservoir",
true,
{{LAS_FILE, SourceAddress( "POR_NONRES_INP", "", RiaWellLogUnitTools::gPerCm3UnitString() )},
{{LAS_FILE, SourceAddress( "PP_NONRES_INP", "", RiaWellLogUnitTools::sg_emwUnitString() )},
{LAS_FILE, SourceAddress( "POR_NONRES_INP", "", RiaWellLogUnitTools::gPerCm3UnitString() )},
{HYDROSTATIC, SourceAddress( "Hydrostatic", "", RiaWellLogUnitTools::barUnitString() )},
{USER_DEFINED, SourceAddress( "", "", RiaWellLogUnitTools::barUnitString() )}} );
}
@ -295,9 +310,8 @@ RigWbsParameter RigWbsParameter::OBG0()
//--------------------------------------------------------------------------------------------------
RigWbsParameter RigWbsParameter::SH()
{
std::vector<std::pair<Source, SourceAddress>> sources =
{{GRID, SourceAddress( "ST", "S3", RiaWellLogUnitTools::barUnitString() )},
{LAS_FILE, SourceAddress( "SH_INP", "", RiaWellLogUnitTools::barUnitString() )}};
std::vector<std::pair<Source, SourceAddress>> sources = {
{GRID, SourceAddress( "ST", "S3", RiaWellLogUnitTools::barUnitString() )}};
return RigWbsParameter( "SH Input", true, sources );
}
@ -318,7 +332,10 @@ RigWbsParameter RigWbsParameter::DF()
//--------------------------------------------------------------------------------------------------
RigWbsParameter RigWbsParameter::K0_FG()
{
return RigWbsParameter( "K0_FG", false, {{LAS_FILE, SourceAddress( "K0_FG_INP" )}, {USER_DEFINED, SourceAddress()}} );
return RigWbsParameter( "K0_FG",
false,
{{LAS_FILE, SourceAddress( "K0_FG_INP", "", RiaWellLogUnitTools::sg_emwUnitString() )},
{USER_DEFINED, SourceAddress()}} );
}
//--------------------------------------------------------------------------------------------------
@ -326,7 +343,10 @@ RigWbsParameter RigWbsParameter::K0_FG()
//--------------------------------------------------------------------------------------------------
RigWbsParameter RigWbsParameter::K0_SH()
{
return RigWbsParameter( "K0_SH", false, {{LAS_FILE, SourceAddress( "K0_SH_INP" )}, {USER_DEFINED, SourceAddress()}} );
return RigWbsParameter( "K0_SH",
false,
{{LAS_FILE, SourceAddress( "K0_SH_INP", "", RiaWellLogUnitTools::sg_emwUnitString() )},
{USER_DEFINED, SourceAddress()}} );
}
//--------------------------------------------------------------------------------------------------
@ -338,7 +358,7 @@ RigWbsParameter RigWbsParameter::FG_Shale()
false,
{{DERIVED_FROM_K0FG, SourceAddress()},
{PROPORTIONAL_TO_SH, SourceAddress()},
{LAS_FILE, SourceAddress( "FG_SHALE_INP" )}} );
{LAS_FILE, SourceAddress( "FG_SHALE_INP", "", RiaWellLogUnitTools::sg_emwUnitString() )}} );
param.setOptionsExclusive( true );
return param;
}
@ -348,7 +368,10 @@ RigWbsParameter RigWbsParameter::FG_Shale()
//--------------------------------------------------------------------------------------------------
RigWbsParameter RigWbsParameter::waterDensity()
{
RigWbsParameter param( "Density of Sea Water", false, {{USER_DEFINED, SourceAddress()}} );
RigWbsParameter param( "Density of Sea Water",
false,
{{USER_DEFINED, SourceAddress()},
{LAS_FILE, SourceAddress( "RHO_INP", "", RiaWellLogUnitTools::gPerCm3UnitString() )}} );
return param;
}
//--------------------------------------------------------------------------------------------------

View File

@ -56,6 +56,7 @@ public:
const QString& name() const;
std::vector<Source> sources() const;
bool hasExternalSource() const;
QString addressString( Source source ) const;
QString units( Source source ) const;
RigFemResultAddress femAddress( Source source ) const;