Duckumentation for Seismic Duck 2.0

A Game of Reflection Seismology

Copyright © 1996-2010 Arch D. Robison

Last Revision: April 9, 2010

Contents


System Requirements

Seismic Duck should run on most PCs built after 2003. The requirements are: Seismic Duck 2.0 has been tested on:

An earlier version "Seismic Duck 1.6" for MacOS 7.1 and 8.0 exists in repositories of old Mac software.


Getting Started

There is no installer. Just unpack the contents of the .zip file to any directory. If you move SeismicDuck.exe somewhere else, you must move tbb.dll with it to the same directory.

Seismic Duck is a full-screen game, so it is best to read the instructions first before starting it. However, if instructions bore you, do the following:

  1. Double click the file SeismicDuck.exe. Its icon looks like .
  2. Press the space bar and watch what happens.
Read on to understand what happened.

Preface

The goals of Seismic Duck are to demonstrate some physics and be an interesting game. These goals require balance. One extreme is accurate physics, which typically happens at time and distance scales too small or large to be interesting. At the other extreme, most games employ cartoon physics suitable only for Wiley Coyote. Seismic Duck tries to be qualitatively accurate, but quantitatively interesting. Thus time and space scales are distorted: Nonetheless, many of the qualitative aspects are accurate, at least as much as a 2-dimensional finite-difference simulation allows. Waves propagate, interfere, spread, and reflect as they should.

Where Oil Hides

The game of Seismic Duck involves applying geophysics to find oil. This section explains where oil hides, and the next section explains how to find it. For an oil reservoir to form, there must be porous rock to store the oil and cap rock to stop the oil migrating further upwards. This arrangement is called a trap. A classic trap is shown below:

An upward curve like this is called an anticline. A downward curve is called a syncline.

Hydrocarbons (gas, oil, asphalt, coal) come from natural chemical transformation of old dead plants buried in rock. Over a long time, gas and oil migrate upwards through porous rock until they reach a layer of non-porous cap rock. They collect at a high point. Below is a diagram showing gas, oil, and water trapped under a cap rock. Gas is at the top because it least dense. Water is at the bottom because it is most dense. The program uses similar color coding.

Another common structural trap for gas and oil is where the porous rock is terminated by a fault. Traps in the current version of Seismic Duck are always anticlines.

It should be understood that despite the fact that oil reservoirs are also called pools, the reservoir is not like a pool of water, but mostly rock. You should think of it as a dirty hard sponge. Applying great pressure to the sponge causes some of the gas and oil to flow out. The weight of the overlying rock provides most of the pressure necessary to extract oil. Sometimes the pressure is so great that the oil flow out by itself. In extreme cases its blows out of the well. Though wells always have spectacular blowouts in the movies, modern drilling goes to great pains to avoid blowouts.

Asphalt and coal do not flow. You must dig for those.

How To Find Oil

Some anticlines show as bulges at the surface. Such obvious traps were drained in the early days of the oil industry. To find oil these days, geophysicists look miles underground by sending sound waves into the ground. Waves partially reflect from underground boundaries, and thus provide information about subsurface structures.

More precisely, reflection occurs when the acoustical impedance changes. The acoustical impedance of a rock is the density of the rock multiplied by the velocity of sound in the rock. For example, cap rock and porous rock have difference acoustical impedances. The boundary between the cap rock and porous rock partially reflects incident sound waves. Thus the depth of an underground structure can be found by creating a sound at the surface, and timing how long it takes to receive a reflection. The time it takes for the sound to reach the boundary and come back is called the (two-way) travel time. The depth of a boundary can be estimated from the travel time and velocity of sound in the rock. For instance, if the speed of sound is 3 km/sec in the rock and takes 4 seconds to make it from the surface to the boundary and back, then the boundary must be 6 km deep.

In reality there are multiple reflection paths and varying rock velocities to consider. In modern oil exploration, high-performance computers compute the subsurface structure from the reflected waves. But in the old days, there were no computers and geologists examined raw seismic data. Seismic Duck brings back these old days, and makes you an old-fashioned prospector for oil.

