mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Moved Watercut class to miscUtilities.hpp.
This commit is contained in:
parent
08e12d7be1
commit
d98b83bd3d
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <opm/core/utility/miscUtilities.hpp>
|
||||
#include <opm/core/utility/Units.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/newwells.h>
|
||||
#include <opm/core/fluid/IncompPropertiesInterface.hpp>
|
||||
@ -358,5 +359,22 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
void Watercut::push(double time, double fraction, double produced)
|
||||
{
|
||||
data_.push_back(time);
|
||||
data_.push_back(fraction);
|
||||
data_.push_back(produced);
|
||||
}
|
||||
|
||||
void Watercut::write(std::ostream& os) const
|
||||
{
|
||||
int sz = data_.size()/3;
|
||||
for (int i = 0; i < sz; ++i) {
|
||||
os << data_[3*i]/Opm::unit::day << " "
|
||||
<< data_[3*i+1] << " "
|
||||
<< data_[3*i+2] << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define OPM_MISCUTILITIES_HEADER_INCLUDED
|
||||
|
||||
#include <vector>
|
||||
#include <iosfwd>
|
||||
|
||||
struct Wells;
|
||||
struct UnstructuredGrid;
|
||||
@ -157,6 +158,15 @@ namespace Opm
|
||||
/// single-perforation.
|
||||
void wellsToSrc(const Wells& wells, const int num_cells, std::vector<double>& src);
|
||||
|
||||
/// Encapsulates the watercut curves.
|
||||
class Watercut
|
||||
{
|
||||
public:
|
||||
void push(double time, double fraction, double produced);
|
||||
void write(std::ostream& os) const;
|
||||
private:
|
||||
std::vector<double> data_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user