mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1891 StimPlan : Add support for "Conductivity-propped"
This commit is contained in:
parent
db233a970f
commit
1ec9e72ce2
@ -140,18 +140,12 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||
{
|
||||
RimStimPlanFractureTemplate* fracTemplateStimPlan = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
|
||||
bool conductivityInFile = false;
|
||||
for (auto parameterUnit : fracTemplateStimPlan->resultNamesWithUnit())
|
||||
{
|
||||
if (parameterUnit.first == "CONDUCTIVITY") conductivityInFile = true;
|
||||
}
|
||||
if (!conductivityInFile)
|
||||
if (!fracTemplateStimPlan->hasConductivity())
|
||||
{
|
||||
RiaLogging::error("Trying to export completion data for stimPlan fracture without conductivity data for " + fracture->name());
|
||||
RiaLogging::error("No transmissibilities will be calculated for " + fracture->name());
|
||||
|
||||
continue;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
{
|
||||
//first option: Width
|
||||
// first option: Width
|
||||
for (std::pair<QString, QString> property : resultNamesWithUnit())
|
||||
{
|
||||
if (property.first == "WIDTH")
|
||||
@ -226,16 +226,15 @@ bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//if width not found, use conductivity
|
||||
for (std::pair<QString, QString> property : resultNamesWithUnit())
|
||||
|
||||
// if width not found, use conductivity
|
||||
if (hasConductivity())
|
||||
{
|
||||
if (property.first == "CONDUCTIVITY")
|
||||
{
|
||||
m_borderPolygonResultName = property.first;
|
||||
return true;
|
||||
}
|
||||
m_borderPolygonResultName = m_stimPlanFractureDefinitionData->conductivityResultName();
|
||||
return true;
|
||||
}
|
||||
//else: Set to first property
|
||||
|
||||
// else: Set to first property
|
||||
if (resultNamesWithUnit().size() > 0)
|
||||
{
|
||||
m_borderPolygonResultName = resultNamesWithUnit()[0].first;
|
||||
@ -391,6 +390,20 @@ std::vector<double> RimStimPlanFractureTemplate::fractureGridResults(const QStri
|
||||
return m_stimPlanFractureDefinitionData->fractureGridResults(resultName, unitName, timeStepIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::hasConductivity() const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull() &&
|
||||
!m_stimPlanFractureDefinitionData->conductivityResultName().isEmpty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
void computeMinMax(const QString& resultName, const QString& unitName, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
||||
std::vector<std::vector<double>> resultValues(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
||||
std::vector<double> fractureGridResults(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
||||
bool hasConductivity() const;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
@ -156,7 +156,7 @@ cvf::ref<RigFractureGrid> RigStimPlanFractureDefinition::createFractureGrid(int
|
||||
QString condUnit;
|
||||
if ( fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC ) condUnit = "md-m";
|
||||
if ( fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD ) condUnit = "md-ft";
|
||||
std::vector<std::vector<double>> conductivityValuesAtTimeStep = this->getMirroredDataAtTimeIndex("CONDUCTIVITY",
|
||||
std::vector<std::vector<double>> conductivityValuesAtTimeStep = this->getMirroredDataAtTimeIndex(this->conductivityResultName(),
|
||||
condUnit,
|
||||
m_activeTimeStepIndex);
|
||||
|
||||
@ -524,7 +524,7 @@ size_t RigStimPlanFractureDefinition::resultIndex(const QString& resultName, con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStimPlanFractureDefinition::setDataAtTimeValue(QString resultName, QString unit, std::vector<std::vector<double>> data, double timeStepValue, double condScalingFactor)
|
||||
{
|
||||
if (resultName == "CONDUCTIVITY")
|
||||
if (resultName == conductivityResultName())
|
||||
{
|
||||
for (std::vector<double> &dataAtDepth : data)
|
||||
{
|
||||
@ -619,3 +619,31 @@ void RigStimPlanFractureDefinition::computeMinMax(const QString& resultName, con
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RigStimPlanFractureDefinition::conductivityResultName() const
|
||||
{
|
||||
static const QString conductivity_text("CONDUCTIVITY");
|
||||
static const QString conductivity_propped_text("Conductivity-Propped");
|
||||
|
||||
// By intention we have two for loops here, as "CONDUCTIVITY" has priority over "Conductivity-Propped"
|
||||
for (auto stimPlanResult : m_stimPlanResults)
|
||||
{
|
||||
if (stimPlanResult.resultName.compare(conductivity_text, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return stimPlanResult.resultName;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto stimPlanResult : m_stimPlanResults)
|
||||
{
|
||||
if (stimPlanResult.resultName.compare(conductivity_propped_text, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return stimPlanResult.resultName;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,8 @@ public:
|
||||
const QString& unitName,
|
||||
size_t timeStepIndex) const;
|
||||
void computeMinMax(const QString& resultName, const QString& unit, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
||||
|
||||
QString conductivityResultName() const;
|
||||
|
||||
// Setup
|
||||
void reorderYgridToDepths();
|
||||
|
Loading…
Reference in New Issue
Block a user