mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-07-29 18:47:55 -05:00
ebos ECL output: move the parameter extraction code for the well data to the well model
this is supposed to be an implementation detail of the well model.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/WellConnections.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/material/common/Exceptions.hpp>
|
||||
|
||||
#include <ewoms/common/propertysystem.hh>
|
||||
@@ -78,6 +79,9 @@ class EclWellManager
|
||||
|
||||
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
|
||||
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
|
||||
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
|
||||
|
||||
typedef typename GridView::template Codim<0>::Entity Element;
|
||||
|
||||
@@ -537,6 +541,26 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Opm::data::Wells wellData() const
|
||||
{
|
||||
Opm::data::Wells wellDat;
|
||||
|
||||
using rt = Opm::data::Rates::opt;
|
||||
for (unsigned wellIdx = 0; wellIdx < numWells(); ++wellIdx) {
|
||||
const auto& ebosWell = well(wellIdx);
|
||||
auto& wellOut = wellDat[ebosWell->name()];
|
||||
|
||||
wellOut.bhp = ebosWell->bottomHolePressure();
|
||||
wellOut.thp = ebosWell->tubingHeadPressure();
|
||||
wellOut.temperature = 0;
|
||||
wellOut.rates.set( rt::wat, ebosWell->surfaceRate(waterPhaseIdx) );
|
||||
wellOut.rates.set( rt::oil, ebosWell->surfaceRate(oilPhaseIdx) );
|
||||
wellOut.rates.set( rt::gas, ebosWell->surfaceRate(gasPhaseIdx) );
|
||||
}
|
||||
|
||||
return wellDat;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief This method writes the complete state of all wells
|
||||
* to the hard disk.
|
||||
|
||||
Reference in New Issue
Block a user