Add summary output of bottom hole pressures.
This commit is contained in:
parent
445800f738
commit
9f253eb9ae
@ -677,7 +677,7 @@ protected:
|
|||||||
PhaseUsage uses, /* phases present */
|
PhaseUsage uses, /* phases present */
|
||||||
BlackoilPhases::PhaseIndex phase, /* oil, water or gas */
|
BlackoilPhases::PhaseIndex phase, /* oil, water or gas */
|
||||||
WellType type, /* prod. or inj. */
|
WellType type, /* prod. or inj. */
|
||||||
char aggregation, /* rate or total */
|
char aggregation, /* rate or total or BHP */
|
||||||
std::string unit)
|
std::string unit)
|
||||||
: EclipseHandle <smspec_node_type> (
|
: EclipseHandle <smspec_node_type> (
|
||||||
ecl_sum_add_var (summary,
|
ecl_sum_add_var (summary,
|
||||||
@ -725,6 +725,9 @@ private:
|
|||||||
char aggregation) {
|
char aggregation) {
|
||||||
std::string name;
|
std::string name;
|
||||||
name += 'W'; // well
|
name += 'W'; // well
|
||||||
|
if (aggregation == 'B') {
|
||||||
|
name += "BHP";
|
||||||
|
} else {
|
||||||
switch (phase) {
|
switch (phase) {
|
||||||
case BlackoilPhases::Aqua: name += 'W'; break; /* water */
|
case BlackoilPhases::Aqua: name += 'W'; break; /* water */
|
||||||
case BlackoilPhases::Vapour: name += 'G'; break; /* gas */
|
case BlackoilPhases::Vapour: name += 'G'; break; /* gas */
|
||||||
@ -741,6 +744,7 @@ private:
|
|||||||
"Unknown well type used in blackoil reporting");
|
"Unknown well type used in blackoil reporting");
|
||||||
}
|
}
|
||||||
name += aggregation; /* rate ('R') or total ('T') */
|
name += aggregation; /* rate ('R') or total ('T') */
|
||||||
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
@ -750,6 +754,13 @@ protected:
|
|||||||
const double value = sign_ * wellState.wellRates () [index_] * convFactor;
|
const double value = sign_ * wellState.wellRates () [index_] * convFactor;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double bhp (const WellState& wellstate) {
|
||||||
|
// Note that 'index_' is used here even though it is meant
|
||||||
|
// to give a (well,phase) pair.
|
||||||
|
const int num_phases = wellstate.wellRates().size() / wellstate.bhp().size();
|
||||||
|
return wellstate.bhp()[index_/num_phases];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Monitors the rate given by a well.
|
/// Monitors the rate given by a well.
|
||||||
@ -812,6 +823,31 @@ private:
|
|||||||
double total_;
|
double total_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Monitors the bottom hole pressure in a well.
|
||||||
|
struct EclipseWellBhp : public EclipseWellReport {
|
||||||
|
EclipseWellBhp (const EclipseSummary& summary,
|
||||||
|
const EclipseGridParser& parser,
|
||||||
|
int whichWell,
|
||||||
|
PhaseUsage uses,
|
||||||
|
BlackoilPhases::PhaseIndex phase,
|
||||||
|
WellType type)
|
||||||
|
: EclipseWellReport (summary,
|
||||||
|
parser,
|
||||||
|
whichWell,
|
||||||
|
uses,
|
||||||
|
phase,
|
||||||
|
type,
|
||||||
|
'B',
|
||||||
|
"Pascal" /* surface cubic meter */ )
|
||||||
|
{ }
|
||||||
|
|
||||||
|
virtual double update (const SimulatorTimer& timer,
|
||||||
|
const WellState& wellState)
|
||||||
|
{
|
||||||
|
return bhp(wellState);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
EclipseSummary::writeTimeStep (const SimulatorTimer& timer,
|
EclipseSummary::writeTimeStep (const SimulatorTimer& timer,
|
||||||
const WellState& wellState) {
|
const WellState& wellState) {
|
||||||
@ -868,6 +904,26 @@ EclipseSummary::addWells (const EclipseGridParser& parser,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add BHP monitors
|
||||||
|
for (int whichWell = 0; whichWell != numWells; ++whichWell) {
|
||||||
|
// In the call below: uses, phase and the well type arguments
|
||||||
|
// are not used, except to set up an index that stores the
|
||||||
|
// well indirectly. For details see the implementation of the
|
||||||
|
// EclipseWellReport constructor, and the method
|
||||||
|
// EclipseWellReport::bhp().
|
||||||
|
BlackoilPhases::PhaseIndex phase = BlackoilPhases::Liquid;
|
||||||
|
if (!uses.phase_used[BlackoilPhases::Liquid]) {
|
||||||
|
phase = BlackoilPhases::Vapour;
|
||||||
|
}
|
||||||
|
add (std::unique_ptr <EclipseWellReport> (
|
||||||
|
new EclipseWellBhp (*this,
|
||||||
|
parser,
|
||||||
|
whichWell,
|
||||||
|
uses,
|
||||||
|
phase,
|
||||||
|
WELL_TYPES[0])));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
Loading…
Reference in New Issue
Block a user