WellConvergence.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
3 Copyright 2017 Statoil ASA.
4 Copyright 2016 - 2017 IRIS AS.
5
6 This file is part of the Open Porous Media project (OPM).
7
8 OPM is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 OPM is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with OPM. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22
23#ifndef OPM_WELL_CONVERGENCE_HEADER_INCLUDED
24#define OPM_WELL_CONVERGENCE_HEADER_INCLUDED
25
26#include <vector>
27
28namespace Opm
29{
30
31class ConvergenceReport;
32class DeferredLogger;
33class WellInterfaceGeneric;
34template<class Scalar> class WellState;
35
37{
38public:
40 : well_(well)
41 {}
42
43 struct Tolerances {
44 double bhp;
45 double thp;
46 double rates;
47 double grup;
49 };
50
51 // checking the convergence of the well control equations
53 const Tolerances& tolerances,
54 const double well_control_residual,
55 const bool well_is_stopped,
56 ConvergenceReport& report,
57 DeferredLogger& deferred_logger) const;
58
59 void checkConvergencePolyMW(const std::vector<double>& res,
60 const int Bhp,
61 const double maxResidualAllowed,
62 ConvergenceReport& report) const;
63
64private:
65 const WellInterfaceGeneric& well_;
66};
67
68}
69
70#endif // OPM_WELL_CONVERGENCE_HEADER_INCLUDED
Definition: ConvergenceReport.hpp:38
Definition: DeferredLogger.hpp:57
Definition: WellConvergence.hpp:37
void checkConvergenceControlEq(const WellState< double > &well_state, const Tolerances &tolerances, const double well_control_residual, const bool well_is_stopped, ConvergenceReport &report, DeferredLogger &deferred_logger) const
void checkConvergencePolyMW(const std::vector< double > &res, const int Bhp, const double maxResidualAllowed, ConvergenceReport &report) const
WellConvergence(const WellInterfaceGeneric &well)
Definition: WellConvergence.hpp:39
Definition: WellInterfaceGeneric.hpp:50
Definition: BlackoilPhases.hpp:27
Definition: WellConvergence.hpp:43
double rates
Tolerance for a rate controlled well.
Definition: WellConvergence.hpp:46
double max_residual_allowed
Max residual allowd.
Definition: WellConvergence.hpp:48
double bhp
Tolerance for bhp controlled well.
Definition: WellConvergence.hpp:44
double thp
Tolerance for thp controlled well.
Definition: WellConvergence.hpp:45
double grup
Tolerance for a grup controlled well.
Definition: WellConvergence.hpp:47