As a powerful out of the box post-processor, Kraken’s ability to easily manipulate your reservoir data and quickly present the data that is important to you is where the huge increase in the value can be found. These manipulations can range from complex equation calculations based on data, report generation and automation of multiple data sets, to name a few!

The example below includes a short script to display the five highest producing wells and their associated maximum oil production rate in the considered field. This is very useful to quickly identify pieces of data that you consider important to your company’s investigation of reservoir data. It should also be noted that, with minimal editing, this scrip could identify wells that are under producing or target other pieces of important data in a similar way. This will save the time of manually sifting through the data, identifying a maximum, recording it and repeating this task for every well of interest. With one script and one click this task is completed.


Name for generated for macro: Highest Oil Production Rate

Commands Description for Macro:
    Print the five wells with the highest oil production rate
    @see: View -> Log for the printed result
# Obtain the current model
model = api.GetModel()

# A collection with the max rates for each well
# max(OPR) -> well name
max_well_rates = {}

# Loop over the simulation wells
for well_name in model.GetWellNames():
    # Get well Oil Production Rate
        opr = model.GetElementCurve(well_name, 'OPR')
        # In case the well has no such curve
        # Set the unit
        opr.unit = 'm3/d'
        # Compute the maximum
        max_opr = max(opr.y)
        # Update the collection
        max_well_rates[max_opr] = well_name

# Print to the Log window, the sorted result
for rate, well_name in sorted(max_well_rates.iteritems(), reverse=True):
    print '%20s  = %.2f m3/d' % (well_name, rate)

Example Output:

Starting macro playback: ‘’

HERCILIO = 1733.34 m3/d

ESSS = 896.11 m3/d

JOACA = 642.37 m3/d

LAGOINHA = 585.54 m3/d

PANTANO = 0.00 m3/d

Finished macro playback

Kraken interface displaying executed script:

Kraken Interface


Plot representation of data the script is analyzing to determine output:

Kraken Plot