If all this sounds too difficult, do not despair. Though careful quantitative calculations are necessary in practice, you will not need them in Seismic Duck. The key in Seismic Duck will be interpreting patterns in seismograms (recordings of waves). Even a bright preschooler can learn to play it with some coaching on what patterns are important.


Running Seismic Duck

To start the program, double click the file SeismicDuck.exe, or its icon . The program brings up a display that looks like this:

The screen has three major portions: In the middle there is a duck and an oil rig. The rest of this section explains the various keys, menus, and sliders that control the program.

Popup Panels

The top of the instrument panel has four green buttons labeled File, Help, Model, and View. These bring up menus. Some menu choices pop up additional panels. Some panels have sliders that you can drag to change values. To hide a popup panel, press the Enter key. Some panels have a pink screw or green button that can be clicked on hide it.

Keyboard

Below is a diagram of the keys that control motion of the duck and drilling platform.

Auto Gain, Subsurface view, and Pause: These keys toggle features shown in the table below. The view toggles are inactive in game mode.

Key Toggles
a Auto gain on seismogram
g Geology view
r Reservoir view
s Seismic view
p Pause
Drill Control: The cursor keys control the drill location. The drill moves up or down. The drill platform moves left or right. The platform cannot be moved if the drill is lowered. In game mode, drilling into fresh rock costs money. Too many dry wells will bankrupt you.

Duck Control: These keys cause the duck to act.

Key Duck Action
Z Move left
X Move right
space Clap feet
Seismic Duck gets its name from its talented duck. It initiates a seismic wave by clapping its feet. Each initiation is called a shot. In real life, shots are taken with explosives on land or airguns in water. After each clap, the duck takes time to regain its senses. When not in game mode, you can also take a shot anywhere underground. Move the cursor to the shot position and click the mouse button. This is handy for studying various wave effects.

File Menu

The File menu lets you start a game and start surveying new areas. You may survey and extract oil from as many areas as you want during a game. You may also end a game early before the clock runs out.

View Menu

The View menu lets you turn each view on or off separately, and lets you control how data is displayed in colors. When playing the game, all three views are turned off, as the point of the game is to deduce the view from seismic data. Below is a summary of the three views and related adjustments.

Geology: Shows the underground layers of rock, and (if present) ocean above the rock.

Reservoir: Shows the contents of the reservoir. The color code is red/green/blue for gas/oil/water as in the earlier picture, and black for empty. The colors get dimmer as you drain the reservoir.

Seismic: Shows seismic pressure waves. These are the waves created when the duck creates a shot by shooting its air gun. The pressure shown is relative to the static pressure within the rock.

Color: Brings up sliders that control how data is displayed.

The default Linear scale is uniform. The Arcsinh scale makes small amplitudes more visible. Both these scales clip values that do not fit. The Sign Only scale shows only the sign of the value. Surprisingly, you can usually deduce the underground structure by knowing the sign only. In real life, computers can often construct a quite accurate image of underground structure from sign-only seismic data.

Speed: Brings up sliders that control speeds. The Frame Rate Limit slider sets a limit on frames per second. The default limit is the frame rate of your monitor. The limit can be lowered to 0.5, which causes the program to update the frame every two monitor frames, or raised to unlimited. Your computer may not actually reach the limit. Press the F key to toggle display of the actual frame rate. It takes about a second for the frame rate display to settle. The Wave Speed slider controls how far waves move per frame.

Model Menu

The Model menu lets you change the parameters of the simulation.

Auto Gain Control: When automatic gain control is disabled, the seismogram gain is fixed at 1 and the signal is recorded as received. When enabled, the seismogram gain is amplified (or attenuated) to make the recorded root-mean-squawk constant. The gain is limited to 16x. The advantage of automatic gain control is that it lets you see weak reflections. The disadvantage is that it introduces artifacts. Most noticeably, automatic gain control causes the initial signal from a shot to not look triangular, because the gain is rapidly changing. Therefore, I recommend that you keep it off until you have mastered the basics.

