2010-08-23 09:34:14 +00:00
|
|
|
/*
|
|
|
|
|
Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
|
|
|
|
|
Copyright 2009, 2010 Statoil ASA.
|
|
|
|
|
|
2013-03-22 01:05:37 +01:00
|
|
|
This file is part of the Open Porous Media project (OPM).
|
2010-08-23 09:34:14 +00:00
|
|
|
|
2013-03-22 01:05:37 +01:00
|
|
|
OPM is free software: you can redistribute it and/or modify
|
2010-08-23 09:34:14 +00:00
|
|
|
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.
|
|
|
|
|
|
2013-03-22 01:05:37 +01:00
|
|
|
OPM is distributed in the hope that it will be useful,
|
2010-08-23 09:34:14 +00:00
|
|
|
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
|
2013-03-22 01:05:37 +01:00
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
2010-08-23 09:34:14 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#if HAVE_CONFIG_H
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2016-04-05 20:25:59 +02:00
|
|
|
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
2010-08-23 09:34:14 +00:00
|
|
|
|
2013-10-08 13:44:56 +02:00
|
|
|
#include <dune/common/version.hh>
|
2016-04-05 20:25:59 +02:00
|
|
|
|
2013-10-08 13:44:56 +02:00
|
|
|
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
|
|
|
|
|
#include <dune/common/parallel/mpihelper.hh>
|
|
|
|
|
#else
|
|
|
|
|
#include <dune/common/mpihelper.hh>
|
|
|
|
|
#endif
|
|
|
|
|
|
2016-04-05 20:25:59 +02:00
|
|
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
|
|
|
|
|
2016-10-10 17:31:02 +02:00
|
|
|
#include <opm/parser/eclipse/Units/Units.hpp>
|
2016-04-05 20:25:59 +02:00
|
|
|
|
|
|
|
|
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
2013-02-05 16:03:17 +01:00
|
|
|
using namespace Opm;
|
2012-02-07 12:20:50 +01:00
|
|
|
using namespace Opm::prefix;
|
|
|
|
|
using namespace Opm::unit;
|
2010-08-23 09:34:14 +00:00
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
2013-09-03 14:41:38 +02:00
|
|
|
try
|
2010-08-23 09:34:14 +00:00
|
|
|
{
|
2013-10-08 13:44:56 +02:00
|
|
|
Dune::MPIHelper::instance(argc, argv);
|
|
|
|
|
|
2010-08-23 09:34:14 +00:00
|
|
|
SinglePhaseUpscaler upscaler;
|
2016-04-05 20:25:59 +02:00
|
|
|
{
|
2017-04-28 15:35:20 +02:00
|
|
|
auto param = Opm::ParameterGroup(argc, argv);
|
2016-04-05 20:25:59 +02:00
|
|
|
|
|
|
|
|
upscaler.init(param);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto upscaled_K = upscaler.upscaleSinglePhase();
|
|
|
|
|
{
|
|
|
|
|
const auto fact = convert::to(1.0*square(meter), milli*darcy);
|
|
|
|
|
|
|
|
|
|
upscaled_K *= fact;
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-23 09:34:14 +00:00
|
|
|
std::cout.precision(15);
|
|
|
|
|
std::cout << "Upscaled K in millidarcy:\n" << upscaled_K << std::endl;
|
|
|
|
|
}
|
2016-04-05 20:25:59 +02:00
|
|
|
catch (const std::exception& e) {
|
|
|
|
|
std::cerr << "Program threw an exception: " << e.what() << '\n';
|
2013-09-03 14:41:38 +02:00
|
|
|
throw;
|
|
|
|
|
}
|