25#include <unordered_map>
54 template<
class Serializer>
73 template<
class Serializer>
84 bool empty()
const {
return entries_.empty(); }
87 auto begin()
const {
return entries_.begin(); }
89 auto end()
const {
return entries_.end(); }
109 const WellMatcher& wmatch,
112 std::function<
bool(
const std::string&)> opens_this_step)
const;
121 const WellMatcher& wmatch,
133 const WellMatcher& wmatch,
135 std::function<
bool(
const std::string&)> schedule_open)
const;
141 std::unordered_map<std::string, Entry> entries_;
Definition DeckRecord.hpp:32
Class for (de-)serializing.
Definition Serializer.hpp:94
std::map< std::string, bool > WellIsOpenMap
A vector of wells and their open status.
Definition WCYCLE.hpp:42
bool empty() const
Returns true if \this has no entries.
Definition WCYCLE.hpp:84
auto begin() const
Returns an iterator to first entry.
Definition WCYCLE.hpp:87
double nextTimeStep(const double current_time, const double dt, const WellMatcher &wmatch, const WellTimeMap &open_times, const WellTimeMap &close_times, std::function< bool(const std::string &)> opens_this_step) const
Returns a time step adjusted according to cycling wells.
Definition WCYCLE.cpp:71
std::vector< std::pair< std::string, double > > WellEfficiencyVec
A vector of wells and efficiency factor scalings to apply.
Definition WCYCLE.hpp:38
auto end() const
Returns an iterator to one past the last entry.
Definition WCYCLE.hpp:89
static WCYCLE serializationTestObject()
Create non-defaulted object suitable for testing the serialisation operation.
Definition WCYCLE.cpp:35
WellEfficiencyVec efficiencyScale(const double current_time, const double dt, const WellMatcher &wmatch, const WellTimeMap &open_times, std::function< bool(const std::string &)> schedule_open) const
Returns efficiency factor scaling factors for cycling wells.
Definition WCYCLE.cpp:178
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition WCYCLE.hpp:74
void addRecord(const DeckRecord &record)
Parse a record for a WCYCLE keyword.
Definition WCYCLE.cpp:54
std::map< std::string, double > WellTimeMap
A map from well name to a time stamp.
Definition WCYCLE.hpp:40
bool operator==(const WCYCLE &that) const
Equality predicate.
Definition WCYCLE.cpp:66
WellIsOpenMap wellStatus(const double current_time, const WellMatcher &wmatch, WellTimeMap &open_times, WellTimeMap &close_times) const
Returns status (open/shut) for cycling wells.
Definition WCYCLE.cpp:129
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Represents a single record in a WCYCLE keyword.
Definition WCYCLE.hpp:46
double off_time
Length of well closed period.
Definition WCYCLE.hpp:48
double startup_time
Time interval to scale up well efficiency factor.
Definition WCYCLE.hpp:49
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition WCYCLE.hpp:55
double max_time_step
Maximum time step when a cycling well opens.
Definition WCYCLE.hpp:50
bool controlled_time_step
Whether or not to.
Definition WCYCLE.hpp:51
double on_time
Length of well open period.
Definition WCYCLE.hpp:47
bool operator==(const Entry &entry) const
Equality predicate.
Definition WCYCLE.cpp:45