mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7293 Wrong unit in legend for stress directions and stress anisotropy
This commit is contained in:
parent
751ebf7eb6
commit
acc9afdb71
@ -48,9 +48,7 @@ RigFemPartResultCalculatorStressAnisotropy::~RigFemPartResultCalculatorStressAni
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigFemPartResultCalculatorStressAnisotropy::isMatching( const RigFemResultAddress& resVarAddr ) const
|
bool RigFemPartResultCalculatorStressAnisotropy::isMatching( const RigFemResultAddress& resVarAddr ) const
|
||||||
{
|
{
|
||||||
return ( ( ( resVarAddr.fieldName == "ST" || resVarAddr.fieldName == "SE" ) &&
|
return isAnisotropyResult( resVarAddr );
|
||||||
( resVarAddr.componentName == "SA12" || resVarAddr.componentName == "SA13" ||
|
|
||||||
resVarAddr.componentName == "SA23" ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -248,3 +246,13 @@ RigFemScalarResultFrames*
|
|||||||
RigFemScalarResultFrames* requestedStress = m_resultCollection->findOrLoadScalarResult( partIndex, resVarAddr );
|
RigFemScalarResultFrames* requestedStress = m_resultCollection->findOrLoadScalarResult( partIndex, resVarAddr );
|
||||||
return requestedStress;
|
return requestedStress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RigFemPartResultCalculatorStressAnisotropy::isAnisotropyResult( const RigFemResultAddress& resVarAddr )
|
||||||
|
{
|
||||||
|
return ( ( ( resVarAddr.fieldName == "ST" || resVarAddr.fieldName == "SE" ) &&
|
||||||
|
( resVarAddr.componentName == "SA12" || resVarAddr.componentName == "SA13" ||
|
||||||
|
resVarAddr.componentName == "SA23" ) ) );
|
||||||
|
}
|
||||||
|
@ -35,4 +35,6 @@ public:
|
|||||||
bool isMatching( const RigFemResultAddress& resVarAddr ) const override;
|
bool isMatching( const RigFemResultAddress& resVarAddr ) const override;
|
||||||
RigFemScalarResultFrames* calculate( int partIndex, const RigFemResultAddress& resVarAddr ) override;
|
RigFemScalarResultFrames* calculate( int partIndex, const RigFemResultAddress& resVarAddr ) override;
|
||||||
RigFemScalarResultFrames* calculateTimeLapse( int partIndex, const RigFemResultAddress& resVarAddr );
|
RigFemScalarResultFrames* calculateTimeLapse( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||||
|
|
||||||
|
static bool isAnisotropyResult( const RigFemResultAddress& resVarAddr );
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "RigFemPartCollection.h"
|
#include "RigFemPartCollection.h"
|
||||||
#include "RigFemPartGrid.h"
|
#include "RigFemPartGrid.h"
|
||||||
|
#include "RigFemPartResultCalculatorStressAnisotropy.h"
|
||||||
#include "RigFemPartResultsCollection.h"
|
#include "RigFemPartResultsCollection.h"
|
||||||
#include "RigFemResultAddress.h"
|
#include "RigFemResultAddress.h"
|
||||||
#include "RigFormationNames.h"
|
#include "RigFormationNames.h"
|
||||||
@ -819,9 +820,22 @@ QString RimGeoMechResultDefinition::resultVariableName() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimGeoMechResultDefinition::currentResultUnits() const
|
QString RimGeoMechResultDefinition::currentResultUnits() const
|
||||||
{
|
{
|
||||||
|
RigFemResultAddress rigFemResultAddress = this->resultAddress();
|
||||||
|
|
||||||
|
if ( RigFemPartResultCalculatorStressAnisotropy::isAnisotropyResult( rigFemResultAddress ) )
|
||||||
|
{
|
||||||
|
return RiaWellLogUnitTools<double>::noUnitString();
|
||||||
|
}
|
||||||
|
|
||||||
if ( this->resultFieldName() == "SE" || this->resultFieldName() == "ST" || this->resultFieldName() == "POR-Bar" ||
|
if ( this->resultFieldName() == "SE" || this->resultFieldName() == "ST" || this->resultFieldName() == "POR-Bar" ||
|
||||||
this->resultFieldName() == "SM" || this->resultFieldName() == "SEM" || this->resultFieldName() == "Q" )
|
this->resultFieldName() == "SM" || this->resultFieldName() == "SEM" || this->resultFieldName() == "Q" )
|
||||||
{
|
{
|
||||||
|
auto componentName = this->resultComponentName();
|
||||||
|
if ( componentName.endsWith( "azi" ) || componentName.endsWith( "inc" ) )
|
||||||
|
{
|
||||||
|
return "Deg";
|
||||||
|
}
|
||||||
|
|
||||||
return "Bar";
|
return "Bar";
|
||||||
}
|
}
|
||||||
else if ( this->resultFieldName() == "MODULUS" )
|
else if ( this->resultFieldName() == "MODULUS" )
|
||||||
|
Loading…
Reference in New Issue
Block a user