Geology: The geology sliders let you change various parameters of the geological model. The water popup lets you do offshore exploration. Adding water makes it much more challenging, because there is a strong reflection off the water bottom. Notice that waves travel much more slowly in the water than in the cap rock. The dip popup selects how steep the anticlines are. The folding popup selects the complexity of the anticlines. Simple folding creates a single anticline. Moderate folding creates up to three anticlines. Complex folding creates up to five anticlines. No folding results in no anticlines, and hence nowhere for hydrocarbons to collect!

Shot: The shot sliders let you change the characteristics of the "shot" that creates the waves. The duck generates shots by clapping is feet, and is not only talented, but a bit musical minded.

More about the signature is said in the next section. In real life, buried explosives are usually used to create shots on land, and air guns on water. An air gun going off sounds like a low-pitched loud thump.

Exploration Geophysics

The best way to learn about exploration seismology is to experiment with the geology and seismic views enabled. Try taking shooting the air gun at various locations and see how the waves bounce off structures. Observe how waves reflect and interfere, and how underground structure affects the recorded seismogram. Below are some basic principles in geophysics.

P waves vs. S waves: There are really two major kinds of seismic waves: pressure waves (P) and shear waves (S). Pressure waves are also called acoustic waves. Oddly enough, the P and S symbols do not stand for Pressure and Shear, but Primary (P) and Secondary (S), but because pressure waves are inherently faster than shear waves and arrive at the receiver first. Shear waves never travel through liquid because liquids do not shear. (But there is an aquatic bird called a Shearwater. Go figure!) That's how physicists know that parts of the inner earth are liquid -- P waves go through and S waves do not. There are also other kinds of waves peculiar to the surface or boundaries. For instance, the damaging waves from an earthquake are a special form of wave (called ground roll) that travels only the surface of the earth. Because they are limited to the surface, their intensity falls of much more slowly than P or S waves do. Seismic Duck does not model shear waves and ground roll for sake of simplicity and speed. The other kinds of waves travel at different speeds, and if simulated, would greatly slow down the animation and make the seismograms much harder to interpret.

Phase of Reflection: A reflection can have the same or opposite phase as the incident wave. The phase of a reflection depends upon whether the acoustical impedance goes up or down when a boundary is crossed. Taking note of the reflection phase can yield a valuable hint about whether a reflection is from the top or the bottom of the sandstone. The reflection from the top of the sandstone has the opposite phase; the reflection from the bottom of the sandstone has same phase. To see this:

Then shoot the air gun and observe the reflections. Turning on automatic gain control from the Model menu may help you compare the reflections, because it amplifies the weaker ones from the bottom of the sandstone that have to travel farther. Reversal of phase shows up as a change in the order of colors. For instance, if the incident wave has blue (positive pressure) traveling in front of red (negative pressure), a reflected wave with reversed phase will have red traveling in front of blue.

Free Surface Boundary Condition: The top boundary is treated as a ``free surface boundary condition'', which means that there is no resistance to motion at the boundary. No resistance means no pressure, and this requires it reflect a wave with opposite phase so that the reflection cancel the incident wave. Use the mouse to shoot the air gun about an inch below the surface. Examine the reflection and you will see that it indeed has opposite phase.

Slope of Seismogram: The initial seismogram for a shot looks like a cone. The slope of the sides relates to the wave velocity. The slower the medium, the steeper the sides of the cone, as shown below:

Both images were taken after same time interval after a shot.

First Break: The fastest path between two points is not always a straight line. Sometimes it is faster to take a detour to get on an expressway. Below is a diagram showing how this can happen for sound waves coming from shot point S.

Both paths take the same time. The detour goes further in that time because sound travels must faster in the shale than water.

This phenomenon is called the first break on a seismogram, where the slope of the outer “cone” becomes less steep. To see the first break effect, set the water depth to shallow and folding to none. Set the air gun frequency to low and shoot the air gun. Watch as the part of the wave in the rock overtakes that in the water. When that overtaking part of the wave reaches the surface, the first break shows up on the seismogram as a change in the slope of the outer edge of the seismogram. On real seismograms, there can be second breaks, third breaks, etc. The position of breaks is one way to determine the depth of a boundary. Below is a snapshot with the leading edge of the seismogram and first break marked.

