mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#912 Added Volumentric strain (EV)
This commit is contained in:
parent
ad97527bbd
commit
89cb050223
@ -222,6 +222,8 @@ std::map<std::string, std::vector<std::string> > RigFemPartResultsCollection::sc
|
||||
fieldCompNames["NE"].push_back("E13");
|
||||
fieldCompNames["NE"].push_back("E23");
|
||||
|
||||
fieldCompNames["EV"];
|
||||
|
||||
}
|
||||
else if (resPos == RIG_INTEGRATION_POINT)
|
||||
{
|
||||
@ -265,6 +267,7 @@ std::map<std::string, std::vector<std::string> > RigFemPartResultsCollection::sc
|
||||
fieldCompNames["NE"].push_back("E13");
|
||||
fieldCompNames["NE"].push_back("E23");
|
||||
|
||||
fieldCompNames["EV"];
|
||||
}
|
||||
}
|
||||
|
||||
@ -462,6 +465,45 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDeviatoricStress
|
||||
return dstDataFrames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateVolumetricStrain(int partIndex, const RigFemResultAddress& resVarAddr)
|
||||
{
|
||||
RigFemScalarResultFrames * ea11 = nullptr;
|
||||
RigFemScalarResultFrames * ea22 = nullptr;
|
||||
RigFemScalarResultFrames * ea33 = nullptr;
|
||||
|
||||
CVF_ASSERT(resVarAddr.fieldName == "EV");
|
||||
|
||||
{
|
||||
ea11 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "NE", "E11"));
|
||||
ea22 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "NE", "E22"));
|
||||
ea33 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "NE", "E33"));
|
||||
}
|
||||
|
||||
RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr);
|
||||
|
||||
int frameCount = ea11->frameCount();
|
||||
for(int fIdx = 0; fIdx < frameCount; ++fIdx)
|
||||
{
|
||||
const std::vector<float>& ea11Data = ea11->frameData(fIdx);
|
||||
const std::vector<float>& ea22Data = ea22->frameData(fIdx);
|
||||
const std::vector<float>& ea33Data = ea33->frameData(fIdx);
|
||||
|
||||
std::vector<float>& dstFrameData = dstDataFrames->frameData(fIdx);
|
||||
size_t valCount = ea11Data.size();
|
||||
dstFrameData.resize(valCount);
|
||||
|
||||
for(size_t vIdx = 0; vIdx < valCount; ++vIdx)
|
||||
{
|
||||
dstFrameData[vIdx] = (ea11Data[vIdx] + ea22Data[vIdx] + ea33Data[vIdx]);
|
||||
}
|
||||
}
|
||||
|
||||
return dstDataFrames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -472,6 +514,11 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
|
||||
return calculateTimeLapseResult(partIndex, resVarAddr);
|
||||
}
|
||||
|
||||
if(resVarAddr.fieldName == "EV")
|
||||
{
|
||||
return calculateVolumetricStrain(partIndex, resVarAddr);
|
||||
}
|
||||
|
||||
if(resVarAddr.fieldName == "Q" )
|
||||
{
|
||||
return calculateDeviatoricStress(partIndex, resVarAddr);
|
||||
|
@ -75,6 +75,7 @@ private:
|
||||
RigFemScalarResultFrames* calculateTimeLapseResult(int partIndex, const RigFemResultAddress& resVarAddr);
|
||||
RigFemScalarResultFrames* calculateMeanStressSMSEM(int partIndex, const RigFemResultAddress& resVarAddr);
|
||||
RigFemScalarResultFrames* calculateDeviatoricStress(int partIndex, const RigFemResultAddress& resVarAddr);
|
||||
RigFemScalarResultFrames* calculateVolumetricStrain(int partIndex, const RigFemResultAddress& resVarAddr);
|
||||
|
||||
cvf::Collection<RigFemPartResults> m_femPartResults;
|
||||
cvf::ref<RifGeoMechReaderInterface> m_readerInterface;
|
||||
|
Loading…
Reference in New Issue
Block a user