Loading...
Searching...
No Matches
BlackoilWellModelGuideRates.hpp
/*
Copyright 2016 SINTEF ICT, Applied Mathematics.
Copyright 2016 - 2017 Statoil ASA.
Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services
Copyright 2016 - 2018 IRIS AS
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_BLACKOILWELLMODEL_GUIDE_RATES_HEADER_INCLUDED
#define OPM_BLACKOILWELLMODEL_GUIDE_RATES_HEADER_INCLUDED
#include <opm/input/eclipse/Schedule/Group/GuideRate.hpp>
#include <string>
#include <unordered_map>
namespace Opm {
template<typename Scalar, typename IndexTraits> class BlackoilWellModelGeneric;
namespace data {
struct GroupData;
struct GroupGuideRates;
class GuideRateValue;
class Wells;
}
class Group;
class Well;
template<typename Scalar, typename IndexTraits>
class BlackoilWellModelGuideRates
{
public:
explicit BlackoilWellModelGuideRates(const BlackoilWellModelGeneric<Scalar, IndexTraits>& wellModel)
: wellModel_(wellModel)
{}
std::unordered_map<std::string, data::GuideRateValue>
calculateWellGuideRates(const int reportStepIdx) const;
void assignWellGuideRates(data::Wells& wsrpt,
const int reportStepIdx) const;
std::unordered_map<std::string, data::GroupGuideRates>
calculateAllGroupGuideRates(const int reportStepIdx) const;
void assignGroupGuideRates(const Group& group,
const std::unordered_map<std::string, data::GroupGuideRates>& groupGuideRates,
data::GroupData& gdata) const;
bool guideRateUpdateIsNeeded(const int reportStepIdx) const;
private:
void getGuideRateValues(const GuideRate::RateVector& qs,
const bool is_inj,
const std::string& wgname,
data::GuideRateValue& grval) const;
data::GuideRateValue getGuideRateValues(const Well& well) const;
data::GuideRateValue getGuideRateValues(const Group& group) const;
data::GuideRateValue getGuideRateInjectionGroupValues(const Group& group) const;
const BlackoilWellModelGeneric<Scalar, IndexTraits>& wellModel_;
};
} // namespace Opm
#endif
Opm::BlackoilWellModelGeneric
Class for handling the blackoil well model.
Definition BlackoilWellModelGeneric.hpp:95
Opm::BlackoilWellModelGuideRates::BlackoilWellModelGuideRates
BlackoilWellModelGuideRates(const BlackoilWellModelGeneric< Scalar, IndexTraits > &wellModel)
Constructor initializes reference to the well model.
Definition BlackoilWellModelGuideRates.hpp:49
Opm::BlackoilWellModelGuideRates::guideRateUpdateIsNeeded
bool guideRateUpdateIsNeeded(const int reportStepIdx) const
Check if a guide rate update is needed.
Definition BlackoilWellModelGuideRates.cpp:591
Opm::BlackoilWellModelGuideRates::calculateWellGuideRates
std::unordered_map< std::string, data::GuideRateValue > calculateWellGuideRates(const int reportStepIdx) const
Calculate guide rate values for all wells.
Definition BlackoilWellModelGuideRates.cpp:395
Opm::BlackoilWellModelGuideRates::assignGroupGuideRates
void assignGroupGuideRates(const Group &group, const std::unordered_map< std::string, data::GroupGuideRates > &groupGuideRates, data::GroupData &gdata) const
Assign group guide rates.
Definition BlackoilWellModelGuideRates.cpp:563
Opm::BlackoilWellModelGuideRates::calculateAllGroupGuideRates
std::unordered_map< std::string, data::GroupGuideRates > calculateAllGroupGuideRates(const int reportStepIdx) const
Calculates guide rate for all groups.
Definition BlackoilWellModelGuideRates.cpp:503
Opm::BlackoilWellModelGuideRates::assignWellGuideRates
void assignWellGuideRates(data::Wells &wsrpt, const int reportStepIdx) const
Assign well guide rates.
Definition BlackoilWellModelGuideRates.cpp:481
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43