Head Wave: Corresponding to the first break in the example above is another kind of wave water with a strange property -- it moves through the slower medium (water) at the velocity of the faster medium! This kind of wave occurs at a boundary, and is called a head wave. In the Seismic Duck water and rock model, head waves are fairly weak. To see them, it may help to set the color mapping to Arcsinh or Sign only.

Waveguide: A slow layer of rock between two fast layers of rock can trap waves and guide them along the layer. This is the same sort of waveguide effect that guides light through fiber optics. To see the effect, turn off the Reservoir view and turn on the Geology and Seismic Views. Use the mouse to shoot the air gun inside the sandstone, near the left edge. If you shoot too close to the left edge, the damping will quash the shot, so be sure to shoot at least a centimeter in from the left edge. Immediately after the shot, much of the wave will escape the guide, because it struck the boundaries at too steep an angle to be reflected back into the waveguide. These escaped waves will race ahead. However, after a while you will see some ``blips'' that travel trapped inside the sandstone layer. These blips are waves being guided by the sandstone layer. If the layer makes a sharp turn, you will see some of the wave escape the waveguide.

Shot Signature: The signature of a shot is the shape of its pulse in time. One of the shot sliders lets you choose one of four signatures shown below.

Name Equation Graph
Rectangular
1 if |t|<1
0 otherwise
Gaussian e-t2
te-t2
Ricker (1-t2)e-t2
The equations in the table omit scaling coefficients.

You will see that the waves caused by the Gaussian signature looks more like the Ricker wavelet. This is because after being pushed by the shot, the rock snaps back the other way. This is called ringing. Similarly, the waves caused by the Ricker and Zero Phase signatures all have extra bumps from ringing. The Rectangular signature is not normally used, because it is not bandlimited and severe aliasing occurs. Aliasing also occurs with the other signatures if the frequency is set too high. Aliasing is explained in the next section (Exaggerations, Approximations, and Artifacts).

Band Limited: You may be wondering about the choice of signatures. Why these signatures? The reason is that except for the rectangular pulse, these signatures are almost finite in time but exponentially bandlimited, meaning their frequency content falls off exponentially with increasing frequency. That is, if played on an audio system most of the sound would come from the woofers, not the tweeters. Signatures such as the rectangular pulse, which is not bandlimited, cause problems. Try the rectangular pulse and see what happens. Ducks band-limited too — one to each foot.

Hyperbolic Moveout: The reflection from a flat horizontal reflector shows up on the seismogram as a hyperbola. The reason is that as the receiver point moves out away from the shot point, the waves have to travel a longer path. The deeper the reflector, the more the hyperbola is flattened out. Thus one way to estimate the depth of a reflector is to observe the flatness of its recorded hyperbola. To see this effect, use the Geology sliders to set the water depth to shallow and the folding to none. Then shoot the air gun at the surface and examine the resulting hyperbolas on the seismogram. The hyperbola for the reflection from the water will have sharper curvature than the hyperbolas for reflections from the deeper boundaries.

Cable Feathering: In real oil exploration over water, a boat pulls a long cable behind it. Along the cable are receivers that pick up the seismic signal. Ideally, the cable becomes straight as it is pulled and the receivers line up. However, water currents can push the receivers out of alignment. This is called cable feathering. Ducks are experts on cable feathering.

Coning: As oil is extracted, the gas above and water below may form cones that intrude into the layer of oil. This is a nuisance in real oil wells too.

Edwin Drake: First person to drill for oil (1861). He did not use any seismic methods. Ducks are proud of famous Drakes.

Ultrasound: A common method of imaging fetuses in the womb is ultrasound. The physics of ultrasound are essentially the same as for seismic imaging. The difference is one of scale: kilometers vs. centimeters. The resolution of the reconstructed image is limited by the wavelength, which is inverse to frequency. Thus ultrasound uses much higher frequencies than seismic imaging.


