mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1617 Adding conductivity scaling factor to StimPlan fracture templates, and scaling the conductivity values in file with this value.
This commit is contained in:
parent
bf3636a9df
commit
50eb8b7225
@ -30,7 +30,9 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigStimPlanFractureDefinition> RifStimPlanXmlReader::readStimPlanXMLFile(const QString& stimPlanFileName, QString * errorMessage)
|
||||
cvf::ref<RigStimPlanFractureDefinition> RifStimPlanXmlReader::readStimPlanXMLFile(const QString& stimPlanFileName,
|
||||
double conductivityScalingFactor,
|
||||
QString * errorMessage)
|
||||
{
|
||||
RiaLogging::info(QString("Starting to open StimPlan XML file: '%1'").arg(stimPlanFileName));
|
||||
RiaEclipseUnitTools::UnitSystemType unitSystem = RiaEclipseUnitTools::UNITS_UNKNOWN;
|
||||
@ -115,7 +117,7 @@ cvf::ref<RigStimPlanFractureDefinition> RifStimPlanXmlReader::readStimPlanXMLFil
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
stimPlanFileData->setDataAtTimeValue(parameter, unit, propertyValuesAtTimestep, timeStepValue);
|
||||
stimPlanFileData->setDataAtTimeValue(parameter, unit, propertyValuesAtTimestep, timeStepValue, conductivityScalingFactor);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class QXmlStreamReader;
|
||||
class RifStimPlanXmlReader
|
||||
{
|
||||
public:
|
||||
static cvf::ref<RigStimPlanFractureDefinition> readStimPlanXMLFile(const QString& stimPlanFileName, QString * errorMessage);
|
||||
static cvf::ref<RigStimPlanFractureDefinition> readStimPlanXMLFile(const QString& stimPlanFileName, double conductivityScalingFactor, QString * errorMessage);
|
||||
|
||||
private:
|
||||
static size_t readStimplanGridAndTimesteps(QXmlStreamReader &xmlStream, RigStimPlanFractureDefinition* stimPlanFileData, RiaEclipseUnitTools::UnitSystemType& unit);
|
||||
|
@ -72,6 +72,7 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate(void)
|
||||
|
||||
CAF_PDM_InitField(&m_activeTimeStepIndex, "activeTimeStepIndex", 0, "Active TimeStep Index", "", "", "");
|
||||
CAF_PDM_InitField(&m_showStimPlanMesh, "showStimPlanMesh", true, "Show StimPlan Mesh", "", "", "");
|
||||
CAF_PDM_InitField(&m_conductivityScalingFactor, "FractureConductivityFactor", 1.0, "Conductivity Scaling Factor", "", "The conductivity values read from file will be scaled with this parameters", "");
|
||||
|
||||
m_fractureGrid = new RigFractureGrid();
|
||||
}
|
||||
@ -121,8 +122,17 @@ void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* ch
|
||||
}
|
||||
|
||||
|
||||
if (&m_wellPathDepthAtFracture == changedField || &m_borderPolygonResultName == changedField || &m_activeTimeStepIndex == changedField || &m_showStimPlanMesh == changedField)
|
||||
if (&m_wellPathDepthAtFracture == changedField
|
||||
|| &m_borderPolygonResultName == changedField
|
||||
|| &m_activeTimeStepIndex == changedField
|
||||
|| &m_showStimPlanMesh == changedField
|
||||
|| &m_conductivityScalingFactor == changedField)
|
||||
{
|
||||
if (&m_conductivityScalingFactor == changedField)
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
@ -240,7 +250,7 @@ bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
{
|
||||
QString errorMessage;
|
||||
m_stimPlanFractureDefinitionData = RifStimPlanXmlReader::readStimPlanXMLFile( m_stimPlanFileName(), &errorMessage);
|
||||
m_stimPlanFractureDefinitionData = RifStimPlanXmlReader::readStimPlanXMLFile( m_stimPlanFileName(), m_conductivityScalingFactor(), &errorMessage);
|
||||
if (errorMessage.size() > 0) RiaLogging::error(errorMessage);
|
||||
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
@ -463,6 +473,7 @@ void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pd
|
||||
m_fractureContainment()->defineUiOrdering(uiConfigName, *trGr);
|
||||
|
||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||
propertyGroup->add(&m_conductivityScalingFactor);
|
||||
propertyGroup->add(&conductivityType);
|
||||
propertyGroup->add(&skinFactor);
|
||||
propertyGroup->add(&perforationLength);
|
||||
|
@ -103,6 +103,7 @@ private:
|
||||
|
||||
caf::PdmField<QString> m_stimPlanFileName;
|
||||
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
||||
caf::PdmField<double> m_conductivityScalingFactor;
|
||||
cvf::ref<RigFractureGrid> m_fractureGrid;
|
||||
|
||||
};
|
||||
|
@ -517,8 +517,20 @@ size_t RigStimPlanFractureDefinition::resultIndex(const QString& resultName, con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStimPlanFractureDefinition::setDataAtTimeValue(QString resultName, QString unit, std::vector<std::vector<double>> data, double timeStepValue)
|
||||
void RigStimPlanFractureDefinition::setDataAtTimeValue(QString resultName, QString unit, std::vector<std::vector<double>> data, double timeStepValue, double condScalingFactor)
|
||||
{
|
||||
if (resultName == "CONDUCTIVITY")
|
||||
{
|
||||
for (std::vector<double> &dataAtDepth : data)
|
||||
{
|
||||
for (double &dataValue : dataAtDepth)
|
||||
{
|
||||
dataValue = dataValue * condScalingFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
size_t resIndex = resultIndex(resultName, unit);
|
||||
|
||||
if (resIndex != cvf::UNDEFINED_SIZE_T)
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
std::vector<std::pair<QString, QString> > getStimPlanPropertyNamesUnits() const;
|
||||
bool numberOfParameterValuesOK(std::vector<std::vector<double>> propertyValuesAtTimestep);
|
||||
size_t totalNumberTimeSteps();
|
||||
void setDataAtTimeValue(QString resultName, QString unit, std::vector<std::vector<double>> data, double timeStepValue);
|
||||
void setDataAtTimeValue(QString resultName, QString unit, std::vector<std::vector<double>> data, double timeStepValue, double condScalingFactor);
|
||||
const std::vector<std::vector<double>>& getDataAtTimeIndex(const QString& resultName, const QString& unit, size_t timeStepIndex) const;
|
||||
std::vector<double> fractureGridResults(const QString& resultName,
|
||||
const QString& unitName,
|
||||
|
Loading…
Reference in New Issue
Block a user