mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6315 Remove biot factor corrections for calculated stresses.
This commit is contained in:
parent
26c863e310
commit
e1ba491a9a
@ -70,24 +70,10 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalSE::calculate( int
|
||||
resVarAddr.componentName ) );
|
||||
frameCountProgress.incrementProgress();
|
||||
frameCountProgress.setNextProgressIncrement( m_resultCollection->frameCount() );
|
||||
RigFemScalarResultFrames* srcPORDataFrames =
|
||||
m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( RIG_NODAL, "POR-Bar", "" ) );
|
||||
RigFemScalarResultFrames* dstDataFrames = m_resultCollection->createScalarResult( partIndex, resVarAddr );
|
||||
|
||||
frameCountProgress.incrementProgress();
|
||||
|
||||
// Biot porelastic coeffisient (alpha)
|
||||
RigFemScalarResultFrames* biotCoefficient = nullptr;
|
||||
if ( !m_resultCollection->biotResultAddress().isEmpty() )
|
||||
{
|
||||
biotCoefficient =
|
||||
m_resultCollection
|
||||
->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( RIG_ELEMENT,
|
||||
m_resultCollection->biotResultAddress().toStdString(),
|
||||
"" ) );
|
||||
}
|
||||
|
||||
const RigFemPart* femPart = m_resultCollection->parts()->part( partIndex );
|
||||
float inf = std::numeric_limits<float>::infinity();
|
||||
|
||||
@ -100,21 +86,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalSE::calculate( int
|
||||
size_t valCount = srcSFrameData.size();
|
||||
dstFrameData.resize( valCount );
|
||||
|
||||
const std::vector<float>& initialPORFrameData = srcPORDataFrames->frameData( 0 );
|
||||
|
||||
int elementCount = femPart->elementCount();
|
||||
|
||||
std::vector<float> biotData;
|
||||
if ( biotCoefficient )
|
||||
{
|
||||
biotData = biotCoefficient->frameData( fIdx );
|
||||
if ( !m_resultCollection->isValidBiotData( biotData, elementCount ) )
|
||||
{
|
||||
m_resultCollection->deleteResult( resVarAddr );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma omp parallel for
|
||||
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
||||
{
|
||||
@ -129,37 +102,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalSE::calculate( int
|
||||
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
||||
if ( elmNodResIdx < srcSFrameData.size() )
|
||||
{
|
||||
double SE_abacus = -srcSFrameData[elmNodResIdx];
|
||||
if ( fIdx == 0 )
|
||||
{
|
||||
// Geostatic step: biot coefficient == 1.0
|
||||
dstFrameData[elmNodResIdx] = SE_abacus;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use biot coefficient for all other (not Geostatic) timesteps
|
||||
double biotCoefficient = 1.0;
|
||||
if ( biotData.empty() )
|
||||
{
|
||||
biotCoefficient = m_resultCollection->biotFixedFactor();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use coefficient from element property table
|
||||
biotCoefficient = biotData[elmIdx];
|
||||
}
|
||||
|
||||
// SE = St - alpha * porePressure - (1 - alpha) * initialPorePressure
|
||||
// ST = SE_abaqus + alpha * porePressure
|
||||
// Can be simplified:
|
||||
// SE = SE_abaqus - (1-alpha) * initialPorePressure
|
||||
// SE_abaqus is called S-Bar
|
||||
int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
|
||||
double initialPorePressure = initialPORFrameData[nodeIdx];
|
||||
if ( initialPorePressure == inf ) initialPorePressure = 0.0f;
|
||||
|
||||
dstFrameData[elmNodResIdx] = SE_abacus - ( 1.0 - biotCoefficient ) * initialPorePressure;
|
||||
}
|
||||
// SE from abacus in opposite direction
|
||||
dstFrameData[elmNodResIdx] = -srcSFrameData[elmNodResIdx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,18 +74,6 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalST::calculate( int
|
||||
RigFemScalarResultFrames* srcPORDataFrames =
|
||||
m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( RIG_NODAL, "POR-Bar", "" ) );
|
||||
|
||||
// Biot porelastic coeffisient (alpha)
|
||||
RigFemScalarResultFrames* biotCoefficient = nullptr;
|
||||
if ( !m_resultCollection->biotResultAddress().isEmpty() )
|
||||
{
|
||||
biotCoefficient =
|
||||
m_resultCollection
|
||||
->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( RIG_ELEMENT,
|
||||
m_resultCollection->biotResultAddress().toStdString(),
|
||||
"" ) );
|
||||
}
|
||||
|
||||
RigFemScalarResultFrames* dstDataFrames = m_resultCollection->createScalarResult( partIndex, resVarAddr );
|
||||
const RigFemPart* femPart = m_resultCollection->parts()->part( partIndex );
|
||||
int frameCount = srcSDataFrames->frameCount();
|
||||
@ -101,17 +89,6 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalST::calculate( int
|
||||
|
||||
int elementCount = femPart->elementCount();
|
||||
|
||||
std::vector<float> biotData;
|
||||
if ( biotCoefficient )
|
||||
{
|
||||
biotData = biotCoefficient->frameData( fIdx );
|
||||
if ( !m_resultCollection->isValidBiotData( biotData, elementCount ) )
|
||||
{
|
||||
m_resultCollection->deleteResult( resVarAddr );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<float>& dstFrameData = dstDataFrames->frameData( fIdx );
|
||||
|
||||
size_t valCount = srcSFrameData.size();
|
||||
@ -136,31 +113,10 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalST::calculate( int
|
||||
float por = srcPORFrameData[nodeIdx];
|
||||
if ( por == inf ) por = 0.0f;
|
||||
|
||||
// ST = SE_abacus + alpha * porePressure
|
||||
// where alpha is biot coefficient, and porePressure is POR-Bar.
|
||||
|
||||
double SE_abacus = -srcSFrameData[elmNodResIdx];
|
||||
if ( fIdx == 0 )
|
||||
{
|
||||
// Geostatic step: biot coefficient == 1.0
|
||||
dstFrameData[elmNodResIdx] = SE_abacus + por;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use biot coefficient for all other (not Geostatic) timesteps
|
||||
double biotCoefficient = 1.0;
|
||||
if ( biotData.empty() )
|
||||
{
|
||||
biotCoefficient = m_resultCollection->biotFixedFactor();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use coefficient from element property table
|
||||
biotCoefficient = biotData[elmIdx];
|
||||
}
|
||||
|
||||
dstFrameData[elmNodResIdx] = SE_abacus + biotCoefficient * por;
|
||||
}
|
||||
// ST = SE_abacus + porePressure
|
||||
// porePressure is POR-Bar.
|
||||
double SE_abacus = -srcSFrameData[elmNodResIdx];
|
||||
dstFrameData[elmNodResIdx] = SE_abacus + por;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -342,35 +342,8 @@ void RigFemPartResultsCollection::setBiotCoefficientParameters( double biotFixed
|
||||
m_biotResultAddress = biotResultAddress;
|
||||
|
||||
// Invalidate all results which depends on biot coefficient (directly or indirectly)
|
||||
// Shear results are independent of pore pressure and biot coefficient.
|
||||
bool includeShear = false;
|
||||
std::vector<std::string> componentNames = getStressComponentNames( includeShear );
|
||||
componentNames.push_back( "S1inc" );
|
||||
componentNames.push_back( "S1azi" );
|
||||
componentNames.push_back( "S2inc" );
|
||||
componentNames.push_back( "S2azi" );
|
||||
componentNames.push_back( "S3inc" );
|
||||
componentNames.push_back( "S3azi" );
|
||||
componentNames.push_back( "SM" );
|
||||
|
||||
for ( auto elementType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
{
|
||||
for ( auto fieldName : {"SE", "ST"} )
|
||||
{
|
||||
for ( auto componentName : componentNames )
|
||||
{
|
||||
deleteResult(
|
||||
RigFemResultAddress( elementType, fieldName, componentName, RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
const std::vector<std::string> stressAnisotropyComponentNames = getStressAnisotropyComponentNames();
|
||||
for ( auto componentName : stressAnisotropyComponentNames )
|
||||
{
|
||||
deleteResult(
|
||||
RigFemResultAddress( elementType, fieldName, componentName, RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
}
|
||||
|
||||
deleteResult(
|
||||
RigFemResultAddress( elementType, "COMPRESSIBILITY", "PORE", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
deleteResult(
|
||||
@ -379,16 +352,6 @@ void RigFemPartResultsCollection::setBiotCoefficientParameters( double biotFixed
|
||||
"COMPRESSIBILITY",
|
||||
"VERTICAL-RATIO",
|
||||
RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
|
||||
// SE only: depends on SE.S1 and SE.S3
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "SFI", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "DSM", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
|
||||
// SE only: depends on SE.DSM
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "FOS", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
|
||||
// ST only: depends on ST.S1 and ST.S3
|
||||
deleteResult( RigFemResultAddress( elementType, "ST", "Q", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
// Depends on COMRESSIBILITY.PORE which depends on biot coefficient
|
||||
@ -397,28 +360,6 @@ void RigFemPartResultsCollection::setBiotCoefficientParameters( double biotFixed
|
||||
{
|
||||
deleteResult( result );
|
||||
}
|
||||
|
||||
for ( auto fieldName : {"SE", "ST"} )
|
||||
{
|
||||
// Surface aligned stress
|
||||
for ( auto componentName : {"SN", "TP", "TPinc", "TPH", "TPQV", "FAULTMOB", "PCRIT"} )
|
||||
{
|
||||
deleteResult( RigFemResultAddress( RIG_ELEMENT_NODAL_FACE,
|
||||
fieldName,
|
||||
componentName,
|
||||
RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
// Stress gradient components
|
||||
const std::vector<std::string> stressGradientComponentNames = getStressGradientComponentNames( includeShear );
|
||||
for ( auto componentName : stressGradientComponentNames )
|
||||
{
|
||||
deleteResult( RigFemResultAddress( RIG_DIFFERENTIALS,
|
||||
fieldName,
|
||||
componentName,
|
||||
RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -1001,5 +1001,5 @@ void RimGeoMechResultDefinition::updateLegendTextAndRanges( RimRegularLegendConf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGeoMechResultDefinition::isBiotCoefficientDependent() const
|
||||
{
|
||||
return ( this->resultFieldName() == "SE" || this->resultFieldName() == "ST" );
|
||||
return ( this->resultFieldName() == "COMPRESSIBILITY" || this->resultFieldName() == "PORO-PERM" );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user