mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add data container PerfData to use in WellState
This commit is contained in:
@@ -67,6 +67,7 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
opm/simulators/wells/MultisegmentWellEval.cpp
|
||||
opm/simulators/wells/MultisegmentWellGeneric.cpp
|
||||
opm/simulators/wells/ParallelWellInfo.cpp
|
||||
opm/simulators/wells/PerfData.cpp
|
||||
opm/simulators/wells/SegmentState.cpp
|
||||
opm/simulators/wells/StandardWellEval.cpp
|
||||
opm/simulators/wells/StandardWellGeneric.cpp
|
||||
@@ -286,6 +287,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
||||
opm/simulators/utils/ParallelEclipseState.hpp
|
||||
opm/simulators/utils/ParallelRestart.hpp
|
||||
opm/simulators/utils/PropsCentroidsDataHandle.hpp
|
||||
opm/simulators/wells/PerfData.hpp
|
||||
opm/simulators/wells/PerforationData.hpp
|
||||
opm/simulators/wells/RateConverter.hpp
|
||||
opm/simulators/utils/readDeck.hpp
|
||||
|
44
opm/simulators/wells/PerfData.cpp
Normal file
44
opm/simulators/wells/PerfData.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright 2021 Equinor 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/simulators/wells/PerfData.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
|
||||
PerfData::PerfData(std::size_t num_perf, const PhaseUsage& pu_arg):
|
||||
pu(pu_arg),
|
||||
pressure(num_perf),
|
||||
rates(num_perf),
|
||||
phase_rates(num_perf * pu.num_phases),
|
||||
solvent_rates(num_perf),
|
||||
polymer_rates(num_perf),
|
||||
brine_rates(num_perf),
|
||||
water_throughput(num_perf),
|
||||
skin_pressure(num_perf),
|
||||
water_velocity(num_perf),
|
||||
prod_index(num_perf)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
52
opm/simulators/wells/PerfData.hpp
Normal file
52
opm/simulators/wells/PerfData.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2021 Equinor 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_PERFDATA_HEADER_INCLUDED
|
||||
#define OPM_PERFDATA_HEADER_INCLUDED
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
class PerfData
|
||||
{
|
||||
private:
|
||||
PhaseUsage pu;
|
||||
|
||||
public:
|
||||
PerfData(std::size_t num_perf, const PhaseUsage& pu);
|
||||
std::vector<double> pressure;
|
||||
std::vector<double> rates;
|
||||
std::vector<double> phase_rates;
|
||||
std::vector<double> solvent_rates;
|
||||
std::vector<double> polymer_rates;
|
||||
std::vector<double> brine_rates;
|
||||
std::vector<double> water_throughput;
|
||||
std::vector<double> skin_pressure;
|
||||
std::vector<double> water_velocity;
|
||||
std::vector<double> prod_index;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif // OPM_PERFORATIONDATA_HEADER_INCLUDED
|
@@ -28,6 +28,7 @@
|
||||
#include <opm/simulators/wells/WellState.hpp>
|
||||
#include <opm/simulators/wells/SegmentState.hpp>
|
||||
#include <opm/simulators/wells/WellContainer.hpp>
|
||||
#include <opm/simulators/wells/PerfData.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
@@ -529,5 +530,19 @@ BOOST_AUTO_TEST_CASE(TESTSegmentState2) {
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TESTPerfData) {
|
||||
const auto& deck_string = R"(
|
||||
RUNSPEC
|
||||
|
||||
OIL
|
||||
WATER
|
||||
GAS
|
||||
)";
|
||||
Opm::PhaseUsage pu = Opm::phaseUsageFromDeck(Opm::Parser{}.parseString(deck_string));
|
||||
|
||||
Opm::PerfData pd(100,pu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Reference in New Issue
Block a user