BlackoilWellModelNetwork.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 SINTEF ICT, Applied Mathematics.
3 Copyright 2016 - 2017 Statoil ASA.
4 Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services
5 Copyright 2016 - 2018 IRIS AS
6
7 This file is part of the Open Porous Media project (OPM).
8
9 OPM is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OPM is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OPM. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#ifndef OPM_BLACKOILWELLMODEL_NETWORK_HEADER_INCLUDED
24#define OPM_BLACKOILWELLMODEL_NETWORK_HEADER_INCLUDED
25
28
30
31#include <map>
32#include <string>
33#include <tuple>
34
35namespace Opm {
36 class DeferredLogger;
37 template<class TypeTag> class BlackoilWellModel;
38}
39
40namespace Opm {
41
43template<typename TypeTag>
45 public BlackoilWellModelNetworkGeneric<GetPropType<TypeTag, Properties::Scalar>,
46 typename GetPropType<TypeTag, Properties::FluidSystem>::IndexTraitsType>
47{
48 using BaseType =
51
54 using IndexTraits = typename FluidSystem::IndexTraitsType;
56
57public:
59
60 std::tuple<bool, Scalar>
61 update(const bool mandatory_network_balance,
62 DeferredLogger& deferred_logger,
63 const bool relax_network_tolerance = false);
64
65 // Pre-step network solve at static reservoir conditions (group and well states might be updated)
66 void doPreStepRebalance(DeferredLogger& deferred_logger);
67
68protected:
72 bool computeWellGroupThp(const double dt, DeferredLogger& local_deferredLogger);
73
75 std::map<std::string, Scalar> well_group_thp_calc_;
76};
77
78} // namespace Opm
79
81
82#endif // OPM_BLACKOILWELLMODEL_NETWORK_HEADER_INCLUDED
Defines a type tags and some fundamental properties all models.
Class for handling the blackoil well network model.
Definition: BlackoilWellModelNetworkGeneric.hpp:48
Class for handling the blackoil well network model.
Definition: BlackoilWellModelNetwork.hpp:47
bool computeWellGroupThp(const double dt, DeferredLogger &local_deferredLogger)
Definition: BlackoilWellModelNetwork_impl.hpp:164
std::tuple< bool, Scalar > update(const bool mandatory_network_balance, DeferredLogger &deferred_logger, const bool relax_network_tolerance=false)
Definition: BlackoilWellModelNetwork_impl.hpp:91
BlackoilWellModelNetwork(BlackoilWellModel< TypeTag > &well_model)
Definition: BlackoilWellModelNetwork_impl.hpp:49
void doPreStepRebalance(DeferredLogger &deferred_logger)
Definition: BlackoilWellModelNetwork_impl.hpp:57
BlackoilWellModel< TypeTag > & well_model_
Definition: BlackoilWellModelNetwork.hpp:74
std::map< std::string, Scalar > well_group_thp_calc_
Definition: BlackoilWellModelNetwork.hpp:75
Class for handling the blackoil well model.
Definition: BlackoilWellModel.hpp:104
Definition: DeferredLogger.hpp:57
Defines the common properties required by the porous medium multi-phase models.
Definition: blackoilbioeffectsmodules.hh:43
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:233