Added changes to output restart data to support WSEGAICD input
This commit is contained in:
parent
dd7d8748e0
commit
8a5a159450
@ -66,24 +66,30 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
|
||||
DeviceBaseStrength = 86,
|
||||
|
||||
AbsValICDLength = 87,
|
||||
|
||||
CalibrFluidDensity = 88,
|
||||
CalibrFluidViscosity = 89,
|
||||
|
||||
CriticalWaterFraction = 90,
|
||||
TransitionRegWidth = 91,
|
||||
MaxEmulsionRatio = 92,
|
||||
|
||||
FlowRateExponent = 95,
|
||||
ViscFuncExponent = 96,
|
||||
|
||||
MaxValidFlowRate = 97,
|
||||
|
||||
ICDLength = 102,
|
||||
|
||||
ValveAreaFraction = 103,
|
||||
|
||||
item106 = 105, // Unknown
|
||||
item107 = 106, // Unknown
|
||||
item108 = 107, // Unknown
|
||||
item109 = 108, // Unknown
|
||||
item110 = 109, // Unknown
|
||||
item111 = 110, // Unknown
|
||||
flowFractionOilDensityExponent = 105,
|
||||
flowFractionWaterDensityExponent = 106,
|
||||
flowFractionGasDensityExponent = 107,
|
||||
flowFractionOilViscosityExponent = 108,
|
||||
flowFractionWaterViscosityExponent = 109,
|
||||
flowFractionGasViscosityExponent = 110,
|
||||
};
|
||||
} // RSeg
|
||||
|
||||
|
@ -438,6 +438,20 @@ namespace {
|
||||
iSeg[baseIndex + Ix::ICDOpenShutFlag] = sicd.ecl_status();
|
||||
}
|
||||
|
||||
template <class ISegArray>
|
||||
void assignAICDCharacteristics(const Opm::Segment& segment,
|
||||
const std::size_t baseIndex,
|
||||
ISegArray& iSeg)
|
||||
{
|
||||
using Ix = ::Opm::RestartIO::Helpers::
|
||||
VectorItems::ISeg::index;
|
||||
|
||||
const auto& aicd = segment.autoICD();
|
||||
iSeg[baseIndex + Ix::SegmentType] = -8;
|
||||
iSeg[baseIndex + Ix::ICDScalingMode] = aicd.methodFlowScaling();
|
||||
iSeg[baseIndex + Ix::ICDOpenShutFlag] = aicd.ecl_status();
|
||||
}
|
||||
|
||||
template <class ISegArray>
|
||||
void assignSegmentTypeCharacteristics(const Opm::Segment& segment,
|
||||
const std::size_t baseIndex,
|
||||
@ -446,6 +460,9 @@ namespace {
|
||||
if (segment.isSpiralICD()) {
|
||||
assignSpiralICDCharacteristics(segment, baseIndex, iSeg);
|
||||
}
|
||||
if (segment.isAICD()) {
|
||||
assignAICDCharacteristics(segment, baseIndex, iSeg);
|
||||
}
|
||||
}
|
||||
|
||||
template <class ISegArray>
|
||||
@ -470,7 +487,6 @@ namespace {
|
||||
}
|
||||
for (std::size_t ind = 0; ind < welSegSet.size(); ind++) {
|
||||
const auto& segment = welSegSet[ind];
|
||||
|
||||
auto segNumber = segment.segmentNumber();
|
||||
auto iS = (segNumber-1)*noElmSeg;
|
||||
iSeg[iS + Ix::SegNo] = welSegSet[orderedSegmentNo[ind]].segmentNumber();
|
||||
@ -610,6 +626,71 @@ namespace {
|
||||
usys.from_si(M::length, sicd.length());
|
||||
}
|
||||
|
||||
template <class RSegArray>
|
||||
void assignAICDCharacteristics(const ::Opm::Segment& segment,
|
||||
const ::Opm::UnitSystem& usys,
|
||||
const int baseIndex,
|
||||
RSegArray& rSeg)
|
||||
{
|
||||
using Ix = ::Opm::RestartIO::Helpers::VectorItems::RSeg::index;
|
||||
using M = ::Opm::UnitSystem::measure;
|
||||
|
||||
const auto& aicd = segment.autoICD();
|
||||
|
||||
rSeg[baseIndex + Ix::DeviceBaseStrength] =
|
||||
usys.from_si(M::icd_strength, aicd.strength());
|
||||
|
||||
rSeg[baseIndex + Ix::AbsValICDLength] =
|
||||
usys.from_si(M::length, std::abs(aicd.length()));
|
||||
|
||||
rSeg[baseIndex + Ix::CalibrFluidDensity] =
|
||||
usys.from_si(M::density, aicd.densityCalibration());
|
||||
|
||||
rSeg[baseIndex + Ix::CalibrFluidViscosity] =
|
||||
usys.from_si(M::viscosity, aicd.viscosityCalibration());
|
||||
|
||||
rSeg[baseIndex + Ix::CriticalWaterFraction] = aicd.criticalValue();
|
||||
|
||||
rSeg[baseIndex + Ix::TransitionRegWidth] =
|
||||
aicd.widthTransitionRegion();
|
||||
|
||||
rSeg[baseIndex + Ix::MaxEmulsionRatio] =
|
||||
aicd.maxViscosityRatio();
|
||||
|
||||
rSeg[baseIndex + Ix::FlowRateExponent] =
|
||||
aicd.flowRateExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::ViscFuncExponent] =
|
||||
aicd.viscExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::MaxValidFlowRate] =
|
||||
(aicd.maxAbsoluteRate() == std::numeric_limits<double>::max()) ?
|
||||
-2.e+20 : usys.from_si(M::geometric_volume_rate, aicd.maxAbsoluteRate()) ;
|
||||
|
||||
rSeg[baseIndex + Ix::ICDLength] =
|
||||
usys.from_si(M::length, aicd.length());
|
||||
|
||||
rSeg[baseIndex + Ix::flowFractionOilDensityExponent] =
|
||||
aicd.oilDensityExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::flowFractionWaterDensityExponent] =
|
||||
aicd.waterDensityExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::flowFractionGasDensityExponent] =
|
||||
aicd.gasDensityExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::flowFractionOilViscosityExponent] =
|
||||
aicd.oilViscExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::flowFractionWaterViscosityExponent] =
|
||||
aicd.waterViscExponent();
|
||||
|
||||
rSeg[baseIndex + Ix::flowFractionGasViscosityExponent] =
|
||||
aicd.gasViscExponent();
|
||||
|
||||
}
|
||||
|
||||
|
||||
template <class RSegArray>
|
||||
void assignSegmentTypeCharacteristics(const ::Opm::Segment& segment,
|
||||
const ::Opm::UnitSystem& usys,
|
||||
@ -620,6 +701,10 @@ namespace {
|
||||
assignSpiralICDCharacteristics(segment, usys, baseIndex, rSeg);
|
||||
}
|
||||
|
||||
if (segment.isAICD()) {
|
||||
assignAICDCharacteristics(segment, usys, baseIndex, rSeg);
|
||||
}
|
||||
|
||||
if (segment.isValve()) {
|
||||
assignValveCharacteristics(segment, usys, baseIndex, rSeg);
|
||||
}
|
||||
@ -716,12 +801,12 @@ namespace {
|
||||
// value is 1. based on tests on several data sets
|
||||
rSeg[iS + Ix::item40] = 1.;
|
||||
|
||||
rSeg[iS + Ix::item106] = 1.0;
|
||||
rSeg[iS + Ix::item107] = 1.0;
|
||||
rSeg[iS + Ix::item108] = 1.0;
|
||||
rSeg[iS + Ix::item109] = 1.0;
|
||||
rSeg[iS + Ix::item110] = 1.0;
|
||||
rSeg[iS + Ix::item111] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionOilDensityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionWaterDensityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionGasDensityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionOilViscosityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionWaterViscosityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionGasViscosityExponent] = 1.0;
|
||||
|
||||
//Treat subsequent segments
|
||||
for (std::size_t segIndex = 1; segIndex < welSegSet.size(); segIndex++) {
|
||||
@ -770,12 +855,12 @@ namespace {
|
||||
|
||||
rSeg[iS + Ix::item40] = 1.;
|
||||
|
||||
rSeg[iS + Ix::item106] = 1.0;
|
||||
rSeg[iS + Ix::item107] = 1.0;
|
||||
rSeg[iS + Ix::item108] = 1.0;
|
||||
rSeg[iS + Ix::item109] = 1.0;
|
||||
rSeg[iS + Ix::item110] = 1.0;
|
||||
rSeg[iS + Ix::item111] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionOilDensityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionWaterDensityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionGasDensityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionOilViscosityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionWaterViscosityExponent] = 1.0;
|
||||
rSeg[iS + Ix::flowFractionGasViscosityExponent] = 1.0;
|
||||
|
||||
if (! segment.isRegular()) {
|
||||
assignSegmentTypeCharacteristics(segment, units, iS, rSeg);
|
||||
|
@ -419,10 +419,13 @@ WELSEGS
|
||||
-- First Last Branch Outlet Length Depth Diam Ruff Area Vol
|
||||
-- Seg Seg Num Seg Chang
|
||||
-- Main Stem
|
||||
2 12 1 1 20 20 0.2 1.E-3 1* 1* /
|
||||
2 12 1 1 20 20 0.2 1.E-3 1* 1* /
|
||||
-- Top Branch
|
||||
13 13 2 3 50 0 0.2 1.E-3 1* 1* /
|
||||
14 17 2 13 100 0 0.2 1.E-3 1* 1* /
|
||||
13 13 2 3 50 0 0.2 1.E-3 1* 1* /
|
||||
14 17 2 13 100 0 0.2 1.E-3 1* 1* /
|
||||
18 18 2 3 0.10000 0 0.15200 1.E-5 /
|
||||
19 19 2 4 0.10000 0 0.15200 1.E-5 /
|
||||
20 20 2 5 0.10000 0 0.15200 1.E-5 /
|
||||
/
|
||||
|
||||
COMPSEGS
|
||||
@ -441,6 +444,12 @@ COMPSEGS
|
||||
-- Middle Branch
|
||||
/
|
||||
|
||||
WSEGAICD
|
||||
PROD 18 18 0.000175 0.019479 1020 0.48 1* 1* 1* 1 1* 2.1 1.2 OPEN 1* 1* 1* 1* 1* 1* /
|
||||
PROD 19 19 0.000175 0.04099 1020 0.48 1* 1* 1* 1 1* 2.1 1.2 OPEN 1* 1* 1* 1* 1* 1* /
|
||||
PROD 20 20 0.000175 0.045951 1020 0.48 1* 1* 1* 1 1* 2.1 1.2 OPEN 1* 1* 1* 1* 1* 1* /
|
||||
/
|
||||
|
||||
WELSEGS
|
||||
|
||||
-- Name Dep 1 Tlen 1 Vol 1
|
||||
|
Loading…
Reference in New Issue
Block a user