Add WellTestState argument to IO routines
This commit is contained in:
parent
2e6daf088b
commit
75d05312b7
@ -27,6 +27,7 @@ class Parser;
|
|||||||
class Python;
|
class Python;
|
||||||
class SummaryState;
|
class SummaryState;
|
||||||
class UDQState;
|
class UDQState;
|
||||||
|
class WellTestState;
|
||||||
|
|
||||||
namespace Action {
|
namespace Action {
|
||||||
class State;
|
class State;
|
||||||
@ -48,10 +49,10 @@ public:
|
|||||||
void post_step(Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, const time_point& sim_time);
|
void post_step(Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, const time_point& sim_time);
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, EclipseIO& io) const;
|
void run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, EclipseIO& io) const;
|
||||||
void run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) const;
|
void run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) const;
|
||||||
void output(Action::State& action_state, SummaryState& st, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_data, EclipseIO& io) const;
|
void output(Action::State& action_state, WellTestState& wtest_state, SummaryState& st, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_data, EclipseIO& io) const;
|
||||||
void simulate(const Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double seconds_elapsed, double time_step) const;
|
void simulate(const Schedule& schedule, WellTestState& wtest_state, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double seconds_elapsed, double time_step) const;
|
||||||
|
|
||||||
EclipseState state;
|
EclipseState state;
|
||||||
std::map<std::string, std::map<data::Rates::opt, std::function<well_rate_function>>> well_rates;
|
std::map<std::string, std::map<data::Rates::opt, std::function<well_rate_function>>> well_rates;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||||
@ -50,6 +51,7 @@ void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
|||||||
data::Solution sol;
|
data::Solution sol;
|
||||||
SummaryState st(TimeService::from_time_t(schedule.getStartTime()));
|
SummaryState st(TimeService::from_time_t(schedule.getStartTime()));
|
||||||
UDQState udq_state(schedule.getUDQConfig(0).params().undefinedValue());
|
UDQState udq_state(schedule.getUDQConfig(0).params().undefinedValue());
|
||||||
|
WellTestState wtest_state;
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
Python python;
|
Python python;
|
||||||
|
|
||||||
@ -58,10 +60,10 @@ void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
|||||||
data::Wells well_data;
|
data::Wells well_data;
|
||||||
data::GroupAndNetworkValues group_nwrk_data;
|
data::GroupAndNetworkValues group_nwrk_data;
|
||||||
if (report_only)
|
if (report_only)
|
||||||
run_step(schedule, action_state, st, udq_state, sol, well_data, group_nwrk_data, report_step, io);
|
run_step(schedule, action_state, wtest_state, st, udq_state, sol, well_data, group_nwrk_data, report_step, io);
|
||||||
else {
|
else {
|
||||||
double time_step = std::min(week, 0.5*schedule.stepLength(report_step - 1));
|
double time_step = std::min(week, 0.5*schedule.stepLength(report_step - 1));
|
||||||
run_step(schedule, action_state, st, udq_state, sol, well_data, group_nwrk_data, report_step, time_step, io);
|
run_step(schedule, action_state, wtest_state, st, udq_state, sol, well_data, group_nwrk_data, report_step, time_step, io);
|
||||||
}
|
}
|
||||||
auto sim_time = TimeService::from_time_t( schedule.simTime(report_step) );
|
auto sim_time = TimeService::from_time_t( schedule.simTime(report_step) );
|
||||||
post_step(schedule, action_state, st, sol, well_data, group_nwrk_data, report_step, sim_time);
|
post_step(schedule, action_state, st, sol, well_data, group_nwrk_data, report_step, sim_time);
|
||||||
@ -95,12 +97,12 @@ void msim::post_step(Schedule& schedule, Action::State& action_state, SummarySta
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& grp_nwrk_data, size_t report_step, EclipseIO& io) const {
|
void msim::run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& grp_nwrk_data, size_t report_step, EclipseIO& io) const {
|
||||||
this->run_step(schedule, action_state, st, udq_state, sol, well_data, grp_nwrk_data, report_step, schedule.stepLength(report_step - 1), io);
|
this->run_step(schedule, action_state, wtest_state, st, udq_state, sol, well_data, grp_nwrk_data, report_step, schedule.stepLength(report_step - 1), io);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) const {
|
void msim::run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) const {
|
||||||
double start_time = schedule.seconds(report_step - 1);
|
double start_time = schedule.seconds(report_step - 1);
|
||||||
double end_time = schedule.seconds(report_step);
|
double end_time = schedule.seconds(report_step);
|
||||||
double seconds_elapsed = start_time;
|
double seconds_elapsed = start_time;
|
||||||
@ -110,7 +112,7 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
|||||||
if ((seconds_elapsed + time_step) > end_time)
|
if ((seconds_elapsed + time_step) > end_time)
|
||||||
time_step = end_time - seconds_elapsed;
|
time_step = end_time - seconds_elapsed;
|
||||||
|
|
||||||
this->simulate(schedule, st, sol, well_data, group_nwrk_data, report_step, seconds_elapsed, time_step);
|
this->simulate(schedule, wtest_state, st, sol, well_data, group_nwrk_data, report_step, seconds_elapsed, time_step);
|
||||||
|
|
||||||
seconds_elapsed += time_step;
|
seconds_elapsed += time_step;
|
||||||
|
|
||||||
@ -127,6 +129,7 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
|||||||
schedule.getUDQConfig( report_step ).eval(report_step, schedule.wellMatcher(report_step), st, udq_state);
|
schedule.getUDQConfig( report_step ).eval(report_step, schedule.wellMatcher(report_step), st, udq_state);
|
||||||
|
|
||||||
this->output(action_state,
|
this->output(action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
report_step,
|
report_step,
|
||||||
@ -141,9 +144,10 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void msim::output(Action::State& action_state, SummaryState& st, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_nwrk_data, EclipseIO& io) const {
|
void msim::output(Action::State& action_state, WellTestState& wtest_state, SummaryState& st, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_nwrk_data, EclipseIO& io) const {
|
||||||
RestartValue value(sol, well_data, group_nwrk_data, {});
|
RestartValue value(sol, well_data, group_nwrk_data, {});
|
||||||
io.writeTimeStep(action_state,
|
io.writeTimeStep(action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
report_step,
|
report_step,
|
||||||
@ -153,7 +157,7 @@ void msim::output(Action::State& action_state, SummaryState& st, const UDQState&
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void msim::simulate(const Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& /* group_nwrk_data */, size_t report_step, double seconds_elapsed, double time_step) const {
|
void msim::simulate(const Schedule& schedule, WellTestState& wtest_state, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& /* group_nwrk_data */, size_t report_step, double seconds_elapsed, double time_step) const {
|
||||||
for (const auto& sol_pair : this->solutions) {
|
for (const auto& sol_pair : this->solutions) {
|
||||||
auto func = sol_pair.second;
|
auto func = sol_pair.second;
|
||||||
func(this->state, schedule, sol, report_step, seconds_elapsed + time_step);
|
func(this->state, schedule, sol, report_step, seconds_elapsed + time_step);
|
||||||
|
@ -46,6 +46,7 @@ class Schedule;
|
|||||||
class SummaryConfig;
|
class SummaryConfig;
|
||||||
class SummaryState;
|
class SummaryState;
|
||||||
class UDQState;
|
class UDQState;
|
||||||
|
class WellTestState;
|
||||||
namespace Action { class State; }
|
namespace Action { class State; }
|
||||||
/*!
|
/*!
|
||||||
* \brief A class to write the reservoir state and the well state of a
|
* \brief A class to write the reservoir state and the well state of a
|
||||||
@ -179,6 +180,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void writeTimeStep( const Action::State& action_state,
|
void writeTimeStep( const Action::State& action_state,
|
||||||
|
const WellTestState& wtest_state,
|
||||||
const SummaryState& st,
|
const SummaryState& st,
|
||||||
const UDQState& udq_state,
|
const UDQState& udq_state,
|
||||||
int report_step,
|
int report_step,
|
||||||
|
@ -40,6 +40,7 @@ namespace Opm {
|
|||||||
class Schedule;
|
class Schedule;
|
||||||
class UDQState;
|
class UDQState;
|
||||||
class SummaryState;
|
class SummaryState;
|
||||||
|
class WellTestState;
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
@ -86,6 +87,7 @@ namespace Opm { namespace RestartIO {
|
|||||||
const EclipseGrid& grid,
|
const EclipseGrid& grid,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const Action::State& action_state,
|
const Action::State& action_state,
|
||||||
|
const WellTestState& wtest_state,
|
||||||
const SummaryState& sumState,
|
const SummaryState& sumState,
|
||||||
const UDQState& udqState,
|
const UDQState& udqState,
|
||||||
std::optional<Helpers::AggregateAquiferData>& aquiferData,
|
std::optional<Helpers::AggregateAquiferData>& aquiferData,
|
||||||
|
@ -268,6 +268,7 @@ void EclipseIO::writeInitial( data::Solution simProps, std::map<std::string, std
|
|||||||
|
|
||||||
// implementation of the writeTimeStep method
|
// implementation of the writeTimeStep method
|
||||||
void EclipseIO::writeTimeStep(const Action::State& action_state,
|
void EclipseIO::writeTimeStep(const Action::State& action_state,
|
||||||
|
const WellTestState& wtest_state,
|
||||||
const SummaryState& st,
|
const SummaryState& st,
|
||||||
const UDQState& udq_state,
|
const UDQState& udq_state,
|
||||||
int report_step,
|
int report_step,
|
||||||
@ -318,7 +319,7 @@ void EclipseIO::writeTimeStep(const Action::State& action_state,
|
|||||||
};
|
};
|
||||||
|
|
||||||
RestartIO::save(rstFile, report_step, secs_elapsed, value,
|
RestartIO::save(rstFile, report_step, secs_elapsed, value,
|
||||||
es, grid, schedule, action_state, st,
|
es, grid, schedule, action_state, wtest_state, st,
|
||||||
udq_state, this->impl->aquiferData, write_double);
|
udq_state, this->impl->aquiferData, write_double);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ namespace {
|
|||||||
const EclipseGrid& grid,
|
const EclipseGrid& grid,
|
||||||
const EclipseState& es,
|
const EclipseState& es,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const data::Wells& wellSol,
|
const data::Wells& wellSol,
|
||||||
const Opm::Action::State& action_state,
|
const Opm::Action::State& action_state,
|
||||||
const Opm::SummaryState& sumState,
|
const Opm::SummaryState& sumState,
|
||||||
const std::vector<int>& inteHD,
|
const std::vector<int>& inteHD,
|
||||||
@ -757,6 +757,7 @@ void save(EclIO::OutputStream::Restart& rstFile,
|
|||||||
const EclipseGrid& grid,
|
const EclipseGrid& grid,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const Action::State& action_state,
|
const Action::State& action_state,
|
||||||
|
const WellTestState& ,
|
||||||
const SummaryState& sumState,
|
const SummaryState& sumState,
|
||||||
const UDQState& udqState,
|
const UDQState& udqState,
|
||||||
std::optional<Helpers::AggregateAquiferData>& aquiferData,
|
std::optional<Helpers::AggregateAquiferData>& aquiferData,
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
|
|
||||||
#include <opm/io/eclipse/EclFile.hpp>
|
#include <opm/io/eclipse/EclFile.hpp>
|
||||||
#include <opm/io/eclipse/EGrid.hpp>
|
#include <opm/io/eclipse/EGrid.hpp>
|
||||||
@ -325,10 +326,12 @@ BOOST_AUTO_TEST_CASE(EclipseIOIntegration) {
|
|||||||
sol.insert("KRG", measure::identity , std::vector<double>(3*3*3 , i*10), TargetType::RESTART_AUXILIARY);
|
sol.insert("KRG", measure::identity , std::vector<double>(3*3*3 , i*10), TargetType::RESTART_AUXILIARY);
|
||||||
|
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
|
WellTestState wtest_state;
|
||||||
UDQState udq_state(1);
|
UDQState udq_state(1);
|
||||||
RestartValue restart_value(sol, wells, grp_nwrk, {});
|
RestartValue restart_value(sol, wells, grp_nwrk, {});
|
||||||
auto first_step = ecl_util_make_date( 10 + i, 11, 2008 );
|
auto first_step = ecl_util_make_date( 10 + i, 11, 2008 );
|
||||||
eclWriter.writeTimeStep( action_state,
|
eclWriter.writeTimeStep( action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
i,
|
i,
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
@ -280,6 +281,7 @@ BOOST_AUTO_TEST_CASE(test_RFT)
|
|||||||
SummaryState st(TimeService::now());
|
SummaryState st(TimeService::now());
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
UDQState udq_state(1234);
|
UDQState udq_state(1234);
|
||||||
|
WellTestState wtest_state;
|
||||||
|
|
||||||
data::Rates r1, r2;
|
data::Rates r1, r2;
|
||||||
r1.set( data::Rates::opt::wat, 4.11 );
|
r1.set( data::Rates::opt::wat, 4.11 );
|
||||||
@ -322,6 +324,7 @@ BOOST_AUTO_TEST_CASE(test_RFT)
|
|||||||
RestartValue restart_value(std::move(solution), std::move(wells), std::move(group_nwrk), {});
|
RestartValue restart_value(std::move(solution), std::move(wells), std::move(group_nwrk), {});
|
||||||
|
|
||||||
eclipseWriter.writeTimeStep( action_state,
|
eclipseWriter.writeTimeStep( action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
2,
|
2,
|
||||||
@ -409,6 +412,7 @@ BOOST_AUTO_TEST_CASE(test_RFT2)
|
|||||||
SummaryState st(Opm::TimeService::now());
|
SummaryState st(Opm::TimeService::now());
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
UDQState udq_state(10);
|
UDQState udq_state(10);
|
||||||
|
WellTestState wtest_state;
|
||||||
|
|
||||||
const auto start_time = schedule.posixStartTime();
|
const auto start_time = schedule.posixStartTime();
|
||||||
for (int counter = 0; counter < 2; counter++) {
|
for (int counter = 0; counter < 2; counter++) {
|
||||||
@ -456,6 +460,7 @@ BOOST_AUTO_TEST_CASE(test_RFT2)
|
|||||||
RestartValue restart_value(std::move(solution), std::move(wells), data::GroupAndNetworkValues(), {});
|
RestartValue restart_value(std::move(solution), std::move(wells), data::GroupAndNetworkValues(), {});
|
||||||
|
|
||||||
eclipseWriter.writeTimeStep( action_state,
|
eclipseWriter.writeTimeStep( action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
step,
|
step,
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
|
|
||||||
#include <opm/io/eclipse/OutputStream.hpp>
|
#include <opm/io/eclipse/OutputStream.hpp>
|
||||||
#include <opm/io/eclipse/EclIOdata.hpp>
|
#include <opm/io/eclipse/EclIOdata.hpp>
|
||||||
@ -390,6 +391,7 @@ struct Setup {
|
|||||||
|
|
||||||
|
|
||||||
RestartValue first_sim(const Setup& setup, Action::State& action_state, SummaryState& st, UDQState& udq_state, bool write_double) {
|
RestartValue first_sim(const Setup& setup, Action::State& action_state, SummaryState& st, UDQState& udq_state, bool write_double) {
|
||||||
|
WellTestState wtest_state;
|
||||||
EclipseIO eclWriter( setup.es, setup.grid, setup.schedule, setup.summary_config);
|
EclipseIO eclWriter( setup.es, setup.grid, setup.schedule, setup.summary_config);
|
||||||
auto num_cells = setup.grid.getNumActive( );
|
auto num_cells = setup.grid.getNumActive( );
|
||||||
int report_step = 1;
|
int report_step = 1;
|
||||||
@ -404,6 +406,7 @@ RestartValue first_sim(const Setup& setup, Action::State& action_state, SummaryS
|
|||||||
|
|
||||||
udq.eval(report_step, setup.schedule.wellMatcher(report_step), st, udq_state);
|
udq.eval(report_step, setup.schedule.wellMatcher(report_step), st, udq_state);
|
||||||
eclWriter.writeTimeStep( action_state,
|
eclWriter.writeTimeStep( action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
report_step,
|
report_step,
|
||||||
@ -485,6 +488,7 @@ BOOST_AUTO_TEST_CASE(ECL_FORMATTED) {
|
|||||||
auto udqState = UDQState{1};
|
auto udqState = UDQState{1};
|
||||||
auto aquiferData = std::optional<Opm::RestartIO::Helpers::AggregateAquiferData>{std::nullopt};
|
auto aquiferData = std::optional<Opm::RestartIO::Helpers::AggregateAquiferData>{std::nullopt};
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
|
WellTestState wtest_state;
|
||||||
{
|
{
|
||||||
RestartValue restart_value(cells, wells, groups, {});
|
RestartValue restart_value(cells, wells, groups, {});
|
||||||
|
|
||||||
@ -507,6 +511,7 @@ BOOST_AUTO_TEST_CASE(ECL_FORMATTED) {
|
|||||||
base_setup.grid,
|
base_setup.grid,
|
||||||
base_setup.schedule,
|
base_setup.schedule,
|
||||||
action_state,
|
action_state,
|
||||||
|
wtest_state,
|
||||||
sumState,
|
sumState,
|
||||||
udqState,
|
udqState,
|
||||||
aquiferData,
|
aquiferData,
|
||||||
@ -538,6 +543,7 @@ BOOST_AUTO_TEST_CASE(ECL_FORMATTED) {
|
|||||||
base_setup.grid,
|
base_setup.grid,
|
||||||
base_setup.schedule,
|
base_setup.schedule,
|
||||||
action_state,
|
action_state,
|
||||||
|
wtest_state,
|
||||||
sumState,
|
sumState,
|
||||||
udqState,
|
udqState,
|
||||||
aquiferData,
|
aquiferData,
|
||||||
@ -623,6 +629,7 @@ BOOST_AUTO_TEST_CASE(WriteWrongSOlutionSize) {
|
|||||||
Opm::SummaryState sumState(TimeService::now());
|
Opm::SummaryState sumState(TimeService::now());
|
||||||
Opm::Action::State action_state;
|
Opm::Action::State action_state;
|
||||||
Opm::UDQState udq_state(19);
|
Opm::UDQState udq_state(19);
|
||||||
|
Opm::WellTestState wtest_state;
|
||||||
auto aquiferData = std::optional<Opm::RestartIO::Helpers::AggregateAquiferData>{std::nullopt};
|
auto aquiferData = std::optional<Opm::RestartIO::Helpers::AggregateAquiferData>{std::nullopt};
|
||||||
|
|
||||||
const auto seqnum = 1;
|
const auto seqnum = 1;
|
||||||
@ -638,6 +645,7 @@ BOOST_AUTO_TEST_CASE(WriteWrongSOlutionSize) {
|
|||||||
setup.grid ,
|
setup.grid ,
|
||||||
setup.schedule,
|
setup.schedule,
|
||||||
action_state,
|
action_state,
|
||||||
|
wtest_state,
|
||||||
sumState,
|
sumState,
|
||||||
udq_state,
|
udq_state,
|
||||||
aquiferData),
|
aquiferData),
|
||||||
@ -676,6 +684,7 @@ BOOST_AUTO_TEST_CASE(ExtraData_content) {
|
|||||||
Setup setup("BASE_SIM.DATA");
|
Setup setup("BASE_SIM.DATA");
|
||||||
{
|
{
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
|
WellTestState wtest_state;
|
||||||
UDQState udq_state(10);
|
UDQState udq_state(10);
|
||||||
auto num_cells = setup.grid.getNumActive( );
|
auto num_cells = setup.grid.getNumActive( );
|
||||||
auto cells = mkSolution( num_cells );
|
auto cells = mkSolution( num_cells );
|
||||||
@ -706,6 +715,7 @@ BOOST_AUTO_TEST_CASE(ExtraData_content) {
|
|||||||
setup.grid,
|
setup.grid,
|
||||||
setup.schedule,
|
setup.schedule,
|
||||||
action_state,
|
action_state,
|
||||||
|
wtest_state,
|
||||||
sumState,
|
sumState,
|
||||||
udq_state,
|
udq_state,
|
||||||
aquiferData);
|
aquiferData);
|
||||||
@ -786,6 +796,7 @@ BOOST_AUTO_TEST_CASE(STORE_THPRES) {
|
|||||||
const auto sumState = sim_state(base_setup.schedule);
|
const auto sumState = sim_state(base_setup.schedule);
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
UDQState udq_state(99);
|
UDQState udq_state(99);
|
||||||
|
WellTestState wtest_state;
|
||||||
|
|
||||||
/* THPRES data has wrong size in extra container. */
|
/* THPRES data has wrong size in extra container. */
|
||||||
{
|
{
|
||||||
@ -802,6 +813,7 @@ BOOST_AUTO_TEST_CASE(STORE_THPRES) {
|
|||||||
base_setup.grid,
|
base_setup.grid,
|
||||||
base_setup.schedule,
|
base_setup.schedule,
|
||||||
action_state,
|
action_state,
|
||||||
|
wtest_state,
|
||||||
sumState,
|
sumState,
|
||||||
udq_state,
|
udq_state,
|
||||||
aquiferData),
|
aquiferData),
|
||||||
@ -827,6 +839,7 @@ BOOST_AUTO_TEST_CASE(STORE_THPRES) {
|
|||||||
base_setup.grid,
|
base_setup.grid,
|
||||||
base_setup.schedule,
|
base_setup.schedule,
|
||||||
action_state,
|
action_state,
|
||||||
|
wtest_state,
|
||||||
sumState,
|
sumState,
|
||||||
udq_state,
|
udq_state,
|
||||||
aquiferData);
|
aquiferData);
|
||||||
@ -884,6 +897,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
|||||||
const auto seqnum = 1;
|
const auto seqnum = 1;
|
||||||
{
|
{
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
|
WellTestState wtest_state;
|
||||||
auto aquiferData = std::optional<Opm::RestartIO::Helpers::AggregateAquiferData>{std::nullopt};
|
auto aquiferData = std::optional<Opm::RestartIO::Helpers::AggregateAquiferData>{std::nullopt};
|
||||||
auto rstFile = OS::Restart {
|
auto rstFile = OS::Restart {
|
||||||
rset, seqnum, OS::Formatted{ false }, OS::Unified{ true }
|
rset, seqnum, OS::Formatted{ false }, OS::Unified{ true }
|
||||||
@ -891,7 +905,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
|||||||
|
|
||||||
RestartIO::save(rstFile, seqnum, 100, restart_value,
|
RestartIO::save(rstFile, seqnum, 100, restart_value,
|
||||||
setup.es, setup.grid, setup.schedule,
|
setup.es, setup.grid, setup.schedule,
|
||||||
action_state, sumState, udq_state, aquiferData);
|
action_state, wtest_state, sumState, udq_state, aquiferData);
|
||||||
}
|
}
|
||||||
|
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellInjectionProperties.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellInjectionProperties.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
|
|
||||||
#include <opm/io/eclipse/EclFile.hpp>
|
#include <opm/io/eclipse/EclFile.hpp>
|
||||||
|
|
||||||
@ -222,10 +223,12 @@ BOOST_AUTO_TEST_CASE(EclipseWriteRestartWellInfo) {
|
|||||||
solution.insert( "SGAS" , Opm::UnitSystem::measure::identity , std::vector< double >( num_cells, 1 ) , Opm::data::TargetType::RESTART_SOLUTION);
|
solution.insert( "SGAS" , Opm::UnitSystem::measure::identity , std::vector< double >( num_cells, 1 ) , Opm::data::TargetType::RESTART_SOLUTION);
|
||||||
Opm::data::Wells wells;
|
Opm::data::Wells wells;
|
||||||
Opm::data::GroupAndNetworkValues group_nwrk;
|
Opm::data::GroupAndNetworkValues group_nwrk;
|
||||||
|
Opm::WellTestState wtest_state;
|
||||||
|
|
||||||
for(int timestep = 0; timestep <= countTimeStep; ++timestep) {
|
for(int timestep = 0; timestep <= countTimeStep; ++timestep) {
|
||||||
|
|
||||||
eclipseWriter.writeTimeStep( action_state,
|
eclipseWriter.writeTimeStep( action_state,
|
||||||
|
wtest_state,
|
||||||
st,
|
st,
|
||||||
udq_state,
|
udq_state,
|
||||||
timestep,
|
timestep,
|
||||||
|
Loading…
Reference in New Issue
Block a user