2018-04-16 12:24:25 -05:00
|
|
|
/*
|
|
|
|
Copyright 2018 Statoil ASA.
|
|
|
|
|
|
|
|
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_DOUBHEAD_HEADER_INCLUDED
|
|
|
|
#define OPM_DOUBHEAD_HEADER_INCLUDED
|
|
|
|
|
|
|
|
#include <chrono>
|
|
|
|
#include <cstddef>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Opm {
|
2020-02-13 01:58:24 -06:00
|
|
|
struct Tuning;
|
2018-04-16 12:24:25 -05:00
|
|
|
class Schedule;
|
2019-04-30 01:28:22 -05:00
|
|
|
class UDQParams;
|
2022-05-20 10:32:38 -05:00
|
|
|
class UnitSystem;
|
2018-04-16 12:24:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Opm { namespace RestartIO {
|
|
|
|
|
|
|
|
class DoubHEAD
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct TimeStamp {
|
|
|
|
std::chrono::time_point<std::chrono::system_clock> start;
|
|
|
|
std::chrono::duration<double, std::chrono::seconds::period> elapsed;
|
|
|
|
};
|
2020-02-13 01:58:24 -06:00
|
|
|
|
2019-10-16 08:47:03 -05:00
|
|
|
struct guideRate {
|
|
|
|
double A;
|
|
|
|
double B;
|
|
|
|
double C;
|
|
|
|
double D;
|
|
|
|
double E;
|
|
|
|
double F;
|
|
|
|
double delay;
|
|
|
|
double damping_fact;
|
|
|
|
};
|
2020-02-13 01:58:24 -06:00
|
|
|
|
2020-11-17 09:03:43 -06:00
|
|
|
struct liftOptPar {
|
|
|
|
double min_int;
|
|
|
|
double incr;
|
|
|
|
double min_ec_grad;
|
|
|
|
};
|
|
|
|
|
2022-05-20 10:32:38 -05:00
|
|
|
struct NetBalanceParams {
|
|
|
|
explicit NetBalanceParams(const UnitSystem& usys);
|
|
|
|
|
2021-10-19 07:49:22 -05:00
|
|
|
double balancingInterval;
|
|
|
|
double convTolNodPres;
|
|
|
|
double convTolTHPCalc;
|
|
|
|
double targBranchBalError;
|
|
|
|
double maxBranchBalError;
|
|
|
|
double minTimeStepSize;
|
|
|
|
};
|
|
|
|
|
2018-04-16 12:24:25 -05:00
|
|
|
DoubHEAD();
|
|
|
|
|
|
|
|
~DoubHEAD() = default;
|
|
|
|
DoubHEAD(const DoubHEAD& rhs) = default;
|
|
|
|
DoubHEAD(DoubHEAD&& rhs) = default;
|
|
|
|
|
|
|
|
DoubHEAD& operator=(const DoubHEAD& rhs) = default;
|
|
|
|
DoubHEAD& operator=(DoubHEAD&& rhs) = default;
|
|
|
|
|
|
|
|
DoubHEAD& tuningParameters(const Tuning& tuning,
|
|
|
|
const double cnvT);
|
|
|
|
|
|
|
|
DoubHEAD& timeStamp(const TimeStamp& ts);
|
2018-12-04 07:15:13 -06:00
|
|
|
DoubHEAD& nextStep(const double nextTimeStep);
|
2018-04-16 12:24:25 -05:00
|
|
|
|
|
|
|
DoubHEAD& drsdt(const Schedule& sched,
|
2019-01-21 02:57:09 -06:00
|
|
|
const std::size_t lookup_step,
|
2019-07-26 10:17:06 -05:00
|
|
|
const double cnvT);
|
2020-02-13 01:58:24 -06:00
|
|
|
|
2019-07-26 10:17:06 -05:00
|
|
|
DoubHEAD& udq_param(const UDQParams& udqPar);
|
2019-10-16 08:47:03 -05:00
|
|
|
DoubHEAD& guide_rate_param(const guideRate& guide_rp);
|
2020-11-17 09:03:43 -06:00
|
|
|
DoubHEAD& lift_opt_param(const liftOptPar& lo_par);
|
2021-10-25 07:13:06 -05:00
|
|
|
DoubHEAD& netBalParams(const NetBalanceParams& net_bal_par);
|
2018-04-16 12:24:25 -05:00
|
|
|
|
|
|
|
const std::vector<double>& data() const
|
|
|
|
{
|
|
|
|
return this->data_;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<double> data_;
|
|
|
|
};
|
|
|
|
|
|
|
|
}} // Opm::RestartIO
|
|
|
|
|
|
|
|
#endif // OPM_DOUBHEAD_HEADER_INCLUDED
|