mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Result Divided by Area: Establish concept used to compute flow velocity and normalized trans (#7349)
* Geometry Tools : Add convenience functions for polygon area * #7232 Result Divided by Area: Add cell face result and show in GUI Native support for flow rate is given by mass rate (mass per time) over a cell face. Add a derived result that takes flow rate divided by cell face area to get velocity (distance per time). Add support for this concept on relevant native results, and indicate this result type in UI using a "/A" postfix * Speed up divided-by-area calculations by using openmp * Some refactoring of result data access. * Make sure NNC data is scaled correctly in vector flow viz. Co-authored-by: jonjenssen <jon@soundsoft.no>
This commit is contained in:
@@ -692,7 +692,6 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
|
||||
scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_K );
|
||||
resultInfoText->append( QString( "riMult Z : %1\n" ).arg( scalarValue ) );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiAreaNormTranResultName(),
|
||||
@@ -962,8 +961,12 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
|
||||
RigResultAccessorFactory::createFromResultDefinition( eclipseCaseData, m_gridIndex, adjustedTimeStep, eclResDef );
|
||||
if ( resultAccessor.notNull() )
|
||||
{
|
||||
double scalarValue = resultAccessor->cellFaceScalar( m_cellIndex, m_face );
|
||||
QString resultVar = eclResDef->resultVariableUiName();
|
||||
double scalarValue = resultAccessor->cellFaceScalar( m_cellIndex, m_face );
|
||||
QString resultDescriptionText = eclResDef->resultVariableUiName();
|
||||
if ( eclResDef->eclipseResultAddress().isDivideByCellFaceAreaActive() )
|
||||
{
|
||||
resultDescriptionText += "/A";
|
||||
}
|
||||
|
||||
QString resultValueText;
|
||||
if ( eclResDef->hasCategoryResult() )
|
||||
@@ -993,7 +996,7 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
|
||||
resultValueText = QString( "%1" ).arg( scalarValue );
|
||||
}
|
||||
|
||||
text = QString( "%1 : %2" ).arg( resultVar ).arg( resultValueText );
|
||||
text = QString( "%1 : %2" ).arg( resultDescriptionText ).arg( resultValueText );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user