#7655 Well Allocation Plot: Make sure all branches are computed

fix
This commit is contained in:
Magne Sjaastad 2021-05-25 16:07:41 +02:00
parent b8f7490311
commit 03917f2e1c
2 changed files with 28 additions and 6 deletions

View File

@ -74,8 +74,7 @@ RigAccWellFlowCalculator::RigAccWellFlowCalculator(
m_tracerNames.push_back( RIG_RESERVOIR_TRACER_NAME ); m_tracerNames.push_back( RIG_RESERVOIR_TRACER_NAME );
initializePipeBranchesMeasuredDepths(); initializePipeBranchesMeasuredDepths();
calculateAccumulatedFlowPrConnection( 0, 0 ); calculateFlowData();
calculateFlowPrPseudoLength( 0, 0.0 );
sortTracers(); sortTracers();
groupSmallContributions(); groupSmallContributions();
} }
@ -109,8 +108,7 @@ RigAccWellFlowCalculator::RigAccWellFlowCalculator( const std::vector<std::vecto
} }
initializePipeBranchesMeasuredDepths(); initializePipeBranchesMeasuredDepths();
calculateAccumulatedFlowPrConnection( 0, 0 ); calculateFlowData();
calculateFlowPrPseudoLength( 0, 0.0 );
if ( !m_useTotalWellPhaseRateOnly ) sortTracers(); if ( !m_useTotalWellPhaseRateOnly ) sortTracers();
} }
@ -147,8 +145,7 @@ RigAccWellFlowCalculator::RigAccWellFlowCalculator( const std::vector<cvf::Vec3d
} }
initializePipeBranchesMeasuredDepths(); initializePipeBranchesMeasuredDepths();
calculateAccumulatedFlowPrConnection( 0, 0 ); calculateFlowData();
calculateFlowPrPseudoLength( 0, 0.0 );
if ( !m_useTotalWellPhaseRateOnly ) sortTracers(); if ( !m_useTotalWellPhaseRateOnly ) sortTracers();
} }
@ -373,6 +370,30 @@ bool RigAccWellFlowCalculator::isFlowRateConsistent( double flowRate ) const
return ( flowRate >= 0.0 && m_isProducer ) || ( flowRate <= 0.0 && !m_isProducer ); return ( flowRate >= 0.0 && m_isProducer ) || ( flowRate <= 0.0 && !m_isProducer );
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigAccWellFlowCalculator::calculateFlowData()
{
for ( size_t branchIndex = 0; branchIndex < m_connectionFlowPrBranch.size(); branchIndex++ )
{
const auto branch = m_connectionFlowPrBranch[branchIndex];
if ( branch.depthValuesFromTop.empty() )
{
calculateAccumulatedFlowPrConnection( branchIndex, 0 );
}
}
for ( size_t branchIndex = 0; branchIndex < m_pseudoLengthFlowPrBranch.size(); branchIndex++ )
{
const auto branch = m_pseudoLengthFlowPrBranch[branchIndex];
if ( branch.depthValuesFromTop.empty() )
{
calculateFlowPrPseudoLength( branchIndex, 0.0 );
}
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -95,6 +95,7 @@ private:
bool isConnectionFlowConsistent( const RigWellResultPoint& wellCell ) const; bool isConnectionFlowConsistent( const RigWellResultPoint& wellCell ) const;
bool isFlowRateConsistent( double flowRate ) const; bool isFlowRateConsistent( double flowRate ) const;
void calculateFlowData();
void calculateAccumulatedFlowPrConnection( size_t branchIdx, size_t startConnectionNumberFromTop ); void calculateAccumulatedFlowPrConnection( size_t branchIdx, size_t startConnectionNumberFromTop );
void calculateFlowPrPseudoLength( size_t branchIdx, double startPseudoLengthFromTop ); void calculateFlowPrPseudoLength( size_t branchIdx, double startPseudoLengthFromTop );