Tutorial: Create a Stream file

Level: Basic

Required Knowledge: None

Keywords: Stream

Pipe-It Utilities: Streamz, Strexzel



Together with Integrated Modeling and Optimization, Stream Management is the biggest technology Pipe-It brings to a client. But what is stream management? In fact, what is a Stream? A stream in the context of Pipe-It is any collection of data pertaining to petroleum fluids flowing along a value chain from sources to the market. This collection is usually gathered in terms of quantity of material versus time. Ninety % of the time when working with Stream Management in Pipe-It we will be working with forecast of production from reservoir simulators. Such a collection of data will exist in Pipe-It in terms of stream files. They will typically have the extension .str. So, how does one get a stream file in the first place? They typically are produced by simulator convertors (provided by Pipe-It) that convert an output of a reservoir simulator into the .str format called the stream format. What does a stream format look like? Can we create one from scratch? That is the purpose of this tutorial.

Getting Started

Open the Pipe-It software. Save the Pipe-It project in your preferred directory. Go to the File menu and choose "Save" or "Save As". You could also use the shortcut provided (Ctrl+S or Ctrl+Shift+S) to do this operation.
Note: A shortcut for an operation (if any) can be seen on the menu.

You can start building the project by adding a title or a note in the Canvas to identify and/or give a general description of the Pipe-It project.

Choose the text-box (Annotation) symbol in the Toolbar and place it at the preferred location on the Canvas. Double-click to edit the annotation text and press "OK" when finished. You could also edit the display (Color / Line / Font etc.) by placing the cursor on the text-box, right-click, and choose "Open Item Properties...".

A new Stream file

Create the Stream file

The simplest way to create a stream file uses the Utility built into Pipe-It called Strexzel. Pipe-It can launch any program via its Process element. Pipe-It has a pre-built Strexzel process available on the tool bar. Click it and then move the cursor to the canvas to place it and click again. This is a standalone pre-configured Pipe-it Process designed to launch Strexzel.

Press the run button to launch it. You get the graphical interface (GUI) of Strexzel. It is designed to allow the user to work with stream files in an environment familiar to Excel. Currently there is no stream file loaded so the GUI is empty.

Let us create a few streams. Click the Streams menu item in the Strexzel toolbar and choose to insert streams. Choose to insert 10 streams and set the stream quantities to Volumes. We get 10 stream rows but there are no cells to hold the data for these streams.

We also see a statement in a new window that emerges on the right, this is the Macro window. The macro keeps a track of all GUI actions we perform. Such macros can be saved and played back later.

To hold quantities of streams, Strexzel requires a concept of characterization. This will be covered in a later Characterization tutorial?. For now, just be aware that we need to name the components, for which quantities will be stored. For compositional streams we may have components corresponding to pure hydrocarbons like methane, ethane, etc... For volumetric quantities, we add two components called SO for surface oil and SG for surface gas. These are specified by the Components menu item that you access in the Strexzel toolbar. There is no meaning to the molecular weight of a volumetric stream, it is more relevant when specifying molar components, so we leave the MW default.

We get a column of cells pale green in colour. Similarly we can add the SG Component.

Note: The quantities in Stream files can be one of four types, moles, mass, volumes or amounts and are generic in nature. This means the user has to keep track of the actual variants of the quantity. In this example the volume of surface oil may be in barrels or meter cube. Similarly the surface gas may be in thousand standard cubic feet or SCF or cubic meters. This is not tracked by Pipe-It in stream operations but the user has to take responsibility of this. This will allow all variations of quantity units to exist in the same project, or indeed the same file. This is a small price to be paid for this flexibility. However the same component will have the same quantity for all the streams in a stream file.

Populate the Stream file

Let us now populate the cells with data. This can be done individually cell by cell or can be pasted from Excel. In this example, we'll type in some data.

Now we can save this stream file. Give the file a name, we'll call it 1stStream.str.

Access the Stream file

As you know any pre-existing file can be dragged onto the canvas as a resource. We can do this easily by right-clicking the canvas and selecting “Show Project in Explorer…”.

We can merely drag our stream file on the canvas to get this resource. You can double-click the stream file resource. This action will open the file in the Strexzel GUI. We see the exact same data.

Another way to see the content of a stream file is to right-click the resource and say “Open in Editor”.

Pressing F4 does the same thing. Doing so opens the file in a Text editor (e.g. Notepad).

We see more information when we do this. We see that this is a valid Stream file of version 1 from the keyword STREAMZ 1 at the top. We see that an un-named characterization is associated with it. We also see that the DATA is visible in columns but they are not aligned to the column headings. This is because this file is tab-delimited and aligns perfectly in programs that expect such data e.g. Strexzel and Excel. We can achieve the same in a Text Editor by specifying a tab spacing larger than the width of the heading. Unfortunately this is not possible in Notepad, which is one reason to use an advanced editor with Pipe-it.

To open this resource in Excel let us locate this in Explorer first by right-clicking and saying “Show Resource in Explorer”. Then we can right click the file and choose to open in Excel. The data lines up perfectly. Stream files are designed to be compatible with Excel and can be easily dragged into or opened by Excel without any need for converting data into columns.

Add data to the Stream file

Open the stream file again in Strexzel by double-clicking on it. Additional data can be added to stream files. They would typically not be flowing quantities but rather attributes to those quantities that further qualify the stream. For example, we might want to add time information to the streams. Such attributes are called variables in Pipe-It streams management terms and can be added by the Variable menu item in the Strexzel toolbar. Let us insert a variable called Year. This will be of the type time. If we choose a special type then we need to associate a unit to it too. Let us choose year.

A column of Year with unit is added before the quantity columns. This column is uncoloured. By default Strexzel colours the components and variables differently and always stores the variables before the components. Let us populate the Year column.

Let us add another variable where we might want to track the Gas-Oil Ratio (GOR) of the stream. This will be of type real and not require a unit. We can specify the location of the GOR column. Let us choose End.

We can key in some numbers or set a formula. Strexzel allows us to perform calculations that apply to all the entries in any column. Let us specify the formula as SG/SO in the dedicated zone.

The proper values are populated. We can now save the stream file.

We can open this file in a text editor again. We see two additional data called Variables defined at the top with their types. The values of the variables are located in the corresponding columns. Since this is a text file, formulas are not stored in it. Formulas can be stored in and used from macro files but that requires another tutorial on Strexzel.

Assign a characterization to the Stream file

SO and SG are the two components that define the characterization of the stream file. We can give this characterization a name. Open the stream file in Strexzel again and Select File/Name? Characterization. Enter the name (e.g. Black Oil?) and save the stream file.

Now opening the file in an Editor will show the characterization name as what was specified.


We completed the creation of a stream file from scratch. At a minimum, a stream file needs one component and one stream to hold the data for the quantity of that component. Additional components and streams can be added. Additionally, variables can be added to store attributes for the streams such as time information, labels, well names, etc. Finally the set of components can be given a name and the named characterization can be specified in the stream file.

Copyright © 2008-2013 Petrostreamz