Added program refine_wells.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-05-24 09:18:37 +02:00
parent dd3b623f87
commit 60ed946835
2 changed files with 54 additions and 1 deletions

View File

@ -8,7 +8,8 @@ noinst_PROGRAMS = \
scaneclipsedeck \
spu_2p \
wells_example \
sim_wateroil
sim_wateroil \
refine_wells
spu_2p_SOURCES = spu_2p.cpp
spu_2p_LDADD = $(LDADD) $(LIBS) $(BOOST_SYSTEM_LIB) $(BOOST_FILESYSTEM_LIB) $(LAPACK_LIBS) $(LIBS) $(LIBS)
@ -17,3 +18,5 @@ sim_wateroil_SOURCES = sim_wateroil.cpp
sim_wateroil_LDADD = $(LDADD) $(LIBS) $(BOOST_SYSTEM_LIB) $(BOOST_FILESYSTEM_LIB) $(LAPACK_LIBS) $(LIBS) $(LIBS)
wells_example_SOURCES = wells_example.cpp
refine_wells_SOURCES = refine_wells.cpp

50
examples/refine_wells.cpp Normal file
View File

@ -0,0 +1,50 @@
/*
Copyright 2012 SINTEF ICT, Applied Mathematics.
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/core/eclipse/EclipseGridParser.hpp>
// Double I and J coordinates of wells and completions.
// Do not change any well productivity indices or any other data.
int main(int argc, char** argv)
{
using namespace Opm;
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " deck\n";
return 1;
}
EclipseGridParser deck(argv[1], false);
WELSPECS ws = deck.getWELSPECS();
const int nw = ws.welspecs.size();
for (int w = 0; w < nw; ++w) {
ws.welspecs[w].I_ *= 2;
ws.welspecs[w].J_ *= 2;
}
COMPDAT cd = deck.getCOMPDAT();
const int nc = cd.compdat.size();
for (int c = 0; c < nc; ++c) {
cd.compdat[c].grid_ind_[0] *= 2;
cd.compdat[c].grid_ind_[1] *= 2;
}
ws.write(std::cout);
std::cout << '\n';
cd.write(std::cout);
}