mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add name member to SingleWellState
This commit is contained in:
parent
03cf7b0327
commit
807ac101d8
@ -21,8 +21,9 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
SingleWellState::SingleWellState(const ParallelWellInfo& pinfo, bool is_producer, std::size_t num_perf, std::size_t num_phases, double temp)
|
||||
: parallel_info(pinfo)
|
||||
SingleWellState::SingleWellState(const std::string& name_, const ParallelWellInfo& pinfo, bool is_producer, std::size_t num_perf, std::size_t num_phases, double temp)
|
||||
: name(name_)
|
||||
, parallel_info(pinfo)
|
||||
, producer(is_producer)
|
||||
, temperature(temp)
|
||||
, well_potentials(num_phases)
|
||||
|
@ -33,8 +33,9 @@ namespace Opm {
|
||||
|
||||
class SingleWellState {
|
||||
public:
|
||||
SingleWellState(const ParallelWellInfo& pinfo, bool is_producer, std::size_t num_perf, std::size_t num_phases, double temp);
|
||||
SingleWellState(const std::string& name, const ParallelWellInfo& pinfo, bool is_producer, std::size_t num_perf, std::size_t num_phases, double temp);
|
||||
|
||||
std::string name;
|
||||
std::reference_wrapper<const ParallelWellInfo> parallel_info;
|
||||
|
||||
Well::Status status{Well::Status::OPEN};
|
||||
|
@ -71,7 +71,7 @@ void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
||||
const int np = pu.num_phases;
|
||||
double temp = well.isInjector() ? well.injectionControls(summary_state).temperature : 273.15 + 15.56;
|
||||
|
||||
auto& ws = this->wells_.add(well.name(), SingleWellState{well_info, well.isProducer(), well_perf_data.size(), static_cast<std::size_t>(np), temp});
|
||||
auto& ws = this->wells_.add(well.name(), SingleWellState{well.name(), well_info, well.isProducer(), well_perf_data.size(), static_cast<std::size_t>(np), temp});
|
||||
|
||||
if ( ws.perf_data.empty())
|
||||
return;
|
||||
|
@ -574,9 +574,9 @@ BOOST_AUTO_TEST_CASE(TESTPerfData) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestSingleWellState) {
|
||||
Opm::ParallelWellInfo pinfo;
|
||||
Opm::SingleWellState ws1(pinfo, true, 10, 3, 1);
|
||||
Opm::SingleWellState ws2(pinfo, true, 10, 3, 2);
|
||||
Opm::SingleWellState ws3(pinfo, false, 10, 3, 3);
|
||||
Opm::SingleWellState ws1("W1", pinfo, true, 10, 3, 1);
|
||||
Opm::SingleWellState ws2("W2", pinfo, true, 10, 3, 2);
|
||||
Opm::SingleWellState ws3("W3", pinfo, false, 10, 3, 3);
|
||||
|
||||
ws1.bhp = 100;
|
||||
ws1.thp = 200;
|
||||
|
Loading…
Reference in New Issue
Block a user