From 78fcacc4834ac7128bb9d7e22269a67699dd8e8d Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 14 Apr 2014 16:12:48 +0200 Subject: [PATCH] remove all files from the 'examples' directory these used the EclipseGridParser but were not compiled. @rolk: If you bother enough to keep them, please add them to the default build, make them compile and work with the current code and ping me for the port to opm-parser. (if you don't want to port this yourself.) --- examples/2d/.gitignore | 15 ----- examples/2d/CMakeLists.txt | 70 --------------------- examples/2d/data/tube.param.in | 4 -- examples/2d/src/co2_2d.cpp | 85 -------------------------- examples/3d/.gitignore | 15 ----- examples/3d/CMakeLists.txt | 68 --------------------- examples/3d/README | 1 - examples/3d/data/tube.data | 108 --------------------------------- examples/3d/data/tube.grdecl | 53 ---------------- examples/3d/data/tube.param.in | 4 -- examples/3d/data/viewtube.m | 30 --------- examples/3d/src/co2_3d.cpp | 83 ------------------------- 12 files changed, 536 deletions(-) delete mode 100644 examples/2d/.gitignore delete mode 100644 examples/2d/CMakeLists.txt delete mode 100644 examples/2d/data/tube.param.in delete mode 100644 examples/2d/src/co2_2d.cpp delete mode 100644 examples/3d/.gitignore delete mode 100644 examples/3d/CMakeLists.txt delete mode 100644 examples/3d/README delete mode 100644 examples/3d/data/tube.data delete mode 100644 examples/3d/data/tube.grdecl delete mode 100644 examples/3d/data/tube.param.in delete mode 100644 examples/3d/data/viewtube.m delete mode 100644 examples/3d/src/co2_3d.cpp diff --git a/examples/2d/.gitignore b/examples/2d/.gitignore deleted file mode 100644 index caf1dfb..0000000 --- a/examples/2d/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# compiler output -bin/ - -# editor backup files -*~ - -# CMake artifacts -CMakeCache.txt -CMakeFiles/ -Makefile -cmake_install.cmake -config.h - -# QtCreator generated project files -CMakeLists.txt.user diff --git a/examples/2d/CMakeLists.txt b/examples/2d/CMakeLists.txt deleted file mode 100644 index 99555be..0000000 --- a/examples/2d/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap -cmake_minimum_required (VERSION 2.8) -project (co2_2d) -enable_language (CXX) - -# build debug by default -if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "Debug") -endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) -message (STATUS "Build type: ${CMAKE_BUILD_TYPE}") - -# extensions to the build system -# if you use this example to create your own project, you should copy -# the cmake/ folder of an OPM project into the root of your own and then -# remove the double-dots from the path below -list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../cmake/Modules") - -# always build with debug info -include (UseDebugSymbols) -include (UseWarnings) - -# use optimizations if we are doing a release build -include (UseOptimization) - -# use tricks to build faster -include (UseFastBuilds) - -# ignore known variables -include (OpmKnown) - -# this will usually be probed by Findopm-core or specified on the -# command-line. we set it here because this example project is located -# where the heuristics don't find it. if you use this as a template, -# then you should remove this line. -set (opm-core_ROOT "${PROJECT_BINARY_DIR}/../../../opm-core") -set (opm-verteq_ROOT "${PROJECT_BINARY_DIR}/../..") - -include (OpmFind) -find_and_append_package (opm-core REQUIRED) -find_and_append_package (opm-verteq REQUIRED) -include_directories (${co2_2d_INCLUDE_DIRS}) -link_directories (${co2_2d_LIBRARY_DIRS}) -add_definitions (${co2_2d_DEFINITIONS}) - -# configuration defines necessary for the header files -include (ConfigVars) -configure_vars ( - FILE CXX "${PROJECT_BINARY_DIR}/config.h" - WRITE ${co2_2d_CONFIG_VARS} - ) - -# create executables in this directory -set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") - -# locate source files that makes out program(s) -set (co2_2d_SOURCES "src/co2_2d.cpp") - -# setup compilation of this particular executable -add_executable (co2_2d ${co2_2d_SOURCES}) -target_link_libraries (co2_2d ${co2_2d_LIBRARIES}) - -# queue this executable to be stripped -strip_debug_symbols (co2_2d) - -# example input file (realize directory names) -configure_file ( - ${PROJECT_SOURCE_DIR}/data/tube.param.in - ${PROJECT_BINARY_DIR}/bin/tube.param - ) diff --git a/examples/2d/data/tube.param.in b/examples/2d/data/tube.param.in deleted file mode 100644 index 6d495e7..0000000 --- a/examples/2d/data/tube.param.in +++ /dev/null @@ -1,4 +0,0 @@ -deck_filename=@PROJECT_SOURCE_DIR@/../3d/data/tube.data -use_reorder=false -output_vtk=false -output_ecl=true diff --git a/examples/2d/src/co2_2d.cpp b/examples/2d/src/co2_2d.cpp deleted file mode 100644 index e65ab6b..0000000 --- a/examples/2d/src/co2_2d.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: t; truncate-lines: t -*- */ -/* vim: set filetype=cpp autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace Opm; -using namespace Opm::parameter; -using namespace std; - -int main (int argc, char *argv[]) try { - // read parameters from command-line - ParameterGroup param (argc, argv, false); - - // parse keywords from the input file specified - // TODO: requirement that file exists - const string filename = param.get ("deck_filename"); - cout << "Reading deck: " << filename << endl; - const EclipseGridParser parser (filename); - - // extract grid from the parse tree - const GridManager gridMan (parser); - const UnstructuredGrid& grid = *gridMan.c_grid (); - - // extract fluid, rock and two-phase properties from the parse tree - IncompPropertiesFromDeck fluid (parser, grid); - - // initial state of the reservoir - const double gravity [] = { 0., 0., Opm::unit::gravity }; - TwophaseState state; - initStateFromDeck (grid, fluid, parser, gravity [2], state); - - // setup wells from input, using grid and rock properties read earlier - WellsManager wells (parser, grid, fluid.permeability()); - WellState wellState; wellState.init (wells.c_wells(), state); - - // no sources and no-flow boundary conditions - vector src (grid.number_of_cells, 0.); - FlowBCManager bc; - - // run schedule - SimulatorTimer stepping; - stepping.init (parser); - - // pressure and transport solvers - LinearSolverFactory linsolver (param); - VertEqWrapper sim ( - param, grid, fluid, 0, wells, src, bc.c_bcs(), linsolver, gravity); - - // write the state at all reporting times - SimulatorOutput > outp ( - param, parser, grid, stepping, state, wellState, sim); (void) outp; - - // if some parameters were unused, it may be that they're spelled wrong - if (param.anyUnused ()) { - cerr << "Unused parameters:" << endl; - param.displayUsage (); - } - - // loop solvers until final time has arrived - sim.run (stepping, state, wellState); - - // done - return 0; -} -catch (const std::exception &e) { - std::cerr << "Program threw an exception: " << e.what() << "\n"; - throw; -} - diff --git a/examples/3d/.gitignore b/examples/3d/.gitignore deleted file mode 100644 index caf1dfb..0000000 --- a/examples/3d/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# compiler output -bin/ - -# editor backup files -*~ - -# CMake artifacts -CMakeCache.txt -CMakeFiles/ -Makefile -cmake_install.cmake -config.h - -# QtCreator generated project files -CMakeLists.txt.user diff --git a/examples/3d/CMakeLists.txt b/examples/3d/CMakeLists.txt deleted file mode 100644 index fc268a5..0000000 --- a/examples/3d/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap -cmake_minimum_required (VERSION 2.8) -project (co2_3d) -enable_language (CXX) - -# build debug by default -if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "Debug") -endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) -message (STATUS "Build type: ${CMAKE_BUILD_TYPE}") - -# extensions to the build system -# if you use this example to create your own project, you should copy -# the cmake/ folder of an OPM project into the root of your own and then -# remove the double-dots from the path below -list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../cmake/Modules") - -# always build with debug info -include (UseDebugSymbols) -include (UseWarnings) - -# use optimizations if we are doing a release build -include (UseOptimization) - -# use tricks to build faster -include (UseFastBuilds) - -# ignore known variables -include (OpmKnown) - -# this will usually be probed by Findopm-core or specified on the -# command-line. we set it here because this example project is located -# where the heuristics don't find it. if you use this as a template, -# then you should remove this line. -set (opm-core_ROOT "${PROJECT_BINARY_DIR}/../../../opm-core") - -include (OpmFind) -find_and_append_package (opm-core REQUIRED) -include_directories (${co2_3d_INCLUDE_DIRS}) -link_directories (${co2_3d_LIBRARY_DIRS}) -add_definitions (${co2_3d_DEFINITIONS}) - -# configuration defines necessary for the header files -include (ConfigVars) -configure_vars ( - FILE CXX "${PROJECT_BINARY_DIR}/config.h" - WRITE ${co2_3d_CONFIG_VARS} - ) - -# create executables in this directory -set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") - -# locate source files that makes out program(s) -set (co2_3d_SOURCES "src/co2_3d.cpp") - -# setup compilation of this particular executable -add_executable (co2_3d ${co2_3d_SOURCES}) -target_link_libraries (co2_3d ${co2_3d_LIBRARIES}) - -# queue this executable to be stripped -strip_debug_symbols (co2_3d) - -# example input file (realize directory names) -configure_file ( - ${PROJECT_SOURCE_DIR}/data/tube.param.in - ${PROJECT_BINARY_DIR}/bin/tube.param - ) diff --git a/examples/3d/README b/examples/3d/README deleted file mode 100644 index fe3bd2c..0000000 --- a/examples/3d/README +++ /dev/null @@ -1 +0,0 @@ -Example of how to do CO2 sequestration modelling using opm-core. diff --git a/examples/3d/data/tube.data b/examples/3d/data/tube.data deleted file mode 100644 index a541ee4..0000000 --- a/examples/3d/data/tube.data +++ /dev/null @@ -1,108 +0,0 @@ -RUNSPEC - -TITLE -Example of how to do CO2 sequestration modelling using opm-core. - -DIMENS - 3 1 2 -/ - --- OPM currently has a bias against injecting anything else than first phase --- supercrit. co2 as the first phase (WATER), brine as second phase (OIL) -WATER -OIL - --- only use SI units -METRIC - -START - 01 OCT 2013 -/ - --- two wells, one injector and one producer -WELLDIMS - 2 1 1 2 -/ - -GRID - -INCLUDE - tube.grdecl -/ - -PROPS - --- brine is 990 kg/m3, 0.35cP, co2 is 650 kg/m3, 0.06cP, at 100 bars (40C) -DENSITY --- brine co2 - 990 650 -/ - -PVCDO --- pres vol.f comp visc - 100 1 0 0.35 -/ - -PVTW - 100 1 0 0.06 -/ - --- From S. Benson, Energy Resources Eng. Dept., Stanford Uni. -SWOF --- S_co2 kr_co2 kr_br Pcow - 0.05 0.00 1.00 0.0000 - 0.10 0.01 0.50 0.0375 - 0.20 0.03 0.30 0.0450 - 0.30 0.10 0.20 0.0475 - 0.40 0.15 0.10 0.0550 - 0.50 0.25 0.05 0.0575 - 0.60 0.60 0.03 0.0700 - 0.70 0.90 0.01 0.1000 - 0.80 1.00 0.00 0.5000 -/ - -SOLUTION - --- every block in the grid starts out water-filled, at 100 bars -SWAT - 6*0.0 -/ - -SOIL - 6*1.0 -/ - -PRESSURE - 100.486 100.488 100.490 - 101.459 101.461 100.464 -/ - -SCHEDULE - --- injector is at (1,1,1..1), producer is at (3,1,2..2), at 1000m depth --- both wells have a radius of 0.2m -WELSPECS - inj grp 1 1 1000 WATER / - prod grp 3 1 1000 OIL / -/ - -COMPDAT - inj 1 1 1 1 OPEN 1 0 0.2 / - prod 3 1 2 2 OPEN 1 0 0.2 / -/ - --- inject CO2 with a constant rate of 5000 cubic meters per day -WCONINJE - inj WATER OPEN RESV -1 5000 / -/ - --- brine with density 990 kg/m^3 in a 1000m column gives hydrostatic --- pressure of approx. 97 bar; BHP should be at least this to produce -WCONPROD - prod OPEN BHP -1 -1 -1 -1 -1 97 / -/ - --- report daily -TSTEP - 1 1 1 1 -/ diff --git a/examples/3d/data/tube.grdecl b/examples/3d/data/tube.grdecl deleted file mode 100644 index d6e5ed9..0000000 --- a/examples/3d/data/tube.grdecl +++ /dev/null @@ -1,53 +0,0 @@ -SPECGRID --- X Y Z - 3 1 2 1 F -/ - -COORD --- SX SY SZ EX EY EZ - 0 0 1000.00 0 0 1020.02 - 50 0 1000.01 50 0 1020.05 - 100 0 1000.02 100 0 1020.08 - 150 0 1000.03 150 0 1020.11 - 0 50 1000.00 0 50 1020.02 - 50 50 1000.01 50 50 1020.05 - 100 50 1000.02 100 50 1020.08 - 150 50 1000.03 150 50 1020.11 -/ - -ZCORN --- X=0 50 50 100 100 150 - 1000.00 1000.01 1000.01 1000.02 1000.02 1000.03 - 1000.00 1000.01 1000.01 1000.02 1000.02 1000.03 - 1010.01 1010.03 1010.03 1010.05 1010.05 1010.07 - 1010.01 1010.03 1010.03 1010.05 1010.05 1010.07 - 1010.01 1010.03 1010.03 1010.05 1010.05 1010.07 - 1010.01 1010.03 1010.03 1010.05 1010.05 1010.07 - 1020.02 1020.05 1020.05 1020.08 1020.08 1020.11 - 1020.02 1020.05 1020.05 1020.08 1020.08 1020.11 -/ - -ACTNUM --- (0,0) (1,0) (2,0) (1,0) (1,1) (2,1) - 1 1 1 1 1 1 -/ - -PORO --- (0,0) (1,0) (2,0) (1,0) (1,1) (2,1) - 0.32 0.33 0.34 0.35 0.36 0.37 -/ - -PERMX --- (0,0) (1,0) (2,0) (1,0) (1,1) (2,1) - 201 200 109 202 108 200 -/ - -PERMY --- (0,0) (1,0) (2,0) (1,0) (1,1) (2,1) - 200 109 201 108 200 202 -/ - -PERMZ --- (0,0) (1,0) (2,0) (1,0) (1,1) (2,1) - 100 100 100 100 100 100 -/ diff --git a/examples/3d/data/tube.param.in b/examples/3d/data/tube.param.in deleted file mode 100644 index d8ec693..0000000 --- a/examples/3d/data/tube.param.in +++ /dev/null @@ -1,4 +0,0 @@ -deck_filename=@PROJECT_SOURCE_DIR@/data/tube.data -use_reorder=false -output_ecl=true -output_dir=@PROJECT_BINARY_DIR@/bin/output diff --git a/examples/3d/data/viewtube.m b/examples/3d/data/viewtube.m deleted file mode 100644 index 346f177..0000000 --- a/examples/3d/data/viewtube.m +++ /dev/null @@ -1,30 +0,0 @@ -% inspired by modules/impes/examples/SPE1/deckinputSPE1Example.m -mrstModule add deckformat - -% get the data file relative to this script -current_dir = fileparts(mfilename('fullpath')); -fn = fullfile(current_dir, 'tube.data'); - -% read grid from the input file -deck = readEclipseDeck(fn); -deck = convertDeckUnits(deck); -fluid = initEclipseFluid(deck); -rock = initEclipseRock(deck); -grid = initEclipseGrid(deck); -grid = computeGeometry(grid); - -% read wells from the input file -rock = compressRock(rock, grid.cells.indexMap); -wells = processWells(grid, rock, deck.SCHEDULE.control, 'InnerProduct', 'ip_tpf'); - -% get initial state from the input file -state = initEclipseState(grid, deck, fluid); -pres = state.pressure(1); -state.wellSol = initWellSol(wells, pres); - -% plot grid and wells -clf; -plotGrid(grid, 'FaceAlpha', .3, 'EdgeAlpha', .1); -plotWell(grid, wells); -view(0, 0); -axis equal tight; diff --git a/examples/3d/src/co2_3d.cpp b/examples/3d/src/co2_3d.cpp deleted file mode 100644 index d0d051c..0000000 --- a/examples/3d/src/co2_3d.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: t; truncate-lines: t -*- */ -/* vim: set filetype=cpp autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace Opm; -using namespace Opm::parameter; -using namespace std; - -int main (int argc, char *argv[]) try { - // read parameters from command-line - ParameterGroup param (argc, argv, false); - - // parse keywords from the input file specified - // TODO: requirement that file exists - const string filename = param.get ("deck_filename"); - cout << "Reading deck: " << filename << endl; - const EclipseGridParser parser (filename); - - // extract grid from the parse tree - const GridManager gridMan (parser); - const UnstructuredGrid& grid = *gridMan.c_grid (); - - // extract fluid, rock and two-phase properties from the parse tree - IncompPropertiesFromDeck fluid (parser, grid); - - // initial state of the reservoir - const double gravity [] = { 0., 0., Opm::unit::gravity }; - TwophaseState state; - initStateFromDeck (grid, fluid, parser, gravity [2], state); - - // setup wells from input, using grid and rock properties read earlier - WellsManager wells (parser, grid, fluid.permeability()); - WellState wellState; wellState.init (wells.c_wells(), state); - - // no sources and no-flow boundary conditions - vector src (grid.number_of_cells, 0.); - FlowBCManager bc; - - // run schedule - SimulatorTimer stepping; - stepping.init (parser); - - // pressure and transport solvers - LinearSolverFactory linsolver (param); - SimulatorIncompTwophase sim ( - param, grid, fluid, 0, wells, src, bc.c_bcs(), linsolver, gravity); - - // write the state at all reporting times - SimulatorOutput outp ( - param, parser, grid, stepping, state, wellState, sim); (void) outp; - - // if some parameters were unused, it may be that they're spelled wrong - if (param.anyUnused ()) { - cerr << "Unused parameters:" << endl; - param.displayUsage (); - } - - // loop solvers until final time has arrived - sim.run (stepping, state, wellState); - - // done - return 0; -} -catch (const std::exception &e) { - std::cerr << "Program threw an exception: " << e.what() << "\n"; - throw; -}