Wave Equation Simulation

[IMG] Wave Equation Simulation
This demo is an "interactive" program that allows one to explore the behavior of acoustic waves in a two-dimensional variable velocity medium whose density is constant. The user-interface takes some getting used to (i.e. unfrien dly, unfamiliar,etc.) but is easy to use.


Brief Instructions

Command		Element		Action

q		Field		Place grid of receivers

S		Field		Place positive source at cursor
s		Field		Place negative source at cursor

Z		Trace		Increase response to pressure
z		Trace		Decrease response to pressure


Detailed Instructions

gafd2 is invoked as follows:

  % gafd2 -data data_path [-nth n] [-gt graphics_type] [-gi graphics_interval]

The options are as follows:

  -data	data_path
	Specifies the name of a file containing a description of
	the acoustic medium.  A few are shipped with the executable.
	(If there is any interest in creating new ones please contact me.)

  -nth n
	Specifies the number of processors to use in the simulation.
	(Default: 1)

  -gt graphics_type
	Used to specify the algorithms used to generate the graphics.
	The current choices are "cpu_a" and "cpu_b".  "cpu_b" requires
	less computation.  (Default: cpu_a).

  -gi graphics_interval
	Specifies the number of "computational steps" that are to be
	taken between display of graphics on the screen.  A small value
	may make the simulation appear somewhat slow (depending on the
	size of the medium and the number of processors used), whereas
	a large value may make the simulation appear "jerky" rather than
	smooth. (Default: 1)


The user-interface takes some getting used to (i.e. unfriendly, unfamiliar,
etc.) but is easy to use.  All commands consist of a single key stroke.
Many commands read the position of the cursor, so it is important to position
the cursor before typing the command.  The window consists of 4 elements:


                 +-----------------------------+-+
	         |                             | |
	         |                             | |
	         |                             |V|
	         |                             | |
	         |                             |s|
	         |                             |c|
	         |         F i e l d           |r|
	         |                             |o|
	         |                             |l|
	         |                             |l|
	         |                             | |
	         |                             | |
	         +-+---------------------------+-+
	         | |        H scroll           | |
	         +-+---------------------------+-+
	         |                               |
	         |        T r a c e              |
	         |                               |
	         +-------------------------------+

  Field:
	This region displays the acoustic pressure field overlaying the
	scalar velocity field.  Strong positive pressures appear as white
	while strong negative pressures appear as black.  Color in the
	velocity field indicates magnitude as well; low velocities appear
	as blue while high velocities appear as red.

  Trace:
	This region displays an oscilliscope-like reading of the pressure
	measured at selected points of the medium.

  V scroll & H scroll
	If the field window is not large enough to display the entire field
	as a result of zooming or resizing the window, bars appear and
	indicate the position and size of the visible region.

The user interface and the computation run asynchronously, so there may
be occasions when the display does not react immediately to user input.

The commands are as follows:

Command		Element		Action

ESC		Any		Terminate the application
f		Any		Toggle "freeze" mode

c		Field		Center visible region at cursor position
up		Field		Move visible region up
down		Field		Move visible region down
left		Field		Move visible region left
right		Field		Move visible region right

e		Field		"Erase" pressure field

q		Field		Place grid of receivers

R		Field		Place receiver at cursor
insert		Field		Place receiver at cursor
r		Field		Delete receiver under cursor
backspace	Field		Delete receiver under cursor
delete		Field		Delete receiver under cursor

S		Field		Place positive source at cursor
s		Field		Place negative source at cursor

t		Field		Toggle "screen saver" mode

V		Field		Increase brightness of velocity field
v		Field		Decrease brightness of velocity field

Z		Field		Zoom in centering on cursor position
z		Field		Zoom out centering on cursor position


up		Trace		Enlarge trace area
down		Trace		Shrink trace area

Z		Trace		Increase response to pressure
z		Trace		Decrease response to pressure

HighEnd_Demos@sgi.com