mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Mohr circle: Use same function to calculate FOS (=1/dsm) in results collection and mohrs plot
This commit is contained in:
@@ -776,14 +776,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDSM(int partInde
|
||||
|
||||
for ( size_t vIdx = 0; vIdx < valCount; ++vIdx )
|
||||
{
|
||||
float se1 = se1Data[vIdx];
|
||||
float se3 = se3Data[vIdx];
|
||||
float pi_4 = 0.785398163397448309616f;
|
||||
float rho = 2.0f * ( atan( sqrt(( se1 + cohPrTanFricAngle)/(se3 + cohPrTanFricAngle)) ) - pi_4);
|
||||
|
||||
{
|
||||
dstFrameData[vIdx] = tan(rho)/tanFricAng;
|
||||
}
|
||||
dstFrameData[vIdx] = dsm(se1Data[vIdx], se3Data[vIdx], tanFricAng, cohPrTanFricAngle);
|
||||
}
|
||||
|
||||
frameCountProgress.incrementProgress();
|
||||
@@ -2049,6 +2042,24 @@ int RigFemPartResultsCollection::frameCount()
|
||||
return static_cast<int>(stepNames().size());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
float RigFemPartResultsCollection::dsm(float p1, float p3, float tanFricAng, float cohPrTanFricAngle)
|
||||
{
|
||||
if (p1 == HUGE_VAL || p3 == HUGE_VAL)
|
||||
{
|
||||
return std::nan("");
|
||||
}
|
||||
|
||||
CVF_ASSERT(p1 > p3);
|
||||
|
||||
float pi_4 = 0.785398163397448309616f;
|
||||
float rho = 2.0f * (atan(sqrt((p1 + cohPrTanFricAngle) / (p3 + cohPrTanFricAngle))) - pi_4);
|
||||
|
||||
return tan(rho) / tanFricAng;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Returns whether any of the parts actually had any of the requested results
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user