#5657 Add combined Production and Injection visualization for Well Disks.

This commit is contained in:
Kristian Bendiksen 2020-03-24 14:40:24 +01:00 committed by Magne Sjaastad
parent 0f470aad97
commit 08f560a058
5 changed files with 115 additions and 25 deletions

View File

@ -688,11 +688,11 @@ double RimSimWellInView::calculateInjectionProductionFractions( const RimWellDis
}
else
{
m_isInjector = RimSimWellInViewTools::gridSummaryCaseForWell( this );
m_isInjector = RimSimWellInViewTools::isInjector( this );
double oil = RimSimWellInViewTools::extractValueForTimeStep( summaryReader,
name(),
wellDiskConfig.getOilProperty(),
wellDiskConfig.getOilProperty( m_isInjector ),
currentDate,
isOk );
if ( !( *isOk ) )
@ -703,7 +703,7 @@ double RimSimWellInView::calculateInjectionProductionFractions( const RimWellDis
double gas = RimSimWellInViewTools::extractValueForTimeStep( summaryReader,
name(),
wellDiskConfig.getGasProperty(),
wellDiskConfig.getGasProperty( m_isInjector ),
currentDate,
isOk ) /
1000.0;
@ -715,7 +715,7 @@ double RimSimWellInView::calculateInjectionProductionFractions( const RimWellDis
double water = RimSimWellInViewTools::extractValueForTimeStep( summaryReader,
name(),
wellDiskConfig.getWaterProperty(),
wellDiskConfig.getWaterProperty( m_isInjector ),
currentDate,
isOk );
if ( !( *isOk ) )

View File

@ -144,6 +144,13 @@ void AppEnum<RimSimWellInViewCollection::WellDiskPropertyConfigType>::setUp()
addItem( RimSimWellInViewCollection::INJECTION_RATES, "INJECTION_RATES", "Injection Rates" );
addItem( RimSimWellInViewCollection::CUMULATIVE_PRODUCTION_RATES, "CUMULATIVE_PRODUCTION_RATES", "Production Total" );
addItem( RimSimWellInViewCollection::CUMULATIVE_INJECTION_RATES, "CUMULATIVE_INJECTION_RATES", "Injection Total" );
addItem( RimSimWellInViewCollection::PRODUCTION_INJECTION_RATES,
"PRODUCTION_INJECTION_RATES",
"Production/Injection Rates" );
addItem( RimSimWellInViewCollection::CUMULATIVE_PRODUCTION_INJECTION_RATES,
"CUMULATIVE_PRODUCTION_INJECTION_RATES",
"Production/Injection Total" );
setDefault( RimSimWellInViewCollection::PRODUCTION_RATES );
}
} // namespace caf
@ -1104,6 +1111,18 @@ RimWellDiskConfig RimSimWellInViewCollection::getActiveWellDiskConfig() const
wellDiskConfig.setGasProperty( "WGIT" );
wellDiskConfig.setWaterProperty( "WWIT" );
}
else if ( configType == PRODUCTION_INJECTION_RATES )
{
wellDiskConfig.setOilProperty( "WOPR", "" );
wellDiskConfig.setGasProperty( "WGPR", "WGIR" );
wellDiskConfig.setWaterProperty( "WWPR", "WWIR" );
}
else if ( configType == CUMULATIVE_PRODUCTION_INJECTION_RATES )
{
wellDiskConfig.setOilProperty( "WOPT", "" );
wellDiskConfig.setGasProperty( "WGPT", "WGIT" );
wellDiskConfig.setWaterProperty( "WWPT", "WWIT" );
}
}
else
{

View File

@ -105,7 +105,9 @@ public:
PRODUCTION_RATES,
INJECTION_RATES,
CUMULATIVE_PRODUCTION_RATES,
CUMULATIVE_INJECTION_RATES
CUMULATIVE_INJECTION_RATES,
PRODUCTION_INJECTION_RATES,
CUMULATIVE_PRODUCTION_INJECTION_RATES
};
typedef caf::AppEnum<RimSimWellInViewCollection::WellPipeColors> WellPipeColorsEnum;

View File

