Chapter 1. Getting Started

Table of Contents

Welcome
PetraSim at a Glance
Main Window
2D Grid Editor
3D Results View
Time History Results
Example Problems
PetraSim Tour (Five Spot)
Load the eos1_five_spot sample model
Enable flux output
Run the simulation
View 3D simulation results
View cell time history data
Installation
30 Day Trial
Purchase of PetraSim
Registration
Additional TOUGH Documentation
Computer Hardware Requirements

Welcome

PetraSim is an interactive pre-processor and post-processor for the TOUGH family of codes. It helps users rapidly develop models and view results for these general purpose simulators which model nonisothermal flows of multicomponent, multiphase fluids in porous and fractured media. The T2VOC and TMVOC simulators include three-phase flows of water, air, and volatile organic chemicals. The TOUGHREACT simulator adds chemical reactions. The TOUGH-Fx/HYDRATE simulator includes the capability to represent methane hydrates.

PetraSim at a Glance

Main Window

The main window guides the user through the process of specifying all model input.

Figure 1.1. Main Window

The Main Window

  1. Navigation Tree - Use this to quickly identify and manage items in your model.

  2. 3D Model View - Use this to visualize the structure of your model in 3D. When you use the Grid Editor, the current layer will be highlighted in this view.

  3. Toolbar - The toolbar provides quick access to the steps required to define, run, and post-process an analysis.

  4. View - Click to reset the 3D Model View to top, front, or side views.

  5. 3D Labels - Add 3D labels to help keep track of model features. Labels are added automatically when you add wells and when you create a model.

  6. Axis Legend - To ensure that you never become disoriented, the axis legend rotates with your model and always displays the x, y, and z axes.

  7. Cell Count - Use the cell count display to see how many cells are in your model.

2D Grid Editor

Use the 2D editor to specify properties for individual cells in your model. Examples of these properties include: initial conditions, enabling and disabling cells, and additional output data.

Figure 1.2. 2D Grid Editor

The 2D Grid Editor

  1. View Selector - Use this to switch between the three 2D viewing planes: XZ, XY, and YZ.

  2. Layer Selector - Use this to select a layer of cells to edit. The currently selected layer is always highlighted in the Main Window.

  3. Cell Annotations - Cells will display annotations when they are: a source or sink (S), fixed thermodynamic conditions (F), selected for additional output (P), or have been named.

  4. Property Selector - Use this to color the current layer of cells based on a particular property such as temperature or gas saturation.

  5. Disabled Cells - Cells that have been disabled will not be used in the simulation and are shown as empty in the Grid Editor.

  6. View - Click this to undo, redo, or reset the view.

  7. Cell Finder - To find any cell in the model, type either the name or the id number into this box, then press enter. The cell will be centered and selected in the Grid Editor.

3D Results View

You can use the 3D Results View to visualize properties of your model as they evolved over time.

Figure 1.3. 3D Results View

The 3D Results View

  1. 3D Results Display - Contours, vectors, and slice planes are shown against an outline of your model. You can also make high-resolution screen shots for publications or presentation graphics.

  2. Scalar Legend - The scalar legend shows what colors were used to display scalar quantities. You can also double-click the legend to define the range and number of colors.

  3. Time List - Click a time step to view the results data at that time during the simulation.

  4. Scalar Property - Select a scalar property, such as temperature or pressure) to display from this list. All slice planes and contours will be updated show the new property.

  5. Vector Property - Select a vector property (such as water flow rate) to display from this list. All vectors will be updated to show the new property.

  6. Isosurface Controls - Change the number of isosurfaces and and other scalar display properties.

  7. Vector Controls - Use sliders to scale the vectors in the 3D view.

  8. Slice Planes - Click this to add 2D slice planes to the 3D view.

Time History Results

You can make time history plots of individual cell data and export the data in a format for import into spreadsheets.

Figure 1.4. Time History Results

Time History Results

  1. Time History Results - You can plot output data for any cell.

  2. Output Variable - Select the output variable for plotting.

  3. Cell Selection - Plots can be made for any cell. Named cells display the name and the cell number.

  4. Line Style - Select the style for the graph.

Example Problems

PetraSim includes model files (*.sim) for each of the example problems in the C:\Program Files\PetraSim\samples directory. The examples can also be downloaded from the web at http://www.petrasim.com under the Support link.

PetraSim Tour (Five Spot)