Playing the Game

To start the game, pull down the File menu and select Begin Game. In the game, all major underground views are hidden. All you see underground is where you drill.

The goal is to get through as many levels as possible. You start each level with 100 units of cash. Time costs money. You must double your cash to reach the next level. The game ends when you run out of cash.

You may survey and drill more than one area per level. However, you score cash only for oil and gas being pumped from the current area. Doubling your money on a level causes the subsurface to be revealed. Click on to start the next level. The Enter key can be used as a shortcut for clicking.

Your current level and cash are shown on gauges that look like the gauges on an old-fashioned gasoline pump. Old-fashioned means the kind that did not read your credit card. Really old fashioned would be the kind that showed you the actual gasoline in a big glass graduated cylinder!

Gas vs. Oil: In the game, the total dollar value of all gas and oil is the same in all geological models, and oil is worth four times as much as gas. In real life, gas is not worth drilling for unless there is also oil. Even the industry's standard symbols for wells shown below imply this fact -- the symbol for a gas well looks almost like the symbol for a dry well!

Costs: Shots are free. Drilling through rock costs money. This is a slight exaggeration, but emphasizes the point that seismic data is relatively cheap compared to drilling. Your initial bankroll is enough to drill all the way to the bottom of the screen twice.

Where to drill: Since gas usually collects at the center of an anticline structure and is worth less than the surrounding oil, it usually pays to aim for oil by drilling off to the side of the structure. Practice interpreting the seismogram with the reservoir view turned on before tackling the game. Study how the top of the seismogram hyperbolas and bright spots correlate to underground structure.

Stratigraphic Information: Drilling a dry well is not a complete loss, because you can see the layers drilled into. Thus drilling gives you information about the depth of layers (strata) at the drill site, just as in real life.

Culture: Some levels have a Thin Glass Inc. factory. It sits on a red line. The duck cannot take shots on the red line, for fear of breaking glass.

Such hazards are called "culture" in exploration seismology, and include structures such as buildings, bridges, and railroad tracks. You can still drill anywhere.

Exaggerations, Approximations, and Artifacts

As mentioned in the preface, Seismic Duck exaggerates certain quantities for sake of visual interest. Furthermore, certain approximations are used that result in artifacts that are not real physics. Many of these approximations show up in real numerical simulations too, so they are worth understanding. Interestingly enough, artifacts also show up in the pictures that computers generate from seismic data. In unlucky instances, the artifacts look like real structures and companies drill for them!

Aliasing and Numerical Anisotropy: Seismic Duck solves the wave equations using a finite grid to approximate a continuous medium. If the wavelengths are too short relative to the grid spacing, the simulation becomes inaccurate. Furthermore, the grid is rectangular, which breaks circular isotropy. To see both artifacts, use the Shot sliders to select a high frequency Gaussian pulse. Use the mouse to shoot in the middle of the shale. See how the wave degenerates into a bunch of blinking dots (which is the aliasing problem), and how some of the wavefronts that should be circular look like overstuffed square pillows instead (the anisotropy problem).

Anticline: The anticline structures in Seismic Duck have grossly exaggerated vertical scale in order to make their affect on reflections visually obvious. They are also greatly simplified by having a single porous layer. Real structures are flatter and usually contain many alternating layers of porous and non-porous rock, which makes for many reflections in real life. Oil companies use high-speed computers to convert all those reflections into pictures of the layers.

Auto Gain Control: An artifact of automatic gain control is that the initial seismogram does not have a simple triangular form, but rather looks like it is wearing an arrowhead as a hat. The reason is that the initial portion of the air gun pulse is a weak signal, which causes the gain to be raised to its upper limit. When the air gun pulse reaches maximum strength, the gain becomes quite low. This rapid change in gain is why the initial seismogram does not look triangular. You can see this rapid change by watching the gain meter during a shot.

Damping: Real waves propagate over the entire earth. Seismic Duck models a finite area, so approximations must be used at the boundaries to fake a larger world beyond. The approximation used is a Uniaxial Perfectly Matched Layer (UPML). Though UPML is very good as suppressing reflections from the boundaries, a little bit of artificial reflection does occur, notably from corners. If you look closely with automatic gain control turned on, you can sometimes detect the corner reflections.

