mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3089 Non-Darcy along well : Minor adjustments
Show d-factor value for types not ALONG_WELL_PATH Compute well path radius used in d-factor computations Make text display more compact
This commit is contained in:
@@ -270,6 +270,7 @@ void RimFracture::ensureValidNonDarcyProperties()
|
||||
props.conductivity = m_fractureTemplate->computeKh(this);
|
||||
props.dFactor = m_fractureTemplate->computeDFactor(this);
|
||||
props.effectivePermeability = m_fractureTemplate->computeEffectivePermeability(this);
|
||||
props.eqWellRadius = m_fractureTemplate->computeWellRadiusForDFactorCalculation(this);
|
||||
|
||||
props.isDataDirty = false;
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ public:
|
||||
, conductivity(std::numeric_limits<double>::infinity())
|
||||
, effectivePermeability(std::numeric_limits<double>::infinity())
|
||||
, dFactor(std::numeric_limits<double>::infinity())
|
||||
, eqWellRadius(std::numeric_limits<double>::infinity())
|
||||
, isDataDirty(true)
|
||||
{
|
||||
}
|
||||
@@ -58,6 +59,7 @@ public:
|
||||
return isDataDirty;
|
||||
}
|
||||
|
||||
double eqWellRadius;
|
||||
double width;
|
||||
double conductivity;
|
||||
double effectivePermeability;
|
||||
|
@@ -147,13 +147,11 @@ RimFractureTemplate::RimFractureTemplate()
|
||||
CAF_PDM_InitField(&m_relativeGasDensity, "RelativeGasDensity", 0.8, "<html>Relative Gas Density (γ)</html>", "", "Relative density of gas at surface conditions with respect to air at STP", "");
|
||||
CAF_PDM_InitField(&m_gasViscosity, "GasViscosity", 0.02, "<html>Gas Viscosity (μ)</html> [cP]", "", "Gas viscosity at bottom hole pressure", "");
|
||||
|
||||
/*
|
||||
CAF_PDM_InitFieldNoDefault(&m_dFactorDisplayField, "dFactorDisplayField", "D Factor", "", "", "");
|
||||
m_dFactorDisplayField.registerGetMethod(this, &RimFractureTemplate::dFactor);
|
||||
m_dFactorDisplayField.registerGetMethod(this, &RimFractureTemplate::dFactorForTemplate);
|
||||
m_dFactorDisplayField.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleValueEditor::uiEditorTypeName());
|
||||
m_dFactorDisplayField.uiCapability()->setUiReadOnly(true);
|
||||
m_dFactorDisplayField.xmlCapability()->disableIO();
|
||||
*/
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_dFactorSummaryText, "dFactorSummaryText", "D Factor Summary", "", "", "");
|
||||
m_dFactorSummaryText.registerGetMethod(this, &RimFractureTemplate::dFactorSummary);
|
||||
@@ -355,7 +353,11 @@ void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
|
||||
nonDarcyFlowGroup->add(&m_relativeGasDensity);
|
||||
nonDarcyFlowGroup->add(&m_gasViscosity);
|
||||
// nonDarcyFlowGroup->add(&m_dFactorDisplayField);
|
||||
|
||||
if (orientationType() != ALONG_WELL_PATH)
|
||||
{
|
||||
nonDarcyFlowGroup->add(&m_dFactorDisplayField);
|
||||
}
|
||||
|
||||
{
|
||||
auto group = nonDarcyFlowGroup->addNewGroup("D Factor Details");
|
||||
@@ -498,7 +500,7 @@ void RimFractureTemplate::prepareFieldsForUiDisplay()
|
||||
|
||||
QString indentedText(const QString& text)
|
||||
{
|
||||
return QString("<pre> %1</pre>").arg(text);
|
||||
return QString(" %1\n").arg(text);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -508,36 +510,60 @@ QString RimFractureTemplate::dFactorSummary() const
|
||||
{
|
||||
QString text;
|
||||
|
||||
auto fractures = fracturesUsingThisTemplate();
|
||||
for (auto f : fractures)
|
||||
std::vector<RimFracture*> fracturesToDisplay;
|
||||
{
|
||||
auto candidateFractures = fracturesUsingThisTemplate();
|
||||
|
||||
if (orientationType() != ALONG_WELL_PATH)
|
||||
{
|
||||
// D-factor values are identical for all fractures, only show summary for the first fracture
|
||||
if (!candidateFractures.empty())
|
||||
{
|
||||
fracturesToDisplay.push_back(candidateFractures.front());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fracturesToDisplay = candidateFractures;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto f : fracturesToDisplay)
|
||||
{
|
||||
f->ensureValidNonDarcyProperties();
|
||||
|
||||
text += QString("Fracture name : %1").arg(f->name());
|
||||
if (orientationType() == ALONG_WELL_PATH)
|
||||
{
|
||||
text += QString("Fracture name : %1").arg(f->name());
|
||||
}
|
||||
|
||||
auto val = f->nonDarcyProperties().dFactor;
|
||||
text += indentedText(QString("D-factor : %1").arg(val));
|
||||
text += "<pre>";
|
||||
{
|
||||
auto val = f->nonDarcyProperties().dFactor;
|
||||
text += indentedText(QString("D-factor : %1").arg(val));
|
||||
|
||||
auto alpha = RiaDefines::nonDarcyFlowAlpha(m_fractureTemplateUnit());
|
||||
text += indentedText(QString("α : %1").arg(alpha));
|
||||
auto alpha = RiaDefines::nonDarcyFlowAlpha(m_fractureTemplateUnit());
|
||||
text += indentedText(QString("α : %1").arg(alpha));
|
||||
|
||||
auto beta = m_inertialCoefficient;
|
||||
text += indentedText(QString("β : %1").arg(beta));
|
||||
auto beta = m_inertialCoefficient;
|
||||
text += indentedText(QString("β : %1").arg(beta));
|
||||
|
||||
double effPerm = f->nonDarcyProperties().effectivePermeability;
|
||||
text += indentedText(QString("Ke : %1").arg(effPerm));
|
||||
double effPerm = f->nonDarcyProperties().effectivePermeability;
|
||||
text += indentedText(QString("Ke : %1").arg(effPerm));
|
||||
|
||||
double gamma = m_relativeGasDensity;
|
||||
text += indentedText(QString("γ : %1").arg(gamma));
|
||||
double gamma = m_relativeGasDensity;
|
||||
text += indentedText(QString("γ : %1").arg(gamma));
|
||||
|
||||
auto h = f->nonDarcyProperties().width;
|
||||
text += indentedText(QString("h : %1").arg(h));
|
||||
auto h = f->nonDarcyProperties().width;
|
||||
text += indentedText(QString("h : %1").arg(h));
|
||||
|
||||
auto wellRadius = m_wellDiameter / 2.0;
|
||||
text += indentedText(QString("rw : %1").arg(wellRadius));
|
||||
auto wellRadius = f->nonDarcyProperties().eqWellRadius;
|
||||
text += indentedText(QString("rw : %1").arg(wellRadius));
|
||||
|
||||
auto mu = m_gasViscosity;
|
||||
text += indentedText(QString("μ : %1").arg(mu));
|
||||
auto mu = m_gasViscosity;
|
||||
text += indentedText(QString("μ : %1").arg(mu));
|
||||
}
|
||||
text += "</pre>";
|
||||
|
||||
text += "<br>";
|
||||
}
|
||||
@@ -545,6 +571,19 @@ QString RimFractureTemplate::dFactorSummary() const
|
||||
return text;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::dFactorForTemplate() const
|
||||
{
|
||||
if (orientationType() == ALONG_WELL_PATH)
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
return computeDFactor(nullptr);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -576,6 +615,27 @@ double RimFractureTemplate::computeEffectivePermeability(const RimFracture* frac
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::computeWellRadiusForDFactorCalculation(const RimFracture* fractureInstance) const
|
||||
{
|
||||
double radius = 0.0;
|
||||
|
||||
if (m_orientationType == ALONG_WELL_PATH && fractureInstance)
|
||||
{
|
||||
auto perforationLength = fractureInstance->perforationLength();
|
||||
|
||||
radius = perforationLength / cvf::PI_D;
|
||||
}
|
||||
else
|
||||
{
|
||||
radius = m_wellDiameter / 2.0;
|
||||
}
|
||||
|
||||
return radius;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -589,26 +649,14 @@ double RimFractureTemplate::computeDFactor(const RimFracture* fractureInstance)
|
||||
}
|
||||
else
|
||||
{
|
||||
double radius = 0.0;
|
||||
double radius = computeWellRadiusForDFactorCalculation(fractureInstance);
|
||||
double alpha = RiaDefines::nonDarcyFlowAlpha(m_fractureTemplateUnit());
|
||||
double beta = m_inertialCoefficient;
|
||||
double effPerm = computeEffectivePermeability(fractureInstance);
|
||||
double gamma = m_relativeGasDensity;
|
||||
|
||||
if (m_orientationType == ALONG_WELL_PATH && fractureInstance)
|
||||
{
|
||||
auto perforationLength = fractureInstance->perforationLength();
|
||||
|
||||
radius = perforationLength / cvf::PI_D;
|
||||
}
|
||||
else
|
||||
{
|
||||
radius = m_wellDiameter / 2.0;
|
||||
}
|
||||
|
||||
auto alpha = RiaDefines::nonDarcyFlowAlpha(m_fractureTemplateUnit());
|
||||
auto beta = m_inertialCoefficient;
|
||||
auto effPerm = computeEffectivePermeability(fractureInstance);
|
||||
auto gamma = m_relativeGasDensity;
|
||||
|
||||
auto mu = m_gasViscosity;
|
||||
auto h = computeFractureWidth(fractureInstance);
|
||||
double mu = m_gasViscosity;
|
||||
double h = computeFractureWidth(fractureInstance);
|
||||
|
||||
double numerator = alpha * beta * effPerm * gamma;
|
||||
double denumerator = h * radius * mu;
|
||||
|
@@ -164,6 +164,7 @@ public:
|
||||
double computeDFactor(const RimFracture* fractureInstance) const;
|
||||
double computeKh(const RimFracture* fractureInstance) const;
|
||||
double computeEffectivePermeability(const RimFracture* fractureInstance) const;
|
||||
double computeWellRadiusForDFactorCalculation(const RimFracture* fractureInstance) const;
|
||||
double computeFractureWidth(const RimFracture* fractureInstance) const;
|
||||
|
||||
protected:
|
||||
@@ -180,6 +181,7 @@ private:
|
||||
virtual FractureWidthAndConductivity widthAndConductivityAtWellPathIntersection(const RimFracture* fractureInstance) const = 0;
|
||||
|
||||
QString dFactorSummary() const;
|
||||
double dFactorForTemplate() const;
|
||||
|
||||
protected:
|
||||
caf::PdmField<int> m_id;
|
||||
@@ -209,7 +211,7 @@ protected:
|
||||
caf::PdmField<double> m_relativeGasDensity;
|
||||
caf::PdmField<double> m_gasViscosity;
|
||||
|
||||
//caf::PdmProxyValueField<double> m_dFactorDisplayField;
|
||||
caf::PdmProxyValueField<double> m_dFactorDisplayField;
|
||||
caf::PdmProxyValueField<QString> m_dFactorSummaryText;
|
||||
|
||||
caf::PdmField<double> m_heightScaleFactor;
|
||||
|
Reference in New Issue
Block a user