This section is a (very) quick walkthrough for one of the sample problems included with TOUGH2. The problem specification is not discussed. You can just load the data, run the simulator, and look at the results. When you are ready, start PetraSim and follow the steps below.

Load the eos1_five_spot sample model

  1. On the File menu, click Open

  2. Select c:\Program Files\PetraSim\samples\tough2\eos1_five_spot\five_spot.sim, then click Open

Figure 1.5. Opening the five spot model

Walk Step 1

Enable flux output

  1. On the Analysis menu, click Output Controls...

  2. Click to select Fluxes and Velocities

  3. Click OK

Figure 1.6. Select fluxes and velocities output

Walk Step 2

Run the simulation

To run the simulation: On the Analysis menu, click Run TOUGH2.

The Running TOUGH2 dialog will open and show how the simulation is progressing. The graph displays simulation time steps on the X-axis and the log10 of the time step on the Y-axis. As a rule of thumb, an increasing Y value is a good sign of simulation progress. If your time steps start to become smaller, it may indicate that the simulator is having a difficult time converging.

When the simulation finishes (approx 10 seconds), a message will be displayed and the Cancel button will turn into a Close button. Click the Close button.

Figure 1.7. Time step graph during simulaton

Walk Step 3

View 3D simulation results

To view 3D simulation resuls: On the Results menu, click 3D Results....

Since this example problem is a 2D problem, it might be useful to add a scaling factor to the Z-axis. To scale an axis in the 3D Results:

  1. On the View menu, click Scale...

  2. Ini the Z-Factor box, type 0.01

  3. Click OK

The image below shows contour data for temperature and vectors for heat flow at the end of the simulation. When you are finished looking at the 3D results, close the 3D Results dialog and return to the PetraSim main window.

Figure 1.8. Temperature contours and flow vectors

Walk Step 4

View cell time history data

To open the cell time history view: On the Results menu, click Cell History Plots.

If you ask for additional time history data for some of your cells, they will appear in bold in the cell list. In this example, the injection and production cells were marked for additional output. These cells will have a data point for each time step of the simulation. You can view the time history of the rest of your cells by selecting the Show All option in the View menu.

Figure 1.9. Temperature contours and flow vectors

Walk Step 5

Installation

PetraSim can be obtained at http://www.rockware.com/ by searching for "PetraSim" or at http://www.petrasim.com. To install, follow these instructions.

If running Windows NT, 2000, XP, or Vista, you must install PetraSim with administrator privileges. In addition, both the user and system must have read/write privileges to the installation directory (typically C:/Program Files/PetraSim). This requirement is placed by our licensing software.

From the web:

  • Download the PetraSim setup.exe and save this file to disk.

  • Double click on setup.exe to install.

From CD:

  • Insert the CD in your CD-ROM drive and installation will begin automatically.

  • If setup does not start automatically, click START on the taskbar and then click RUN. Type "D:\setup.exe" where "D:" is the drive letter for your CD-ROM.

30 Day Trial

After installation, you will be automatically registered for a 5 day trial period. To obtain a full 30 day trial version, you will need to obtain a new Site Key. On the Help menu, click Register.... Copy and send the Site Code to or . You will receive a Site Key which you will copy and paste into the Site Key box using the paste icon.

Figure 1.10. Registration dialog

The Register dialog

Purchase of PetraSim

All PetraSim sales are handled by RockWare at http://www.rockware.com/. Our representative is Alison at . Search for "PetraSim" to go to the PetraSim sales page. Pricing for popular options are listed at the bottom of the page. Alison will provide a detailed quote at your request.

Registration

To register the software after purchase, on the Help menu, click Register.... Copy and send the Site Code to . You will receive a Site Key which you will copy and paste into the Site Key box using the paste icon.

Additional TOUGH Documentation

In preparing this manual, we have liberally used descriptions from the user manuals for the TOUGH family of codes. Links to download the TOUGH manuals are given at http://www.petrasim.com. More information about the TOUGH family of codes can be found at: http://www-esd.lbl.gov/TOUGH2/. Printed copies of the user manuals may be obtained from Karsten Pruess at .

Computer Hardware Requirements

PetraSim will run well on any newer computer. At a minimum, the processor should be at least as fast as a 1 GHz Pentium III, with at least 512 MB RAM. A graphics card that supports OpenGL 1.1 or later with 64 MB of graphics memory is recommended.