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:
@@ -140,18 +140,12 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
|||||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||||
{
|
{
|
||||||
RimStimPlanFractureTemplate* fracTemplateStimPlan = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
|
RimStimPlanFractureTemplate* fracTemplateStimPlan = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
|
||||||
bool conductivityInFile = false;
|
if (!fracTemplateStimPlan->hasConductivity())
|
||||||
for (auto parameterUnit : fracTemplateStimPlan->resultNamesWithUnit())
|
|
||||||
{
|
|
||||||
if (parameterUnit.first == "CONDUCTIVITY") conductivityInFile = true;
|
|
||||||
}
|
|
||||||
if (!conductivityInFile)
|
|
||||||
{
|
{
|
||||||
RiaLogging::error("Trying to export completion data for stimPlan fracture without conductivity data for " + fracture->name());
|
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());
|
RiaLogging::error("No transmissibilities will be calculated for " + fracture->name());
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,15 +226,14 @@ bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if width not found, use conductivity
|
// if width not found, use conductivity
|
||||||
for (std::pair<QString, QString> property : resultNamesWithUnit())
|
if (hasConductivity())
|
||||||
{
|
{
|
||||||
if (property.first == "CONDUCTIVITY")
|
m_borderPolygonResultName = m_stimPlanFractureDefinitionData->conductivityResultName();
|
||||||
{
|
|
||||||
m_borderPolygonResultName = property.first;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// else: Set to first property
|
// else: Set to first property
|
||||||
if (resultNamesWithUnit().size() > 0)
|
if (resultNamesWithUnit().size() > 0)
|
||||||
{
|
{
|
||||||
@@ -391,6 +390,20 @@ std::vector<double> RimStimPlanFractureTemplate::fractureGridResults(const QStri
|
|||||||
return m_stimPlanFractureDefinitionData->fractureGridResults(resultName, unitName, timeStepIndex);
|
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;
|
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<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;
|
std::vector<double> fractureGridResults(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
||||||
|
bool hasConductivity() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
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;
|
QString condUnit;
|
||||||
if ( fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC ) condUnit = "md-m";
|
if ( fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC ) condUnit = "md-m";
|
||||||
if ( fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD ) condUnit = "md-ft";
|
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,
|
condUnit,
|
||||||
m_activeTimeStepIndex);
|
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)
|
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)
|
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 "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ public:
|
|||||||
size_t timeStepIndex) const;
|
size_t timeStepIndex) const;
|
||||||
void computeMinMax(const QString& resultName, const QString& unit, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
void computeMinMax(const QString& resultName, const QString& unit, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
||||||
|
|
||||||
|
QString conductivityResultName() const;
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
void reorderYgridToDepths();
|
void reorderYgridToDepths();
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user