Loading...
Searching...
No Matches
WellConvergence.hpp
/*
Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
Copyright 2017 Statoil ASA.
Copyright 2016 - 2017 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_WELL_CONVERGENCE_HEADER_INCLUDED
#define OPM_WELL_CONVERGENCE_HEADER_INCLUDED
#include <vector>
namespace Opm
{
class ConvergenceReport;
class DeferredLogger;
template<typename Scalar, typename IndexTraits> class WellInterfaceGeneric;
template<typename Scalar, typename IndexTraits> class WellState;
template<typename Scalar, typename IndexTraits>
class WellConvergence
{
public:
explicit WellConvergence(const WellInterfaceGeneric<Scalar, IndexTraits>& well)
: well_(well)
{}
struct Tolerances {
Scalar bhp;
Scalar thp;
Scalar rates;
Scalar grup;
Scalar max_residual_allowed;
};
// checking the convergence of the well control equations
void checkConvergenceControlEq(const WellState<Scalar, IndexTraits>& well_state,
const Tolerances& tolerances,
const Scalar well_control_residual,
const bool well_is_stopped,
ConvergenceReport& report,
DeferredLogger& deferred_logger) const;
void checkConvergencePolyMW(const std::vector<Scalar>& res,
const int Bhp,
const Scalar maxResidualAllowed,
ConvergenceReport& report) const;
private:
const WellInterfaceGeneric<Scalar, IndexTraits>& well_;
};
}
#endif // OPM_WELL_CONVERGENCE_HEADER_INCLUDED
Opm::ConvergenceReport
Represents the convergence status of the whole simulator, to make it possible to query and store the ...
Definition ConvergenceReport.hpp:38
Opm::DeferredLogger
Definition DeferredLogger.hpp:57
Opm::WellInterfaceGeneric
Definition WellInterfaceGeneric.hpp:53
Opm::WellState
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition WellState.hpp:66
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::WellConvergence::Tolerances
Definition WellConvergence.hpp:44
Opm::WellConvergence::Tolerances::thp
Scalar thp
Tolerance for thp controlled well.
Definition WellConvergence.hpp:46
Opm::WellConvergence::Tolerances::rates
Scalar rates
Tolerance for a rate controlled well.
Definition WellConvergence.hpp:47
Opm::WellConvergence::Tolerances::bhp
Scalar bhp
Tolerance for bhp controlled well.
Definition WellConvergence.hpp:45
Opm::WellConvergence::Tolerances::max_residual_allowed
Scalar max_residual_allowed
Max residual allowd.
Definition WellConvergence.hpp:49
Opm::WellConvergence::Tolerances::grup
Scalar grup
Tolerance for a grup controlled well.
Definition WellConvergence.hpp:48