From c156eea3003ad4930f50f6969ee50984cc61ee0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Fri, 25 Nov 2016 14:45:52 +0100 Subject: [PATCH] Module for python cmake files; test template Adds the pycmake makefile dependency and provides a submodule for build convenience. Adds the SPE3CASE1 test case for some simple test writing and a test template file. Sets up python library structure. --- .gitmodules | 4 + CMakeLists.txt | 6 +- README.md | 10 +- cmake/CMakeLists.txt | 1 - cmake/FindPythonModule.cmake | 168 ------------ pycmake | 1 + python/CMakeLists.txt | 5 +- python/sunbeam/CMakeLists.txt | 5 + python/sunbeam/__init__.py | 2 + python/sunbeam/sunbeam.py | 0 tests/CMakeLists.txt | 5 + tests/parse.py | 10 + tests/spe3/SPE3CASE1.DATA | 498 ++++++++++++++++++++++++++++++++++ 13 files changed, 542 insertions(+), 173 deletions(-) create mode 100644 .gitmodules delete mode 100644 cmake/CMakeLists.txt delete mode 100644 cmake/FindPythonModule.cmake create mode 160000 pycmake create mode 100644 python/sunbeam/CMakeLists.txt create mode 100644 python/sunbeam/__init__.py create mode 100644 python/sunbeam/sunbeam.py create mode 100644 tests/CMakeLists.txt create mode 100644 tests/parse.py create mode 100644 tests/spe3/SPE3CASE1.DATA diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..2941af824 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "pycmake"] + path = pycmake + url = https://github.com/statoil/pycmake + branch = 21f1eb9 diff --git a/CMakeLists.txt b/CMakeLists.txt index 43c2c0a0c..1c81b212d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ find_package( PythonLibs 2.7 REQUIRED ) find_package( PythonInterp 2.7 REQUIRED ) find_package( Boost COMPONENTS python REQUIRED ) -add_subdirectory( cmake ) -add_subdirectory( python ) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/pycmake/cmake/Modules) + add_subdirectory( src ) +add_subdirectory( python ) +add_subdirectory( tests ) diff --git a/README.md b/README.md index 464a6e9c8..e7768fe83 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # sunbeam ![build status](https://travis-ci.org/Statoil/sunbeam.svg?branch=master "TravisCI Build Status") -TBA +# Quick start (WIP) +``` +git clone --recursive git@github.com:statoil/sunbeam` +cd sunbeam +mkdir build +cd build +cmake .. +make +``` diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt deleted file mode 100644 index 2c1bb80e8..000000000 --- a/cmake/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -include( FindPythonModule.cmake ) diff --git a/cmake/FindPythonModule.cmake b/cmake/FindPythonModule.cmake deleted file mode 100644 index e3c830c38..000000000 --- a/cmake/FindPythonModule.cmake +++ /dev/null @@ -1,168 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 at -# for more details - - - -# The basic assumption of this package is PEP 396 -- Module Version Numbers as -# layed out in https://www.python.org/dev/peps/pep-0396/ - -# Unfortunately, not all Python modules expose a version number, like inspect. -# Other Python modules expose several version numbers, e.g. one for the -# underlying software and one for the python packaging, like SQLite and PyQt. - -cmake_minimum_required (VERSION 2.8.1) - - - -# try import python module, if success, check its version, store as PY_module. -# the module is imported as-is, hence the case (e.g. PyQt4) must be correct. -# -# if given a second argument, the accessor, we call accessor on the module -# instead of the default __version__. -# -# (Yes, accessor could potentially be a function like "os.delete_everything()".) -macro(python_module_version module) - set(PY_VERSION_ACCESSOR "__version__") - set(PY_module_name ${module}) - - if(${PY_module_name} STREQUAL "PyQt4") - set(PY_module_name "PyQt4.Qt") - endif() - if(${PY_module_name} STREQUAL "PyQt4.Qt") - set(PY_VERSION_ACCESSOR "PYQT_VERSION_STR") - endif() - - if(${PY_module_name} STREQUAL "serial") - set(PY_VERSION_ACCESSOR "VERSION") - endif() - - if(${PY_module_name} STREQUAL "sqlite") - set(PY_VERSION_ACCESSOR "version") - endif() - - - # ARGUMENTS: module accessor - set (extra_macro_args ${ARGN}) - list(LENGTH extra_macro_args num_extra_args) - if (${num_extra_args} GREATER 0) - list(GET extra_macro_args 0 accessor) - set(PY_VERSION_ACCESSOR ${accessor}) - endif() - - execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" - "# set module's version to py_mv and print it -import ${PY_module_name} as py_m -py_mv = '0.0.0' # output if no accessor is found -if hasattr(py_m, '${PY_VERSION_ACCESSOR}'): - py_mv = py_m.${PY_VERSION_ACCESSOR} -print(py_mv) -" - RESULT_VARIABLE _${module}_fail # error code 0 if module is importable - OUTPUT_VARIABLE _${module}_version # module.accessor or "0.0.0" if no such - ERROR_VARIABLE stderr_output - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT _${module}_fail) - set(PY_${module} ${_${module}_version}) - endif() - - # clean up - unset(PY_VERSION_ACCESSOR) - unset(PY_module_name) - unset(extra_macro_args) -endmacro() - - - -# If we find the correct module and new enough version, set PY_package, where -# "package" is the given argument to the version we found else, display warning -# and do not set any variables. -macro(python_module package) - - # ARGUMENTS: package package_req module_version version_req accessor - set (extra_macro_args ${ARGN}) - # Did we get any optional args? - list(LENGTH extra_macro_args num_extra_args) - if (${num_extra_args} GREATER 0) - list(GET extra_macro_args 0 package_req) - else() - set(package_req "REQUIRED") # requirement not set, is required - endif () - if (${num_extra_args} GREATER 1) - list(GET extra_macro_args 1 module_version) - else() - set(module_version "0.0.0") # module_version not set, 0.0.0 is ok - endif () - if (${num_extra_args} GREATER 2) - list(GET extra_macro_args 2 version_req) - else() - set(version_req "MINIMUM") # version requirement not set, is minimum - endif () - if (${num_extra_args} GREATER 3) - list(GET extra_macro_args 3 accessor) - endif () - - # Setting warning/error output level - set(PY_MSG_ERR SEND_ERROR) - set(PY_MSG_WARN WARNING) - if(${package_req} STREQUAL "QUIET") - set(PY_MSG_ERR STATUS) - set(PY_MSG_WARN STATUS) - endif() - - # We are done expanding the optional arguments - - python_module_version(${package} ${accessor}) - - # package not found in system - if(NOT DEFINED PY_${package}) - if(${package_req} STREQUAL "OPTIONAL") - message(${PY_MSG_WARN} "Could not find Python module " ${package}) - else() - message(${PY_MSG_ERR} "Could not find Python module " ${package}) - endif() - - else() - # package found in system - - if (${version_req} STREQUAL "EXACT" AND NOT ${PY_${package}} VERSION_EQUAL ${module_version}) - message(${PY_MSG_ERR} "Python module ${package} not exact. " - "Wanted EXACT ${module_version}, found ${PY_${package}}") - elseif (${version_req} STREQUAL "OPTIONAL" AND ${PY_${package}} VERSION_LESS ${module_version}) - message(${PY_MSG_WARN} "Python module ${package} too old. " - "Wanted ${module_version}, found ${PY_${package}}") - elseif (${version_req} STREQUAL "MINIMUM" AND ${PY_${package}} VERSION_LESS ${module_version}) - message(${PY_MSG_ERR} "Python module ${package} too old. " - "Wanted MINIMUM ${module_version}, found ${PY_${package}}") - else() - if(NOT DEFINED accessor) - message(STATUS "Found ${package}. " - "${PY_${package}} >= ${module_version}") - else() - message(STATUS "Found ${package}. " - "${PY_${package}} >= ${module_version} (" ${accessor} ")") - endif() - endif() - endif() - - # clean up - unset(package_req) - unset(module_version) - unset(version_req) - unset(accessor) - unset(extra_macro_args) - set(PY_MSG_ERR) - set(PY_MSG_WARN) -endmacro() diff --git a/pycmake b/pycmake new file mode 160000 index 000000000..21f1eb9a9 --- /dev/null +++ b/pycmake @@ -0,0 +1 @@ +Subproject commit 21f1eb9a928e70840d94f4f75e5ff285df393edb diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 983fa3e75..90c5d5afc 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,4 +1,5 @@ -# Loading pycmake macros +include( FindPythonModule ) +include( PythonPackage ) #python_module( ctypes ) python_module( six ) @@ -10,3 +11,5 @@ if (DEFINED PY_inspect) else() message(STATUS "We do not have inspect, ignoring ...") endif() + +add_subdirectory( sunbeam ) diff --git a/python/sunbeam/CMakeLists.txt b/python/sunbeam/CMakeLists.txt new file mode 100644 index 000000000..c4a4cd885 --- /dev/null +++ b/python/sunbeam/CMakeLists.txt @@ -0,0 +1,5 @@ +set(PYTHON_SOURCES + __init__.py + sunbeam.py) + +add_python_package(sunbeam sunbeam "${PYTHON_SOURCES}") diff --git a/python/sunbeam/__init__.py b/python/sunbeam/__init__.py new file mode 100644 index 000000000..b79a82637 --- /dev/null +++ b/python/sunbeam/__init__.py @@ -0,0 +1,2 @@ +__version__ = '0.0.1' +__license__ = 'GNU General Public License version 3' diff --git a/python/sunbeam/sunbeam.py b/python/sunbeam/sunbeam.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 000000000..ff5e7743f --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,5 @@ +configure_file(spe3/SPE3CASE1.DATA spe3/SPE3CASE1.DATA COPYONLY) + +foreach(prog parse) + add_python_test(${prog} ${prog}.py) +endforeach() diff --git a/tests/parse.py b/tests/parse.py new file mode 100644 index 000000000..59a8f818a --- /dev/null +++ b/tests/parse.py @@ -0,0 +1,10 @@ +import unittest +import sunbeam + +class TestParse(unittest.TestCase): + + def setUp(self): + self.spe3 = 'spe3/SPE3CASE1.DATA' + + def parse(self): + sunbeam.parse(self.spe3) diff --git a/tests/spe3/SPE3CASE1.DATA b/tests/spe3/SPE3CASE1.DATA new file mode 100644 index 000000000..f1b26f659 --- /dev/null +++ b/tests/spe3/SPE3CASE1.DATA @@ -0,0 +1,498 @@ +-- This reservoir simulation deck is made available under the Open Database +-- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in +-- individual contents of the database are licensed under the Database Contents +-- License: http://opendatacommons.org/licenses/dbcl/1.0/ + +-- Copyright (C) 2015 Statoil + +-- This simulation is based on the data given in +-- 'Third SPE Comparative Solution Project: Gas +-- Cycling of Retrograde Condensate Reservoirs' +-- by D.E. Kenyon and G.A. Behie, +-- Journal of Petroleum Technology, August 1987 + +---------------------------------------------------------------- +------------------ SPE 3, CASE 1 ------------------------------- +---------------------------------------------------------------- + +RUNSPEC +-- ------------------------------------------------------------- + +TITLE + SPE 3 - CASE 1 +DIMENS + 9 9 4 / +OIL +GAS +WATER +VAPOIL +DISGAS + +FIELD + +START + 1 'JAN' 2015 / + +WELLDIMS +-- Item 1: maximum number of wells in the model +-- - there are two wells in the problem; injector and producer +-- Item 2: maximum number of grid blocks connected to any one well +-- - must be two as both wells are located at two grid blocks +-- Item 3: maximum number of groups in the model +-- - we are dealing with only one 'group' +-- Item 4: maximum number of wells in any one group +-- - there must be two wells in a group as there are two wells in total + 2 2 1 2 / + +TABDIMS +-- The max number of saturation and pressure nodes in the PROPS-tables +-- exceeds the default -> item 3 and 4 in TABDIMS must be changed + 1* 1* 30 30 / + +EQLDIMS +/ + + +UNIFOUT + +GRID + +-- The INIT keyword is used to request an .INIT file. The .INIT file +-- is written before the simulation actually starts, and contains grid +-- properties and saturation tables as inferred from the input +-- deck. There are no other keywords which can be used to configure +-- exactly what is written to the .INIT file. +INIT + +-- --------------------------------------------------------------- +-- The values in this section are retrieved from table 2 +-- and figure 1 in Kenyon & Behie +NOECHO +DX +-- There are in total 324 cells with length 293.3ft in x-direction + 324*293.3 / +DY +-- There are in total 324 cells with length 293.3ft in y-direction + 324*293.3 / +DZ +-- The layers are 30, 30, 50 and 50 ft thick +-- In each layer there are 81 cells + 81*30 81*30 81*50 81*50 / + +TOPS +-- The depth of the top of each grid block +-- 81*7315 81*7345 81*7375 81*7425 / + 81*7315 / + +PORO +-- Constant porosity of 0.3 throughout all 324 grid cells + 324*0.13 / + +PERMX +-- The layers have horizontal (meaning x- and y-direction) permeability +-- of 130mD, 40mD, 20mD and 150, respectively, from top to bottom layer. + 81*130 81*40 81*20 81*150 / + +PERMY + 81*130 81*40 81*20 81*150 / + +PERMZ +-- z-direction permeability is 13mD, 4mD, 2mD and 15mD,respectively, from top +-- to bottom layer + 81*13 81*4 81*2 81*15 / +ECHO + +PROPS +-- ------------------------------------------------------------- + +ROCK +-- Item 1: reference pressure (psia) +-- Item 2: rock compressibility (psi^{-1}) + +-- Using values from table 2 in Kenyon & Behie: + 3550 4e-6 / + + +SGOF +-- Values taken from Kenyon & Behie's table 2 +-- Sg Krg Kro(g) Pc +-- (first val 0) (first val 0) (only oil, gas & con. water) (for oil-gas) + 0.00 0.00 0.800 0 + 0.04 0.005 0.650 0 + 0.08 0.013 0.513 0 + 0.12 0.026 0.400 0 + 0.16 0.040 0.315 0 + 0.20 0.058 0.250 0 + 0.24 0.078 0.196 0 + 0.28 0.100 0.150 0 + 0.32 0.126 0.112 0 + 0.36 0.156 0.082 0 + 0.40 0.187 0.060 0 + 0.44 0.222 0.040 0 + 0.48 0.260 0.024 0 + 0.52 0.300 0.012 0 + 0.56 0.348 0.005 0 + 0.60 0.400 0 0 + 0.64 0.450 0 0 + 0.68 0.505 0 0 + 0.72 0.562 0 0 + 0.76 0.620 0 0 + 0.80 0.680 0 0 + 0.84 0.740 0 0 / +-- Since Kenyon & Behie say that 'Relative permeability data were +-- based on the simplistic assumption that the rel. perm. of +-- any phase depends only on its saturation', the Kro values +-- depend only on So, which is 1-Sg-Swc when only +-- oil, gas and connate water are present. Swc=0.16 (= Swi here) +SWOF +-- Values taken from Kenyon & Behie's table 2 +-- Sw Krw 0 Kro(w) Pc +-- (first val is (first val 0) (only oil & water) (for water-oil) +-- connate water sat) (first val must be Krog at Sg=0) + 0.16 0.00 0.800 50 + 0.20 0.002 0.650 32 + 0.24 0.010 0.513 21 + 0.28 0.020 0.400 15.5 + 0.32 0.033 0.315 12.0 + 0.36 0.049 0.250 9.2 + 0.40 0.066 0.196 7.0 + 0.44 0.090 0.150 5.3 + 0.48 0.119 0.112 4.2 + 0.52 0.150 0.082 3.4 + 0.56 0.186 0.060 2.7 + 0.60 0.227 0.040 2.1 + 0.64 0.277 0.024 1.7 + 0.68 0.330 0.012 1.3 + 0.72 0.390 0.005 1.0 + 0.76 0.462 0 0.7 + 0.80 0.540 0 0.5 + 0.84 0.620 0 0.4 + 0.88 0.710 0 0.3 + 0.92 0.800 0 0.2 + 0.96 0.900 0 0.1 + 1.00 1.000 0 0.0 / +-- The Kro values depend only on So, which is 1-Sw when +-- only oil and water are present +-- Since we know Pcgw and since Pcog=0, we can conclude that Pcwo +-- should be equal to Pcgw + +-------------------- START OF PVTsim GENERATED VALUES ------------------------- +-- Generated with PVTsim version 21.0.0 at 03.07.2015 10:04:27 +--#FIELD +-- Salinity (mg/l) +-- 0.0 +-- +DENSITY +-- OilDens WaterDens GasDens +-- lb/ft3 lb/ft3 lb/ft3 + 43.33 62.37 0.05850 / +-- +PVTW +-- RefPres Bw Cw Vw dVw +-- psia rb/stb 1/psia cP 1/psia + 3427.6 1.02629 0.30698E-05 0.31107 0.59410E-05 / +-- +-- Separator Conditions (from table 3 in Kenyon & Behie's paper) +-- Tsep(F) Psep(psia) +-- ---------- ---------- +-- 80.00 815.00 +-- 80.00 315.00 +-- 80.00 65.00 +-- 59.00 14.70 +-- +-- Reservoir temperature (F) +-- 200.00 +-- +-- Experiment type: Constant Mass Expansion +-- +------------------------------------------------------------ +--SOLUTION PRESSURE OIL FVF OIL +-- GOR Rs Po Bo VISCOSITY +--MSCF/STB psia RB/STB cP +------------------------------------------------------------ +PVTO + 0.189473 500.0 1.20936 0.219 + 1000.0 1.19352 0.240 + 1500.0 1.17997 0.260 + 2000.0 1.16819 0.279 + 2500.0 1.15780 0.299 + 3000.0 1.14853 0.318 + 3427.6 1.14135 0.334 + 3500.0 1.14019 0.337 + 4000.0 1.13263 0.356 + 4500.0 1.12574 0.374 + 5000.0 1.11941 0.393 / + 0.479365 1000.0 1.40215 0.149 + 1500.0 1.37754 0.164 + 2000.0 1.35701 0.179 + 2500.0 1.33949 0.194 + 3000.0 1.32426 0.208 + 3427.6 1.31270 0.220 + 3500.0 1.31085 0.222 + 4000.0 1.29891 0.237 + 4500.0 1.28817 0.251 + 5000.0 1.27845 0.265 / + 0.826985 1500.0 1.62448 0.113 + 2000.0 1.58913 0.124 + 2500.0 1.56020 0.135 + 3000.0 1.53584 0.146 + 3427.6 1.51777 0.156 + 3500.0 1.51492 0.157 + 4000.0 1.49666 0.168 + 4500.0 1.48052 0.179 + 5000.0 1.46610 0.190 / + 1.250165 2000.0 1.89110 0.089 + 2500.0 1.84197 0.098 + 3000.0 1.80234 0.107 + 3427.6 1.77380 0.114 + 3500.0 1.76937 0.115 + 4000.0 1.74128 0.124 + 4500.0 1.71695 0.132 + 5000.0 1.69557 0.141 / + 1.794854 2500.0 2.23421 0.073 + 3000.0 2.16656 0.080 + 3427.6 2.11974 0.086 + 3500.0 2.11259 0.087 + 4000.0 2.06805 0.093 + 4500.0 2.03039 0.100 + 5000.0 1.99794 0.106 / + 2.549781 3000.0 2.71411 0.071 + 3427.6 2.63221 0.076 + 3500.0 2.61998 0.077 + 4000.0 2.54537 0.083 + 4500.0 2.48418 0.089 + 5000.0 2.43271 0.094 / + 2.951016 3427.6 2.96669 0.068 + 3500.0 2.94777 0.069 + 4000.0 2.83495 0.075 + 4500.0 2.74550 0.080 + 5000.0 2.67220 0.085 / + 3.033715 3500.0 3.01897 0.068 + 4000.0 2.90343 0.073 + 4500.0 2.81181 0.079 + 5000.0 2.73675 0.084 / + 3.605023 4000.0 3.38017 0.065 + 4500.0 3.27351 0.070 + 5000.0 3.18612 0.075 / +/ +------------------------------------------------------------ +--PRESSURE VAPORIZED GAS FVF GAS +-- Pg OGR Rv Bg VISCOSITY +-- psia STB/MSCF RB/MSCF cP +------------------------------------------------------------ +PVTG + 500.0 0.0382886993 6.419987 0.012999 / + 1000.0 0.0314227763 3.007969 0.014122 / + 1500.0 0.0357629796 1.922602 0.015848 / + 2000.0 0.0473304978 1.408289 0.018550 / + 2500.0 0.0679314005 1.123337 0.022691 / + 3000.0 0.1043958616 0.959755 0.029087 / + 3427.6 0.1670518252 0.893267 0.038650 / + 3500.0 0.1670518252 0.884653 0.039158 / + 4000.0 0.1670518252 0.834785 0.042494 + 0.1043958616 0.809080 0.035345 + 0.0679314005 0.798204 0.031649 + 0.0473304978 0.792752 0.029766 + 0.0357629796 0.789094 0.028868 + 0.0314227763 0.786258 0.028754 + 0.0000000000 0.773146 0.026778 / +/ + +--Warning: Constant reservoir fluid composition assumed above 3428. psia +--Tabulated properties corrected to be monotonic with pressure + +-------------------- END OF PVTsim GENERATED VALUES ------------------------- + + +SOLUTION + +EQUIL +-- Item 1: datum depth (ft) +-- - Datum depth is at 7500ft (table 2, Kenyon & Behie) +-- Item 2: pressure at datum depth (psia) +-- - This is 3550psia (table 2, Kenyon & Behie) +-- Item 3: depth of water-oil contact +-- - See comment under item 5 +-- Item 4: oil-water capillary pressure at the water-oil contact +-- - Cap. pres. at gas-water contact is 0 (table 2, Kenyon & Behie) +-- - Cap. pres. for gas-oil is assumed 0 (table 2, Kenyon & Behie) +-- - This means oil-water cap. pres. is 0 at contact +-- Item 5: depth of gas-oil contact (ft) +-- - Since all oil is initially contained in the gas phase, +-- we can set item 5 equal to item 3, which must be +-- set to the gas-water contact (since we have assumed no oil) +-- The gas-water contact is at 7500ft (table 2, Kenyon & Behie) +-- Item 6: gas-oil capillary pressure at gas-oil contact (psi) +-- - Kenyon & Behie say this is assumed to be zero +-- Item 7: RSVD-table +-- Item 8: RVVD-table +-- Item 9: must set to 0 as only this is supported in OPM + +-- Item #: 1 2 3 4 5 6 7 8 9 + 7500 3550 7500 0 7500 0 0 0 0 / +-- +SUMMARY + +WOPR + 'PROD' +/ + +FOPR + +WOPT + 'PROD' +/ + +FOPT + +BOSAT +-- Oil Saturation in lower cell block of production well + 7 7 4 / +/ + +BRS + 7 7 4 / + 1 1 1 / + 9 9 1 / + 9 1 4 / + 1 9 1 / + 4 4 4 / +/ + +-- In order to compare Eclipse with Flow: +WBHP + 'INJ' + 'PROD' +/ +WGIR + 'INJ' + 'PROD' +/ +-- $$$ WGIT +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / +WGPR + 'INJ' + 'PROD' +/ +-- $$$ WGPT +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / +WOIR + 'INJ' + 'PROD' +/ +-- $$$ WOIT +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / +-- $$$ WOPR +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / +-- $$$ WOPT +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / +WWIR + 'INJ' + 'PROD' +/ +-- $$$ WWIT +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / +WWPR + 'INJ' + 'PROD' +/ +-- $$$ WWPT +-- $$$ 'INJ' +-- $$$ 'PROD' +-- $$$ / + +SCHEDULE + +RPTRST + 'BASIC=4' / + +--DRSDT +-- 0 / +-- GOR cannot rise and free gas does not dissolve in undersaturated +-- oil when setting DRSDT to 0, +-- Notice that all GOR curves are decreasing +-- -> adding DRSDT=0 should not make difference +-- No difference in BOSAT, FOPR and FOPT graphs when including DRSDT=0 + +WELSPECS +-- Item #: 1 2 3 4 5 6 + 'PROD' 'G1' 7 7 7375 'GAS' / + 'INJ' 'G1' 1 1 7315 'GAS' / +/ +-- The coordinates in item 3-4 are retrieved from figure 1 in Kenyon & Behie +-- Ref. manual says the top-most perforation of the well is the +-- recommended value for datum depth for BHP (item 5), which are the values +-- that are entered above +-- Both oil and gas are produced, and 'GAS' has been chosen as preferred +-- phase (item 6) for PROD. All graphs will be identical if choosing OIL + +COMPDAT +-- Item #: 1 2 3 4 5 6 7 8 9 + 'PROD' 7 7 3 4 'OPEN' 1* 1* 2 / + 'INJ' 1 1 1 2 'OPEN' 1* 1* 2 / +/ +-- The coordinates in item 2-5 are retrieved from figure 1 in Kenyon & Behie +-- Item 9 is the well bore internal diameter, +-- the radius is given to be 1ft in Kenyon & Behie's paper + + +WCONPROD +-- Item #: 1 2 3 6 9 + 'PROD' 'OPEN' 'GRAT' 2* 6200 2* 500 / +/ +-- It is stated in Kenyon & Behie's table 3 that the production is +-- controlled by a separator gas rate of 6200Mscf per day (item 6) +-- Kenyon & Behie also say that min BHP is 500psi (item 9) + +WCONINJE +-- Item #: 1 2 3 4 5 6 7 + 'INJ' 'GAS' 'OPEN' 'RATE' 4700 1* 4000 / +/ +-- In Case 1, Kenyon & Behie require a constant recycle-gas rate of +-- 4700Mscf per day (item 5) for ten years +-- Kenyon & Behie say max BHP is 4000psi (item 7) + +TSTEP +-- first year: +7*52.14285714 +-- next nine years: +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 / + +-- The cycling period ends after ten years, +-- so we need to set item 5 in WCONINJE to 0: +WCONINJE +-- Item #: 1 2 3 4 5 6 7 + 'INJ' 'GAS' 'OPEN' 'RATE' 0 1* 4000 / +/ + +TSTEP +-- Advance the simulator once a month for next 5 years +-- because Kenyon & Behie say models are to run for a total of 15 years +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 +31 28 31 30 31 30 31 31 30 31 30 31 / + + +END \ No newline at end of file