mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch 'dev' into dev-deeper
This commit is contained in:
commit
15a6bc358b
@ -27,27 +27,37 @@ QString RiaDefines::conductivityResultName()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::unitStringConductivity(RiaEclipseUnitTools::UnitSystem unitSystem)
|
||||
{
|
||||
switch (unitSystem)
|
||||
{
|
||||
case RiaEclipseUnitTools::UNITS_METRIC: return "md-m";
|
||||
case RiaEclipseUnitTools::UNITS_FIELD: return "md-ft";
|
||||
default: return "";
|
||||
case RiaEclipseUnitTools::UNITS_METRIC:
|
||||
return "md-m";
|
||||
case RiaEclipseUnitTools::UNITS_FIELD:
|
||||
return "md-ft";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaDefines::nonDarcyFlowAlpha(RiaEclipseUnitTools::UnitSystem unitSystem)
|
||||
{
|
||||
switch (unitSystem)
|
||||
{
|
||||
case RiaEclipseUnitTools::UNITS_METRIC: return 2.24460e-10;
|
||||
case RiaEclipseUnitTools::UNITS_FIELD: return 6.83352e-8;
|
||||
default: return 0.0;
|
||||
case RiaEclipseUnitTools::UNITS_METRIC:
|
||||
return 2.24460e-10;
|
||||
case RiaEclipseUnitTools::UNITS_FIELD:
|
||||
return 6.83352e-8;
|
||||
case RiaEclipseUnitTools::UNITS_LAB:
|
||||
return 5.41375E-11;
|
||||
// case RiaEclipseUnitTools::PVT_METRIC: return 2.25533E-10;
|
||||
|
||||
default:
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
@ -27,5 +27,5 @@ namespace RiaDefines
|
||||
QString conductivityResultName();
|
||||
QString unitStringConductivity(RiaEclipseUnitTools::UnitSystem unitSystem);
|
||||
|
||||
double nonDarcyFlowAlpha(RiaEclipseUnitTools::UnitSystem unitSystem);
|
||||
};
|
||||
double nonDarcyFlowAlpha(RiaEclipseUnitTools::UnitSystem unitSystem);
|
||||
}; // namespace RiaDefines
|
||||
|
@ -131,7 +131,7 @@ std::vector<RigCompletionData>
|
||||
{
|
||||
// No change in transmissibility for main bore
|
||||
auto transmissibilityAndPermeability =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(
|
||||
settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
@ -146,7 +146,7 @@ std::vector<RigCompletionData>
|
||||
{
|
||||
// Adjust transmissibility for fishbone laterals
|
||||
auto transmissibilityAndPermeability =
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(
|
||||
settings.caseToApply,
|
||||
wellPath,
|
||||
wellBorePart.lengthsInCell,
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaFilePathTools.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -1658,46 +1659,39 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
const RimNonDarcyPerforationParameters* nonDarcyParameters =
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters();
|
||||
|
||||
double transmissibility = 0.0;
|
||||
double effectivePermeability = 0.0;
|
||||
double transmissibility = 0.0;
|
||||
double kh = RigCompletionData::defaultValue();
|
||||
double dFactor = RigCompletionData::defaultValue();
|
||||
|
||||
{
|
||||
auto transmissibilityAndPermeability =
|
||||
calculateTransmissibilityAndPermeability(settings.caseToApply,
|
||||
wellPath,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem) / 2,
|
||||
cell.globCellIndex,
|
||||
settings.useLateralNTG);
|
||||
auto transmissibilityAndKh = calculateTransmissibilityAndKh(settings.caseToApply,
|
||||
wellPath,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
interval->skinFactor(),
|
||||
interval->diameter(unitSystem) / 2,
|
||||
cell.globCellIndex,
|
||||
settings.useLateralNTG);
|
||||
|
||||
transmissibility = transmissibilityAndPermeability.first;
|
||||
transmissibility = transmissibilityAndKh.first;
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() != RimNonDarcyPerforationParameters::NON_DARCY_NONE)
|
||||
if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED)
|
||||
{
|
||||
effectivePermeability =
|
||||
transmissibilityAndPermeability.second * nonDarcyParameters->gridPermeabilityScalingFactor();
|
||||
kh = transmissibilityAndKh.second;
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
}
|
||||
else if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED)
|
||||
{
|
||||
kh = transmissibilityAndKh.second;
|
||||
|
||||
double dFactor = RigCompletionData::defaultValue();
|
||||
double kh = RigCompletionData::defaultValue();
|
||||
const double effectivePermeability =
|
||||
kh * nonDarcyParameters->gridPermeabilityScalingFactor() / cell.intersectionLengthsInCellCS.length();
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED)
|
||||
{
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
else if (nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED)
|
||||
{
|
||||
dFactor = calculateDFactor(settings.caseToApply,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
cell.globCellIndex,
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters(),
|
||||
effectivePermeability);
|
||||
}
|
||||
|
||||
if (nonDarcyParameters->nonDarcyFlowType() != RimNonDarcyPerforationParameters::NON_DARCY_NONE)
|
||||
{
|
||||
kh = effectivePermeability * cell.intersectionLengthsInCellCS.length();
|
||||
dFactor = calculateDFactor(settings.caseToApply,
|
||||
cell.intersectionLengthsInCellCS,
|
||||
cell.globCellIndex,
|
||||
wellPath->perforationIntervalCollection()->nonDarcyParameters(),
|
||||
effectivePermeability);
|
||||
}
|
||||
}
|
||||
|
||||
completion.setTransAndWPImultBackgroundDataFromPerforation(
|
||||
@ -2307,15 +2301,15 @@ CellDirection RicWellPathExportCompletionDataFeatureImpl::calculateCellMainDirec
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<double, double>
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndPermeability(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant,
|
||||
CellDirection directionForVolumeScaling)
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAndKh(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant,
|
||||
CellDirection directionForVolumeScaling)
|
||||
{
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
|
||||
@ -2367,7 +2361,7 @@ std::pair<double, double>
|
||||
double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex);
|
||||
double permz = permzAccessObject->cellScalarGlobIdx(globalCellIndex);
|
||||
|
||||
const double totalPermeabilityForCell = RigTransmissibilityEquations::totalPermeability(permx, permy, permz);
|
||||
const double totalKh = RigTransmissibilityEquations::totalPermeability(permx, permy, permz, internalCellLengths, latNtg, ntg);
|
||||
|
||||
double darcy = RiaEclipseUnitTools::darcysConstant(wellPath->unitSystem());
|
||||
|
||||
@ -2387,7 +2381,7 @@ std::pair<double, double>
|
||||
|
||||
const double totalConnectionFactor = RigTransmissibilityEquations::totalConnectionFactor(transx, transy, transz);
|
||||
|
||||
return std::make_pair(totalConnectionFactor, totalPermeabilityForCell);
|
||||
return std::make_pair(totalConnectionFactor, totalKh);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -2401,10 +2395,15 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCa
|
||||
{
|
||||
using EQ = RigPerforationTransmissibilityEquations;
|
||||
|
||||
if (!eclipseCase || !eclipseCase->eclipseCaseData())
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
|
||||
double porosity = 0.0;
|
||||
{
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
|
||||
eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PORO");
|
||||
cvf::ref<RigResultAccessor> poroAccessObject =
|
||||
RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PORO");
|
||||
@ -2421,7 +2420,9 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCa
|
||||
porosity,
|
||||
nonDarcyParameters->porosityScalingFactor());
|
||||
|
||||
return EQ::dFactor(nonDarcyParameters->unitConstant(),
|
||||
const double alpha = RiaDefines::nonDarcyFlowAlpha(eclipseCaseData->unitsType());
|
||||
|
||||
return EQ::dFactor(alpha,
|
||||
betaFactor,
|
||||
effectivePermeability,
|
||||
internalCellLengths.length(),
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
|
||||
static std::pair<double, double>
|
||||
calculateTransmissibilityAndPermeability(RimEclipseCase* eclipseCase,
|
||||
calculateTransmissibilityAndKh(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
|
@ -23,9 +23,10 @@
|
||||
|
||||
#include "RicLinkVisibleViewsFeature.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RimContourMapView.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
@ -42,9 +43,14 @@ bool RicLinkViewFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<caf::PdmUiItem*> allSelectedItems;
|
||||
std::vector<RimGridView*> selectedGridViews;
|
||||
std::vector<RimContourMapView*> selectedContourMaps;
|
||||
|
||||
caf::SelectionManager::instance()->selectedItems(allSelectedItems);
|
||||
caf::SelectionManager::instance()->objectsByType(&selectedGridViews);
|
||||
if (selectedGridViews.size() > 1u && allSelectedItems.size() == selectedGridViews.size())
|
||||
caf::SelectionManager::instance()->objectsByType(&selectedContourMaps);
|
||||
size_t selectedRegularGridViews = selectedGridViews.size() - selectedContourMaps.size();
|
||||
|
||||
if (selectedGridViews.size() > 1u && selectedRegularGridViews >= 1u && allSelectedItems.size() == selectedGridViews.size())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -80,8 +86,10 @@ void RicLinkViewFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
std::vector<caf::PdmUiItem*> allSelectedItems;
|
||||
std::vector<RimGridView*> selectedGridViews;
|
||||
|
||||
caf::SelectionManager::instance()->selectedItems(allSelectedItems);
|
||||
caf::SelectionManager::instance()->objectsByType(&selectedGridViews);
|
||||
|
||||
if (selectedGridViews.size() > 1u && allSelectedItems.size() == selectedGridViews.size())
|
||||
{
|
||||
RicLinkVisibleViewsFeature::linkViews(selectedGridViews);
|
||||
|
@ -23,9 +23,10 @@
|
||||
|
||||
#include "RicLinkVisibleViewsFeatureUi.h"
|
||||
|
||||
#include "RimViewController.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimContourMapView.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
|
||||
@ -147,6 +148,15 @@ void RicLinkVisibleViewsFeature::linkViews(std::vector<RimGridView*>& views)
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimViewLinker* viewLinker = proj->viewLinkerCollection->viewLinker();
|
||||
|
||||
std::vector<RimGridView*> masterCandidates;
|
||||
for (RimGridView* view : views)
|
||||
{
|
||||
if (dynamic_cast<RimContourMapView*>(view) == nullptr)
|
||||
{
|
||||
masterCandidates.push_back(view);
|
||||
}
|
||||
}
|
||||
|
||||
if (!viewLinker)
|
||||
{
|
||||
// Create a new view linker
|
||||
@ -155,15 +165,20 @@ void RicLinkVisibleViewsFeature::linkViews(std::vector<RimGridView*>& views)
|
||||
{
|
||||
return;
|
||||
}
|
||||
CVF_ASSERT(!masterCandidates.empty());
|
||||
|
||||
RicLinkVisibleViewsFeatureUi featureUi;
|
||||
featureUi.setViews(views);
|
||||
RimGridView* masterView = masterCandidates.front();
|
||||
if (masterCandidates.size() > 1u)
|
||||
{
|
||||
RicLinkVisibleViewsFeatureUi featureUi;
|
||||
featureUi.setViews(masterCandidates);
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Master View", "");
|
||||
propertyDialog.setWindowIcon(QIcon(":/chain.png"));
|
||||
if (propertyDialog.exec() != QDialog::Accepted) return;
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Master View", "");
|
||||
propertyDialog.setWindowIcon(QIcon(":/chain.png"));
|
||||
if (propertyDialog.exec() != QDialog::Accepted) return;
|
||||
|
||||
RimGridView* masterView = featureUi.masterView();
|
||||
masterView = featureUi.masterView();
|
||||
}
|
||||
viewLinker = new RimViewLinker;
|
||||
proj->viewLinkerCollection()->viewLinker = viewLinker;
|
||||
viewLinker->setMasterView(masterView);
|
||||
|
@ -21,8 +21,9 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimContourMapView.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
@ -54,6 +55,11 @@ bool RicSetMasterViewFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dynamic_cast<RimContourMapView*>(activeView) != nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -177,60 +177,62 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel(cvf::ModelBasicList*
|
||||
|
||||
for (RimWellPathAttribute* attribute : attributes)
|
||||
{
|
||||
if (attribute->componentType() == RiaDefines::CASING)
|
||||
if (attribute->isEnabled())
|
||||
{
|
||||
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
|
||||
double endMD = attribute->endMD();
|
||||
double shoeLength = wellPathRadius;
|
||||
double shoeStartMD = endMD - shoeLength;
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(shoeStartMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
|
||||
std::vector<double> radii;
|
||||
radii.push_back(wellPathRadius);
|
||||
radii.push_back(wellPathRadius * 2.5);
|
||||
radii.push_back(wellPathRadius * 1.1);
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
|
||||
|
||||
cvf::Collection<cvf::Part> parts;
|
||||
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
|
||||
for (auto part : parts)
|
||||
if (attribute->componentType() == RiaDefines::CASING)
|
||||
{
|
||||
part->setSourceInfo(objectSourceInfo.p());
|
||||
model->addPart(part.p());
|
||||
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
|
||||
double endMD = attribute->endMD();
|
||||
double shoeLength = wellPathRadius;
|
||||
double shoeStartMD = endMD - shoeLength;
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(shoeStartMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
|
||||
std::vector<double> radii;
|
||||
radii.push_back(wellPathRadius);
|
||||
radii.push_back(wellPathRadius * 2.5);
|
||||
radii.push_back(wellPathRadius * 1.1);
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
|
||||
|
||||
cvf::Collection<cvf::Part> parts;
|
||||
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
|
||||
for (auto part : parts)
|
||||
{
|
||||
part->setSourceInfo(objectSourceInfo.p());
|
||||
model->addPart(part.p());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (attribute->componentType() == RiaDefines::PACKER)
|
||||
{
|
||||
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
|
||||
double startMD = attribute->startMD();
|
||||
double packerLength = wellPathRadius;
|
||||
double endMD = attribute->startMD() + packerLength;
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
|
||||
std::vector<double> radii;
|
||||
radii.push_back(wellPathRadius);
|
||||
radii.push_back(wellPathRadius * 2.5);
|
||||
radii.push_back(wellPathRadius * 2.5);
|
||||
radii.push_back(wellPathRadius);
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
|
||||
|
||||
cvf::Collection<cvf::Part> parts;
|
||||
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
|
||||
for (auto part : parts)
|
||||
else if (attribute->componentType() == RiaDefines::PACKER)
|
||||
{
|
||||
part->setSourceInfo(objectSourceInfo.p());
|
||||
model->addPart(part.p());
|
||||
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
|
||||
double startMD = attribute->startMD();
|
||||
double endMD = attribute->endMD();
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
|
||||
|
||||
std::vector<double> radii;
|
||||
radii.push_back(wellPathRadius);
|
||||
radii.push_back(wellPathRadius * 1.5);
|
||||
radii.push_back(wellPathRadius * 1.5);
|
||||
radii.push_back(wellPathRadius);
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
|
||||
|
||||
cvf::Collection<cvf::Part> parts;
|
||||
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
|
||||
for (auto part : parts)
|
||||
{
|
||||
part->setSourceInfo(objectSourceInfo.p());
|
||||
model->addPart(part.p());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -632,6 +632,17 @@ cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords() const
|
||||
return bb;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFishbonesMultipleSubs::isEnabled() const
|
||||
{
|
||||
RimFishbonesCollection* collection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
|
||||
return collection->isChecked() && isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -110,6 +110,7 @@ public:
|
||||
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||
|
||||
// Overrides from RimWellPathCompletionsInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RivWellFracturePartMgr.h"
|
||||
|
||||
@ -286,6 +287,16 @@ void RimFracture::clearCachedNonDarcyProperties()
|
||||
m_cachedFractureProperties = NonDarcyData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFracture::isEnabled() const
|
||||
{
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(fractureCollection);
|
||||
return fractureCollection->isChecked() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -129,6 +129,7 @@ public:
|
||||
friend class RimFractureTemplate;
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
@ -49,14 +49,6 @@ RimNonDarcyPerforationParameters::RimNonDarcyPerforationParameters()
|
||||
|
||||
CAF_PDM_InitField(&m_userDefinedDFactor, "UserDefinedDFactor", 1.0, "D Factor", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_unitConstant,
|
||||
"UnitConstant",
|
||||
1.0,
|
||||
"<html> Unit Constant (α)</html>",
|
||||
"",
|
||||
"<html>Unit:[cP*Day*m<sup>2</sup>/(Forch*mD*Sm<sup>3</sup>)]</html>",
|
||||
"");
|
||||
|
||||
CAF_PDM_InitField(&m_gridPermeabilityScalingFactor,
|
||||
"GridPermeabilityScalingFactor",
|
||||
1.0,
|
||||
@ -65,7 +57,7 @@ RimNonDarcyPerforationParameters::RimNonDarcyPerforationParameters()
|
||||
"",
|
||||
"");
|
||||
|
||||
CAF_PDM_InitField(&m_wellRadius, "WellRadius", 0.15, "<html>Well Radius (r<sub>w</sub>)</html> [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_wellRadius, "WellRadius", 0.108, "<html>Well Radius (r<sub>w</sub>)</html> [m]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_relativeGasDensity,
|
||||
"RelativeGasDensity",
|
||||
@ -117,14 +109,6 @@ double RimNonDarcyPerforationParameters::userDefinedDFactor() const
|
||||
return m_userDefinedDFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimNonDarcyPerforationParameters::unitConstant() const
|
||||
{
|
||||
return m_unitConstant;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -210,7 +194,6 @@ void RimNonDarcyPerforationParameters::defineUiOrdering(QString uiConfigName, ca
|
||||
{
|
||||
{
|
||||
auto group = nonDarcyFlowGroup->addNewGroup("Parameters");
|
||||
group->add(&m_unitConstant);
|
||||
group->add(&m_gridPermeabilityScalingFactor);
|
||||
group->add(&m_wellRadius);
|
||||
group->add(&m_relativeGasDensity);
|
||||
|
@ -40,7 +40,6 @@ public:
|
||||
|
||||
NonDarcyFlowEnum nonDarcyFlowType() const;
|
||||
double userDefinedDFactor() const;
|
||||
double unitConstant() const;
|
||||
double gridPermeabilityScalingFactor() const;
|
||||
double wellRadius() const;
|
||||
double relativeGasDensity() const;
|
||||
@ -57,7 +56,6 @@ private:
|
||||
caf::PdmField<caf::AppEnum<NonDarcyFlowEnum>> m_nonDarcyFlowType;
|
||||
caf::PdmField<double> m_userDefinedDFactor;
|
||||
|
||||
caf::PdmField<double> m_unitConstant;
|
||||
caf::PdmField<double> m_gridPermeabilityScalingFactor;
|
||||
caf::PdmField<double> m_wellRadius;
|
||||
caf::PdmField<double> m_relativeGasDensity;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathValve.h"
|
||||
@ -232,6 +233,16 @@ std::vector<RimWellPathValve*> RimPerforationInterval::valves() const
|
||||
return allValves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPerforationInterval::isEnabled() const
|
||||
{
|
||||
RimPerforationCollection* perforationCollection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(perforationCollection);
|
||||
return perforationCollection->isChecked() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
std::vector<RimWellPathValve*> valves() const;
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
@ -31,6 +31,7 @@
|
||||
class RimWellPathComponentInterface
|
||||
{
|
||||
public:
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||
virtual QString componentLabel() const = 0;
|
||||
virtual QString componentTypeLabel() const = 0;
|
||||
|
@ -103,6 +103,16 @@ std::vector<double> RimWellPathValve::valveLocations() const
|
||||
return valveDepths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathValve::isEnabled() const
|
||||
{
|
||||
RimPerforationInterval* perforationInterval = nullptr;
|
||||
this->firstAncestorOrThisOfType(perforationInterval);
|
||||
return perforationInterval->isEnabled() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
std::vector<double> valveLocations() const;
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
@ -138,7 +138,7 @@ QString Rim3dWellLogExtractionCurve::resultPropertyString() const
|
||||
QString name;
|
||||
if (eclipseCase)
|
||||
{
|
||||
name = caf::Utils::makeValidFileBasename(m_eclipseResultDefinition->resultVariableUiName());
|
||||
name = caf::Utils::makeValidFileBasename(m_eclipseResultDefinition->resultVariableUiShortName());
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
|
@ -658,8 +658,8 @@ void RimContourMapProjection::defineUiOrdering(QString uiConfigName, caf::PdmUiO
|
||||
{
|
||||
caf::PdmUiGroup* mainGroup = uiOrdering.addNewGroup("Projection Settings");
|
||||
mainGroup->add(&m_relativeSampleSpacing);
|
||||
mainGroup->add(&m_resultAggregation);
|
||||
mainGroup->add(&m_showContourLines);
|
||||
mainGroup->add(&m_resultAggregation);
|
||||
|
||||
caf::PdmUiGroup* weightingGroup = uiOrdering.addNewGroup("Mean Weighting Options");
|
||||
weightingGroup->add(&m_weightByParameter);
|
||||
|
@ -553,11 +553,11 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
{
|
||||
options.push_back(calcTimeOfFlightOptionItem());
|
||||
options.push_back(caf::PdmOptionItemInfo(timeOfFlightString(false), RIG_FLD_TOF_RESNAME));
|
||||
if (m_phaseSelection() == RigFlowDiagResultAddress::PHASE_ALL)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME));
|
||||
options.push_back(calcMaxFractionTracerOptionItem());
|
||||
options.push_back(caf::PdmOptionItemInfo(maxFractionTracerString(false), RIG_FLD_MAX_FRACTION_TRACER_RESNAME));
|
||||
options.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME));
|
||||
}
|
||||
}
|
||||
@ -742,69 +742,7 @@ QString RimEclipseResultDefinition::resultVariableUiName() const
|
||||
{
|
||||
if (resultType() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
QString fullName;
|
||||
|
||||
if (m_flowTracerSelectionMode() == FLOW_TR_BY_SELECTION)
|
||||
{
|
||||
RigFlowDiagResultAddress flowDiagRes = flowDiagResAddress();
|
||||
|
||||
bool allInjectors = injectorSelectionState() == ALL_SELECTED;
|
||||
bool allProducers = producerSelectionState() == ALL_SELECTED;
|
||||
|
||||
if (allInjectors && allProducers)
|
||||
{
|
||||
QString allTracersText = caf::AppEnum< FlowTracerSelectionType >::uiText(FLOW_TR_INJ_AND_PROD);
|
||||
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(allTracersText);
|
||||
}
|
||||
else if (allInjectors)
|
||||
{
|
||||
QStringList fullTracerList;
|
||||
QStringList listOfSelectedProducers;
|
||||
QString allInjectorsText = caf::AppEnum< FlowTracerSelectionType >::uiText(FLOW_TR_INJECTORS);
|
||||
for (const QString& producer : m_selectedProducerTracers())
|
||||
{
|
||||
listOfSelectedProducers.push_back(producer);
|
||||
}
|
||||
fullTracerList.push_back(allInjectorsText);
|
||||
if (!listOfSelectedProducers.empty())
|
||||
{
|
||||
fullTracerList.push_back(listOfSelectedProducers.join(", "));
|
||||
}
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(fullTracerList.join(", "));
|
||||
}
|
||||
else if (allProducers)
|
||||
{
|
||||
QStringList fullTracerList;
|
||||
QStringList listOfSelectedInjectors;
|
||||
QString allProducersText = caf::AppEnum< FlowTracerSelectionType >::uiText(FLOW_TR_PRODUCERS);
|
||||
for (const QString& injector : m_selectedInjectorTracers())
|
||||
{
|
||||
listOfSelectedInjectors.push_back(injector);
|
||||
}
|
||||
fullTracerList.push_back(allProducersText);
|
||||
if (!listOfSelectedInjectors.empty())
|
||||
{
|
||||
fullTracerList.push_back(listOfSelectedInjectors.join(", "));
|
||||
}
|
||||
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(fullTracerList.join(", "));
|
||||
}
|
||||
else
|
||||
{
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiText());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(m_flowTracerSelectionMode().uiText());
|
||||
}
|
||||
|
||||
return fullName;
|
||||
return flowDiagResUiText(false, 32);
|
||||
}
|
||||
|
||||
return m_resultVariable();
|
||||
@ -817,16 +755,7 @@ QString RimEclipseResultDefinition::resultVariableUiShortName() const
|
||||
{
|
||||
if (resultType() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
QString candidate = resultVariableUiName();
|
||||
QString postfix = "...)";
|
||||
int stringSizeLimit = 32;
|
||||
if (candidate.size() > stringSizeLimit + postfix.size())
|
||||
{
|
||||
candidate = candidate.left(stringSizeLimit);
|
||||
candidate += postfix;
|
||||
}
|
||||
|
||||
return candidate;
|
||||
return flowDiagResUiText(true, 24);
|
||||
}
|
||||
|
||||
return m_resultVariable();
|
||||
@ -1279,6 +1208,37 @@ bool RimEclipseResultDefinition::hasDualPorFractureResult()
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseResultDefinition::flowDiagResUiText(bool shortLabel, int maxTracerStringLength) const
|
||||
{
|
||||
QString uiText = QString::fromStdString(flowDiagResAddress().variableName);
|
||||
if (flowDiagResAddress().variableName == RIG_FLD_TOF_RESNAME)
|
||||
{
|
||||
uiText = timeOfFlightString(shortLabel);
|
||||
}
|
||||
else if (flowDiagResAddress().variableName == RIG_FLD_MAX_FRACTION_TRACER_RESNAME)
|
||||
{
|
||||
uiText = maxFractionTracerString(shortLabel);
|
||||
}
|
||||
|
||||
QString tracersString = selectedTracersString();
|
||||
|
||||
if (!tracersString.isEmpty())
|
||||
{
|
||||
const QString postfix = "...";
|
||||
|
||||
if (tracersString.size() > maxTracerStringLength + postfix.size())
|
||||
{
|
||||
tracersString = tracersString.left(maxTracerStringLength);
|
||||
tracersString += postfix;
|
||||
}
|
||||
uiText += QString("\n%1").arg(tracersString);
|
||||
}
|
||||
return uiText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1407,53 +1367,122 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForSelected
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo RimEclipseResultDefinition::calcTimeOfFlightOptionItem()
|
||||
QString RimEclipseResultDefinition::timeOfFlightString(bool shorter) const
|
||||
{
|
||||
QString tofString;
|
||||
bool multipleSelected = false;
|
||||
if (injectorSelectionState() != NONE_SELECTED && producerSelectionState() != NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Residence Time (Average)", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "Res.Time" : "Residence Time";
|
||||
multipleSelected = true;
|
||||
}
|
||||
else if (injectorSelectionState() == ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
else if (injectorSelectionState() != NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Forward Time Of Flight", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "Fwd.TOF" : "Forward Time Of Flight";
|
||||
}
|
||||
else if (injectorSelectionState() >= MULTIPLE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
else if (producerSelectionState() != NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Forward Time Of Flight (Average)", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "Rev.TOF" : "Reverse Time Of Flight";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() == ONE_SELECTED)
|
||||
else
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Reverse Time Of Flight", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "TOF" : "Time Of Flight";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
|
||||
multipleSelected = multipleSelected ||
|
||||
injectorSelectionState() >= MULTIPLE_SELECTED || producerSelectionState() >= MULTIPLE_SELECTED;
|
||||
|
||||
if (multipleSelected && !shorter)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Reverse Time Of Flight (Average)", RIG_FLD_TOF_RESNAME);
|
||||
tofString += " (Average)";
|
||||
}
|
||||
return caf::PdmOptionItemInfo("Time Of Flight", RIG_FLD_TOF_RESNAME);
|
||||
return tofString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo RimEclipseResultDefinition::calcMaxFractionTracerOptionItem()
|
||||
QString RimEclipseResultDefinition::maxFractionTracerString(bool shorter) const
|
||||
{
|
||||
if (injectorSelectionState() == ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
QString mfString;
|
||||
if (injectorSelectionState() >= ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Flooding Region", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
mfString = shorter ? "FloodReg" : "Flooding Region";
|
||||
if (injectorSelectionState() >= MULTIPLE_SELECTED)
|
||||
mfString += "s";
|
||||
}
|
||||
else if (injectorSelectionState() >= MULTIPLE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= ONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Flooding Regions", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
mfString = shorter ? "DrainReg" : "Drainage Region";
|
||||
if (producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
mfString += "s";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() == ONE_SELECTED)
|
||||
else
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Drainage Region", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
mfString = shorter ? "Drain&FloodReg" : "Drainage/Flooding Regions";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
return mfString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseResultDefinition::selectedTracersString() const
|
||||
{
|
||||
QStringList fullTracersList;
|
||||
|
||||
FlowTracerSelectionState injectorState = injectorSelectionState();
|
||||
FlowTracerSelectionState producerState = producerSelectionState();
|
||||
|
||||
if (injectorState == ALL_SELECTED && producerState == ALL_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Drainage Regions", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
fullTracersList += caf::AppEnum<FlowTracerSelectionType>::uiText(FLOW_TR_INJ_AND_PROD);
|
||||
}
|
||||
return caf::PdmOptionItemInfo("Drainage/Flooding Regions", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
else
|
||||
{
|
||||
if (injectorState == ALL_SELECTED)
|
||||
{
|
||||
fullTracersList += caf::AppEnum<FlowTracerSelectionType>::uiText(FLOW_TR_INJECTORS);
|
||||
}
|
||||
|
||||
if (producerState == ALL_SELECTED)
|
||||
{
|
||||
fullTracersList += caf::AppEnum<FlowTracerSelectionType>::uiText(FLOW_TR_PRODUCERS);
|
||||
}
|
||||
|
||||
if (injectorSelectionState() == ONE_SELECTED || injectorSelectionState() == MULTIPLE_SELECTED)
|
||||
{
|
||||
QStringList listOfSelectedInjectors;
|
||||
for (const QString& injector : m_selectedInjectorTracers())
|
||||
{
|
||||
listOfSelectedInjectors.push_back(injector);
|
||||
}
|
||||
if (!listOfSelectedInjectors.empty())
|
||||
{
|
||||
fullTracersList += listOfSelectedInjectors.join(", ");
|
||||
}
|
||||
}
|
||||
|
||||
if (producerSelectionState() == ONE_SELECTED || producerSelectionState() == MULTIPLE_SELECTED)
|
||||
{
|
||||
QStringList listOfSelectedProducers;
|
||||
for (const QString& producer : m_selectedProducerTracers())
|
||||
{
|
||||
listOfSelectedProducers.push_back(producer);
|
||||
}
|
||||
if (!listOfSelectedProducers.empty())
|
||||
{
|
||||
fullTracersList.push_back(listOfSelectedProducers.join(", "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString tracersText;
|
||||
if (!fullTracersList.empty())
|
||||
{
|
||||
tracersText = fullTracersList.join(", ");
|
||||
}
|
||||
return tracersText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -163,15 +163,19 @@ private:
|
||||
bool operator()(const QString& lhs, const QString& rhs) const;
|
||||
};
|
||||
|
||||
private:
|
||||
private:
|
||||
void assignFlowSolutionFromCase();
|
||||
|
||||
bool hasDualPorFractureResult();
|
||||
|
||||
QString flowDiagResUiText(bool shortLabel, int maxTracerStringLength = std::numeric_limits<int>::max()) const;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calcOptionsForVariableUiFieldStandard();
|
||||
QList<caf::PdmOptionItemInfo> calcOptionsForSelectedTracerField(bool injector);
|
||||
caf::PdmOptionItemInfo calcTimeOfFlightOptionItem();
|
||||
caf::PdmOptionItemInfo calcMaxFractionTracerOptionItem();
|
||||
QString timeOfFlightString(bool shorter) const;
|
||||
QString maxFractionTracerString(bool shorter) const;
|
||||
|
||||
QString selectedTracersString() const;
|
||||
|
||||
void changedTracerSelectionField(bool injector);
|
||||
QStringList getResultNamesForCurrentUiResultType();
|
||||
|
@ -1139,7 +1139,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel,
|
||||
|
||||
if (resultColors->hasResult() && resultColors->legendConfig()->showLegend())
|
||||
{
|
||||
resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiShortName());
|
||||
resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiName());
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->titledOverlayFrame());
|
||||
}
|
||||
|
||||
|
@ -794,7 +794,7 @@ QString RimWellLogExtractionCurve::wellLogChannelName() const
|
||||
QString name;
|
||||
if (eclipseCase)
|
||||
{
|
||||
name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiName());
|
||||
name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiShortName());
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
|
@ -1799,7 +1799,6 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
m_wellPathAttributePlotObjects.push_back(std::unique_ptr<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource())));
|
||||
}
|
||||
|
||||
|
||||
if (m_showWellPathAttributes)
|
||||
{
|
||||
if (m_wellPathAttributeCollection)
|
||||
@ -1813,13 +1812,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
std::set<QString> attributesAssignedToLegend;
|
||||
for (RimWellPathAttribute* attribute : attributes)
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
if (attribute->isEnabled())
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1831,13 +1833,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
std::set<QString> completionsAssignedToLegend;
|
||||
for (const RimWellPathComponentInterface* completion : allCompletions)
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() &&
|
||||
!completionsAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
completionsAssignedToLegend.insert(legendTitle);
|
||||
if (completion->isEnabled())
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() &&
|
||||
!completionsAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
completionsAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,6 +188,14 @@ double RimWellPath::wellPathRadiusScaleFactor() const
|
||||
return m_wellPathRadiusScaleFactor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPath::isEnabled() const
|
||||
{
|
||||
return m_showWellPath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -124,6 +124,7 @@ public:
|
||||
|
||||
|
||||
// RimWellPathComponentInterface overrides
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
@ -91,6 +91,16 @@ void RimWellPathAttribute::setDepthsFromWellPath(const RimWellPath* wellPath)
|
||||
m_endMD = wellPath->wellPathGeometry()->measureDepths().back();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathAttribute::isEnabled() const
|
||||
{
|
||||
RimWellPathAttributeCollection* collection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
return collection->isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -217,12 +227,16 @@ void RimWellPathAttribute::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
|
||||
this->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
}
|
||||
else if (m_type() == RiaDefines::PACKER)
|
||||
{
|
||||
m_endMD = m_startMD + 2;
|
||||
}
|
||||
}
|
||||
if (changedField == &m_startMD)
|
||||
{
|
||||
if (m_type() == RiaDefines::PACKER)
|
||||
{
|
||||
m_endMD = m_startMD + 50;
|
||||
m_endMD = m_startMD + 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
void setDepthsFromWellPath(const RimWellPath* wellPath);
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
@ -54,9 +55,9 @@ public:
|
||||
double endMD() const override;
|
||||
|
||||
private:
|
||||
bool isDiameterSupported() const;
|
||||
bool isDiameterSupported() const;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
static QString generateInchesLabel(double diameter);
|
||||
static QString generateInchesLabel(double diameter);
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RimWellPathAttributeCollection.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathAttribute.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
@ -37,6 +38,7 @@ RimWellPathAttributeCollection::RimWellPathAttributeCollection()
|
||||
m_attributes.uiCapability()->setUiEditorTypeName(caf::PdmUiTableViewEditor::uiEditorTypeName());
|
||||
m_attributes.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
|
||||
m_attributes.uiCapability()->setCustomContextMenuEnabled(true);
|
||||
this->setName("Casing Design");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -157,3 +159,20 @@ void RimWellPathAttributeCollection::defineUiTreeOrdering(caf::PdmUiTreeOrdering
|
||||
{
|
||||
uiTreeOrdering.skipRemainingChildren(true);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttributeCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
if (changedField == this->objectToggleField())
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
this->updateAllReferringTracks();
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cvfBase.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
@ -25,7 +27,7 @@
|
||||
|
||||
class RimWellPathAttribute;
|
||||
|
||||
class RimWellPathAttributeCollection : public caf::PdmObject
|
||||
class RimWellPathAttributeCollection : public RimCheckableNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
@ -37,11 +39,13 @@ public:
|
||||
void insertAttribute(RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute);
|
||||
void deleteAttribute(RimWellPathAttribute* attributeToDelete);
|
||||
void deleteAllAttributes();
|
||||
|
||||
protected:
|
||||
void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimWellPathAttribute*> m_attributes;
|
||||
|
@ -31,8 +31,8 @@ RimWellPathTarget::RimWellPathTarget()
|
||||
CAF_PDM_InitField(&m_isEnabled, "IsEnabled", true, "", "", "", "");
|
||||
//m_targetType.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_targetPoint, "TargetPoint", "Point", "", "", "");
|
||||
CAF_PDM_InitField(&m_dogleg1, "Dogleg1", 3.0, "DL in", "", "", "");
|
||||
CAF_PDM_InitField(&m_dogleg2, "Dogleg2", 3.0, "DL out", "", "", "");
|
||||
CAF_PDM_InitField(&m_dogleg1, "Dogleg1", 3.0, "DL in", "", "[deg/30m]", "");
|
||||
CAF_PDM_InitField(&m_dogleg2, "Dogleg2", 3.0, "DL out", "", "[deg/30m]", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_targetType, "TargetType", "Type", "", "", "");
|
||||
m_targetType.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&m_hasTangentConstraintUiField, "HasTangentConstraint", false, "Dir", "", "", "");
|
||||
|
@ -113,7 +113,7 @@ float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t interse
|
||||
double porePressure = hydroStaticPorePressureBar;
|
||||
|
||||
// 1: Try pore pressure from the grid
|
||||
if (porePressure == hydroStaticPorePressureBar && averageSegmentPorePressureBar != std::numeric_limits<float>::infinity())
|
||||
if (porePressure == hydroStaticPorePressureBar && averageSegmentPorePressureBar > 0.0)
|
||||
{
|
||||
porePressure = averageSegmentPorePressureBar;
|
||||
}
|
||||
@ -137,6 +137,8 @@ float RigGeoMechWellLogExtractor::calculatePorePressureInSegment(int64_t interse
|
||||
porePressure = pascalToBar(poreElementPressuresPascal[elmIdx]);
|
||||
}
|
||||
// 4: If no pore-pressure was found, the default value of hydrostatic pore pressure is used.
|
||||
|
||||
CVF_ASSERT(porePressure >= 0.0);
|
||||
return porePressure;
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
#include "RigTransmissibilityEquations.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
@ -60,19 +57,26 @@ double RigTransmissibilityEquations::totalConnectionFactor(double transX, double
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigTransmissibilityEquations::totalPermeability(const double permx, const double permy, const double permz)
|
||||
double RigTransmissibilityEquations::totalPermeability(double cellPermX,
|
||||
double cellPermY,
|
||||
double cellPermZ,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double lateralNtg,
|
||||
double ntg)
|
||||
{
|
||||
const double kx = cvf::Math::sqrt(permy * permz);
|
||||
const double ky = cvf::Math::sqrt(permx * permz);
|
||||
const double kz = cvf::Math::sqrt(permy * permx);
|
||||
// Compute kh for each local grid cell axis
|
||||
// Use permeability values for the two other axis
|
||||
double khx = sqrt(cellPermY * cellPermZ) * internalCellLengths.x() * lateralNtg;
|
||||
double khy = sqrt(cellPermX * cellPermZ) * internalCellLengths.y() * lateralNtg;
|
||||
double khz = sqrt(cellPermX * cellPermY) * internalCellLengths.z() * ntg;
|
||||
|
||||
const double totalPerm = cvf::Math::sqrt(kx * kx + ky * ky + kz * kz);
|
||||
const double totalKh = cvf::Math::sqrt(khx * khx + khy * khy + khz * khz);
|
||||
|
||||
return totalPerm;
|
||||
return totalKh;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigTransmissibilityEquations::permeability(const double conductivity, const double width)
|
||||
{
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMath.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
class RigTransmissibilityEquations
|
||||
{
|
||||
public:
|
||||
@ -34,7 +38,12 @@ public:
|
||||
|
||||
static double totalConnectionFactor(double transX, double transY, double transZ);
|
||||
|
||||
static double totalPermeability(const double permx, const double permy, const double permz);
|
||||
static double totalPermeability(double cellPermX,
|
||||
double cellPermY,
|
||||
double cellPermZ,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double lateralNtg,
|
||||
double ntg);
|
||||
|
||||
static double permeability(const double conductivity, const double width);
|
||||
|
||||
|
@ -143,6 +143,7 @@ QString Utils::makeValidFileBasename(const QString& fileBasenameCandidate)
|
||||
cleanBasename.replace("|", "_");
|
||||
cleanBasename.replace("?", "_");
|
||||
cleanBasename.replace("*", "_");
|
||||
cleanBasename.replace("\n", "_");
|
||||
|
||||
|
||||
cleanBasename.replace(QRegExp("_+"), "_");
|
||||
|
Loading…
Reference in New Issue
Block a user