Removed legacy blackoil fluid code. Further information:

- These classes were imported (copied) from the dune-porsol repository,
   and copies remain there for the time being.
 - Some of the black oil fluid classes that are in opm-core, such as the
   SinglePvt* classes, are direct descendants of the Miscibility* classes
   that have been removed.
 - At some point, we may modify dune-porsol to use the new fluid interfaces
   from opm-core, but for now we keep using the existing code as-is.
This commit is contained in:
Atgeirr Flø Rasmussen
2012-02-10 09:28:05 +01:00
parent da1159061a
commit 11e5f76813
21 changed files with 0 additions and 3111 deletions
-6
View File
@@ -9,9 +9,6 @@ LDADD = $(top_builddir)/libopmcore.la
noinst_PROGRAMS = \
bo_fluid_p_and_z_deps \
bo_fluid_pressuredeps \
bo_fluid_test \
bo_resprop_test \
monotcubicinterpolator_test \
param_test \
@@ -21,9 +18,6 @@ unit_test \
test_readvector \
test_sf2p
bo_fluid_p_and_z_deps_SOURCES = bo_fluid_p_and_z_deps.cpp
bo_fluid_pressuredeps_SOURCES = bo_fluid_pressuredeps.cpp
bo_fluid_test_SOURCES = bo_fluid_test.cpp
bo_resprop_test_SOURCES = bo_resprop_test.cpp
monotcubicinterpolator_test_SOURCES = monotcubicinterpolator_test.cpp
param_test_SOURCES = param_test.cpp
-132
View File
@@ -1,132 +0,0 @@
/*
Copyright 2011 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 "config.h"
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <opm/core/fluid/BlackoilFluid.hpp>
int main(int argc, char** argv)
{
std::cout << "%{\n";
// Parameters.
Opm::parameter::ParameterGroup param(argc, argv);
// Parser.
std::string ecl_file = param.get<std::string>("filename");
Opm::EclipseGridParser parser(ecl_file);
// Look at the BlackoilFluid behaviour
Opm::BlackoilFluid fluid;
fluid.init(parser);
Opm::BlackoilFluid::CompVec z0(0.0);
z0[Opm::BlackoilFluid::Water] = param.getDefault("z_w", 0.0);
z0[Opm::BlackoilFluid::Oil] = param.getDefault("z_o", 1.0);
z0[Opm::BlackoilFluid::Gas] = param.getDefault("z_g", 0.0);
int num_pts_p = param.getDefault("num_pts_p", 41);
int num_pts_z = param.getDefault("num_pts_z", 51);
double min_press = param.getDefault("min_press", 1e7);
double max_press = param.getDefault("max_press", 3e7);
int changing_component = param.getDefault("changing_component", int(Opm::BlackoilFluid::Gas));
double min_z = param.getDefault("min_z", 0.0);
double max_z = param.getDefault("max_z", 500.0);
#ifdef COMPUTE_OLD_TERMS
int variable = param.getDefault("variable", 0);
#else
int variable = param.getDefault("variable", 2);
#endif
Opm::BlackoilFluid::CompVec z = z0;
std::cout << "%}\n"
<< "data = [\n";
for (int i = 0; i < num_pts_p; ++i) {
double pfactor = num_pts_p < 2 ? 0.0 : double(i)/double(num_pts_p - 1);
double p = (1.0 - pfactor)*min_press + pfactor*max_press;
for (int j = 0; j < num_pts_z; ++j) {
double zfactor = num_pts_z < 2 ? 0.0 : double(j)/double(num_pts_z - 1);
z[changing_component] = (1.0 - zfactor)*min_z + zfactor*max_z;
// std::cout << p << ' ' << z << '\n';
Opm::BlackoilFluid::FluidState state = fluid.computeState(Opm::BlackoilFluid::PhaseVec(p), z);
std::cout.precision(6);
std::cout.width(15);
std::cout.fill(' ');
double var = 0.0;
switch (variable) {
#ifdef COMPUTE_OLD_TERMS
case 0:
var = state.total_compressibility_;
break;
case 1:
var = state.experimental_term_;
break;
#endif
case 2:
var = state.saturation_[0];
break;
case 3:
var = state.saturation_[1];
break;
case 4:
var = state.saturation_[2];
break;
case 5:
var = state.formation_volume_factor_[0];
break;
case 6:
var = state.formation_volume_factor_[1];
break;
case 7:
var = state.formation_volume_factor_[2];
break;
case 8:
var = state.solution_factor_[0];
break;
case 9:
var = state.solution_factor_[1];
break;
case 10:
var = state.solution_factor_[2];
break;
default:
THROW("Unknown varable specification: " << variable);
break;
}
std::cout << var << ' ';
}
std::cout << '\n';
}
std::cout << "];\n\n"
<< "paxis = [\n";
for (int i = 0; i < num_pts_p; ++i) {
double pfactor = double(i)/double(num_pts_p - 1);
double p = (1.0 - pfactor)*min_press + pfactor*max_press;
std::cout << p << '\n';
}
std::cout << "];\n\n"
<< "zaxis = [\n";
for (int j = 0; j < num_pts_z; ++j) {
double zfactor = double(j)/double(num_pts_z - 1);
std::cout << (1.0 - zfactor)*min_z + zfactor*max_z << '\n';
}
std::cout << "];\n";
}
-108
View File
@@ -1,108 +0,0 @@
/*
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 <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <opm/core/fluid/BlackoilFluid.hpp>
#ifdef COMPUTE_OLD_TERMS
void printCompressibilityTerms(double p, const Opm::BlackoilFluid::FluidState& state)
{
std::cout.precision(6);
std::cout.width(15);
std::cout.fill(' ');
std::cout << p << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.total_compressibility_ << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << totmob << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.total_phase_volume_density_ << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.experimental_term_ << '\n';
}
#endif
static void printSatsEtc(double p, const Opm::BlackoilFluid::FluidState& state)
{
std::cout.precision(6);
std::cout.width(15);
std::cout.fill(' ');
std::cout << p << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.saturation_[0] << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.saturation_[1] << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.saturation_[2] << " ";
std::cout.width(15);
std::cout.fill(' ');
std::cout << state.total_phase_volume_density_ << '\n';
}
int main(int argc, char** argv)
{
// Parameters.
Opm::parameter::ParameterGroup param(argc, argv);
// Parser.
std::string ecl_file = param.get<std::string>("filename");
Opm::EclipseGridParser parser(ecl_file);
// Look at the BlackoilFluid behaviour
Opm::BlackoilFluid fluid;
fluid.init(parser);
Opm::BlackoilFluid::CompVec z(0.0);
z[Opm::BlackoilFluid::Water] = param.getDefault("z_w", 0.0);
z[Opm::BlackoilFluid::Oil] = param.getDefault("z_o", 1.0);
z[Opm::BlackoilFluid::Gas] = param.getDefault("z_g", 0.0);
int num_pts = param.getDefault("num_pts", 41);
double min_press = param.getDefault("min_press", 1e7);
double max_press = param.getDefault("max_press", 3e7);
#ifdef COMPUTE_OLD_TERMS
bool print_compr = param.getDefault("print_compr", true);
#endif
for (int i = 0; i < num_pts; ++i) {
double factor = double(i)/double(num_pts - 1);
double p = (1.0 - factor)*min_press + factor*max_press;
Opm::BlackoilFluid::FluidState state = fluid.computeState(Opm::BlackoilFluid::PhaseVec(p), z);
double totmob = 0.0;
for (int phase = 0; phase < Opm::BlackoilFluid::numPhases; ++phase) {
totmob += state.mobility_[phase];
}
#ifdef COMPUTE_OLD_TERMS
if (print_compr) {
printCompressibilityTerms(p, state);
} else {
printSatsEtc(p, state);
}
#else
printSatsEtc(p, state);
#endif
}
}
-53
View File
@@ -1,53 +0,0 @@
/*
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 <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <opm/core/fluid/blackoil/FluidMatrixInteractionBlackoil.hpp>
int main(int argc, char** argv)
{
// Parameters.
Opm::parameter::ParameterGroup param(argc, argv);
// Parser.
std::string ecl_file = param.get<std::string>("filename");
Opm::EclipseGridParser parser(ecl_file);
// Test the FluidMatrixInteractionBlackoil class.
Opm::FluidMatrixInteractionBlackoilParams<double> fluid_params;
fluid_params.init(parser);
typedef Opm::FluidMatrixInteractionBlackoil<double> Law;
Law::PhaseVec 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[0] << ' ' << kr[1] << ' ' << kr[2] << '\n';
}
}