Resolve Complete

download Resolve Complete

of 49

Transcript of Resolve Complete

  • 8/12/2019 Resolve Complete

    1/49

    RESOLVE

    October, 2003

    USER GUIDE

  • 8/12/2019 Resolve Complete

    2/49

    The information in this document is subject to change as major improvements and/oramendments to the program are generated. When necessary, Petroleum Experts will issuethe proper documentation.

    The software described in this manual is furnished under a licence agreement. The softwaremay be used or copied only in accordance with the terms of the agreement. It is against the

    law to copy the software on any medium except as specifically allowed in the licenseagreement. No part of this documentation may be reproduced or transmitted in any form or byany means, electronic or mechanical, including photocopying, recording, or information storageand retrieval systems for any purpose other than the purchaser's personal use, unless expresswritten consent has been given by Petroleum Experts Limited.

    All names of companies, wells, persons or products contained in this documentation are part ofa fictitious scenario or scenarios and are used solely to document the use of a PetroleumExperts product.

    Address: Registered Office:Petroleum Experts Limited Petroleum Experts LimitedSpectrum House Spectrum House2 Powderhall Road 2 Powderhall RoadEdinburgh, Scotland Edinburgh, ScotlandEH7 4GB EH7 4GBTel: (44 131) 474 7030Fax: (44 131) 474 7031Email: [email protected]: www.petroleumexperts.com

  • 8/12/2019 Resolve Complete

    3/49

    1- 3 TABLE OF CONTENTS

    1 Introduction ...................................................... ................................................................... ........................... 1

    1.1 Contacting Petroleum Experts ........................................................................ ....................................... 1

    1.2 System requirements...................... ................................................................. ...................................... 2

    1.3 Overview of RESOLVE........................................................ .................................................................. 2

    2 Methodology ............................................................... ............................................................... ................1

    2.1 How RESOLVE Works .............................................................. ............................................................ 12.1.1 Step 1: Load and query application case.................................................................. ....................12.1.2 Step 2: Connect individual sources and sinks from client applications ......................................... 12.1.3 Step 3: Create a schedule ............................................................ ................................................ 12.1.4 Step 4: Run the simulation................................................................ ............................................ 2

    2.2 Application Architecture................................................................... ...................................................... 3

    2.3 Driver Registration.......................................................... ................................................................... ....4

    2.4 Connection Rules .......................................................... .................................................................... ....5

    2.5 Composition Tables............................................................ .............................................................. .....7

    3 Step by Step Guide............................................................. ................................................................... ....1

    3.1 Getting started - step by step example ........................................................... ....................................... 1

    3.1.1 Step 1 - Initialise new case ............................................................. .............................................. 23.1.2 Step 2 - Load the Reveal case..................................... ................................................................. 33.1.3 Step 3 - Load the GAP case ....................................................... .................................................. 33.1.4 Step 4 - Make the connections between the cases.................................................. .....................43.1.5 Step 5 - Configure the cases .............................................................. .......................................... 63.1.6 Step 6 - Enter the schedule ........................................................ .................................................. 63.1.7 Step 7 - Run the simulation....................................... .............................................................. ......73.1.8 Step 8 - Extracting and viewing the results ..................................................................... ..............7

    4 Menu Commands.......................................... ................................................................. ............................ 1

    4.1 Overview................................................................................................................................................14.1.1 Menu: File ........................................................... ...................................................................... ....14.1.2 Menu: Options ........................................................... ................................................................... 24.1.3 Menu: System......................................................... .................................................................. ....34.1.4 Connection Wizard................................................................ ........................................................ 44.1.5 System Properties................................................... ................................................................. .....54.1.6 Menu: Module ................................................................ ............................................................... 74.1.7 Menu: Schedule............................................................ ................................................................ 74.1.8 Timestep control .............................................................. ............................................................. 84.1.9 Scripting control ....................................................... .................................................................. ...94.1.10 Menu: Run ........................................................... ....................................................................... 114.1.11 Menu: Results ............................................................. ................................................................ 12

    4.1.12 Menu: View ....................................................... ........................................................... ...............12

    PETROLEUM EXPERTS LTD

  • 8/12/2019 Resolve Complete

    4/49

    TABLE OF CONTENTS 2 - 3

    Appendix A Sample Files........................... ................................................................... 1

    A1 Sample Files............................................................... .......................................................... .................1

    Appendix B......................... ................................................................. .............................................................. ......1B1 Distributed Applications ............................................................ ............................................................. 1

    Appendix C Hysys Link .......................................................................... ......................1

    C1 Use of the Hysys Driver....................................................... .............................................................. ....1

    C2 Setting up a case in Hysys ............................................................ ........................................................ 2

    C3 Loading and Editing a Case ............................................................... ................................................... 3

    C4 Other Functions ................................................................ ................................................................. ....3

    Appendix D GAP Link..................................................... .............................................. 1

    D1 Driver Configuration................................. ....................................................................... ....................... 1

    D2 Loading and editing a case................... ........................................................................ ......................... 1

    D3 Other functions ............................................................ ...................................................................... ....2

    D4 Setting up a case in GAP ......................................................... ............................................................. 2

    Appendix E REVEAL Link............................................ ................................................. 1

    E1 Driver Configuration....................... ....................................................................... ................................. 1

    E2 Loading and Editing a Case ............................................................... ................................................... 1

    E3 Other Functions ................................................................. ................................................................ ....2

    E4 Setting up a case in Reveal ........................................................ ........................................................... 2

    Appendix F Developer Instructions for Resolve ................................................................... ............................ 1

    F1 Template code............................................................... .................................................................... ....1

    F2 Startup...................................................................................................................................................1

    F3 Build and register the stub code ................................................................... ......................................... 1

    F4 Notes on the driver code ................................................................ ....................................................... 2

    F5 Data flow................................................... ................................................................. ............................ 2

    SEPTEMBER 2003 RESOLVEMANUAL

  • 8/12/2019 Resolve Complete

    5/49

    3- 3 TABLE OF CONTENTS

    PETROLEUM EXPERTS LTD

  • 8/12/2019 Resolve Complete

    6/49

    RESOLVE

    1 Introduction

    Chapter 1: Overview of RESOLVE

    Chapter 2: System requirements - hardware and software requirements

    Chapter 3: Getting started - basic commands and step-by-step example

    Chapter 4: Menu commands - dropdown menu commands

    Appendix A: Sample files - description of sample files supplied with installation

    Appendix B: Distributed Applications

    Appendix C: Hysys Link

    Appendix D: GAPLink

    Appendix E: REVEALLink

    1.1 Contacting Petroleum ExpertsWe encourage feedback and if you have problems or questions using RESOLVE,pleasesend an e-mail to [email protected] with the following information.

    1 Include the keyword 'RESOLVE' in the e-mail subject.

    2 RESOLVE version and build number - use the menu option Help|About RESOLVE...to

    obtain this information.

    3 Description of the problem or question.

    4 Include a REVEALarchive (*.rvl) file where possible. Check that this file is not toolarge (>2MB). If it is large, then run the simulation for one timestep and save the file,this will eliminate potentially large quantities of graphical output data.

  • 8/12/2019 Resolve Complete

    7/49

    CHAPTER 1 INTRODUCTION

    PETROLEUM EXPERTS LTD 2 - 2

    1.2 System requirementsRESOLVEsupports all Windows-certified drivers that are shipped with Windows. The list ofdevices, software and hardware supported by Windows is included with the documentationof your copy of Windows.

    Hardware and software requirements- minimum requirements recommended forRESOLVE.

    Pentium II class PC (Windows 95, 98, NT or 2000)500 MHz processor (1GHz recommended)256 Mbytes of memory (1Gbytes recommended)5 Gbyte hard disc space for temporary files1280 by 1024 minimum display size with high colour (16 bit) resolutionCD drive if the software is installed from a CD

    Licenses- RESOLVEcan be run using a single user (stand-alone) license or on a network.

    In either case, a special security key is needed. The security key is called Bitlockfor stand-alone licenses, and Hardlockfor network licenses. The security key is provided byPetroleum Experts.

    For a stand-alone license, the security key (Bitlock)must be attached to the parallel port ofthe PC. For a network installation, the security hey (Hardlock) can be attached to any PCcommunicating with the network. You should refer to the separate installation procedure fora network Hardlocksent with the purchase of a Hardlocklicense.

    1.3 Overview of RESOLVE

    RESOLVEis the sixth member of Petroleum Experts Integrated Production Management

    (IPM) suite of software.

    RESOLVEis a tool to allow connectivity between arbitrary Petroleum Engineeringpackages.With RESOLVEthe user can:

    load and query cases of client applicationsconnect corresponding sources and sinks from client applications using the graphicalinterface

    perform optimised or non-optimised runs with connected applicationsimplement condition-based scheduling of events

    RESOLVEis essentially a high-level framework that allows engineering data to be passed

    between applications. The data that is passed is fixed and should be general for all potentialclient applications: see the methodology section for more information.

    RESOLVEis built around an 'application-driver' scheme that allows users with specific

    connectivity requirements to build their own connections. See the architecture section formore information.

    RESOLVEruns on a PC (Windows 95, 98, 2000, NT) with a single interface to all

    functionality.

  • 8/12/2019 Resolve Complete

    8/49

    RESOLVE

    2 Methodology

    2.1 How RESOLVEWorks

    2.1.1 Step 1: Load and query application caseRESOLVE RESOLVE

    RESOLVE

    GAP

    RESOLVE

    2.1.2 Step 2: Connect individual sources and sinksfrom client applications

    RESOLVE

    REVEAL

    GAP

    2.1.3 Step 3: Create a scheduleRESOLVE

  • 8/12/2019 Resolve Complete

    9/49

    2.1.4 Step 4: Run the simulationRESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

  • 8/12/2019 Resolve Complete

    10/49

    2.2 Application Architecture

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE RESOLVE

    GAP

    RESOLVE

    RESOLVE

    RESOLVE

  • 8/12/2019 Resolve Complete

    11/49

    2.3 Driver Registration

    RESOLVE

    RESOLVE

    GAP REVEAL

    RESOLVE RESOLVE

    RESOLVE

    RESOLVE

    App Module:RESOLVE

    DLL Path:

    Application Type:RESOLVE

    RESOLVE

    RESOLVE

    Requires compositionCan produce composition:

    GAP

  • 8/12/2019 Resolve Complete

    12/49

    Ver:

    Description:

    Register:

    RESOLVE

    RESOLVE

    Unregister:

    Configure:

    GAP

    GAP

    2.4 Connection Rules

    RESOLVE

    RESOLVE

    R SO V node descriptionsRESOLVE RESOLVE

    Source/Sink node:

    GAP

  • 8/12/2019 Resolve Complete

    13/49

    GAP

    Data providers/data acceptors:

    RESOLVE

    GAP

    Uni-directional/bi-directional links:RESOLVE

    Compositional/non-compositional nodes:RESOLVE

    GAP

    The connection rules:

  • 8/12/2019 Resolve Complete

    14/49

    2.5 Composition Tables

    RESOLVE

    RESOLVE

    RESOLVE

    Module connection list:RESOLVE

    GAP

  • 8/12/2019 Resolve Complete

    15/49

    Component lists:

    Add Individual Connection:

    GAP

    Add All:

    Remove Link:

    RESOLVE

    RESOLVE

  • 8/12/2019 Resolve Complete

    16/49

    RESOLVE

    3 Step by Step Guide

    3.1 Getting started - step by step example

    GAP

    REVEAL

    Before you start:GAP REVEAL

    GAP REVEAL RESOLVE

    RESOLVE

    RESOLVE

    GAP

    GAP REVEAL

    RESOLVE

  • 8/12/2019 Resolve Complete

    17/49

    3.1.1 Step 1 - Initialise new case

    RESOLVE File|New

    Options|Units OK

    File|Save As...

  • 8/12/2019 Resolve Complete

    18/49

    3.1.2 Step 2 - Load the Reveal case

    REVEAL GAP

    RESOLVE

    REVEAL

    REVEAL and

    REVEAL

    3.1.3 Step 3 - Load the PcaseGAP RESOLVE

    GAP

    RESOLVE GAP

  • 8/12/2019 Resolve Complete

    19/49

    3.1.4 Step 4 - Make the connections between the cases

    Background information:

    REVEAL GAP

    GAP

    REVEAL

    GAP.

    REVEAL

    REVEAL

    GAP

    Moving the icons:

    REVEAL

    near REVEAL

    REVEAL

    REVEAL

    GAP

  • 8/12/2019 Resolve Complete

    20/49

    Connecting the icons:

    REVEAL GAP

  • 8/12/2019 Resolve Complete

    21/49

    3.1.5 Step 5 - Configure the cases

    GAP

    REVEAL

    REVEAL

    REVEAL

    REVEAL

    3.1.6 Step 6 - Enter the schedule

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

  • 8/12/2019 Resolve Complete

    22/49

    3.1.7 Step 7 - Run the simulation

    GAP

    GAP REVEAL RESOLVE. REVEAL

    GAP

    3.1.8 Step 8 - Extracting and viewing the results

    RESOLVE

    RESOLVE

    RESOLVE

    RESOLVE

    GAP

    RESOLVE.

    REVEAL

    GAP GAP

    RESOLVE.

  • 8/12/2019 Resolve Complete

    23/49

  • 8/12/2019 Resolve Complete

    24/49

    CHAPTER 4 MENU COMMANDS

    Print commandsCommands for printing the system, configuring the printer driver, and previewing theprint job.

    4.1.2 Menu: Options

    These are the commands that can be accessed from the 'Options' menu.

    UnitsDisplays a screen with the current sets of input and output units that RESOLVEwillemploy.

    RegisterThis invokes a screen that can be used to register and configure additional drivers forRESOLVE.

    When RESOLVEis started for the first time, it will attempt to load a default set ofdrivers that come as part of the software distribution. These will include drivers forPetex products (GAPand REVEAL)and possibly other products for which Petex

    have built drivers (e.g. Hysys). You can use the registration screen to configure thesedrivers, change to different versions of the drivers, or add drivers of your own.

    The available options from this screen are:Register: allows the user to browse to a new driver DLL. When you have selectedthe driver, RESOLVEwill ensure that it is suitable and then display its properties in

    the list with the other drivers.Unregister: if a driver is highlighted, 'Unregister' will remove it from the list.Configure: some drivers may require additional configuration information. This willdepend on the driver: further details can be found in the driver help files. An exampleof configuration data may be the location of the application exectuable on the harddisk.

    See driver registration for more details.

    PETROLEUM EXPERTS LTD 2 - 12

  • 8/12/2019 Resolve Complete

    25/49

    CHAPTER 4 MENU COMMANDS

    4.1.3 Menu: System

    The commands available from the system menu are generally those that are used tocreate and manipulate icons on the main screen.

    These are the commands that can be accessed from the 'System' menu.

    Create InstanceThis will invoke a menu with a list of the available drivers. To create an instance, clickon the application that you would like to load and click onto the front screen at thelocation at which you would like the icon to be displayed.

    LinkEnters 'link' mode for linking connected sources / sinks together.

    SelectEnters 'selection' mode for selecting icons for later manipulation (e.g. moving).Selection can be done per icon (by clicking into the icon) or by dragging over arectangle which will toggle the selection state of all the icons within the rectangle.Selected icons are marked with a blue circle.

    MoveEnters 'move' mode for moving icons. Icons can be moved individually by clickinginto the icons and dragging with the mouse, or collectively by clicking near a group ofselected icons and dragging to the new location.

    Delete

    Enters 'delete' mode for deleting clients. Source and sink icons can not be deletedindividually as these are properties of the client application cases. The clients can bedeleted in this mode by clicking onto the main icons.

    Select / Unselect all itemsEnters select or unselect mode. Once items have been selected they can be moveden block.

    Show / Hide all sources / sinksFor clarity in complex systems it may be desirable to hide all the sources and sinks ofa client application - when they are hidden a small plus (+) sign appears in thebottom corner of the case icon.

    These menu options toggle the states of all the client applications.

    Connection WizardInvokes the Connection Wizard.

    Icon SizesAllows the user to change the icon sizes on the screen. This may be useful if asystem is fairly complex and is looking cluttered.

    PropertiesInvokes the system properties screen. This allows various options relevant to thesimulation to be set, as well as some graphical preferences (e.g. screen fonts).

    PETROLEUM EXPERTS LTD 3 - 12

  • 8/12/2019 Resolve Complete

    26/49

    CHAPTER 4 MENU COMMANDS

    4.1.4 Connection Wizard

    The 'connection wizard' may be used to generate connections between nodes in theResolve system. This can also be achieved graphically, but this can be quite arduous

    when generating connections over a large system.

    When invoked, the following screen is produced:

    Module lists:The drop down list boxes at the top of the screen contain all the client modules in theResolve system. Select the two modules that you wish to make connections for fromthe lists on the left and right of the screen. The sources/sinks that correspond to themodule are then listed in the list boxes below.

    Sorting options:The lists of nodes can be manipulated in various ways. Nodes can be selected in the

    lists and removed by clicking the Remove Selectedbutton. The lists are, by default,sorted alphabetically (as it is normal to connect items with common names), but the

    PETROLEUM EXPERTS LTD 4 - 12

  • 8/12/2019 Resolve Complete

    27/49

    CHAPTER 4 MENU COMMANDS

    sorting can be reversed by clicking . The Resetbutton will display allnodes sorted alphabetically.

    Display Filter:Use the checkboxes to determine which items appear in the list. By default, dataproviders and data acceptors (i.e. all items) are listed. Click on the checkboxes toapply a filter to the list, and then click Apply.

    Connections can then be made by highlighting the individual sources and sinks in thelist and clicking on Add Individual Item. If the lists have been sorted and filtered toalign the nodes that are to be connected, then Add Allcan be used to formautomatic connections between the node lists. The resulting connections aredisplayed in the list box at the bottom of the screen.

    4.1.5 System Properties

    This screen allows certain properties of the system display and runtime mode to bechanged.

    When Options | System properties is invoked from the main menu, the followingscreen is invoked.

    PETROLEUM EXPERTS LTD 5 - 12

  • 8/12/2019 Resolve Complete

    28/49

    CHAPTER 4 MENU COMMANDS

    System title:This controls the display of a system title on the main screen. To give the system atitle, enter the title in the text box supplied. The font for the title can be changed bypressing the 'Font' button. The system title information is saved with the Resolve file.

    Label fonts:Press the 'Font' button to change the font that is used to label the icons on the mainResolve screen.

    Runtime options:

    Stop on non-fatal validation errors:If this is checked, Resolve will present a screen at run-time that will display any non-fatal validation errors in the system. Such an error would be a node that is notconnected to another node: this is not going to stop the system from running, butcould be a reminder to you that the system is not complete.

    Reload modules at start of run:Normally, it is a good idea to reload modules with their models at the start of a run. Insome cases, the models can be changed by the run itself, and so they should bereloaded at the start of a run to ensure that they are correctly initialised. However, insome cases where the models do not need to be re-initialised, the reload procedureis just time-consuming and can be skipped.

    Perform calculations in parallel:In general, it is preferable to perform calculations in parallel wherever possible. Forexample, if two reservoir simulators were connected to a surface network, it would bedesirable to run the simulation timesteps in parallel. This option can be used to forcethe calculations to run in series.

    PETROLEUM EXPERTS LTD 6 - 12

  • 8/12/2019 Resolve Complete

    29/49

    CHAPTER 4 MENU COMMANDS

    4.1.6 Menu: Module

    The 'Module' menu is generated dynamically with a list of the loaded clientapplications. For each client, the following menu options are available.

    Change LabelThe alias that was set when the object was created can be changed here

    Edit CaseEquivalent to double clicking on the icon in question, this invokes the 'Edit Case'screen to allow the user to change the case being studied. In general, this will resultin the current connections being lost as the new case is loaded in.

    ReloadBroadcasts a message to the client application to reload the case from scratch intothe application.

    SaveBroadcasts a 'save' message to the client application to save the case.

    Update queryOften used in conjunction with the reload, this will update the sources and the sinksdisplayed with the current contents of the case.

    There may be other options available for some drivers - these depend on the driveritself and more details can be found under the help for that driver.

    4.1.7 Menu: Schedule

    The commands available from the schedule menu are those that are used to setevent scheduling for the simulation.

    These are the commands that can be accessed from the 'Schedule' menu.

    TimestepsThis will invoke a screen that allows the user to set a timestep length and schedule

    duration for the RESOLVErun. See timestep control for more information.

    ScriptThis is a function that allows advanced condition-dependent scheduling to beimplemented. See scripting for more information.

    PETROLEUM EXPERTS LTD 7 - 12

  • 8/12/2019 Resolve Complete

    30/49

    CHAPTER 4 MENU COMMANDS

    4.1.8 Timestep control

    In a Resolve system, Resolve is the master controller and all the attached clients areslaves of the Resolve process. As such, Resolve coordinates the timesteps of the

    time-dependent applications and ensures that the applications are appropriatelysynchronised. See How Resolve Works for more information.

    The timestep lengths (the times between synchronisation of the modules) are setfrom this screen.

    On the left hand side is a list of concurrent schedules. The buttons at the bottom ofthe list allow schedule records to be added, removed, and inserted, or the entire listcan be cleared. When a schedule in the list is highlighted, that schedule timing and

    duration is displayed at the top of the screen.

    Timestep duration in Resolve can be fixed, or individual timestep lengths can be set.

    Regular/fixed timesteps:If this option is selected, the schedule duration and timestep length only need to beset.

    When Resolve performs a simulation, it broadcasts 'Solve' commands to all themodules that accept data from a connected module. In the case of a bi-directionallink (where data is passed back to the original provider) the Solve command will beaccompanied by a flag indicating whether the 'Solve' is an optimised solve or a

    simple system calculation. Resolve does not know whether the module in questionwill 'understand' the optimisation request but the command will be sent anyway: in

    PETROLEUM EXPERTS LTD 8 - 12

  • 8/12/2019 Resolve Complete

    31/49

    CHAPTER 4 MENU COMMANDS

    the case of GAP (for example), systems can be optimised by adjusting lift variables,setting chokes, etc. The 'Optimise every ...' field allows the user to specify how oftenthe 'optimise' command is sent.

    User defined timesteps:Timestep durations can be entered individually in the grid on the right of the screen.The grid can be generated automatically using a linear or geometric sequence.

    4.1.9 Scripting control

    Resolve implements a scripting control that allows event-driven scheduling to beperformed during a Resolve run. To use this facility, a basicknowledge of VisualBasic and programming will be required. Examples of how scripting can be used areincluded in the sample files.

    To create or edit a script, go to Schedule | Script from the main menu. The followingeditor is invoked:

    Several functions ('entry points') are called by Resolve at predefined parts of thesimulation. Use the drop down lists at the top of the screen to select the function thatyou wish to implement.

    Declarations:This is not a function that is called, but this section allows variables to be set up andinstantiated with initial values.

    The three functions that are called are:

    PreSolve:(as in the above example). This is called by Resolve just before the Solve command

    PETROLEUM EXPERTS LTD 9 - 12

  • 8/12/2019 Resolve Complete

    32/49

    CHAPTER 4 MENU COMMANDS

    is sent to a group of connected modules, after the data has been passed betweenthe applications. The argument to the function (ModuleList) is a string that is adelimited list of the modules that form the group, the delimiter being a tilde '~'character. For example, in a simple Resolve system consisting of two modules('Simulator' and 'Network') that are connected together, PreSolve will be called withan argument 'Simulator~Network'. The argument can be used to check exactly whichpart of the Resolve system is currently being solved.

    PostSolve:This is also called with a ModuleList argument. It is called after the Solve commandand after the data has been passed back to the receiving module.

    Finish:Called at the end of the simulation, to allow post-processing, tidying of data, etc.

    PETROLEUM EXPERTS LTD 10 - 12

  • 8/12/2019 Resolve Complete

    33/49

    CHAPTER 4 MENU COMMANDS

    4.1.10 Menu: Run

    The menu items under 'Run' are used to control a simulation run as it proceeds.

    The options are:

    ValidateThis performs the 'pre-processing' of the run without doing the run itself. It can beused to perform a simple validation of the system.

    StartCommences a run (from scratch or following a pause). If it is starting from scratch,RESOLVEwill validate the system beforehand and display any validation errors.

    StopTerminates a run

    PausePauses a run. During a simulation, the client applications user interfaces are disabled- pressing pause will reenable the applications and allow the user to view results, etc.

    Do One StepSingle-steps through a simulation.

    Edit composition tablesComposition tables are required when compositional data is being passed betweenapplications. Each application will have its own set of compositions which may have

    unique names across the RESOLVE system (e.g. methane in one package may bereferred to as CH4 in another). The composition tables map the compositions fromdifferent applications onto each other. See the composition table screen for moreinformation.

    Edit calculation orderFor more complex systems RESOLVE breaks down the calculations into severalparts. For example, consider the case where a reservoir simulator is connected to asurface network model, which is in turn connected to a process simulator. In thisexample, it is necessary to calculate first the production of the fluids from thereservoir to the surface network, and then solve the connection between the surfacenetwork and the process.

    RESOLVEwill make a guess as to the required order based on the client types. Thecalculation order can be changed manually using this screen.

    Debug LoggingTurn the debug logging on or off. The debug logging will generate a detailed recordof all the data that is passed between applications during a run which will then besaved with the RESOLVE file. It allows cases to be debugged remotely withoutnecessarily having access to all the drivers or applications.

    Debug file view / exportUtility functions to view the above debug file or to export it as an ASCII file.

    PETROLEUM EXPERTS LTD 11 - 12

  • 8/12/2019 Resolve Complete

    34/49

    CHAPTER 4 MENU COMMANDS

    PETROLEUM EXPERTS LTD 12 - 12

    4.1.11 Menu: Results

    This allows the simulation results to be accessed.

    Sink ResultsThis invokes a screen with a basic set of results for all the sink objects in the system.They are grouped by application: for each application total quantities are alsorecorded.

    From this screen plotting and reporting functions can also be performed.

    Generate ASCII fileThis simply generates an ASCII file of the results in the current working directory.The file has the same name as the resolve file except with an .rsr extension.

    Log WindowDisplays the log window. The log window can be written to by script commands (seescripting for more information), which is potentially useful for debugging purposes.The log file is saved with the RESOLVEfile - this menu item can then be used to

    display the currently saved log file.

    4.1.12 Menu: View

    Menu items to display / hide the toolbar (at the top of the main window), the statusbar (at the bottom of the main window), and the infoviewer (to the left of the mainwindow) are available here.

  • 8/12/2019 Resolve Complete

    35/49

    Appendix A Sample Files

    A1 Sample Files

    The following is a brief description of the sample files included with the installation.Depending on where RESOLVEwas installed, they may be found in C:\Program

    Files\Petroleum Experts\IPM #\Samples\resolve, where # is the IPM (IntegratedProduction Management) release version number.

    The sample files are all based on connections between REVEALand GAP.Checkthe information in the step-by-step guide: getting started before attempting to load asample file.

    To extract the sample files:The sample files are distributed as GAParchives (.gar files). Take the following

    steps:

    1. Extract the archive using GAP. Start GAP.Make sure that the version of GAPthat you start is the same as the version of GAPthat RESOLVEwill run.Select

    File | Archive | Extract from the GAPmain menu and browse to the .gar file that youextracted from the original zip file.2. Follow the on-screen instructions to unpack the .gar file to the subdirectory thatyou have created. Load the unpacked .gap file into GAPand check that all the

    associated paths (e.g. to lift curves, etc) are correct. You can check this from Edit |Edit project paths.3. Close down GAPand start RESOLVE. You should now be able to open the .rsl filefrom RESOLVE. The RESOLVEfile will have been generated with different paths tothe linked cases: as the file loads, RESOLVEwill prompt you to browse for the new

    case directories.4. When the RESOLVEload is completed, save the .rsl file so that the new case

    paths are saved.

    Following is a brief description of the sample files:

    SMARTWELLThis is a model of an intelligently completed well ('smartwell') in which a REVEAL

    well, completed in four places, is controlled on a completion-by-completion basis withGAP.

    GAS-SCHEDULEThis is the same as Gapex, except that it implements a script that will test for a highGOR (> 25000 scf/STB) in the gas completion and shut it in if it exceeds this amount.This is illustrating the scripting capability of RESOLVE.

    VOIDAGEThis is using a REVEALmodel linked to a combined production and injection systemin a GAPcase. The production system is solved first, and the voidage is calculatedby the script. This is then set as a constraint in the injection system which is then

    solved. This example is essentially implementing a voidage replacement scheme.

  • 8/12/2019 Resolve Complete

    36/49

    2- 2 APPENDIXA SAMPLE FILES

    PETROLEUM EXPERTS LTD

    WATER-RECYCLINGThis is an example where REVEALwells are connected at the wellhead to a GAP

    model that uses a lift curve to model the delta P to the manifold. The wells in thiscase are gas lifted. A script is included that can allow water to be recycled into theREVEALmodel. In addition, the script calculates the saturations around themultilateral well bores in REVEALand outputs a warning to the user when they

    exceed a certain threshold.

    WATER-RECYCLING2This is the same as Gapex, except that it allows the produced water to be recycledback into the REVEALmodel (up to a maximum of 4000 STB/d as set in the GAPmodel). It also contains a script that shuts in the water injector when the watersaturations in the reservoir exceed a certain threshold.

  • 8/12/2019 Resolve Complete

    37/49

    1- 1 APPENDIX B

    Appendix B

    B1 Distributed Applications

    This functionality is implemented as part of the driver code. However, in general, thisis how to set up a remote machine to be able to launch IPM programs fromRESOLVE.

    Windows 2000/NT 4.0/XP

    1. As administrator, run DCOMCNFG.EXE.

    2. Locate PXSERV document in the applications list.

    3. Click on the PROPERTIES button.

    4. Under the Location tab, select 'Run application on this computer'.

    5. Under the Security tab, change the access and launch permissions to allowyou (as user) full access to the remote machine.

    6. Under the Identity tab, select 'Interactive User'.

    7. Press OK. You should now be able to create instances of PXSERVER andlaunch the IPM programs from RESOLVEon a remote PC.

    Windows 98/ME

    Petroleum Experts is not able to support these architectures when RESOLVEis usedremotely. RESOLVEis still supported when used as a local application on these

    operating systems.

    The reason for this is that the Microsoft implementation of DCOM on these systemsdoes not allow remote applications to run interactively.

    PETROLEUM EXPERTS LTD

  • 8/12/2019 Resolve Complete

    38/49

    Appendix C Hysys Link

    C1 Use of the Hysys Driver

    The Hysys driver allows instances of Hysys to be opened and controlled fromResolve.

    How to use HysysLinkThe driver first needs to be registered with Resolve. See the Resolve help for moreinformation on how to do this. Once the driver is registered, it will be possible tocreate instances of Hysys in Resolve.

    - Create an instance of Hysys from the 'Create Instance' menu on the Resolve mainscreen. Click on the Resolve screen to create a Hysys icon.- Load a pre-modeled case of Hysys by double-clicking on the created icon and thebrowsing to the case in question. Note that it is possible to run Hysys on a remotecomputer over a network. To do this, DCOM security must be set up on theregistered Hysys component on the remote computer. See your IT systemadministrator for this.- Click on the OK button. An instance of Hysys will be created in the background thatwill load the required case.- The driver will now determine the 'sources' and 'sinks' of the Hysys model fordisplay on the Resolve screen. These correspond to the input streams and outputstreams of the model.

    - The Hysys streams can now be connected in Resolve to other sources and sinksfrom other applications. Note that the streams in Hysys are 'uni-directional'. Thismeans that a single point is passed by the program that supplies the data to Hysysand Hysys returns no data back. The streams can only be connected to other uni-directional sources/sinks.- Resolve does not extract any reporting variables from uni-directional connections -it is necessary to set up the variables that you wish to monitor. Right click on theHysys icon in Resolve, and click on 'Output variables'. From the resulting screen,browse to the variables that you wish to report.- As many cases of Hysys as you wish can be loaded into Resolve at one time.

    What the driver does

    When Resolve is run, it will query the individual cases for the compositional data thatthey are to run with - Resolve requires a common set of components to be presentacross the entire system. These components do not necessarily have to have thesame names (e.g. pseudo-components may be named differently in GAP comparedwith Hysys, say) but it must be possible to map the different component setstogether. This has to be borne in mind when setting up the Hysys model, i.e. the fluidpackage that is created must contain all the components that are to be expected fromthe connected package. Pseudo-component properties do not have to be known asthese will be set by Resolve as part of the data transfer.

    When the case is run in Resolve, data will be passed to the connected inputstream(s) in Hysys. This data will consist of a single point of pressure, temperature,mass flow rates, and black oil and compositional data. This data will be set at theinput stream.

  • 8/12/2019 Resolve Complete

    39/49

    2-3 APPENDIX C HYSYS LINK

    The compositional data is set in Hysys by poking the data into the fluid package. Thismeans that all streams that access the same fluid package will be affected. If morethan one input stream is connected through Resolve, and these share a fluidpackage, then the compositional data of that fluid package will effectively be writtentwice, once for each stream. This is only a problem if the input streams arise fromdifferent sources with different properties. It is possible to set up different fluidpackages for different streams in Hysys, but then a stream cutter (or somemechanism for mapping components between fluids) will be necessary in the Hysysmodel.

    Once the data has been passed, Hysys is allowed to solve the system. Data for themonitored variables (see above) are extracted. Also, the data for any output streamsthat are connected in Resolve are generated. Black oil data (that may be required forconnection to black oil applications) is obtained from a series of flash calculations.

    See also: Notes on setting up Hysys cases.

    C2 Setting up a case in Hysys

    For more information on the data that is passed by Resolve, and on how to set up aResolve model, please see the Resolve help.

    Here are some other points that should be considered when creating the Hysysmodel.

    - The driver has been developed for use with steady state (non-dynamic) Hysys.Dynamic (time-dependent) behaviour is assumed to come from the connectedmodels.- When the model is created, the fluid package must contain all the components thatare expected from the connected model (e.g. GAP). The components can be pure orpseudo (hypo). They do not have to have the same names as in the GAP model asResolve will map GAP components to Hysys components as part of the initialisationprocess.- When the compositional properties (critical temperature, pressure, etc) are passed,only pseudo-component properties can be changed in Hysys. Pure componentproperties are left unchanged. If you would like to pass the critical properties for apure component, then this would have to be set up as a hypothetical component inHysys. This would, however, mean that Hysys does not have any knowledge of the

    pure component that it is supposed to represent (for the purposes of enthalpycalculations, etc).- When compositional properties are set in Hysys, they are applied to the fluidpackage that is accessed by a stream. If the fluid package is shared across severalinput streams all streams will be affected by the changes.- This may also affect cases where more than one input stream is connected inResolve. If the streams access the same fluid package, then the fluid package will beupdated twice, potentially with different fluid properties. It is possible in Hysys for theinput streams to access different fluid packages, but then a stream cutter or someother mapping will be required to map the different packages together in the Hysysmodel.

    PETROLEUM EXPERTS LTD

  • 8/12/2019 Resolve Complete

    40/49

    APPENDIX C HYSYSLINK 3 - 3

    SEPTEMBER 2003 RESOLVEMANUAL

    C3 Loading and Editing a Case

    To access this double-click on the Hysys icon in Resolve.

    Hysys Filename:This is the Hysys case name (extension *.hsc).

    Machine Name:Hysys cases run from Resolve can be distributed over a network. Enter in this fieldthe name of the machine on the network on which you would like the Hysys case torun. The machine name can be given as an IP address or a name in the DNSregister (e.g. 'dave-8200').

    Leave the space blank to run Hysys on the local machine.

    When entering file (case) names for remote machines, the file name entered should

    be relative to the local machine.

    C4 Other Functions

    The following assorted functions are available in the Reveal driver.

    Save Case:Saves the Hysys case to the current file name

    Reload Case:Reloads the case from file (useful if the file has been edited). Resolve will alwaysreload the file before a simulation run anyway, unless told otherwise in the simulationoptions.

    Updating the source/sink data (query):When a case is loaded or edited, Resolve queries the case for its sources and sinks.In some circumstances it may be desirable to repeat this operation without reloadingthe system.

    Output variables:Connections made to Hysys are uni-directional and as a result no results data is

    stored by Resolve by default. Use this option to set the variables that Resolve is tostore as part of its reporting. When this option is selected, the Hysys model isinterrogated for all available variables pertaining to both material streams, energystreams, and equipment. These are then available for reporting.

    Show case:This simply makes the case visible to the user. It is important that Hysys is not quitwhile Resolve is controlling it, as the connection can not be remade once it is lostwithout re-opening the Resolve file.

  • 8/12/2019 Resolve Complete

    41/49

    Appendix D GAPLink

    D1 Driver Configuration

    Before the driver can be used effectively, it must be configured for use with GAP.

    The configuration screen can be accessed from the Resolve driver registrationscreen (Options | Register on the main menu). Click on the GAP driver in the list andpress the 'Configure' button.

    The configuration options are:

    GAP executable path:In this field you should enter the directory in which the GAP executable is installed. Ifthis is left blank, Resolve will attempt to start GAP in the same directory as theOpenServer executable (PXServer.exe) is running. For safety it is best to enter thedirectory.

    Application timeout:In case of difficulties, Resolve will wait a certain period when attempting to start upGAP. If it is not able to do so then Resolve will call an error after the timeout period.For most cases a timeout of 30 seconds should be appropriate. If you are running ona fairly slow machine you may want to make this value larger to avoid Resolve 'timingout' unnecessarily.

    D2 Loading and editing a case

    To access this double-click on the Reveal icon in Resolve.

    GAP Filename:This is the GAP case name (extension *.gap).

    System:As well as the main system, GAP cases can optionally contain associated water and

    gas injection systems. This control can be used to select one of these systems ratherthan (by default) the main system. This is useful if you would like to connectseparately to a GAP case and an associated system of a GAP case. Two instancesof GAP can be created in Resolve, one of which points to the main system while onepoints to the associated system.

    Machine Name:GAP cases run from Resolve can be distributed over a network. Enter in this field thename of the machine on the network on which you would like the GAP case to run.The machine name can be given as an IP address or a name in the DNS register(e.g. 'dave-8200').

    Leave the space blank to run GAP on the local machine.

  • 8/12/2019 Resolve Complete

    42/49

    2-3 APPENDIX D GAPLINK

    When entering file (case) names for remote machines, the file name entered shouldbe relative to that machine and not the local machine.

    Predictive Mode:GAP can be used as a standalone calculator or in predictive mode. By default, GAPis run in the same mode as is set up in the GAP model, which may be predictive ifthere are MBAL or decline curve tanks present. The prediction mode can beoverridden here to always use GAP as a standalone calculator.

    D3 Other functions

    The following assorted functions are available in the GAP driver.

    Save Case:Saves the GAP case to the current file name

    Reload Case:Reloads the case from file (useful if the file has been edited). Resolve will alwaysreload the file before a simulation run anyway, unless told otherwise in the simulationoptions.

    Updating the source/sink data (query):When a case is loaded or edited, Resolve queries the case for its sources and sinks.In some circumstances it may be desirable to repeat this operation without reloadingthe system.

    Test OpenServerThis simply tests whether PXServer.exe is registered with the operating system andreturns the full path ofl i

  • 8/12/2019 Resolve Complete

    43/49

    APPENDIX D GAPLINK 3 - 3

    SEPTEMBER 2003 RESOLVEMANUAL

    6. As with all calculations, quality checking of the model before the simulation isrun is extremely important to check for errors at an early stage before addingextra complexity.

  • 8/12/2019 Resolve Complete

    44/49

  • 8/12/2019 Resolve Complete

    45/49

    2-3 APPENDIX E REVEALLINK

    Fixed rate (total liquid rate, or gas rate for gas reservoirs),Fixed bottom hole pressureFixed manifold pressure

    The third option is available only when Revealis connected to GAP, and is generally

    to be preferred as the lift curve will give some of the system response of the surfacenetwork and so will reduce the explicitness of the system. If fixed manifold pressureis selected, it is essential to include the same lift curves that are in the GAPmodel inthe Reveal model.

    Run Revealfrom:By default, Revealsimulations are started from t = 0. If a restart file has been savedin the simulation case, then this control can be used to start from the restart.

    E3 Other Functions

    The following assorted functions are available in the Reveal driver.

    Save Case:Saves the Reveal case to the current file name

    Reload Case:Reloads the case from file (useful if the file has been edited). Resolve will alwaysreload the file before a simulation run anyway, unless told otherwise in the simulationoptions.

    Updating the source/sink data (query):

    When a case is loaded or edited, Resolve queries the case for its sources and sinks.In some circumstances it may be desirable to repeat this operation without reloadingthe system.

    Test OpenServerThis simply tests whether PXServer.exe is registered with the operating system andreturns the full path of the registered application.

    E4 Setting up a case in REVEAL

    Here are some brief notes on how Revealcases can be set up for use with Resolve.

    In general terms, there are no special requirements that a Reveal model has to fulfillin order to be used by Resolve. The following points are worth bearing in mind,however:

    1. The schedule as entered in Revealis overridden by the schedule that is

    entered in Resolve. The only parts of the schedule that are not ignored arethose relating to initial timestep sizes and timestep growth. Thus Revealwilltake as many internal timesteps as required to reach the timestep set byResolve.

    2. In particular, the schedule set for the wells is ignored. Wells are set to fixed

    rate or pressure by Resolvedepending on the setting in the Resolvefile.Wells that are not connected in Resolvewill be shut in.

    PETROLEUM EXPERTS LTD

  • 8/12/2019 Resolve Complete

    46/49

    APPENDIX E REVEALLINK 3 - 3

    SEPTEMBER 2003 RESOLVEMANUAL

    3. Lift curves in Revealwill be ignored unless the wells are controlled with a

    fixed manifold pressure.4. Wells will be set to production or injection wells depending on the item that

    they are connected to. If a Reveal well is connected to a water injector inGAP, then it will become a water injector in Reveal.

    Fluids that are injected into Reveal may not be at the same temperature as thereservoir. It is important in these cases to have a fully thermal PVT.

  • 8/12/2019 Resolve Complete

    47/49

    Appendix F DeveloperInstructions for Resolve

    These notes are intended for developers wishing to build a custom driver to install intoResolve.

    Before starting it is recommended that you understand the architecture of Resolveand the flow of data that occurs when a Resolve simulation is run. Details can befound in the on-line help or the manual that comes with the software. Brief details aregiven below.

    It is also sometimes helpful to run some of the example files (that link Gap to Reveal andGap to Hysys).

    F1 Template code

    A driver template, coded in C++ and distributed as a zipped archive, is available fromPetroleum Experts on request. This is the stub code for the Reveal driver.

    The stub driver code contains many comments and supplements this document.

    F2 Startup

    Ensure that Resolve is installed and the default drivers (for GAP, Reveal, and Hysys) areregistered with the application.

    You can check this from the Resolve menu. Go to Options | Register and check that thedrivers are present in the list. Resolve should attempt to register these when it is started forthe first time: if they are not registered, then click on the Register button and locate thedrivers on your driver.

    F3 Build and register the stub code

    The stub code was developed under Microsoft Visual C++ version 6.0, and is only verified onthis platform.

    To build the stub (template) driver:

    1. Load the project file (.dsp) into Developer Studio.2. Build the driver a DLL called DriverStub.dll will be created.3. Register the new DLL using the main menu on Resolve: Options | Register as

    detailed above.4. The driver has the default App Name user.

  • 8/12/2019 Resolve Complete

    48/49

    2- 3 APPENDIX F DEVELOPER INSTRUCTIONS FOR RESOLVE

    F4 Notes on the driver code

    Once the driver is registered, you are ready to start adapting it to create your ownconnection. To understand the functions that the driver implements it is necessary tounderstand the way Resolve works when it performs a simulation.

    F5 Data flow

    The starting point for Resolve consists of having two or more systems modeled in the clientapplications that are ready to be connected. These are then loaded into the Resolve frontscreen:

    1. An instance of the application object is created by the user invoking Create Instance |(app name) and then clicking on an arbitrary position on the front screen.

    2. The user edits the case by double-clicking on the icon end entering some casedetails (in the simplest form this might just be a file name). The driver tells theapplication to load the case.

    3. Resolve interrogates the driver for the case contents, i.e. the sources and sinks thatthe driver exposes. It then displays these as child icons of the main application iconon the front screen.

    4. When more than one case is loaded, objects that generate inflows (drawn with a dotin the top left corner) can connect to objects that receive inflows. This is donegraphically on the front screen.

    The user now enters a schedule for the simulation: this may be just a schedule duration anda timestep length.

    Finally, the user presses Start Simulation. Resolve will now control all the client (connected)applications by broadcasting commands to all the client drivers. These commands may be

    ignored if they are not applicable to the application: for example, DoTimestep() is irrelevantto an application that is not time dependent and is just doing instantaneous solves.

    During a simulation, the following occurs:1. Resolve commands the applications to initialise (allocate memory, equilibrate).2. Resolve collects inflow data from all the inflow provider objects in the system.3. This data is passed to the inflow receiver objects.4. Resolve broadcasts a general Solve() command: this will cause GAP (for example) to

    perform a solve and optimisation.5. The solution data is passed back to the inflow objects (e.g. wells in a simulator).6. The solution data is used as a control for the duration of a timestep that is now

    executed.7. Following the timestep, we return to point (2) where the inflow data is collected.

    It should be possible to identify the above procedures in the code of the driver stub.

    F6 Driver Source Code

    The next sections describe the contents of the various source code files that make up thedriver. The .cpp files themselves contain fairly extensive comments to explain what eachmethod should be doing. If you would like some more help, or a code sample of the driver forReveal, then please contact Petroleum Experts.

    PETROLEUM EXPERTS LTD

  • 8/12/2019 Resolve Complete

    49/49

    APPENDIX F DEVELOPER INSTRUCTIONS FOR RESOLVE 3- 3

    F6.1 DriverStub.cpp / DriverStub.h

    These just implement the application object and are standard, AppWizard, generatedsource files. Some configuration data can be stored here.

    F6.2 ExtShared.h

    This is shared by all Resolve drivers. It contains some general definitions and the datastructures that are passed between Resolve and the driver.

    It also contains the command ID #defines that are broadcast by Resolve to the drivers.

    F6.3 ExtDllEntry.cpp

    This is the main entry point of the driver DLL. It consists of five entry points:

    1. ExtIdentify(). This identifies the driver to Resolve, passing a structure that containsfields for the application, driver description, and other options.

    2. ExtCreateInstance(). This creates a new instance of the model in the driver. Eachinstance of the model is represented by a separate icon on the Resolve screen.These models should be able to be controlled independently by the driver.

    3. ExtDestroyInstance(). Destroys an instance as created above.4. ExtConfigure(). Allows the user to configure the driver. For GAP and Reveal drivers

    this allows information such as the application executable paths to be stored.5. ExtCmd(). The main message loop for the driver. A model handle is passed and a

    command ID: the driver must call the requested command for the given model.

    F6.4 ExtInterface.hThis is the definition file for an abstract class that can (although it is not obligatory) be usedas a template for a general model class. It contains virtual functions (and some pure virtualfunctions) for all the possible commands. These can be overridden in a subclass.

    F6.5 ExtModel.cpp / ExtModel.h

    This is the model class derived from the above interface class. This is where all the work isdone in communicating with the application and returning the data to Resolve.

    The ExtModel.cpp file in DriverStub is well commented and should provide you with a goodidea of what the various methods are supposed to be doing.

    F6.6 RVLRegistry.cpp / RVLRegistry.h

    Utility functions for storing information (such as configuration data) in the registry.

    F7 Conclusion

    Please contact Petroleum Experts if help or advice is needed in the development of your