Initial work to add Actionx data to Eclipse compatible restart file
further changes to Actionx - restart further changes for Actionx data to Restart file additional changes to output Actionx data to Restart file add test data for UDQ-ACTIONX changes to add unit tests for InteHead - Actionx Added changes to allow for output of IACT, SACT and ZACT to the E100 compatible restart file changes to add ZLACT to restart output Further changes - add ZACN - prelim further changes to add ZACN to restart file Additional changes to output IACN and SACN to restart further changes to add IACN and SACN to the restart file further changes to make unit tests for Actionx data / keywords further changes to actionx restart and unit tests therefore Added code for unit tests - not finished some changes to correct for changes in upstream/master changes correct errors in IACN and SACN Initial work to add Actionx data to Eclipse compatible restart file further changes to Actionx - restart further changes for Actionx data to Restart file additional changes to output Actionx data to Restart file add test data for UDQ-ACTIONX changes to add unit tests for InteHead - Actionx Added changes to allow for output of IACT, SACT and ZACT to the E100 compatible restart file changes to add ZLACT to restart output Further changes - add ZACN - prelim further changes to add ZACN to restart file Additional changes to output IACN and SACN to restart further changes to add IACN and SACN to the restart file further changes to make unit tests for Actionx data / keywords further changes to actionx restart and unit tests therefore Added code for unit tests - not finished some changes to correct for changes in upstream/master changes correct errors in IACN and SACN changes to avoid change in output data for restart file further changes to avoid change in RESTART data minor change to avoid data change in Restart file
This commit is contained in:
parent
1db06277ce
commit
7973585db0
@ -210,11 +210,13 @@ if(ENABLE_ECL_OUTPUT)
|
||||
src/opm/io/eclipse/ERst.cpp
|
||||
src/opm/io/eclipse/ESmry.cpp
|
||||
src/opm/io/eclipse/OutputStream.cpp
|
||||
src/opm/output/eclipse/AggregateActionxData.cpp
|
||||
src/opm/output/eclipse/AggregateConnectionData.cpp
|
||||
src/opm/output/eclipse/AggregateGroupData.cpp
|
||||
src/opm/output/eclipse/AggregateMSWData.cpp
|
||||
src/opm/output/eclipse/AggregateUDQData.cpp
|
||||
src/opm/output/eclipse/AggregateWellData.cpp
|
||||
src/opm/output/eclipse/CreateActionxDims.cpp
|
||||
src/opm/output/eclipse/CreateDoubHead.cpp
|
||||
src/opm/output/eclipse/CreateInteHead.cpp
|
||||
src/opm/output/eclipse/CreateLogiHead.cpp
|
||||
@ -323,6 +325,7 @@ if(ENABLE_ECL_INPUT)
|
||||
endif()
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
list (APPEND TEST_SOURCE_FILES
|
||||
tests/test_AggregateActionxData.cpp
|
||||
tests/test_AggregateWellData.cpp
|
||||
tests/test_AggregateGroupData.cpp
|
||||
tests/test_AggregateMSWData.cpp
|
||||
@ -370,6 +373,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/SPE9_CP_PACKED.DATA
|
||||
tests/SOFR_TEST.DATA
|
||||
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
|
||||
tests/UDQ_ACTIONX_TEST1.DATA
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -654,6 +658,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/eclipse/VectorItems/msw.hpp
|
||||
opm/output/eclipse/VectorItems/tabdims.hpp
|
||||
opm/output/eclipse/VectorItems/well.hpp
|
||||
opm/output/eclipse/AggregateActionxData.hpp
|
||||
opm/output/eclipse/AggregateGroupData.hpp
|
||||
opm/output/eclipse/AggregateConnectionData.hpp
|
||||
opm/output/eclipse/AggregateMSWData.hpp
|
||||
|
122
opm/output/eclipse/AggregateActionxData.hpp
Normal file
122
opm/output/eclipse/AggregateActionxData.hpp
Normal file
@ -0,0 +1,122 @@
|
||||
/*
|
||||
Copyright (c) 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_AGGREGATE_Actionx_DATA_HPP
|
||||
#define OPM_AGGREGATE_Actionx_DATA_HPP
|
||||
|
||||
#include <opm/output/eclipse/WindowedArray.hpp>
|
||||
#include <opm/io/eclipse/PaddedOutputString.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace Opm {
|
||||
class Schedule;
|
||||
class UDQInput;
|
||||
class UDQActive;
|
||||
} // Opm
|
||||
|
||||
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
|
||||
class AggregateActionxData
|
||||
{
|
||||
public:
|
||||
explicit AggregateActionxData(const std::vector<int>& actDims);
|
||||
|
||||
void captureDeclaredActionxData( const Opm::Schedule& sched,
|
||||
const Opm::SummaryState& st,
|
||||
const std::vector<int>& actDims,
|
||||
const std::size_t simStep);
|
||||
|
||||
const std::vector<int>& getIACT() const
|
||||
{
|
||||
return this->iACT_.data();
|
||||
}
|
||||
|
||||
|
||||
const std::vector<float>& getSACT() const
|
||||
{
|
||||
return this->sACT_.data();
|
||||
}
|
||||
|
||||
const std::vector<EclIO::PaddedOutputString<8>>& getZACT() const
|
||||
{
|
||||
return this->zACT_.data();
|
||||
}
|
||||
|
||||
const std::vector<EclIO::PaddedOutputString<8>>& getZLACT() const
|
||||
{
|
||||
return this->zLACT_.data();
|
||||
}
|
||||
|
||||
const std::vector<EclIO::PaddedOutputString<8>>& getZACN() const
|
||||
{
|
||||
return this->zACN_.data();
|
||||
}
|
||||
|
||||
const std::vector<int>& getIACN() const
|
||||
{
|
||||
return this->iACN_.data();
|
||||
}
|
||||
|
||||
const std::vector<double>& getSACN() const
|
||||
{
|
||||
return this->sACN_.data();
|
||||
}
|
||||
|
||||
private:
|
||||
/// Aggregate 'IACT' array (Integer) for all ACTIONX data (9 integers pr UDQ)
|
||||
WindowedArray<int> iACT_;
|
||||
|
||||
/// Aggregate 'SACT' array (Integer) for all ACTIONX data (5 integers pr ACTIONX - currently all zero - meaning unknown)
|
||||
WindowedArray<float> sACT_;
|
||||
|
||||
/// Aggregate 'ZACT' array (Character) for all ACTIONX data. (4 * 8 chars pr ACIONX keyword - name of Action)
|
||||
WindowedArray<EclIO::PaddedOutputString<8>> zACT_;
|
||||
|
||||
/// Aggregate 'ZLACT' array (Character) for all Actionx data. (max 16 * 8 characters pr line (default 80 chars pr line)
|
||||
WindowedArray<EclIO::PaddedOutputString<8>> zLACT_;
|
||||
|
||||
/// Aggregate 'ZACN' array (Character) for all Actionx data (length equal to max no of conditions pr Actionx * the number of Actiox kwords)
|
||||
WindowedArray<EclIO::PaddedOutputString<8>> zACN_;
|
||||
|
||||
/// Aggregate 'IACN' array (Integer) for all Actionx data (length 26* the max number of conditoins pr Actionx * the number of Actionx kwords)
|
||||
WindowedArray<int> iACN_;
|
||||
|
||||
/// Aggregate 'SACN' array (Integer) for all Actionx data (16 * max number of Actionx conditions)
|
||||
WindowedArray<double> sACN_;
|
||||
|
||||
};
|
||||
|
||||
}}} // Opm::RestartIO::Helpers
|
||||
|
||||
#endif //OPM_AGGREGATE_WELL_DATA_HPP
|
@ -93,8 +93,15 @@ namespace Opm { namespace RestartIO {
|
||||
|
||||
struct UdqParam {
|
||||
int udqParam_1;
|
||||
int no_udqs;
|
||||
};
|
||||
|
||||
struct ActionParam {
|
||||
int no_actions;
|
||||
int max_no_sched_lines_per_action;
|
||||
int max_no_conditions_per_action;
|
||||
int max_no_characters_per_line;
|
||||
};
|
||||
InteHEAD();
|
||||
~InteHEAD() = default;
|
||||
|
||||
@ -121,8 +128,9 @@ namespace Opm { namespace RestartIO {
|
||||
InteHEAD& variousParam(const int version, const int iprog);
|
||||
InteHEAD& wellSegDimensions(const WellSegDims& wsdim);
|
||||
InteHEAD& regionDimensions(const RegDims& rdim);
|
||||
InteHEAD& ngroups(const Group& gr);
|
||||
InteHEAD& ngroups(const Group& gr);
|
||||
InteHEAD& udqParam_1(const UdqParam& udqpar);
|
||||
InteHEAD& actionParam(const ActionParam& act_par);
|
||||
|
||||
const std::vector<int>& data() const
|
||||
{
|
||||
|
@ -76,6 +76,10 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
NSCAQZ = 46, // Number of data elements per aquifer connection in SCAQ array
|
||||
NACAQZ = 47, // Number of data elements per aquifer connection in ACAQ array
|
||||
|
||||
NOOFACTIONS = 156, // The number of actions in the dataset
|
||||
MAXNOLINES = 157, // Maximum number of lines of schedule data for ACTION keyword - including ENDACTIO
|
||||
MAXNOSTRPRLINE = 158, // Maximum number of 8-chars strings pr input line of Action data (rounded up from input)
|
||||
|
||||
NWMAXZ = 163, // Maximum number of wells in the model
|
||||
|
||||
NSEGWL = 174, // Number of multisegment wells defined with WELSEG
|
||||
@ -86,7 +90,11 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
NISEGZ = 178, // Number of entries per segment in ISEG array
|
||||
NRSEGZ = 179, // Number of entries per segment in RSEG array
|
||||
NILBRZ = 180, // Number of entries per segment in ILBR array
|
||||
|
||||
MAX_ACT_COND = 245, // Maximum number of conditions pr action /
|
||||
NO_UDQS = 266, // No of UDQ data (parameters) /
|
||||
UDQPAR_1 = 267, // Integer seed value for the RAND /
|
||||
RSEED = 296,
|
||||
};
|
||||
}}}} // Opm::RestartIO::Helpers::VectorItems
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Runspec;
|
||||
class EclipseGrid;
|
||||
class EclipseState;
|
||||
class Schedule;
|
||||
@ -69,6 +70,10 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
const std::size_t lookup_step,
|
||||
const std::vector<int>& inteHead);
|
||||
|
||||
std::vector<int>
|
||||
createActionxDims( const Runspec& rspec,
|
||||
const Schedule& sched,
|
||||
const std::size_t simStep);
|
||||
|
||||
}}} // Opm::RestartIO::Helpers
|
||||
|
||||
|
@ -39,6 +39,7 @@ class Actions {
|
||||
public:
|
||||
Actions() = default;
|
||||
size_t size() const;
|
||||
int max_input_lines() const;
|
||||
bool empty() const;
|
||||
void add(const ActionX& action);
|
||||
bool ready(std::time_t sim_time) const;
|
||||
|
587
src/opm/output/eclipse/AggregateActionxData.cpp
Normal file
587
src/opm/output/eclipse/AggregateActionxData.cpp
Normal file
@ -0,0 +1,587 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#include <opm/output/eclipse/AggregateActionxData.hpp>
|
||||
#include <opm/output/eclipse/AggregateGroupData.hpp>
|
||||
#include <opm/output/eclipse/WriteRestartHelpers.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
// #####################################################################
|
||||
// Class Opm::RestartIO::Helpers::AggregateGroupData
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace {
|
||||
const std::map<std::string, int> lhsQuantityToIndex = {
|
||||
{"F", 1},
|
||||
{"W", 2},
|
||||
{"G", 3},
|
||||
{"D", 10},
|
||||
{"M", 11},
|
||||
{"Y", 12},
|
||||
};
|
||||
|
||||
const std::map<std::string, double> monthToNo = {
|
||||
{"JAN", 1.},
|
||||
{"FEB", 2.},
|
||||
{"MAR", 3.},
|
||||
{"APR", 4.},
|
||||
{"MAY", 5.},
|
||||
{"JUN", 6.},
|
||||
{"JUL", 7.},
|
||||
{"AUG", 8.},
|
||||
{"SEP", 9.},
|
||||
{"OCT", 10.},
|
||||
{"NOV", 11.},
|
||||
{"DEC", 12.},
|
||||
};
|
||||
|
||||
|
||||
const std::map<std::string, int> rhsQuantityToIndex = {
|
||||
{"F", 1},
|
||||
{"W", 2},
|
||||
{"G", 3},
|
||||
};
|
||||
|
||||
using logic_enum = Opm::Action::Condition::Logical;
|
||||
const std::map<logic_enum, int> logicalToIndex_13 = {
|
||||
{logic_enum::AND, 1},
|
||||
{logic_enum::OR, 2},
|
||||
{logic_enum::END, 0},
|
||||
};
|
||||
|
||||
const std::map<logic_enum, int> logicalToIndex_17 = {
|
||||
{logic_enum::AND, 1},
|
||||
{logic_enum::OR, 0},
|
||||
{logic_enum::END, 0},
|
||||
};
|
||||
|
||||
|
||||
using cmp_enum = Opm::Action::Condition::Comparator;
|
||||
const std::map<cmp_enum, int> cmpToIndex = {
|
||||
{cmp_enum::GREATER, 1},
|
||||
{cmp_enum::LESS, 2},
|
||||
{cmp_enum::GREATER_EQUAL, 3},
|
||||
{cmp_enum::LESS_EQUAL, 4},
|
||||
{cmp_enum::EQUAL, 5},
|
||||
{cmp_enum::INVALID, 0},
|
||||
};
|
||||
|
||||
|
||||
namespace iACT {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<int>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<int>;
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[1]) }
|
||||
};
|
||||
}
|
||||
|
||||
template <class IACTArray>
|
||||
void staticContrib(const Opm::Action::ActionX& actx, IACTArray& iAct)
|
||||
{
|
||||
//item [0]: is unknown, (=0)
|
||||
iAct[0] = 0;
|
||||
//item [1]: The number of lines of schedule data including ENDACTIO
|
||||
iAct[1] = actx.keyword_strings().size();
|
||||
//item [2]: is unknown, (=1)
|
||||
iAct[2] = 1;
|
||||
//item [3]: is unknown, (=7)
|
||||
iAct[3] = 7;
|
||||
//item [4]: is unknown, (=0)
|
||||
iAct[4] = 0;
|
||||
//item [5]: The number of times the action is triggered
|
||||
iAct[5] = actx.max_run();
|
||||
//item [6]: is unknown, (=0)
|
||||
iAct[6] = 0;
|
||||
//item [7]: is unknown, (=0)
|
||||
iAct[7] = 0;
|
||||
//item [8]: The number of times the action is triggered
|
||||
iAct[8] = actx.conditions().size();
|
||||
}
|
||||
|
||||
} // iAct
|
||||
|
||||
namespace sACT {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<float>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<float>;
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[2]) }
|
||||
};
|
||||
}
|
||||
|
||||
template <class SACTArray>
|
||||
void staticContrib(SACTArray& sAct)
|
||||
{
|
||||
//item [0 - 4]: is unknown, (=0)
|
||||
for (std::size_t ind = 0; ind < 5 ; ind++) {
|
||||
sAct[ind] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
} // sAct
|
||||
|
||||
namespace zACT {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<
|
||||
Opm::EclIO::PaddedOutputString<8>
|
||||
>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<
|
||||
Opm::EclIO::PaddedOutputString<8>
|
||||
>;
|
||||
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[3]) }
|
||||
};
|
||||
}
|
||||
|
||||
template <class ZACTArray>
|
||||
void staticContrib(const Opm::Action::ActionX& actx, ZACTArray& zAct)
|
||||
{
|
||||
// entry 1 is udq keyword
|
||||
zAct[0] = actx.name();
|
||||
}
|
||||
} // zAct
|
||||
|
||||
namespace zLACT {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<
|
||||
Opm::EclIO::PaddedOutputString<8>
|
||||
>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<
|
||||
Opm::EclIO::PaddedOutputString<8>
|
||||
>;
|
||||
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[4]) }
|
||||
};
|
||||
}
|
||||
|
||||
template <class ZLACTArray>
|
||||
void staticContrib(const Opm::Action::ActionX& actx, int noEPrZlact, ZLACTArray& zLact)
|
||||
{
|
||||
std::size_t ind = 0;
|
||||
int l_sstr = 8;
|
||||
int max_l_str = 128;
|
||||
// write out the schedule input lines
|
||||
const auto& schedule_data = actx.keyword_strings();
|
||||
for (auto z_data : schedule_data) {
|
||||
int n_sstr = z_data.size()/l_sstr;
|
||||
if (static_cast<int>(z_data.size()) > max_l_str) {
|
||||
std::cout << "Too long input data string (max 128 characters): " << z_data << std::endl;
|
||||
throw std::invalid_argument("Actionx: " + actx.name());
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < n_sstr; i++) {
|
||||
zLact[ind + i] = z_data.substr(i*l_sstr, l_sstr);
|
||||
}
|
||||
//add remainder of last non-zero string
|
||||
if ((z_data.size() % l_sstr) > 0)
|
||||
zLact[ind + n_sstr] = z_data.substr(n_sstr*l_sstr);
|
||||
}
|
||||
ind += static_cast<std::size_t>(noEPrZlact);
|
||||
}
|
||||
}
|
||||
} // zLact
|
||||
|
||||
namespace zACN {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<
|
||||
Opm::EclIO::PaddedOutputString<8>
|
||||
>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<
|
||||
Opm::EclIO::PaddedOutputString<8>
|
||||
>;
|
||||
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[5]) }
|
||||
};
|
||||
}
|
||||
|
||||
template <class ZACNArray>
|
||||
void staticContrib(const Opm::Action::ActionX& actx, ZACNArray& zAcn)
|
||||
{
|
||||
std::size_t ind = 0;
|
||||
int noEPZacn = 13;
|
||||
// write out the schedule Actionx conditions
|
||||
const auto& actx_cond = actx.conditions();
|
||||
for (auto z_data : actx_cond) {
|
||||
// left hand quantity
|
||||
if ((z_data.lhs.quantity.substr(0,1) != "D") &&
|
||||
(z_data.lhs.quantity.substr(0,1) != "M") &&
|
||||
(z_data.lhs.quantity.substr(0,1) != "Y"))
|
||||
zAcn[ind + 0] = z_data.lhs.quantity;
|
||||
// right hand quantity
|
||||
if ((z_data.rhs.quantity.substr(0,1) == "W") ||
|
||||
(z_data.rhs.quantity.substr(0,1) == "G"))
|
||||
zAcn[ind + 1] = z_data.rhs.quantity;
|
||||
// operator (comparator)
|
||||
zAcn[ind + 2] = z_data.cmp_string;
|
||||
// well-name if left hand quantity is a well quantity
|
||||
if (z_data.lhs.quantity.substr(0,1) == "W") {
|
||||
zAcn[ind + 3] = z_data.lhs.args[0];
|
||||
}
|
||||
// well-name if right hand quantity is a well quantity
|
||||
if (z_data.rhs.quantity.substr(0,1) == "W") {
|
||||
zAcn[ind + 4] = z_data.rhs.args[0];
|
||||
}
|
||||
|
||||
// group-name if left hand quantity is a group quantity
|
||||
if (z_data.lhs.quantity.substr(0,1) == "G") {
|
||||
zAcn[ind + 5] = z_data.lhs.args[0];
|
||||
}
|
||||
// group-name if right hand quantity is a group quantity
|
||||
if (z_data.rhs.quantity.substr(0,1) == "G") {
|
||||
zAcn[ind + 6] = z_data.rhs.args[0];
|
||||
}
|
||||
|
||||
//increment index according to no of items pr condition
|
||||
ind += static_cast<std::size_t>(noEPZacn);
|
||||
}
|
||||
}
|
||||
} // zAcn
|
||||
|
||||
}
|
||||
|
||||
namespace iACN {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<int>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<int>;
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[6]) }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <class IACNArray>
|
||||
void staticContrib(const Opm::Action::ActionX& actx, IACNArray& iAcn)
|
||||
{
|
||||
//item [0 - 9]: are unknown, (=0)
|
||||
|
||||
/*item [10] type of quantity for condition
|
||||
1 for a field quantity (number of flowing producing wells)
|
||||
2 for a well quantity
|
||||
3 for a (node) group quantity
|
||||
//9 for a well group quantity
|
||||
10 for DAY
|
||||
11 for MNTH
|
||||
12 for YEAR
|
||||
*/
|
||||
std::size_t ind = 0;
|
||||
int noEPZacn = 26;
|
||||
// write out the schedule Actionx conditions
|
||||
const auto& actx_cond = actx.conditions();
|
||||
for (auto cond_it = actx_cond.begin(); cond_it < actx_cond.end(); cond_it++) {
|
||||
auto z_data = *cond_it;
|
||||
// left hand quantity
|
||||
std::string lhsQtype = z_data.lhs.quantity.substr(0,1);
|
||||
const auto it_lhsq = lhsQuantityToIndex.find(lhsQtype);
|
||||
if (it_lhsq != lhsQuantityToIndex.end()) {
|
||||
iAcn[ind + 10] = it_lhsq->second;
|
||||
}
|
||||
else {
|
||||
std::cout << "Unknown condition type: " << z_data.lhs.quantity << std::endl;
|
||||
throw std::invalid_argument("Actionx: " + actx.name());
|
||||
}
|
||||
|
||||
/*item[11] - quantity type for rhs quantity
|
||||
1 - for field variables
|
||||
2 - for well variables?
|
||||
3 - for group variables
|
||||
8 - for constant values
|
||||
*/
|
||||
iAcn[ind + 11] = 8;
|
||||
std::string rhsQtype = z_data.rhs.quantity.substr(0,1);
|
||||
const auto it_rhsq = rhsQuantityToIndex.find(rhsQtype);
|
||||
if (it_rhsq != rhsQuantityToIndex.end()) {
|
||||
iAcn[ind + 11] = it_rhsq->second;
|
||||
}
|
||||
|
||||
/*item[12] - index for lhs type
|
||||
1 - for MNTH
|
||||
0 - for all other types
|
||||
*/
|
||||
std::string lhsQ = z_data.lhs.quantity;
|
||||
if ( lhsQ == "MNTH") {
|
||||
iAcn[ind + 12] = 1;
|
||||
}
|
||||
|
||||
/*item [13] - relates to operator
|
||||
OR is 2
|
||||
AND is 1
|
||||
*/
|
||||
const auto it_logic_13 = logicalToIndex_13.find(z_data.logic);
|
||||
if (it_logic_13 != logicalToIndex_13.end()) {
|
||||
iAcn[ind + 13] = it_logic_13->second;
|
||||
}
|
||||
else {
|
||||
std::cout << "Unknown Boolean operator type for condition: " << z_data.lhs.quantity << std::endl;
|
||||
throw std::invalid_argument("Actionx: " + actx.name());
|
||||
}
|
||||
|
||||
/*item [16] - related to the operater used in ACTIONX for defined quantities
|
||||
> is 1
|
||||
< is 2
|
||||
>= is 3
|
||||
<= is 4
|
||||
= is 5
|
||||
*/
|
||||
const auto it_cmp = cmpToIndex.find(z_data.cmp);
|
||||
if (it_cmp != cmpToIndex.end()) {
|
||||
iAcn[ind + 16] = it_cmp->second;
|
||||
}
|
||||
else {
|
||||
std::cout << "Unknown operator type for condition: " << z_data.lhs.quantity << std::endl;
|
||||
throw std::invalid_argument("Actionx: " + actx.name());
|
||||
}
|
||||
|
||||
/*item [17] - relates to operator and if the right hand condition is a constant or not
|
||||
* First condition => [17] = 0
|
||||
* Second+ conditions
|
||||
*If the previous condition has a constant rhs => [17] = 0
|
||||
*If rhs is {W,G, F} and
|
||||
*If previous condition is AND => [17] = 1
|
||||
*If previous condition is OR => [17] = 0
|
||||
*/
|
||||
if (cond_it > actx_cond.begin()) {
|
||||
const std::string prev_rhs_quant = (cond_it-1)->rhs.quantity.substr(0,1);
|
||||
const auto it_prev_rhs = rhsQuantityToIndex.find(prev_rhs_quant);
|
||||
if (it_prev_rhs != rhsQuantityToIndex.end()) {
|
||||
const auto it_logic_17 = logicalToIndex_17.find((cond_it-1)->logic);
|
||||
if (it_logic_17 != logicalToIndex_17.end()) {
|
||||
iAcn[ind + 17] = it_logic_17->second;
|
||||
}
|
||||
else {
|
||||
std::cout << "Unknown Boolean operator type for condition: " << z_data.lhs.quantity << std::endl;
|
||||
throw std::invalid_argument("Actionx: " + actx.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
//increment index according to no of items pr condition
|
||||
ind += static_cast<std::size_t>(noEPZacn);
|
||||
}
|
||||
}
|
||||
} // iAcn
|
||||
|
||||
namespace sACN {
|
||||
|
||||
Opm::RestartIO::Helpers::WindowedArray<double>
|
||||
allocate(const std::vector<int>& actDims)
|
||||
{
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<double>;
|
||||
return WV {
|
||||
WV::NumWindows{ static_cast<std::size_t>(actDims[0]) },
|
||||
WV::WindowSize{ static_cast<std::size_t>(actDims[7]) }
|
||||
};
|
||||
}
|
||||
|
||||
template <class SACNArray>
|
||||
void staticContrib(const Opm::Action::ActionX& actx,
|
||||
const Opm::SummaryState& st,
|
||||
SACNArray& sAcn)
|
||||
{
|
||||
std::size_t ind = 0;
|
||||
int noEPZacn = 16;
|
||||
double undef_high_val = 1.0E+20;
|
||||
// write out the schedule Actionx conditions
|
||||
const auto& actx_cond = actx.conditions();
|
||||
for (const auto& z_data : actx_cond) {
|
||||
|
||||
// item [0 - 1] = 0 (unknown)
|
||||
sAcn[ind + 0] = 0.;
|
||||
sAcn[ind + 1] = 0.;
|
||||
|
||||
//item [2, 5, 7, 9]: value of condition 1 (zero if well, group or field variable
|
||||
const std::string& rhsQtype = z_data.rhs.quantity.substr(0,1);
|
||||
const auto& it_rhsq = rhsQuantityToIndex.find(rhsQtype);
|
||||
if (it_rhsq == rhsQuantityToIndex.end()) {
|
||||
//come here if constant value condition
|
||||
double t_val = 0.;
|
||||
if (rhsQtype == "M") {
|
||||
const auto& it_mnth = monthToNo.find(z_data.rhs.quantity);
|
||||
if (it_mnth != monthToNo.end()) {
|
||||
t_val = it_mnth->second;
|
||||
}
|
||||
else {
|
||||
std::cout << "Unknown Month: " << z_data.rhs.quantity << std::endl;
|
||||
throw std::invalid_argument("Actionx: " + actx.name() + " Condition: " + z_data.lhs.quantity );
|
||||
}
|
||||
}
|
||||
else {
|
||||
t_val = std::stod(z_data.rhs.quantity);
|
||||
}
|
||||
sAcn[ind + 2] = t_val;
|
||||
sAcn[ind + 5] = sAcn[ind + 2];
|
||||
sAcn[ind + 7] = sAcn[ind + 2];
|
||||
sAcn[ind + 9] = sAcn[ind + 2];
|
||||
}
|
||||
//Treat well, group and field right hand side conditions
|
||||
if (it_rhsq != rhsQuantityToIndex.end()) {
|
||||
//Well variable
|
||||
if (it_rhsq->first == "W") {
|
||||
sAcn[ind + 4] = st.get_well_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 5] = st.get_well_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 6] = st.get_well_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 7] = st.get_well_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 8] = st.get_well_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 9] = st.get_well_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
}
|
||||
//group variable
|
||||
if (it_rhsq->first == "G") {
|
||||
sAcn[ind + 4] = st.get_group_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 5] = st.get_group_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 6] = st.get_group_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 7] = st.get_group_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 8] = st.get_group_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
sAcn[ind + 9] = st.get_group_var(z_data.rhs.args[0], z_data.rhs.quantity);
|
||||
}
|
||||
//field variable
|
||||
if (it_rhsq->first == "F") {
|
||||
sAcn[ind + 4] = st.get(z_data.rhs.quantity);
|
||||
sAcn[ind + 5] = st.get(z_data.rhs.quantity);
|
||||
sAcn[ind + 6] = st.get(z_data.rhs.quantity);
|
||||
sAcn[ind + 7] = st.get(z_data.rhs.quantity);
|
||||
sAcn[ind + 8] = st.get(z_data.rhs.quantity);
|
||||
sAcn[ind + 9] = st.get(z_data.rhs.quantity);
|
||||
}
|
||||
}
|
||||
|
||||
//treat cases with left hand side condition being: DAY, MNTH og YEAR variable
|
||||
const std::string& lhsQtype = z_data.lhs.quantity.substr(0,1);
|
||||
const auto& it_lhsq = lhsQuantityToIndex.find(lhsQtype);
|
||||
if ((it_lhsq->first == "D") || (it_lhsq->first == "M") || (it_lhsq->first == "Y")) {
|
||||
sAcn[ind + 4] = undef_high_val;
|
||||
sAcn[ind + 5] = undef_high_val;
|
||||
sAcn[ind + 6] = undef_high_val;
|
||||
sAcn[ind + 7] = undef_high_val;
|
||||
sAcn[ind + 8] = undef_high_val;
|
||||
sAcn[ind + 9] = undef_high_val;
|
||||
}
|
||||
|
||||
//increment index according to no of items pr condition
|
||||
ind += static_cast<std::size_t>(noEPZacn);
|
||||
}
|
||||
}
|
||||
|
||||
} // sAcn
|
||||
|
||||
|
||||
// =====================================================================
|
||||
|
||||
Opm::RestartIO::Helpers::AggregateActionxData::
|
||||
AggregateActionxData(const std::vector<int>& actDims)
|
||||
: iACT_ (iACT::allocate(actDims)),
|
||||
sACT_ (sACT::allocate(actDims)),
|
||||
zACT_ (zACT::allocate(actDims)),
|
||||
zLACT_(zLACT::allocate(actDims)),
|
||||
zACN_ (zACN::allocate(actDims)),
|
||||
iACN_ (iACN::allocate(actDims)),
|
||||
sACN_ (sACN::allocate(actDims))
|
||||
{}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void
|
||||
Opm::RestartIO::Helpers::AggregateActionxData::
|
||||
captureDeclaredActionxData( const Opm::Schedule& sched,
|
||||
const Opm::SummaryState& st,
|
||||
const std::vector<int>& actDims,
|
||||
const std::size_t simStep)
|
||||
{
|
||||
auto acts = sched.actions(simStep);
|
||||
std::size_t act_ind = 0;
|
||||
for (auto actx_it = acts.begin(); actx_it < acts.end(); actx_it++) {
|
||||
{
|
||||
auto i_act = this->iACT_[act_ind];
|
||||
iACT::staticContrib(*actx_it, i_act);
|
||||
}
|
||||
|
||||
{
|
||||
auto s_act = this->sACT_[act_ind];
|
||||
sACT::staticContrib(s_act);
|
||||
}
|
||||
|
||||
{
|
||||
auto z_act = this->zACT_[act_ind];
|
||||
zACT::staticContrib(*actx_it, z_act);
|
||||
}
|
||||
|
||||
{
|
||||
auto z_lact = this->zLACT_[act_ind];
|
||||
zLACT::staticContrib(*actx_it, actDims[8], z_lact);
|
||||
}
|
||||
|
||||
{
|
||||
auto z_acn = this->zACN_[act_ind];
|
||||
zACN::staticContrib(*actx_it, z_acn);
|
||||
}
|
||||
|
||||
{
|
||||
auto i_acn = this->iACN_[act_ind];
|
||||
iACN::staticContrib(*actx_it, i_acn);
|
||||
}
|
||||
|
||||
{
|
||||
auto s_acn = this->sACN_[act_ind];
|
||||
sACN::staticContrib(*actx_it, st, s_acn);
|
||||
}
|
||||
|
||||
act_ind +=1;
|
||||
}
|
||||
}
|
||||
|
139
src/opm/output/eclipse/CreateActionxDims.cpp
Executable file
139
src/opm/output/eclipse/CreateActionxDims.cpp
Executable file
@ -0,0 +1,139 @@
|
||||
/*
|
||||
Copyright (c) 2018 Equinor ASA
|
||||
Copyright (c) 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/>.
|
||||
*/
|
||||
|
||||
#include <opm/output/eclipse/AggregateUDQData.hpp>
|
||||
#include <opm/output/eclipse/WriteRestartHelpers.hpp>
|
||||
|
||||
#include <opm/output/eclipse/InteHEAD.hpp>
|
||||
#include <opm/output/eclipse/DoubHEAD.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
|
||||
// The number of actions (no of Actionx)
|
||||
std::size_t noOfActions(const Opm::Action::Actions& acts)
|
||||
{
|
||||
std::size_t no_entries = acts.size();
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
|
||||
std::size_t entriesPerIACT()
|
||||
{
|
||||
std::size_t no_entries = 9;
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
std::size_t entriesPerSACT()
|
||||
{
|
||||
std::size_t no_entries = 5;
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
std::size_t entriesPerZACT()
|
||||
{
|
||||
std::size_t no_entries = 4;
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
// (The max number of characters in an action statement / (8 - chars pr string)) * (max over actions of number of lines pr ACTIONX)
|
||||
std::size_t entriesPerZLACT(const Opm::Runspec& rspec, const Opm::Action::Actions& acts)
|
||||
{
|
||||
int max_char_pr_line = rspec.actdims().max_characters();
|
||||
std::size_t no_entries_pr_line = ((max_char_pr_line % 8) == 0) ? max_char_pr_line / 8 : (max_char_pr_line / 8) + 1;
|
||||
std::size_t no_entries = no_entries_pr_line * acts.max_input_lines();
|
||||
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
// The max number of characters in an action statement * (max over actions of number of lines pr ACTIONX) / (8 - chars pr string)
|
||||
std::size_t entriesPerLine(const Opm::Runspec& rspec)
|
||||
{
|
||||
int max_char_pr_line = rspec.actdims().max_characters();
|
||||
std::size_t no_entries_pr_line = ((max_char_pr_line % 8) == 0) ? max_char_pr_line / 8 : (max_char_pr_line / 8) + 1;
|
||||
|
||||
return no_entries_pr_line;
|
||||
}
|
||||
|
||||
|
||||
std::size_t entriesPerZACN(const Opm::Runspec& rspec)
|
||||
{
|
||||
//(Max number of conditions pr ACTIONX) * ((max no characters pr line = 104) / (8 - characters pr string)(104/8 = 13)
|
||||
std::size_t no_entries = rspec.actdims().max_conditions() * 13;
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
std::size_t entriesPerIACN(const Opm::Runspec& rspec)
|
||||
{
|
||||
//26*Max number of conditions pr ACTIONX
|
||||
std::size_t no_entries = 26 * rspec.actdims().max_conditions();
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
std::size_t entriesPerSACN(const Opm::Runspec& rspec)
|
||||
{
|
||||
//16
|
||||
std::size_t no_entries = 16 * rspec.actdims().max_conditions();
|
||||
return no_entries;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // Anonymous
|
||||
|
||||
// #####################################################################
|
||||
// Public Interface (createUdqDims()) Below Separator
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
std::vector<int>
|
||||
Opm::RestartIO::Helpers::
|
||||
createActionxDims( const Runspec& rspec,
|
||||
const Schedule& sched,
|
||||
const std::size_t simStep)
|
||||
{
|
||||
const auto& acts = sched.actions(simStep);
|
||||
std::vector<int> actDims(9);
|
||||
|
||||
//No of Actionx keywords
|
||||
actDims[0] = noOfActions(acts);
|
||||
actDims[1] = entriesPerIACT();
|
||||
actDims[2] = entriesPerSACT();
|
||||
actDims[3] = entriesPerZACT();
|
||||
actDims[4] = entriesPerZLACT(rspec, acts);
|
||||
actDims[5] = entriesPerZACN(rspec);
|
||||
actDims[6] = entriesPerIACN(rspec);
|
||||
actDims[7] = entriesPerSACN(rspec);
|
||||
actDims[8] = entriesPerLine(rspec);
|
||||
|
||||
return actDims;
|
||||
}
|
@ -27,6 +27,9 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Regdims.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
@ -186,14 +189,27 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
/*Opm::RestartIO::InteHEAD::UdqParam
|
||||
getRandSeedPar(const ::Opm::Runspec& rspec)
|
||||
|
||||
Opm::RestartIO::InteHEAD::UdqParam
|
||||
getUdqParam(const ::Opm::Runspec& rspec, const ::Opm::UDQConfig& udqcfg )
|
||||
{
|
||||
const auto& udq_par = rspec.udqParams();
|
||||
const auto r_seed = udq_par.rand_seed();
|
||||
const auto no_udq = udqcfg.size();
|
||||
|
||||
return { r_seed};
|
||||
}*/
|
||||
return { r_seed, static_cast<int>(no_udq)};
|
||||
}
|
||||
|
||||
Opm::RestartIO::InteHEAD::ActionParam
|
||||
getActionParam(const ::Opm::Runspec& rspec, const ::Opm::Action::Actions& acts )
|
||||
{
|
||||
const auto& no_act = acts.size();
|
||||
const auto max_lines_pr_action = acts.max_input_lines();
|
||||
const auto max_cond_per_action = rspec.actdims().max_conditions();
|
||||
const auto max_characters_per_line = rspec.actdims().max_characters();
|
||||
|
||||
return { static_cast<int>(no_act), max_lines_pr_action, static_cast<int>(max_cond_per_action), static_cast<int>(max_characters_per_line)};
|
||||
}
|
||||
|
||||
Opm::RestartIO::InteHEAD::WellSegDims
|
||||
getWellSegDims(const ::Opm::Runspec& rspec,
|
||||
@ -264,6 +280,8 @@ createInteHead(const EclipseState& es,
|
||||
{
|
||||
const auto nwgmax = maxGroupSize(sched, lookup_step);
|
||||
const auto ngmax = numGroupsInField(sched, lookup_step);
|
||||
const auto& udqCfg = sched.getUDQConfig(lookup_step);
|
||||
const auto& acts = sched.actions(lookup_step);
|
||||
const auto& rspec = es.runspec();
|
||||
const auto& tdim = es.getTableManager();
|
||||
const auto& rdim = tdim.getRegdims();
|
||||
@ -292,7 +310,8 @@ createInteHead(const EclipseState& es,
|
||||
.regionDimensions (getRegDims(tdim, rdim))
|
||||
.ngroups ({ ngmax })
|
||||
.variousParam (201702, 100) // Output should be compatible with Eclipse 100, 2017.02 version.
|
||||
//.udqParam_1 (getRandSeedPar(rspec))
|
||||
//.udqParam_1 (getUdqParam(rspec, udqCfg))
|
||||
//.actionParam (getActionParam(rspec, acts))
|
||||
;
|
||||
|
||||
return ih.data();
|
||||
|
@ -175,9 +175,9 @@ enum index : std::vector<int>::size_type {
|
||||
ih_153 = 153 , // 0 0
|
||||
ih_154 = 154 , // 0 0
|
||||
ih_155 = 155 , // 0 0
|
||||
ih_156 = 156 , // 0 0
|
||||
ih_157 = 157 , // 0 0
|
||||
ih_158 = 158 , // 0 0
|
||||
NO_ACT = VI::intehead::NOOFACTIONS, // 0 0
|
||||
MAX_LINES = VI::intehead::MAXNOLINES, // 0 0
|
||||
MAXSPRLINE = VI::intehead::MAXNOSTRPRLINE, // 0 0
|
||||
ih_159 = 159 , // 0 0
|
||||
ih_160 = 160 , // 0 0
|
||||
ih_161 = 161 , // 0 0
|
||||
@ -264,7 +264,7 @@ enum index : std::vector<int>::size_type {
|
||||
ih_242 = 242 , // 0
|
||||
ih_243 = 243 , // 0
|
||||
ih_244 = 244 , // 0
|
||||
ih_245 = 245 , // 0
|
||||
MXACTC = VI::intehead::MAX_ACT_COND, // Max no of conditions pr action
|
||||
ih_246 = 246 , // 0
|
||||
ih_247 = 247 , // 0
|
||||
ih_248 = 248 , // 0
|
||||
@ -285,8 +285,8 @@ enum index : std::vector<int>::size_type {
|
||||
ih_263 = 263 , // 0
|
||||
ih_264 = 264 , // 0
|
||||
ih_265 = 265 , // 0
|
||||
ih_266 = 266 , // 0
|
||||
UDQPAR_1 = VI::intehead::UDQPAR_1, // 0
|
||||
NOUDQS = VI::intehead::NO_UDQS, // 0
|
||||
UDQPAR_1 = VI::intehead::UDQPAR_1, // 0
|
||||
ih_268 = 268 , // 0
|
||||
ih_269 = 269 , // 0
|
||||
ih_270 = 270 , // 0
|
||||
@ -315,7 +315,7 @@ enum index : std::vector<int>::size_type {
|
||||
ih_293 = 293 , // 0
|
||||
ih_294 = 294 , // 0
|
||||
ih_295 = 295 , // 0
|
||||
ih_296 = 296 , // 0
|
||||
R_SEED = VI::intehead::RSEED, // 0
|
||||
ih_297 = 297 , // 0
|
||||
ih_298 = 298 , // 0
|
||||
ih_299 = 299 , // 0
|
||||
@ -683,6 +683,21 @@ Opm::RestartIO::InteHEAD::
|
||||
udqParam_1(const UdqParam& udq_par)
|
||||
{
|
||||
this -> data_[UDQPAR_1] = - udq_par.udqParam_1;
|
||||
this -> data_[R_SEED] = - udq_par.udqParam_1;
|
||||
this -> data_[NOUDQS] = udq_par.no_udqs;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Opm::RestartIO::InteHEAD&
|
||||
Opm::RestartIO::InteHEAD::
|
||||
actionParam(const ActionParam& act_par)
|
||||
{
|
||||
this -> data_[NO_ACT] = act_par.no_actions;
|
||||
this -> data_[MAX_LINES] = act_par.max_no_sched_lines_per_action;
|
||||
this -> data_[MXACTC] = act_par.max_no_conditions_per_action;
|
||||
this -> data_[MAXSPRLINE] = ((act_par.max_no_characters_per_line % 8) == 0) ? act_par.max_no_characters_per_line / 8 :
|
||||
(act_par.max_no_characters_per_line / 8) + 1;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -55,6 +55,14 @@ const ActionX& Actions::get(std::size_t index) const {
|
||||
return this->actions[index];
|
||||
}
|
||||
|
||||
int Actions::max_input_lines() const {
|
||||
std::size_t max_il = 0;
|
||||
for (const auto& act : this-> actions) {
|
||||
if (act.keyword_strings().size() > max_il) max_il = act.keyword_strings().size() ;
|
||||
}
|
||||
return static_cast<int>(max_il);
|
||||
}
|
||||
|
||||
|
||||
bool Actions::ready(std::time_t sim_time) const {
|
||||
for (const auto& action : this->actions) {
|
||||
|
514
tests/UDQ_ACTIONX_TEST1.DATA
Normal file
514
tests/UDQ_ACTIONX_TEST1.DATA
Normal file
@ -0,0 +1,514 @@
|
||||
-- This reservoir simulation deck is made available under the Open Database
|
||||
-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in
|
||||
-- individual contents of the database are licensed under the Database Contents
|
||||
-- License: http://opendatacommons.org/licenses/dbcl/1.0/
|
||||
|
||||
-- Copyright (C) 2018 Equinor
|
||||
|
||||
-- This deck uses User defined quantities (UDQ) together with the ACTIONX
|
||||
-- keyword to shut well with highest water cut when number of wells on stream
|
||||
-- exceeds a defined number.
|
||||
|
||||
--------------------------------------------------------
|
||||
|
||||
|
||||
-- *****************************************************
|
||||
RUNSPEC
|
||||
-- *****************************************************
|
||||
|
||||
-- Simulation run title
|
||||
TITLE
|
||||
Generic Reservoir
|
||||
|
||||
NOECHO
|
||||
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
-- Simulation grid dimension (Imax, Jmax, Kmax)
|
||||
DIMENS
|
||||
3 5 4 /
|
||||
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
-- Simulation run start
|
||||
START
|
||||
22 'AUG' 2018 /
|
||||
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
--Activate "Data Check Only" option
|
||||
--NOSIM
|
||||
--
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
-- Fluid phases present
|
||||
OIL
|
||||
GAS
|
||||
WATER
|
||||
DISGAS
|
||||
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
-- Measurement unit used
|
||||
METRIC
|
||||
|
||||
--
|
||||
--
|
||||
--Table dimensions
|
||||
TABDIMS
|
||||
-- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT
|
||||
1 1 130 24 1 20 /
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
-- Dimensions for equilibration tables
|
||||
EQLDIMS
|
||||
2 100 20 /
|
||||
--
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
--Dimension for well data
|
||||
WELLDIMS
|
||||
6 5 5 6 /
|
||||
|
||||
--Dimensions for ACTIONX data
|
||||
ACTDIMS
|
||||
4 20 80 4 /
|
||||
|
||||
--
|
||||
--
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
-- Input and output files format
|
||||
FMTIN
|
||||
FMTOUT
|
||||
UNIFIN
|
||||
UNIFOUT
|
||||
|
||||
|
||||
-- Dimensions for used defined quantity facility
|
||||
-- max functions permitted in a quantity definition
|
||||
-- max arguments permitted in a quantity definition
|
||||
-- max user defined connection quantities
|
||||
-- max user defined field quantities
|
||||
-- max user defined group quantities
|
||||
-- max user defined region quantities
|
||||
-- max user defined segment quantities
|
||||
-- max user defined well quantities
|
||||
-- max user defined aquifer quantities
|
||||
-- max user defined block quantities
|
||||
-- whether new randon number generator seed computed for restart runs
|
||||
UDQDIMS
|
||||
50 25 0 50 50 0 0 50 0 20 /
|
||||
|
||||
-- Dimensions for the user defined arguments facility
|
||||
-- number of keyword arguments in which UDQs replace numerical values
|
||||
-- ratained for back-compatibility
|
||||
-- total number of unique instances in which a UDQ is used in a keyword argument
|
||||
UDADIMS
|
||||
10 1* 10 /
|
||||
|
||||
|
||||
--PARALLEL
|
||||
-- 2 /
|
||||
|
||||
-- *************************************************************************
|
||||
-- In this section simulation grid and static reservoir parameters are given
|
||||
-- *************************************************************************
|
||||
|
||||
GRID
|
||||
|
||||
-- ****************************************************
|
||||
-------------------------------------------------------
|
||||
|
||||
--
|
||||
--Disable echoing of the input file
|
||||
NOECHO
|
||||
|
||||
--
|
||||
--Requests output of an INIT file
|
||||
INIT
|
||||
|
||||
--
|
||||
--Control output of the Grid geometry file
|
||||
GRIDFILE
|
||||
0 1 /
|
||||
|
||||
|
||||
--
|
||||
--Input of pre-processor map origin (X1, Y1, X2, Y2, X3, Y3)
|
||||
--X1 Y1 The X and Y coordinates of one point of the grid Y-axis relative to the map
|
||||
--X2 Y2 The X and Y coordinates of the grid origin relative to the map origin
|
||||
--X3 Y3 The X and Y coordinates of one point of the grid X-axis relative to the map
|
||||
MAPAXES
|
||||
0.0 100.0 0.0 0.0 100.0 0.0 /
|
||||
--
|
||||
--
|
||||
|
||||
NOECHO
|
||||
|
||||
--
|
||||
-- ----------------------------------------------------
|
||||
--Include simulation grid
|
||||
INCLUDE
|
||||
'include/test_3x5x4.grdecl' /
|
||||
|
||||
|
||||
|
||||
PORO
|
||||
15*0.25
|
||||
15*0.20
|
||||
15*0.23
|
||||
15*0.18
|
||||
/
|
||||
|
||||
PERMX
|
||||
15*500
|
||||
15*100
|
||||
15*1000
|
||||
15*250
|
||||
/
|
||||
|
||||
-- ---------------------------------------------------
|
||||
-- Copy PERMX to PERMY & PERMZ
|
||||
COPY
|
||||
PERMX PERMY /
|
||||
PERMX PERMZ /
|
||||
/
|
||||
--
|
||||
-- ---------------------------------------------------
|
||||
-- Set Kv/Kh
|
||||
MULTIPLY
|
||||
PERMZ 0.1 /
|
||||
/
|
||||
|
||||
|
||||
MULTZ
|
||||
15*1.0
|
||||
15*0.0
|
||||
30*1.0
|
||||
/
|
||||
|
||||
-- ***************************************************
|
||||
-- In this section simulation grid parameters are edited
|
||||
-- ***************************************************
|
||||
|
||||
EDIT
|
||||
|
||||
-- ***************************************************
|
||||
|
||||
|
||||
|
||||
-- ***************************************************
|
||||
-- In this section fluid-rock properties and
|
||||
-- relative permabilities are given
|
||||
-- ***************************************************
|
||||
|
||||
PROPS
|
||||
|
||||
-- ***************************************************
|
||||
|
||||
INCLUDE
|
||||
'include/sgof.txt' /
|
||||
|
||||
|
||||
INCLUDE
|
||||
'include/swof.txt' /
|
||||
|
||||
-- ---------------------------------------------------
|
||||
|
||||
-- Include PVT data
|
||||
INCLUDE
|
||||
'include/example_pvt.txt' /
|
||||
|
||||
|
||||
|
||||
|
||||
-- ***********************************************************
|
||||
-- In this section simulation grid region parameters are given
|
||||
-- ***********************************************************
|
||||
|
||||
REGIONS
|
||||
|
||||
-- ***************************************************
|
||||
|
||||
EQLNUM
|
||||
30*1 30*2 /
|
||||
|
||||
--
|
||||
--
|
||||
-- ***************************************************
|
||||
-- In this section the initialization parameters and
|
||||
-- dynamic parameters are defined
|
||||
-- ***************************************************
|
||||
|
||||
SOLUTION
|
||||
|
||||
-- ***************************************************
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
--
|
||||
--Simulation model initialisation data
|
||||
--
|
||||
-- DATUM DATUM OWC OWC GOC GOC RSVD RVVD SOLN
|
||||
-- Depth Pres. Depth Pcow Depth Pcog Table Table Method
|
||||
EQUIL
|
||||
2030 382.4 2030 0.0 500 0.0 1 1 0 /
|
||||
2050 382.4 2050 0.0 500 0.0 1 1 0 /
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- ---------------------------------------------------
|
||||
-- Dissolved gas-oil ratio versus depth,
|
||||
|
||||
RSVD
|
||||
1500 180.0
|
||||
4000 180.0 /
|
||||
1500 180.0
|
||||
4000 180.0 /
|
||||
|
||||
|
||||
-- ---------------------------------------------------
|
||||
--Controls on output to the RESTART file
|
||||
--RPTRST
|
||||
-- ALLPROPS=2 BASIC=2 FIP /
|
||||
|
||||
|
||||
RPTRST
|
||||
'BASIC=2' 'PBPD' /
|
||||
|
||||
|
||||
--
|
||||
-- **************************************************************************************
|
||||
-- In this section simulation output data to be written to sumTESTy file are defined
|
||||
-- **************************************************************************************
|
||||
|
||||
SUMMARY
|
||||
|
||||
-- ***************************************************
|
||||
|
||||
|
||||
-- ---------------------------------------------------
|
||||
-- Summary data to be written to summary file
|
||||
--
|
||||
--
|
||||
-- **************************************************************************************
|
||||
-- In this section data required to describe history and prediction is given
|
||||
-- - well completions, well production/injection, well constraints
|
||||
-- - platform/production unit constraints, etc.
|
||||
-- **************************************************************************************
|
||||
|
||||
INCLUDE
|
||||
'include/example_summary.txt' /
|
||||
|
||||
|
||||
FMWIN
|
||||
|
||||
FMWPR
|
||||
|
||||
GMWPR
|
||||
'UPPER' 'LOWER' /
|
||||
|
||||
GMWIN
|
||||
'UPPER' 'LOWER' /
|
||||
|
||||
|
||||
WUPR1
|
||||
'OP*' /
|
||||
|
||||
WUPR3
|
||||
'OP*' /
|
||||
|
||||
|
||||
SCHEDULE
|
||||
|
||||
GRUPTREE
|
||||
'UPPER' 'TEST' /
|
||||
'LOWER' 'TEST' /
|
||||
/
|
||||
|
||||
|
||||
-- ***************************************************
|
||||
|
||||
WELSPECS
|
||||
'OPU01' 'UPPER' 1 2 2002 'OIL' 0.00 'STD' 'SHUT' 'YES' 0 'SEG' /
|
||||
'OPU02' 'UPPER' 1 4 2002 'OIL' 0.00 'STD' 'SHUT' 'YES' 0 'SEG' /
|
||||
'OPL01' 'LOWER' 1 2 2025 'OIL' 0.00 'STD' 'SHUT' 'YES' 0 'SEG' /
|
||||
'OPL02' 'LOWER' 1 4 2025 'OIL' 0.00 'STD' 'SHUT' 'YES' 0 'SEG' /
|
||||
/
|
||||
|
||||
|
||||
WELSPECS
|
||||
'WIU01' 'UPPER' 3 3 2030 'WATER' 0.00 'STD' 'SHUT' 'YES' 0 'SEG' /
|
||||
'WIL01' 'LOWER' 3 3 2050 'WATER' 0.00 'STD' 'SHUT' 'YES' 0 'SEG' /
|
||||
/
|
||||
|
||||
|
||||
COMPDAT
|
||||
-- --------------------------------------------------------------------------------------------------
|
||||
'OPU01' 1 2 1 1 'OPEN' 0 1* 0.241 1* 2.50 0.0 'Z' 1* /
|
||||
'OPU02' 1 4 1 1 'OPEN' 0 1* 0.241 1* 2.50 0.0 'Z' 1* /
|
||||
'OPL01' 1 2 3 3 'OPEN' 0 1* 0.241 1* 2.50 0.0 'Z' 1* /
|
||||
'OPL02' 1 4 3 3 'OPEN' 0 1* 0.241 1* 2.50 0.0 'Z' 1* /
|
||||
'WIU01' 3 3 2 2 'OPEN' 0 1* 0.241 1* 2.50 0.0 'Z' 1* /
|
||||
'WIL01' 3 3 4 4 'OPEN' 0 1* 0.241 1* 2.50 0.0 'Z' 1* /
|
||||
/
|
||||
|
||||
|
||||
-- Well production rate targets/limits:
|
||||
WCONPROD
|
||||
-- name status ctrl qo qw qg ql qr bhp thp vfp alq
|
||||
'OPU*' 'SHUT' 'GRUP' 1500. 1* 1* 2500. 1* 60.0 / single wells
|
||||
'OPL*' 'SHUT' 'GRUP' 1500. 1* 1* 2500. 1* 60.0 / single wells
|
||||
/
|
||||
|
||||
WCONINJE
|
||||
-- name inj type status ctrl surface_qw res_qw BHPmax
|
||||
'WIU*' 'WATER' 'SHUT' 'GRUP' 10500. 1* 500. /
|
||||
'WIL*' 'WATER' 'SHUT' 'GRUP' 10500. 1* 500. /
|
||||
/
|
||||
|
||||
|
||||
UDQ
|
||||
-- WUPR3 sorts production wells from poorest (highest wct) to best. ACTIONX will shut #1 in this list
|
||||
DEFINE WUPR1 1/(0.01 + WWCT 'OP*') /
|
||||
DEFINE WUPR3 SORTA(WUPR1) /
|
||||
-- units ignored
|
||||
/
|
||||
|
||||
|
||||
|
||||
|
||||
--start files/gconprod0.tmpl
|
||||
GCONPROD
|
||||
'TEST' 'LRAT' 6000 1* 1* 6000 'RATE' 'NO' 9* /
|
||||
'LOWER' 'FLD' 6000 1* 1* 6000 'RATE' 'YES' 1* 'FORM' 7* /
|
||||
'UPPER' 'FLD' 3000 1* 1* 6000 'RATE' 'YES' 1* 'FORM' 7* /
|
||||
/
|
||||
|
||||
GCONINJE
|
||||
'LOWER' 'WATER' 'VREP' 3* 1.2 /
|
||||
'UPPER' 'WATER' 'VREP' 3* 2.0 /
|
||||
/
|
||||
|
||||
-- Well proportions
|
||||
GUIDERAT
|
||||
-- int phase A B C D E F incr. damp
|
||||
0 'OIL' 1 0.5 1 1 0 0 'YES' 0.5 / equal to 1/(0.5+WWCT)
|
||||
|
||||
|
||||
|
||||
--start files/actionxprod.tmpl
|
||||
ACTIONX
|
||||
ACT01 10 /
|
||||
WWPR 'OP*' > 17 OR /
|
||||
GMWPR 'T*' > 14 AND /
|
||||
DAY > 3 /
|
||||
/
|
||||
WELOPEN
|
||||
'?' SHUT 0 0 0 2* /
|
||||
/
|
||||
ENDACTIO
|
||||
|
||||
ACTIONX
|
||||
ACT02 11 /
|
||||
FMWPR > 25 AND /
|
||||
WGPR 'OPL02' > GGPR 'LOWER' AND /
|
||||
MNTH > MAY /
|
||||
/
|
||||
WELOPEN
|
||||
'?' 'SHUT' 0 0 0 2* /
|
||||
/
|
||||
WELOPEN
|
||||
'OPL01' 'OPEN' 5* /
|
||||
/
|
||||
ENDACTIO
|
||||
|
||||
|
||||
DATES
|
||||
1 'SEP' 2018 /
|
||||
/
|
||||
|
||||
ACTIONX
|
||||
ACT03 13 /
|
||||
WWPR 'OPU02' > WWPR 'OPU01' OR /
|
||||
GMWPR 'T*' > 39 AND /
|
||||
YEAR > 2019 /
|
||||
/
|
||||
WELOPEN
|
||||
'?' SHUT 0 0 0 2* /
|
||||
/
|
||||
ENDACTIO
|
||||
|
||||
WELOPEN
|
||||
'OPL01' 'OPEN' 5* /
|
||||
/
|
||||
DATES
|
||||
1 'OCT' 2018 /
|
||||
/
|
||||
|
||||
--start files/actionxprod.tmpl
|
||||
ACTIONX
|
||||
ACT01 10 /
|
||||
FMWPR > 45 AND /
|
||||
WUPR3 'OP*' > 46 OR /
|
||||
MNTH > JUN /
|
||||
/
|
||||
WELOPEN
|
||||
'?' SHUT 0 0 0 2* /
|
||||
/
|
||||
WELOPEN
|
||||
'OPU02' 'OPEN' 5* /
|
||||
/
|
||||
WELOPEN
|
||||
'OPL02' 'OPEN' 5* /
|
||||
/
|
||||
ENDACTIO
|
||||
|
||||
|
||||
WELOPEN
|
||||
'WIL01' 'OPEN' 5* /
|
||||
/
|
||||
|
||||
DATES
|
||||
1 'NOV' 2018 /
|
||||
/
|
||||
END
|
||||
|
||||
WELOPEN
|
||||
'OPL02' 'OPEN' 5* /
|
||||
/
|
||||
|
||||
|
||||
|
||||
DATES
|
||||
1 'DEC' 2018 /
|
||||
/
|
||||
|
||||
|
||||
WELOPEN
|
||||
'OPU01' 'OPEN' 5* /
|
||||
/
|
||||
|
||||
DATES
|
||||
1 'MAY' 2019 /
|
||||
/
|
||||
|
||||
|
||||
WELOPEN
|
||||
'OPU02' 'OPEN' 5* /
|
||||
/
|
||||
|
||||
DATES
|
||||
1 'JUN' 2019 /
|
||||
/
|
||||
|
||||
|
||||
WELOPEN
|
||||
'WIU01' 'OPEN' 5* /
|
||||
/
|
||||
|
||||
DATES
|
||||
1 'JAN' 2021 /
|
||||
/
|
224
tests/include/example_pvt.txt
Normal file
224
tests/include/example_pvt.txt
Normal file
@ -0,0 +1,224 @@
|
||||
-- This reservoir simulation deck is made available under the Open Database
|
||||
-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in
|
||||
-- individual contents of the database are licensed under the Database Contents
|
||||
-- License: http://opendatacommons.org/licenses/dbcl/1.0/
|
||||
|
||||
-- Copyright (C) 2018 Equinor
|
||||
|
||||
-- This file is one of the include files for UDQ_ACTIONX.DATA and UDQ_WCONPROD.DATA.
|
||||
|
||||
|
||||
|
||||
-- *** G A S D A T A ***
|
||||
-- BAR (CP)
|
||||
--
|
||||
PVDG
|
||||
--
|
||||
20.00 0.061895 0.01299
|
||||
40.00 0.030252 0.01383
|
||||
60.00 0.019844 0.01450
|
||||
80.00 0.014686 0.01520
|
||||
100.00 0.011627 0.01596
|
||||
120.00 0.009619 0.01682
|
||||
140.00 0.008213 0.01780
|
||||
160.00 0.007184 0.01890
|
||||
197.66 0.005820 0.02160
|
||||
231.13 0.005042 0.02477
|
||||
261.31 0.004561 0.02844
|
||||
288.87 0.004255 0.03272
|
||||
314.34 0.004062 0.03783
|
||||
338.20 0.003953 0.04410
|
||||
360.83 0.003947 0.05210
|
||||
382.58 0.003915 0.06273
|
||||
403.60 0.003912 0.07723
|
||||
423.77 0.003907 0.09631
|
||||
/
|
||||
|
||||
|
||||
-- *** O I L D A T A ***
|
||||
|
||||
-- RSO PRESSURE B-OIL VISCOSITY
|
||||
-- (BAR) (CP)
|
||||
PVTO
|
||||
--
|
||||
19.6 20.00 1.12324 0.96519
|
||||
55.00 1.11698 1.03237
|
||||
90.00 1.11127 1.10051
|
||||
125.00 1.10602 1.16942
|
||||
160.00 1.10119 1.23890
|
||||
195.00 1.09672 1.30876
|
||||
230.00 1.09256 1.37884
|
||||
265.00 1.08868 1.44899
|
||||
300.00 1.08504 1.51908
|
||||
335.00 1.08164 1.58903
|
||||
370.00 1.07843 1.65876 /
|
||||
|
||||
31.5 40.00 1.15981 0.85738
|
||||
75.00 1.15288 0.91402
|
||||
110.00 1.14657 0.97137
|
||||
145.00 1.14079 1.02927
|
||||
180.00 1.13546 1.08759
|
||||
215.00 1.13053 1.14617
|
||||
250.00 1.12595 1.20488
|
||||
285.00 1.12168 1.26360
|
||||
320.00 1.11768 1.32224
|
||||
355.00 1.11394 1.38073
|
||||
390.00 1.11042 1.43898 /
|
||||
|
||||
42.4 60.00 1.191 0.7868
|
||||
95.00 1.184 0.8364
|
||||
130.00 1.177 0.8866
|
||||
165.00 1.171 0.9371
|
||||
200.00 1.165 0.9880
|
||||
235.00 1.160 1.0390
|
||||
270.00 1.155 1.0902
|
||||
305.00 1.150 1.1413
|
||||
340.00 1.146 1.1922
|
||||
375.00 1.142 1.2431
|
||||
410.00 1.138 1.2936 /
|
||||
--
|
||||
53.4 80.00 1.222 0.7175
|
||||
115.00 1.214 0.7608
|
||||
150.00 1.206 0.8045
|
||||
185.00 1.200 0.8485
|
||||
220.00 1.194 0.8928
|
||||
255.00 1.188 0.9371
|
||||
290.00 1.183 0.9815
|
||||
325.00 1.178 1.0258
|
||||
360.00 1.173 1.0700
|
||||
395.00 1.169 1.1141
|
||||
430.00 1.165 1.1579 /
|
||||
--
|
||||
64.6 100.00 1.252 0.6544
|
||||
135.00 1.244 0.6923
|
||||
170.00 1.236 0.7305
|
||||
205.00 1.229 0.7689
|
||||
240.00 1.222 0.8075
|
||||
275.00 1.216 0.8461
|
||||
310.00 1.211 0.8847
|
||||
345.00 1.205 0.9233
|
||||
380.00 1.200 0.9618
|
||||
415.00 1.196 1.0000
|
||||
450.00 1.191 1.0381 /
|
||||
--
|
||||
76.3 120.00 1.284 0.5978
|
||||
155.00 1.275 0.6312
|
||||
190.00 1.266 0.6648
|
||||
225.00 1.259 0.6985
|
||||
260.00 1.252 0.7323
|
||||
295.00 1.245 0.7661
|
||||
330.00 1.239 0.7999
|
||||
365.00 1.234 0.8337
|
||||
400.00 1.229 0.8673
|
||||
435.00 1.224 0.9007
|
||||
470.00 1.219 0.9340 /
|
||||
--
|
||||
88.5 140.00 1.316 0.5477
|
||||
175.00 1.307 0.5749
|
||||
210.00 1.298 0.6020
|
||||
245.00 1.290 0.6290
|
||||
280.00 1.282 0.6559
|
||||
315.00 1.276 0.6827
|
||||
350.00 1.269 0.7095
|
||||
385.00 1.263 0.7362
|
||||
420.00 1.258 0.7629
|
||||
455.00 1.253 0.7895
|
||||
490.00 1.248 0.8161 /
|
||||
--
|
||||
101.3 160.00 1.350 0.5020
|
||||
195.00 1.340 0.5227
|
||||
230.00 1.331 0.5432
|
||||
265.00 1.322 0.5635
|
||||
300.00 1.314 0.5835
|
||||
335.00 1.307 0.6034
|
||||
370.00 1.300 0.6231
|
||||
405.00 1.294 0.6426
|
||||
440.00 1.288 0.6620
|
||||
475.00 1.283 0.6813 /
|
||||
--
|
||||
114.7 180.00 1.385 0.4636
|
||||
215.00 1.375 0.4820
|
||||
250.00 1.365 0.5003
|
||||
285.00 1.356 0.5183
|
||||
320.00 1.347 0.5362
|
||||
355.00 1.340 0.5538
|
||||
390.00 1.333 0.5712
|
||||
425.00 1.326 0.5885
|
||||
460.00 1.320 0.6055
|
||||
495.00 1.314 0.6222 /
|
||||
--
|
||||
128.9 200.00 1.422 0.4290
|
||||
235.00 1.411 0.4455
|
||||
270.00 1.401 0.4618
|
||||
305.00 1.391 0.4779
|
||||
340.00 1.382 0.4938
|
||||
375.00 1.374 0.5096
|
||||
410.00 1.367 0.5252
|
||||
445.00 1.360 0.5406
|
||||
480.00 1.353 0.5558 /
|
||||
--
|
||||
143.8 220.00 1.461 0.3977
|
||||
255.00 1.449 0.4125
|
||||
290.00 1.438 0.4271
|
||||
325.00 1.428 0.4415
|
||||
360.00 1.419 0.4558
|
||||
395.00 1.410 0.4699
|
||||
430.00 1.402 0.4839
|
||||
465.00 1.395 0.4977 /
|
||||
--
|
||||
159.5 240.00 1.502 0.3692
|
||||
275.00 1.489 0.3825
|
||||
310.00 1.478 0.3956
|
||||
345.00 1.467 0.4086
|
||||
380.00 1.458 0.4214
|
||||
415.00 1.449 0.4341
|
||||
450.00 1.440 0.4466
|
||||
485.00 1.432 0.4590 /
|
||||
--
|
||||
184.0 268.79 1.565 0.3324
|
||||
303.79 1.551 0.3438
|
||||
338.79 1.539 0.3551
|
||||
373.79 1.528 0.3663
|
||||
408.79 1.517 0.3774
|
||||
443.79 1.508 0.3883
|
||||
478.79 1.499 0.3991 /
|
||||
--
|
||||
226.3 306.18 1.679 0.2855
|
||||
341.18 1.664 0.2949
|
||||
376.18 1.650 0.3041
|
||||
411.18 1.637 0.3132
|
||||
446.18 1.625 0.3222
|
||||
481.18 1.614 0.3311 /
|
||||
--
|
||||
268.6 339.93 1.792 0.2517
|
||||
374.93 1.775 0.2597
|
||||
409.93 1.760 0.2675
|
||||
444.93 1.746 0.2751
|
||||
479.93 1.732 0.2827 /
|
||||
--
|
||||
310.9 371.44 1.903 0.2265
|
||||
406.44 1.885 0.2333
|
||||
441.44 1.868 0.2401
|
||||
476.44 1.853 0.2468 /
|
||||
--
|
||||
353.3 401.66 2.013 0.2071
|
||||
436.66 1.993 0.2132
|
||||
471.66 1.975 0.2192 /
|
||||
/
|
||||
--
|
||||
--******************************************************
|
||||
--* PVT WATER
|
||||
--******************************************************
|
||||
PVTW
|
||||
344.83 1.0292 4.002E-05 0.36000 0.00E+00 /
|
||||
|
||||
--------------------------------------------------------
|
||||
--
|
||||
--P(DATUM) CR
|
||||
ROCK
|
||||
383.0 4.12E-05 /
|
||||
--
|
||||
|
||||
|
||||
DENSITY
|
||||
842.3 1001.1 0.900 /
|
152
tests/include/example_summary.txt
Normal file
152
tests/include/example_summary.txt
Normal file
@ -0,0 +1,152 @@
|
||||
-- This reservoir simulation deck is made available under the Open Database
|
||||
-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in
|
||||
-- individual contents of the database are licensed under the Database Contents
|
||||
-- License: http://opendatacommons.org/licenses/dbcl/1.0/
|
||||
|
||||
-- Copyright (C) 2018 Equinor
|
||||
|
||||
-- This file is one of the include files for UDQ_ACTIONX.DATA and UDQ_WCONPROD.DATA.
|
||||
|
||||
|
||||
--
|
||||
-- Field Data
|
||||
-----------------------------
|
||||
-- Production Rates
|
||||
-----------------------------
|
||||
|
||||
FOPR
|
||||
FOPRH
|
||||
FGPR
|
||||
FGPRH
|
||||
FWPR
|
||||
FWPRH
|
||||
FWIR
|
||||
|
||||
-----------------------------
|
||||
-- In place
|
||||
-----------------------------
|
||||
FWIP
|
||||
FOIP
|
||||
FGIP
|
||||
-- Ratios
|
||||
FWCT
|
||||
FWCTH
|
||||
FGOR
|
||||
FGORH
|
||||
FPR
|
||||
-- Region data
|
||||
RPR
|
||||
/
|
||||
ROIP
|
||||
/
|
||||
ROIPL
|
||||
/
|
||||
ROIPG
|
||||
/
|
||||
RGIP
|
||||
/
|
||||
RGIPL
|
||||
/
|
||||
RGIPG
|
||||
/
|
||||
RGPR
|
||||
/
|
||||
RGPT
|
||||
/
|
||||
|
||||
GWIR
|
||||
/
|
||||
GVIR
|
||||
/
|
||||
|
||||
GOPR
|
||||
/
|
||||
GWPR
|
||||
/
|
||||
GLPR
|
||||
/
|
||||
GLPR
|
||||
/
|
||||
GVPR
|
||||
/
|
||||
|
||||
|
||||
-----------------------------
|
||||
-- Control Mode --
|
||||
-----------------------------
|
||||
-- Well Data
|
||||
-- Production Rates
|
||||
WOPR
|
||||
/
|
||||
WOPRH
|
||||
/
|
||||
WGPR
|
||||
/
|
||||
WGPRH
|
||||
/
|
||||
WWPR
|
||||
/
|
||||
WWPRH
|
||||
/
|
||||
-- Production Cummulatives
|
||||
WOPT
|
||||
/
|
||||
WWPT
|
||||
/
|
||||
WGPT
|
||||
/
|
||||
WOPTH
|
||||
/
|
||||
WWPTH
|
||||
/
|
||||
WGPTH
|
||||
/
|
||||
-- Ratios
|
||||
WWCT
|
||||
/
|
||||
WWCTH
|
||||
/
|
||||
WGOR
|
||||
/
|
||||
WGORH
|
||||
/
|
||||
WWIR
|
||||
/
|
||||
WWIRH
|
||||
/
|
||||
WGIR
|
||||
/
|
||||
WGIRH
|
||||
/
|
||||
WWIT
|
||||
/
|
||||
WWITH
|
||||
/
|
||||
WGIT
|
||||
/
|
||||
WGITH
|
||||
/
|
||||
-- Performance
|
||||
WBHP
|
||||
/
|
||||
WTHP
|
||||
/
|
||||
WPI
|
||||
/
|
||||
WVPR
|
||||
/
|
||||
WBP
|
||||
/
|
||||
WBP4
|
||||
/
|
||||
WBP9
|
||||
/
|
||||
WMCTL
|
||||
/
|
||||
WLPR
|
||||
/
|
||||
--
|
||||
-- Simulatior performance
|
||||
TCPU
|
||||
TCPUDAY
|
||||
|
60
tests/include/sgof.txt
Normal file
60
tests/include/sgof.txt
Normal file
@ -0,0 +1,60 @@
|
||||
-- This reservoir simulation deck is made available under the Open Database
|
||||
-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in
|
||||
-- individual contents of the database are licensed under the Database Contents
|
||||
-- License: http://opendatacommons.org/licenses/dbcl/1.0/
|
||||
|
||||
-- Copyright (C) 2018 Equinor
|
||||
|
||||
-- This file is one of the include files for UDQ_ACTIONX.DATA and UDQ_WCONPROD.DATA.
|
||||
|
||||
SGOF
|
||||
-- Table 1
|
||||
-- Lomeland parameters for W-phase:
|
||||
-- a = 0
|
||||
-- b (E) = 1.76931
|
||||
-- lambda (L) = 1.60918
|
||||
-- mu (T) = 1.39034
|
||||
-- Lomeland parameters for N-phase:
|
||||
-- a = 0
|
||||
-- b (E) = 4.45273
|
||||
-- lambda (L) = 3.94784
|
||||
-- mu (T) = 0.878858
|
||||
0 0 1 0
|
||||
0.0183 0.001480314 0.8127534 0
|
||||
0.0366 0.004696335 0.675857 0
|
||||
0.0549 0.009371694 0.5622753 0
|
||||
0.0732 0.01546379 0.4663578 0
|
||||
0.0915 0.02298664 0.385133 0
|
||||
0.1098 0.03197913 0.3164995 0
|
||||
0.1281 0.04249268 0.2587408 0
|
||||
0.1464 0.05458466 0.2103665 0
|
||||
0.1647 0.06831379 0.1700565 0
|
||||
0.183 0.08373629 0.1366388 0
|
||||
0.2013 0.1009022 0.1090792 0
|
||||
0.2196 0.1198516 0.08647139 0
|
||||
0.2379 0.1406109 0.06802822 0
|
||||
0.2562 0.1631885 0.05307051 0
|
||||
0.2745 0.1875705 0.04101619 0
|
||||
0.2928 0.2137163 0.03136912 0
|
||||
0.3111 0.2415547 0.02370834 0
|
||||
0.3294 0.2709792 0.01767817 0
|
||||
0.3477 0.3018447 0.01297907 0
|
||||
0.366 0.3339653 0.009359652 0
|
||||
0.3843 0.3671116 0.006609586 0
|
||||
0.4026 0.401011 0.00455345 0
|
||||
0.4209 0.4353486 0.003045475 0
|
||||
0.4392 0.4697695 0.001965044 0
|
||||
0.4575 0.5038828 0.001212868 0
|
||||
0.4758 0.5372664 0.0007077659 0
|
||||
0.4941 0.5694721 0.000383946 0
|
||||
0.5124 0.6000285 0.0001887263 0
|
||||
0.5307 0.6284408 8.062741e-05 0
|
||||
0.549 0.6541796 2.778023e-05 0
|
||||
0.5673 0.676644 6.602397e-06 0
|
||||
0.5856 0.6950468 7.048731e-07 0
|
||||
0.61 0.71 0 0
|
||||
0.6275 0.7825 0 0
|
||||
0.645 0.855 0 0
|
||||
0.6625 0.9275 0 0
|
||||
0.68 1 0 0
|
||||
/
|
64
tests/include/swof.txt
Normal file
64
tests/include/swof.txt
Normal file
@ -0,0 +1,64 @@
|
||||
-- This reservoir simulation deck is made available under the Open Database
|
||||
-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in
|
||||
-- individual contents of the database are licensed under the Database Contents
|
||||
-- License: http://opendatacommons.org/licenses/dbcl/1.0/
|
||||
|
||||
-- Copyright (C) 2018 Equinor
|
||||
|
||||
-- This file is one of the include files for UDQ_ACTIONX.DATA and UDQ_WCONPROD.DATA.
|
||||
|
||||
|
||||
SWOF
|
||||
-- Table 1
|
||||
-- Lomeland parameters for W-phase:
|
||||
-- a = 0
|
||||
-- b (E) = 1.90518
|
||||
-- lambda (L) = 4.61229
|
||||
-- mu (T) = 0.776052
|
||||
-- Lomeland parameters for N-phase:
|
||||
-- a = 0
|
||||
-- b (E) = 5.76204
|
||||
-- lambda (L) = 1.58165
|
||||
-- mu (T) = 1.62976
|
||||
0.32 0 1 0
|
||||
0.3365 3.00925e-08 0.9804566 0
|
||||
0.353 7.541952e-07 0.9391194 0
|
||||
0.3695 5.01876e-06 0.8832853 0
|
||||
0.386 1.941502e-05 0.8178788 0
|
||||
0.4025 5.581854e-05 0.7471578 0
|
||||
0.419 0.0001330574 0.674704 0
|
||||
0.4355 0.0002787865 0.60333 0
|
||||
0.452 0.0005316304 0.535068 0
|
||||
0.4685 0.0009436502 0.4712431 0
|
||||
0.485 0.001583182 0.412597 0
|
||||
0.5015 0.002538082 0.3594268 0
|
||||
0.518 0.00391938 0.3117147 0
|
||||
0.5345 0.005865308 0.2692366 0
|
||||
0.551 0.008545575 0.2316458 0
|
||||
0.5675 0.01216566 0.1985336 0
|
||||
0.584 0.01697073 0.169471 0
|
||||
0.6005 0.0232485 0.1440352 0
|
||||
0.617 0.03133019 0.1218258 0
|
||||
0.6335 0.04158825 0.1024735 0
|
||||
0.65 0.05442925 0.08564409 0
|
||||
0.6665 0.07028023 0.0710386 0
|
||||
0.683 0.08956673 0.05839253 0
|
||||
0.6995 0.1126816 0.0474734 0
|
||||
0.716 0.1399451 0.03807806 0
|
||||
0.7325 0.1715593 0.03002991 0
|
||||
0.749 0.2075632 0.02317622 0
|
||||
0.7655 0.2478002 0.01738581 0
|
||||
0.782 0.2919105 0.01254709 0
|
||||
0.7985 0.3393688 0.008566921 0
|
||||
0.815 0.3895919 0.005370427 0
|
||||
0.8315 0.4421811 0.002903191 0
|
||||
0.848 0.4975608 0.001139647 0
|
||||
0.87 0.59168 0 0
|
||||
0.8885714 0.6500114 0 0
|
||||
0.9071429 0.7083429 0 0
|
||||
0.9257143 0.7666743 0 0
|
||||
0.9442857 0.8250057 0 0
|
||||
0.9628571 0.8833371 0 0
|
||||
0.9814286 0.9416686 0 0
|
||||
1 1 0 0
|
||||
/
|
121
tests/include/test_3x5x4.grdecl
Normal file
121
tests/include/test_3x5x4.grdecl
Normal file
@ -0,0 +1,121 @@
|
||||
-- This reservoir simulation deck is made available under the Open Database
|
||||
-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in
|
||||
-- individual contents of the database are licensed under the Database Contents
|
||||
-- License: http://opendatacommons.org/licenses/dbcl/1.0/
|
||||
|
||||
-- Copyright (C) 2018 Equinor
|
||||
|
||||
-- This file is one of the include files for UDQ_ACTIONX.DATA and UDQ_WCONPROD.DATA.
|
||||
|
||||
SPECGRID
|
||||
3 5 4 1 F /
|
||||
|
||||
COORD
|
||||
2000.0000 2000.0000 2000.0000 1999.5638 2000.0000 2039.9619
|
||||
2199.8096 2000.0000 2008.7239 2199.3735 2000.0000 2048.6858
|
||||
2399.6193 2000.0000 2017.4478 2399.1831 2000.0000 2057.4097
|
||||
2599.4289 2000.0000 2026.1716 2598.9927 2000.0000 2066.1336
|
||||
2000.0000 2200.0000 2000.0000 1999.5638 2200.0000 2039.9619
|
||||
2199.8096 2200.0000 2008.7239 2199.3735 2200.0000 2048.6858
|
||||
2399.6193 2200.0000 2017.4478 2399.1831 2200.0000 2057.4097
|
||||
2599.4289 2200.0000 2026.1716 2598.9927 2200.0000 2066.1336
|
||||
2000.0000 2400.0000 2000.0000 1999.5638 2400.0000 2039.9619
|
||||
2199.8096 2400.0000 2008.7239 2199.3735 2400.0000 2048.6858
|
||||
2399.6193 2400.0000 2017.4478 2399.1831 2400.0000 2057.4097
|
||||
2599.4289 2400.0000 2026.1716 2598.9927 2400.0000 2066.1336
|
||||
2000.0000 2600.0000 2000.0000 1999.5638 2600.0000 2039.9619
|
||||
2199.8096 2600.0000 2008.7239 2199.3735 2600.0000 2048.6858
|
||||
2399.6193 2600.0000 2017.4478 2399.1831 2600.0000 2057.4097
|
||||
2599.4289 2600.0000 2026.1716 2598.9927 2600.0000 2066.1336
|
||||
2000.0000 2800.0000 2000.0000 1999.5638 2800.0000 2039.9619
|
||||
2199.8096 2800.0000 2008.7239 2199.3735 2800.0000 2048.6858
|
||||
2399.6193 2800.0000 2017.4478 2399.1831 2800.0000 2057.4097
|
||||
2599.4289 2800.0000 2026.1716 2598.9927 2800.0000 2066.1336
|
||||
2000.0000 3000.0000 2000.0000 1999.5638 3000.0000 2039.9619
|
||||
2199.8096 3000.0000 2008.7239 2199.3735 3000.0000 2048.6858
|
||||
2399.6193 3000.0000 2017.4478 2399.1831 3000.0000 2057.4097
|
||||
2599.4289 3000.0000 2026.1716 2598.9927 3000.0000 2066.1336
|
||||
/
|
||||
|
||||
ZCORN
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2000.0000 2008.7239 2008.7239 2017.4478 2017.4478 2026.1716
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2009.9905 2018.7144 2018.7144 2027.4382 2027.4382 2036.1621
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2019.9810 2028.7048 2028.7048 2037.4287 2037.4287 2046.1526
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2029.9714 2038.6953 2038.6953 2047.4192 2047.4192 2056.1431
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
2039.9619 2048.6858 2048.6858 2057.4097 2057.4097 2066.1336
|
||||
/
|
587
tests/test_AggregateActionxData.cpp
Normal file
587
tests/test_AggregateActionxData.cpp
Normal file
@ -0,0 +1,587 @@
|
||||
#define BOOST_TEST_MODULE UDQ-ACTIONX_Data
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well2.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
#include <opm/output/eclipse/AggregateUDQData.hpp>
|
||||
#include <opm/output/eclipse/AggregateActionxData.hpp>
|
||||
#include <opm/output/eclipse/WriteRestartHelpers.hpp>
|
||||
|
||||
#include <opm/output/eclipse/InteHEAD.hpp>
|
||||
#include <opm/output/eclipse/VectorItems/intehead.hpp>
|
||||
#include <opm/output/eclipse/DoubHEAD.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||
|
||||
#include <opm/io/eclipse/OutputStream.hpp>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
|
||||
Opm::Deck first_sim(std::string fname) {
|
||||
return Opm::Parser{}.parseFile(fname);
|
||||
}
|
||||
}
|
||||
/*
|
||||
Opm::SummaryState sum_state_TEST1_FLOW()
|
||||
{
|
||||
auto state = Opm::SummaryState{std::chrono::system_clock::now()};
|
||||
state.update_well_var("OPU01", "WUPR3", 4);
|
||||
state.update_well_var("OPU02", "WUPR3", 3);
|
||||
state.update_well_var("OPL01", "WUPR3", 1);
|
||||
state.update_well_var("OPL02", "WUPR3", 2);
|
||||
|
||||
state.update("FMWPR", 4);
|
||||
|
||||
|
||||
return state;
|
||||
}
|
||||
*/
|
||||
Opm::SummaryState sum_state_TEST1()
|
||||
{
|
||||
auto state = Opm::SummaryState{std::chrono::system_clock::now()};
|
||||
state.update_well_var("OPU01", "WWPR", 21.);
|
||||
state.update_well_var("OPU02", "WWPR", 22.);
|
||||
state.update_well_var("OPL01", "WWPR", 23.);
|
||||
state.update_well_var("OPL02", "WWPR", 24.);
|
||||
|
||||
state.update_well_var("OPU01", "WGPR", 230.);
|
||||
state.update_well_var("OPU02", "WGPR", 231.);
|
||||
state.update_well_var("OPL01", "WGPR", 232.);
|
||||
state.update_well_var("OPL02", "WGPR", 233.);
|
||||
|
||||
state.update_group_var("UPPER", "GWPR", 36.);
|
||||
state.update_group_var("LOWER", "GWPR", 37.);
|
||||
state.update_group_var("TEST", "GWPR", 73.);
|
||||
|
||||
state.update_group_var("UPPER", "GGPR", 460.);
|
||||
state.update_group_var("LOWER", "GGPR", 461.);
|
||||
state.update_group_var("TEST", "GGPR", 821.);
|
||||
|
||||
|
||||
state.update_group_var("TEST", "GMWPR", 4);
|
||||
|
||||
state.update("FWPR", 73.);
|
||||
|
||||
state.update("FMWPR", 4);
|
||||
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
//int main(int argc, char* argv[])
|
||||
struct SimulationCase
|
||||
{
|
||||
explicit SimulationCase(const Opm::Deck& deck)
|
||||
: es { deck }
|
||||
, grid { deck }
|
||||
, sched{ deck, es }
|
||||
{}
|
||||
|
||||
// Order requirement: 'es' must be declared/initialised before 'sched'.
|
||||
Opm::EclipseState es;
|
||||
Opm::EclipseGrid grid;
|
||||
Opm::Schedule sched;
|
||||
|
||||
};
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(Aggregate_Actionx)
|
||||
|
||||
|
||||
|
||||
// test constructed UDQ-Actionx restart data
|
||||
BOOST_AUTO_TEST_CASE (Declared_Actionx_data)
|
||||
{
|
||||
const auto simCase = SimulationCase{first_sim("UDQ_ACTIONX_TEST1.DATA")};
|
||||
|
||||
Opm::EclipseState es = simCase.es;
|
||||
Opm::Runspec rspec = es.runspec();
|
||||
Opm::SummaryState st = sum_state_TEST1();
|
||||
Opm::Schedule sched = simCase.sched;
|
||||
Opm::EclipseGrid grid = simCase.grid;
|
||||
const auto& ioConfig = es.getIOConfig();
|
||||
//const auto& restart = es.cfg().restart();
|
||||
|
||||
|
||||
// Report Step 1: 2008-10-10 --> 2011-01-20
|
||||
const auto rptStep = std::size_t{1};
|
||||
std::string outputDir = "./";
|
||||
std::string baseName = "UDQ_ACTIONX_TEST1";
|
||||
Opm::EclIO::OutputStream::Restart rstFile {
|
||||
Opm::EclIO::OutputStream::ResultSet { outputDir, baseName },
|
||||
rptStep,
|
||||
Opm::EclIO::OutputStream::Formatted { ioConfig.getFMTOUT() },
|
||||
Opm::EclIO::OutputStream::Unified { ioConfig.getUNIFOUT() }
|
||||
};
|
||||
|
||||
double secs_elapsed = 3.1536E07;
|
||||
const auto ih = Opm::RestartIO::Helpers::createInteHead(es, grid, sched,
|
||||
secs_elapsed, rptStep, rptStep);
|
||||
//set dummy value for next_step_size
|
||||
const double next_step_size= 0.1;
|
||||
const auto dh = Opm::RestartIO::Helpers::createDoubHead(es, sched, rptStep,
|
||||
secs_elapsed, next_step_size);
|
||||
|
||||
const auto udqDims = Opm::RestartIO::Helpers::createUdqDims(sched, rptStep, ih);
|
||||
auto udqData = Opm::RestartIO::Helpers::AggregateUDQData(udqDims);
|
||||
udqData.captureDeclaredUDQData(sched, rptStep, st, ih);
|
||||
|
||||
const auto actDims = Opm::RestartIO::Helpers::createActionxDims(rspec, sched, rptStep);
|
||||
auto actionxData = Opm::RestartIO::Helpers::AggregateActionxData(actDims);
|
||||
actionxData.captureDeclaredActionxData(sched, st, actDims, rptStep);
|
||||
|
||||
#if 0
|
||||
rstFile.write("IUDQ", udqData.getIUDQ());
|
||||
rstFile.write("IUAD", udqData.getIUAD());
|
||||
rstFile.write("IGPH", udqData.getIGPH());
|
||||
rstFile.write("IUAP", udqData.getIUAP());
|
||||
rstFile.write("ZUDN", udqData.getZUDN());
|
||||
rstFile.write("ZUDL", udqData.getZUDL());
|
||||
|
||||
rstFile.write("IACT", actionxData.getIACT());
|
||||
rstFile.write("SACT", actionxData.getSACT());
|
||||
rstFile.write("ZACT", actionxData.getZACT());
|
||||
rstFile.write("ZLACT", actionxData.getZLACT());
|
||||
rstFile.write("ZACN", actionxData.getZACN());
|
||||
rstFile.write("IACN", actionxData.getIACN());
|
||||
rstFile.write("SACN", actionxData.getSACN());
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
{
|
||||
/*
|
||||
Check of InteHEAD and DoubHEAD data for UDQ variables
|
||||
|
||||
INTEHEAD
|
||||
|
||||
Intehead[156] - The number of ACTIONS
|
||||
Intehead[157] - The max number of lines of schedule data including ENDACTIO keyword for any ACTION
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------]
|
||||
|
||||
*/
|
||||
const auto rptStep_1 = std::size_t{0};
|
||||
const auto ih_1 = Opm::RestartIO::Helpers::createInteHead(es, grid, sched,
|
||||
secs_elapsed, rptStep, rptStep_1);
|
||||
|
||||
BOOST_CHECK_EQUAL(ih_1[156] , 2);
|
||||
BOOST_CHECK_EQUAL(ih_1[157] , 7);
|
||||
|
||||
|
||||
const auto rptStep_2 = std::size_t{1};
|
||||
const auto ih_2 = Opm::RestartIO::Helpers::createInteHead(es, grid, sched,
|
||||
secs_elapsed, rptStep, rptStep_2);
|
||||
BOOST_CHECK_EQUAL(ih_2[156] , 3);
|
||||
BOOST_CHECK_EQUAL(ih_2[157] , 7);
|
||||
|
||||
const auto rptStep_3 = std::size_t{2};
|
||||
const auto ih_3 = Opm::RestartIO::Helpers::createInteHead(es, grid, sched,
|
||||
secs_elapsed, rptStep, rptStep_3);
|
||||
|
||||
BOOST_CHECK_EQUAL(ih_3[156] , 3);
|
||||
BOOST_CHECK_EQUAL(ih_3[157] , 10);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
{
|
||||
/*
|
||||
IACT
|
||||
--length is equal to 9*the number of ACTIONX keywords
|
||||
//item [0]: is unknown, (=0)
|
||||
//item [1]: The number of lines of schedule data including ENDACTIO
|
||||
//item [2]: is unknown, (=1)
|
||||
//item [3]: is unknown, (=7)
|
||||
//item [4]: is unknown, (=0)
|
||||
//item [5]: The number of times the action is triggered
|
||||
//item [6]: is unknown, (=0)
|
||||
//item [7]: is unknown, (=0)
|
||||
//item [8]: The number of times the action is triggered
|
||||
*/
|
||||
|
||||
|
||||
const auto& iAct = actionxData.getIACT();
|
||||
|
||||
auto start = 0*actDims[1];
|
||||
BOOST_CHECK_EQUAL(iAct[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 1] , 4);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 2] , 1);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 3] , 7);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 5] , 10);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 8] , 3);
|
||||
|
||||
|
||||
start = 1*actDims[1];
|
||||
BOOST_CHECK_EQUAL(iAct[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 1] , 7);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 2] , 1);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 3] , 7);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 5] , 11);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 8] , 3);
|
||||
|
||||
start = 2*actDims[1];
|
||||
BOOST_CHECK_EQUAL(iAct[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 1] , 4);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 2] , 1);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 3] , 7);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 5] , 13);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAct[start + 8] , 3);
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
/*
|
||||
ZACT
|
||||
--length 4 times 8-chars pr ACTIONX keyword
|
||||
|
||||
Name of action 4 times 8 chars (up to 8 chars for name)
|
||||
|
||||
*/
|
||||
|
||||
const auto& zAct = actionxData.getZACT();
|
||||
|
||||
auto start = 0*actDims[3];
|
||||
BOOST_CHECK_EQUAL(zAct[start + 0].c_str() , "ACT01 ");
|
||||
|
||||
start = 1*actDims[3];
|
||||
BOOST_CHECK_EQUAL(zAct[start + 0].c_str() , "ACT02 ");
|
||||
|
||||
start = 2*actDims[3];
|
||||
BOOST_CHECK_EQUAL(zAct[start + 0].c_str() , "ACT03 ");
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
/*
|
||||
ZLACT
|
||||
-- length = ACTDIMS_item3*(max-over-action of number of lines of data pr ACTION)
|
||||
|
||||
*/
|
||||
|
||||
const auto& zLact = actionxData.getZLACT();
|
||||
|
||||
//First action
|
||||
auto start_a = 0*actDims[4];
|
||||
auto start = start_a + 0*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "WELOPEN ");
|
||||
|
||||
start = start_a + 1*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , " '?' '");
|
||||
BOOST_CHECK_EQUAL(zLact[start + 1].c_str() , "SHUT' 0 ");
|
||||
BOOST_CHECK_EQUAL(zLact[start + 2].c_str() , "0 0 / ");
|
||||
|
||||
start = start_a + 2*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "/ ");
|
||||
|
||||
start = start_a + 3*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "ENDACTIO");
|
||||
|
||||
//Second action
|
||||
start_a = 1*actDims[4];
|
||||
start = start_a + 0*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "WELOPEN ");
|
||||
|
||||
start = start_a + 1*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , " '?' '");
|
||||
BOOST_CHECK_EQUAL(zLact[start + 1].c_str() , "SHUT' 0 ");
|
||||
BOOST_CHECK_EQUAL(zLact[start + 2].c_str() , "0 0 / ");
|
||||
|
||||
start = start_a + 2*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "/ ");
|
||||
|
||||
start = start_a + 3*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "WELOPEN ");
|
||||
|
||||
start = start_a + 4*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , " 'OPL0");
|
||||
BOOST_CHECK_EQUAL(zLact[start + 1].c_str() , "1' 'OPEN");
|
||||
BOOST_CHECK_EQUAL(zLact[start + 2].c_str() , "' / ");
|
||||
|
||||
start = start_a + 5*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "/ ");
|
||||
|
||||
|
||||
start = start_a + 6*actDims[8];
|
||||
BOOST_CHECK_EQUAL(zLact[start + 0].c_str() , "ENDACTIO");
|
||||
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
/*
|
||||
ZACN
|
||||
//(Max number of conditions pr ACTIONX) * ((max no characters pr line = 104) / (8 - characters pr string)(104/8 = 13)
|
||||
|
||||
*/
|
||||
|
||||
const auto& zAcn = actionxData.getZACN();
|
||||
|
||||
//First action
|
||||
auto start_a = 0*actDims[5];
|
||||
auto start = start_a + 0*13;
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 0].c_str() , "WWPR ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 1].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 2].c_str() , "> ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 3].c_str() , "OP* ");
|
||||
|
||||
start = start_a + 1*13;
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 0].c_str() , "GMWPR ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 1].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 2].c_str() , "> ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 3].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 4].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 5].c_str() , "T* ");
|
||||
|
||||
start = start_a + 2*13;
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 0].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 1].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 2].c_str() , "> ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 3].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 4].c_str() , " ");
|
||||
|
||||
|
||||
|
||||
//Second action
|
||||
start_a = 1*actDims[5];
|
||||
start = start_a + 0*13;
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 0].c_str() , "FMWPR ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 1].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 2].c_str() , "> ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 3].c_str() , " ");
|
||||
|
||||
start = start_a + 1*13;
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 0].c_str() , "WGPR ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 1].c_str() , "GGPR ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 2].c_str() , "> ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 3].c_str() , "OPL02 ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 4].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 5].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 6].c_str() , "LOWER ");
|
||||
|
||||
start = start_a + 2*13;
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 0].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 1].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 2].c_str() , "> ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 3].c_str() , " ");
|
||||
BOOST_CHECK_EQUAL(zAcn[start + 4].c_str() , " ");
|
||||
}
|
||||
|
||||
{
|
||||
/*
|
||||
IACN
|
||||
26*Max number of conditions pr ACTIONX
|
||||
|
||||
*/
|
||||
|
||||
|
||||
const auto& iAcn = actionxData.getIACN();
|
||||
|
||||
auto start_a = 0*actDims[6];
|
||||
auto start = start_a + 0*26;
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 2] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 5] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 9] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 10] , 2);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 11] , 8);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 13] , 2);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 15] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 16] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 17] , 0);
|
||||
|
||||
start = start_a + 1*26;
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 2] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 5] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 9] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 10] , 3);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 11] , 8);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 13] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 15] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 16] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 17] , 0);
|
||||
|
||||
start_a = 1*actDims[6];
|
||||
start = start_a + 0*26;
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 2] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 5] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 9] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 10] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 11] , 8);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 13] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 15] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 16] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 17] , 0);
|
||||
|
||||
start = start_a + 1*26;
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 2] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 5] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 9] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 10] , 2);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 11] , 3);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 13] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 15] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 16] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 17] , 0);
|
||||
|
||||
start = start_a + 2*26;
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 2] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 5] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 7] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 9] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 10] , 11);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 11] , 8);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 12] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 13] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 15] , 0);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 16] , 1);
|
||||
BOOST_CHECK_EQUAL(iAcn[start + 17] , 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
{
|
||||
/*
|
||||
SACN
|
||||
26*Max number of conditions pr ACTIONX
|
||||
|
||||
*/
|
||||
|
||||
|
||||
const auto& sAcn = actionxData.getSACN();
|
||||
|
||||
auto start_a = 0*actDims[6];
|
||||
auto start = start_a + 0*16;
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 2] , 17);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 5] , 17);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 7] , 17);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 9] , 17);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 10] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 11] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 13] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 15] , 0);
|
||||
|
||||
start = start_a + 1*16;
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 2] , 14);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 4] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 5] , 14);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 6] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 7] , 14);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 8] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 9] , 14);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 10] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 11] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 13] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 15] , 0);
|
||||
|
||||
start = start_a + 2*16;
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 0] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 1] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 2] , 3);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 3] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 4] , 1.E+20);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 5] , 1.E+20);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 6] , 1.E+20);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 7] , 1.E+20);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 8] , 1.E+20);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 9] , 1.E+20);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 10] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 11] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 12] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 13] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 14] , 0);
|
||||
BOOST_CHECK_EQUAL(sAcn[start + 15] , 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
Loading…
Reference in New Issue
Block a user