June 20, 2019

Oil Sands Water Distribution Model

Posted by Jason Lillywhite

Some years ago, I helped an oil company build a GoldSim model that simulates water distribution for an in-situ bitumen extraction facility. It was a good application for GoldSim because of its dynamic nature and also the feedback loops inherent in the flow streams used to distribute water in the process.

This blog post summarizes the model and lists some possible future avenues for further modeling with GoldSim.
The model started out in MS Excel, which was working for planning purposes and estimating rough numbers but as soon as they needed to determine specific flow volumes under various conditions, it quickly became unwieldy so they called for some help with converting it to GoldSim and incorporating more realistic logic more specific to their application. I have since wanted to generalize this model for public distribution so that others could make use of it and perhaps borrow ideas for future projects.

Flow Network

At the most basic level, this model consists of Splitters, Sums, and PreviousValue elements that are used to split flows by fractions, combine flows at junctions, and recirculate flows using previous values, which prevent recursive loops in GoldSim. The image below is a screen capture of this part of the model, which shows a schematic of the basic flow distribution from the oil extraction and water separation all the way through to the treatment and injection of steam created from the water that was extracted and separated.
Oil Sands Process Water Distribution System in GoldSim
The calculations start at the element called "Steam_Distribution" that is a function of a desired oil production rate. From this value, a steam to oil ratio is used to determine the amount of steam to inject. Of this, some is lost to condensation and the remainder injected into the ground where it can then free up bitumen and be pumped back to the surface along with the condensed water as a mixture. There are some gains and losses of water during this underground process, which is defined using a "net loss" factor on the "Reservoir" Splitter element. From here, the mixture undergoes a separation process where some water is lost. We are tracking only water here so the oil part is ignored and the amount of water that remains with the separated oil is considered a loss from the system.

A freshwater source is used to offset net losses in the system as the cycle is completed to the point of injecting steam back into the ground. The amount of freshwater makeup is calculated implicitly by repeating all the calculations until the desired amount of steam is achieved at the element called High_Press_Steam. The next steps in the flow process undergo softening, combine the blowdown recycle stream, and finally make its way to the boiler feedwater (BFW) tank. The amount of incoming recycle flows is highly contaminated, so the recycle flow rate must be carefully controlled to maintain water quality that is acceptable for the steam generation process. 

Water flows from the BFW to the steam separator, where additional losses occur due to condensation and steam flash. The steam flash is recirculated to the stream just upstream of the BFW tank. The steam flash is assumed to be free of contamination so this does provide some dilution. Note the element is a previous value since this is a feedback look on the process and would otherwise cause a recursive loop.

When the water is heated in the boiler, the remaining water is left with all of the contaminants in what is called "blowdown". The high-concentrated blowdown is put into a recycle stream where a portion of this is disposed and the rest is sent back into the BFW stream. The proportions of recycle and disposal is very important as it significantly impacts the water quality of the water that is again treated. Because of this, the proportion must be controlled carefully to ensure just the right amount of contamination remains in the stream. 

Solving for Freshwater Makeup

The flow network described above resides inside a "Looping Container". A looping container is used in GoldSim to solve for the correct amount of freshwater makeup needed to maintain the required amount of steam needed for the oil sands process. In the looping container, all elements within a container will repeat until a condition is met or while a condition is true. Below, you can see the condition expression used for this container.

The flow network will re-calculate until the following condition is met:

~Required_Steam - High_Press_Steam < 0.01 l/s and ~LoopCount > 5

The required steam is a user-defined input and the term "High_Pressure_Steam" is the flow calculated in the flow network. Looping will continue until these two values are close to the same (within 0.01 L/s). As each loop progresses, the freshwater makeup flow is increased by a small increment using the following equation:

Freshwater_Makeup = (~LoopCount - 1) * 0.01 l/s

On the first iteration, the term "LoopCount" is 1. Using the above equation, the freshwater makeup is zero. On following iterations (loops) of the flow network container, the freshwater makeup is incremented by 0.01 l/s. This continues until enough freshwater is added to provide the correct steam that meets the requirement.

Contaminant Transport

GoldSim's Contaminant Transport (CT) module is used to quantify and keep track of contaminants in the system. For this simple model, only TDS is tracked but we could easily add many more species to the list of contaminants to track. Once the freshwater makeup flow has been calculated, TDS concentrations are calculated using GoldSim's CT cell pathways using the water flows calculated in the flow network. Each cell represents of node of the system where mixing is instantaneous and complete. These nodes only link contaminated flow paths and steam flows are ignored because it is assumed that there is no contamination in those steams. Below is a screen capture of the contaminant transport network of the model.
Contaminant Transport in the Water Distribution System

The boundary conditions for this model are the assumed concentrations at the inflows: Reservoir_Source and Freshwater_Source. From this point, GoldSim calculates the concentration of TDS in other cells based on the amount of contaminated water that flows in and out along with clean steam/water that is removed and/or recycled back in. These calculations can also be accomplished with simple expression elements using a mass balance approach but the CT module provides the additional capability of including a list of contaminants in the future without further complicating the model. 

Optimizing Blowdown Recycle

The concentration at the BFW tank is compared to a user-defined maximum limit based on what the steam separator requires for optimum operation. In the case of this model, TDS must be <= 8000 mg/L. To maintain this concentration (a value at or just below 8000), we use optimization to best determine the fraction of blowdown recycle. If you decrease blowdown recycle too much, then TDS drops below 8000 mg/L and you end up using too much freshwater makeup. If you increase the blowdown recycle too much, then the concentration of TDS will rise above 8000 mg/L and compromise the steam separation process. In order to maintain the correct amount, GoldSim automatically optimizes the concentration very near the limit by fine tuning the recycle fraction for us. This is done using an "Optimization submodel". Below is a screen capture showing how the optimization is set up.

The key to the optimization process is to establish an objective function. In our case, it is the difference between the water quality limit at the BFW (8000 mg/L) and the calculated concentration in the flow stream. The equation is shown below:

WQ_Diff = abs(~Max_C_OTSG - BFW_CT.Concentration_in_Water[TDS])


Max_C_OTSG = Maximum limit on TDS concentration at the OTSG (Once Through Steam Generator)


BFW_CT.Concentration_in_Water[TDS] = the calculated concentration in that stream

The optimization also requires that the following condition is met:
~Max_C_OTSG >= BFW_CT.Concentration_in_Water[TDS]

Meaning that whatever the optimizer picks for a recycle fraction, it must not result in concentrations that exceed the limit.

Finally, the optimization variables must be chosen along with a range of possible values picked during the optimization process. In our case, it is the "Blowdown_Recycle" fraction, which ranges from 0-100%. A value of 100% would cause 100% of the blowdown to be recycled. The remaining blowdown is treated and disposed of.

Intuitive User Interface

A GoldSim Dashboard is used to display the flows and concentrations at all points in the process along with indicators of meeting water quantities and water quality objectives. 
User Interface
This model is set up for a static run but can easily be modified to run for a duration of time set by the user if any of the model inputs are to change over time. Alternatively, you could run scenarios that use different inputs to visualize the changes in the model. This model is useful in demonstrating how water might be distributed in a typical in-situ oil sands process but also demonstrates GoldSim's utility for simulating process flows for a wide array of applications. I highly recommend that you take a look at the model and play with some of the inputs. You can get a copy of the model from our library: https://support.goldsim.com/hc/en-us/articles/360025002354

Let me know if you have any questions or comments about it.

No comments:

Post a Comment