BaseAquiferModel.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_BASE_AQUIFER_MODEL_HPP
28#define OPM_BASE_AQUIFER_MODEL_HPP
29
30#include <opm/models/discretization/common/fvbaseproperties.hh>
31#include <opm/models/utils/basicproperties.hh>
32#include <opm/models/utils/propertysystem.hh>
33
34#include <opm/output/data/Aquifer.hpp>
35
36#include <stdexcept>
37
38namespace Opm {
39
48template <class TypeTag>
50{
51 using Simulator = GetPropType<TypeTag, Properties::Simulator>;
52 using RateVector = GetPropType<TypeTag, Properties::RateVector>;
53
54public:
55 BaseAquiferModel(Simulator& simulator)
56 : simulator_(simulator)
57 {}
58
64 { }
65
75 void initFromRestart(const data::Aquifers&)
76 {
77 throw std::logic_error {
78 "Initialization from restart data not supported "
79 "for base aquifer model"
80 };
81 }
82
87 { }
88
93 { }
94
99 { }
100
104 template <class Context>
105 void addToSource(RateVector&,
106 const Context&,
107 unsigned,
108 unsigned) const
109 { }
110
118 { }
119
127 { }
128
134 { }
135
140 template <class Restarter>
141 void serialize(Restarter&)
142 { }
143
148 template <class Restarter>
149 void deserialize(Restarter&)
150 { }
151
152 data::Aquifers aquiferData() const
153 { return data::Aquifers{}; }
154
155protected:
156 Simulator& simulator_;
157};
158
159} // namespace Opm
160
161#endif // OPM_BASE_AQUIFER_MODEL_HPP
The base class which specifies the API of aquifer models.
Definition: BaseAquiferModel.hpp:50
void endEpisode()
This method is called once an episode (report step) has been finished successfully.
Definition: BaseAquiferModel.hpp:133
void serialize(Restarter &)
Write the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:141
void beginEpisode()
This method is called when a new episode (report step) starts.
Definition: BaseAquiferModel.hpp:86
void beginIteration()
This method is called before each Newton-Raphson iteration.
Definition: BaseAquiferModel.hpp:98
void addToSource(RateVector &, const Context &, unsigned, unsigned) const
Add the water which enters or leaves the reservoir due to aquifiers.
Definition: BaseAquiferModel.hpp:105
void initialSolutionApplied()
Called once the problem has been fully initialized and the initial condition has been applied.
Definition: BaseAquiferModel.hpp:63
void beginTimeStep()
This method is called when a new time step (substep) starts.
Definition: BaseAquiferModel.hpp:92
void endTimeStep()
This method is called after each successful time step (substep).
Definition: BaseAquiferModel.hpp:126
void endIteration()
This method is called after each Newton-Raphson successful iteration.
Definition: BaseAquiferModel.hpp:117
data::Aquifers aquiferData() const
Definition: BaseAquiferModel.hpp:152
void initFromRestart(const data::Aquifers &)
Called if aquifers are being initialized from values retrieved from a restart file.
Definition: BaseAquiferModel.hpp:75
Simulator & simulator_
Definition: BaseAquiferModel.hpp:156
BaseAquiferModel(Simulator &simulator)
Definition: BaseAquiferModel.hpp:55
void deserialize(Restarter &)
Load the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:149
Definition: BlackoilPhases.hpp:27