mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-20 11:48:25 -06:00
Remove WellState as base class
This commit is contained in:
parent
3dcb0742d0
commit
fc3c044a4e
@ -1,77 +0,0 @@
|
||||
/*
|
||||
Copyright 2012 SINTEF ICT, Applied Mathematics.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_WELLSTATE_HEADER_INCLUDED
|
||||
#define OPM_WELLSTATE_HEADER_INCLUDED
|
||||
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
#include <opm/simulators/wells/PerforationData.hpp>
|
||||
#include <opm/simulators/wells/WellContainer.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
class ParallelWellInfo;
|
||||
class SummaryState;
|
||||
|
||||
/// The state of a set of wells.
|
||||
class WellState
|
||||
{
|
||||
public:
|
||||
using mapentry_t = std::array<int, 3>;
|
||||
using WellMapType = std::map<std::string, mapentry_t>;
|
||||
|
||||
explicit WellState(const PhaseUsage& pu) :
|
||||
phase_usage_(pu)
|
||||
{}
|
||||
|
||||
WellState() = default;
|
||||
WellState(const WellState& rhs) = default;
|
||||
|
||||
virtual ~WellState() = default;
|
||||
|
||||
WellState& operator=(const WellState& rhs) = default;
|
||||
|
||||
|
||||
protected:
|
||||
WellContainer<Well::Status> status_;
|
||||
WellContainer<std::vector<PerforationData>> well_perf_data_;
|
||||
WellContainer<const ParallelWellInfo*> parallel_well_info_;
|
||||
WellMapType wellMap_;
|
||||
std::vector<double> bhp_;
|
||||
std::vector<double> thp_;
|
||||
std::vector<double> temperature_;
|
||||
WellContainer<std::vector<double>> wellrates_;
|
||||
PhaseUsage phase_usage_;
|
||||
WellContainer<std::vector<double>> perfrates_;
|
||||
WellContainer<std::vector<double>> perfpress_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif // OPM_WELLSTATE_HEADER_INCLUDED
|
@ -21,11 +21,12 @@
|
||||
#ifndef OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||
#define OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||
|
||||
#include <opm/simulators/wells/WellState.hpp>
|
||||
#include <opm/simulators/wells/ALQState.hpp>
|
||||
#include <opm/simulators/wells/GlobalWellInfo.hpp>
|
||||
#include <opm/simulators/wells/WellContainer.hpp>
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <opm/simulators/wells/PerforationData.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
@ -46,12 +47,12 @@ class Schedule;
|
||||
/// The state of a set of wells, tailored for use by the fully
|
||||
/// implicit blackoil simulator.
|
||||
class WellStateFullyImplicitBlackoil
|
||||
: public WellState
|
||||
{
|
||||
typedef WellState BaseType;
|
||||
public:
|
||||
using mapentry_t = std::array<int, 3>;
|
||||
using WellMapType = std::map<std::string, mapentry_t>;
|
||||
|
||||
static const uint64_t event_mask = ScheduleEvents::WELL_STATUS_CHANGE + ScheduleEvents::PRODUCTION_UPDATE + ScheduleEvents::INJECTION_UPDATE;
|
||||
typedef BaseType :: WellMapType WellMapType;
|
||||
|
||||
virtual ~WellStateFullyImplicitBlackoil() = default;
|
||||
|
||||
@ -60,9 +61,9 @@ public:
|
||||
static const int Oil = BlackoilPhases::Liquid;
|
||||
static const int Gas = BlackoilPhases::Vapour;
|
||||
|
||||
explicit WellStateFullyImplicitBlackoil(const PhaseUsage& pu) :
|
||||
WellState(pu)
|
||||
explicit WellStateFullyImplicitBlackoil(const PhaseUsage& pu)
|
||||
{
|
||||
this->phase_usage_ = pu;
|
||||
}
|
||||
|
||||
const WellMapType& wellMap() const { return wellMap_; }
|
||||
@ -439,6 +440,18 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
WellContainer<Well::Status> status_;
|
||||
WellContainer<std::vector<PerforationData>> well_perf_data_;
|
||||
WellContainer<const ParallelWellInfo*> parallel_well_info_;
|
||||
WellMapType wellMap_;
|
||||
std::vector<double> bhp_;
|
||||
std::vector<double> thp_;
|
||||
std::vector<double> temperature_;
|
||||
WellContainer<std::vector<double>> wellrates_;
|
||||
PhaseUsage phase_usage_;
|
||||
WellContainer<std::vector<double>> perfrates_;
|
||||
WellContainer<std::vector<double>> perfpress_;
|
||||
|
||||
std::vector<double> perfphaserates_;
|
||||
WellContainer<int> is_producer_; // Size equal to number of local wells.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user