@ -23,6 +23,7 @@
//--------------------------------------------------------------------------------------------------
RimWellDiskConfig::RimWellDiskConfig()
: m_isSingleProperty( false )
, m_isCombinedProductionAndInjection( false )
, m_summaryCase( nullptr )
{
}
@ -64,16 +65,24 @@ void RimWellDiskConfig::setSingleProperty( const std::string& singleProperty )
//--------------------------------------------------------------------------------------------------
void RimWellDiskConfig::setOilProperty( const std::string& oilProperty )
{
m_isSingleProperty = false;
m_oilProperty = oilProperty;
m_isSingleProperty = false;
m_isCombinedProductionAndInjection = false;
m_oilProperty = oilProperty;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RimWellDiskConfig::getOilProperty() const
std::string RimWellDiskConfig::getOilProperty( bool isInjector ) const
{
return m_oilProperty;
if ( m_isCombinedProductionAndInjection && isInjector )
{
return m_oilPropertyInjector;
}
else
{
return m_oilProperty;
}
}
//--------------------------------------------------------------------------------------------------
@ -81,16 +90,24 @@ std::string RimWellDiskConfig::getOilProperty() const
//--------------------------------------------------------------------------------------------------
void RimWellDiskConfig::setGasProperty( const std::string& gasProperty )
{
m_isSingleProperty = false;
m_gasProperty = gasProperty;
m_isSingleProperty = false;
m_isCombinedProductionAndInjection = false;
m_gasProperty = gasProperty;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RimWellDiskConfig::getGasProperty() const
std::string RimWellDiskConfig::getGasProperty( bool isInjector ) const
{
return m_gasProperty;
if ( m_isCombinedProductionAndInjection && isInjector )
{
return m_gasPropertyInjector;
}
else
{
return m_gasProperty;
}
}
//--------------------------------------------------------------------------------------------------
@ -98,16 +115,57 @@ std::string RimWellDiskConfig::getGasProperty() const
//--------------------------------------------------------------------------------------------------
void RimWellDiskConfig::setWaterProperty( const std::string& waterProperty )
{
m_isSingleProperty = false;
m_waterProperty = waterProperty;
m_isSingleProperty = false;
m_isCombinedProductionAndInjection = false;
m_waterProperty = waterProperty;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RimWellDiskConfig::getWaterProperty() const
std::string RimWellDiskConfig::getWaterProperty( bool isInjector ) const
{
return m_waterProperty;
if ( m_isCombinedProductionAndInjection && isInjector )
{
return m_waterPropertyInjector;
}
else
{
return m_waterProperty;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellDiskConfig::setOilProperty( const std::string& oilPropertyProducer, const std::string& oilPropertyInjector )
{
m_isCombinedProductionAndInjection = true;
m_isSingleProperty = false;
m_oilProperty = oilPropertyProducer;
m_oilPropertyInjector = oilPropertyInjector;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellDiskConfig::setGasProperty( const std::string& gasPropertyProducer, const std::string& gasPropertyInjector )
{
m_isCombinedProductionAndInjection = true;
m_isSingleProperty = false;
m_gasProperty = gasPropertyProducer;
m_gasPropertyInjector = gasPropertyInjector;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellDiskConfig::setWaterProperty( const std::string& waterPropertyProducer, const std::string& waterPropertyInjector )
{
m_isCombinedProductionAndInjection = true;
m_isSingleProperty = false;
m_waterProperty = waterPropertyProducer;
m_waterPropertyInjector = waterPropertyInjector;
}
//--------------------------------------------------------------------------------------------------

View File

@ -37,22 +37,33 @@ public:
void setSingleProperty( const std::string& singleProperty );
void setOilProperty( const std::string& oilProperty );
std::string getOilProperty() const;
std::string getOilProperty( bool isInjector ) const;
void setGasProperty( const std::string& gasProperty );
std::string getGasProperty() const;
std::string getGasProperty( bool isInjector ) const;
void setWaterProperty( const std::string& waterProperty );
std::string getWaterProperty() const;
std::string getWaterProperty( bool isInjector ) const;
void setOilProperty( const std::string& oilPropertyProducer, const std::string& oilPropertyInjector );
void setGasProperty( const std::string& gasPropertyProducer, const std::string& gasPropertyInjector );
void setWaterProperty( const std::string& waterPropertyProducer, const std::string& waterPropertyInjector );
RimSummaryCase* sourceCase() const;
void setSourceCase( RimSummaryCase* summaryCase );
private:
bool m_isSingleProperty;
std::string m_singleProperty;
std::string m_oilProperty;
std::string m_gasProperty;
std::string m_waterProperty;
bool m_isSingleProperty;
std::string m_singleProperty;
bool m_isCombinedProductionAndInjection;
std::string m_oilProperty;
std::string m_gasProperty;
std::string m_waterProperty;
std::string m_oilPropertyInjector;
std::string m_gasPropertyInjector;
std::string m_waterPropertyInjector;
RimSummaryCase* m_summaryCase;
};