Ducks: Real collection of seismic data over water involves boats, not ducks. Receivers (geophones) record the seismic data and are attached to long cables that the boats pull behind them.

Full Traps: At best, seismic data reveals structures, but not oil. In Seismic Duck, the structures always have oil. In real life, you have to drill to find out if there is gas, oil, or water only. Read Yergin's The Prize for an account of Mukluk, a place in the Artic Ocean where $2 billion was spent drilling into a structure that turned out to have only salt water.

Interpolation: Seismic Duck solves the wave equation on a grid with two-pixel spacing between grid points, both horizontally and vertically. There are 4x as many pixels as grid points, thus most of the pixels are interpolated from neighboring grid points. The artifact of this approximation is that some zero-crossing boundaries of waves take on a stair-step appearance.

Poisson Solver: The reservoir model uses a crude Poisson solver that presumes that water and oil are compressible gases. This approximation seems to be good enough and fast enough for game purposes. IMplicit Pressure Explicit Saturation (IMPES) models are typically used in production reservoir models. I have not investigated yet whether doing IMPES at video frame rates is practical on current personal computers.

Spreading: In the real three dimensional world, wave energy falls off inverse-square with distance traveled from a point source. This is because energy emitted by a point source in three dimensions becomes an expanding spherical shell. The Seismic Duck world is two dimensional, so wave energy falls off inversely to distance traveled.

Hypersonic Duck: The duck can waddle or swim faster than the waves. Considering that sound travels about 6 times faster in rock than air, this means the duck exceeds Mach 6!

Velocity and Density: For ocean water and shale, Seismic Duck uses approximately correct values for the velocity of sound and density. Seismic Duck uses fictitious values for sandstone so that reflections will be visually obvious. The table below shows the values for Seismic Duck and the real world.

Seismic DuckReal World
velocity
(km/s)
density
(g/cm3)
velocity
(km/s)
density
(g/cm3)
water 1.5 1.0 1.4-1.5 1.025-1.028
sandstone 2.1 1.4 2.3-2.7 2.0-2.6
shale 3.0 2.0 1.8-4.8 2.0-2.7

About the Programming

Mathematics: Seismic Duck uses the staggered-grid "leap frog" finite difference time domain method, inspired by Virieux's paper. Absorbing waves at the boundaries is done with uniaxial perfectly matched layers.

Code: The code is C++ with some IA-32 SSE intrinsics. It harnesses multi-core processors via Intel* Threading Building Blocks (Intel* TBB), using classic space-time trapezoidal iteration spaces that are tiled to minimize memory bandwidth. [Disclosure: I'm the architect for Intel* TBB. This game is my own hobby and is not connected to my employer.]

Known Idiosyncrasies:

To Reach The Author

The author welcomes comments, and can be reached at:

Acknowledgements

Scott Morton advised me on the necessity of band-limiting the shot. Former employment at Shell's Bellaire Research Center (Houston) taught me everything I know about geophysics. Yuri V. Ganshin pointed out some errors in version 1.4. Steven Johnson's notes taught me what I needed to know about perfectly matched layers. Any geophysics errors are my own.

Thanks to Microsoft for their Microsoft Visual Studio 2008 Express Edition. The GNU Image Manipulation Program (GIMP) has been essential for creating the images in the game and this document.


Legal

Distribution: Seismic Duck 2.0 is freeware. This software may be freely distributed as long as it is not modified and this file "Seismic Duck 1.6 READ ME" accompanies it.

Disclaimer: No warrantee expressed or implied. Use this software at your own risk.

All versions of Seismic Duck use finite-difference equations that do not duplicate the real world, but merely approximate it with arbitrarily large error, including but not limited to aliasing, numerical anisotropy, and numerical dispersion. Seismic Duck does not model shear waves, 3D or non-linear effects. Seismic Duck is not suitable for serious oil exploration.


References