commit e8a9b6767be1cd284b70848f632f70707e0b427c Author: Atgeirr Flø Rasmussen Date: Wed Nov 10 13:31:32 2010 +0100 Implemented FluidMatrixInteractionBlackoil init(), kr() and a test prog. diff --git a/dune/porsol/blackoil/test/bo_fluid_test.cpp b/dune/porsol/blackoil/test/bo_fluid_test.cpp new file mode 100644 index 00000000..9b0cb23c --- /dev/null +++ b/dune/porsol/blackoil/test/bo_fluid_test.cpp @@ -0,0 +1,50 @@ +/* + Copyright 2010 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 . +*/ + + +#include +#include +#include + + +int main(int argc, char** argv) +{ + // Parameters. + Dune::parameter::ParameterGroup param(argc, argv); + + std::string ecl_file = param.get("filename"); + Dune::EclipseGridParser parser(ecl_file); + Opm::FluidMatrixInteractionBlackoilParams fluid_params; + fluid_params.init(parser); + typedef Opm::FluidMatrixInteractionBlackoil Law; + + + Dune::FieldVector s, kr; + const double temp = 300; // [K] + int num = 41; + for (int i = 0; i < num; ++i) { + s[Law::Aqua] = 0.0; + s[Law::Liquid] = double(i)/double(num - 1); + s[Law::Vapour] = 1.0 - s[Law::Aqua] - s[Law::Liquid]; + Law::kr(kr, fluid_params, s, temp); + std::cout.width(6); + std::cout.fill(' '); + std::cout << s[Law::Liquid] << " " << kr << '\n'; + } +}