ray2mesh, a software toolkit for geophysics

Ray2mesh provides a set of libraries each, dedicated at some specific geophysics computational task. Each library is shipped in a package that contains the library itself with its API, plus an application program. The packages can be seen as building blocks. The figure below shows the various packages (libraries) as a layer model: packages provide an API, used by the other packages. In the schema below, dependencies between the currently available packages must be read top-down (e.g., raydescartes depends on IASP and raycode).

IASP raycode mesh
raydescartes
ray2mesh

Note that new packages may be plugged in instead. For instance, other models could be used instead of IASP as far as it conforms to the API.

Feel free to send comments and feed-back if you use/try these programs.
The source code is distributed under the GNU Public License (GPL) and can be freely downloaded here.

You will find on this site the following sections :

  1. General documentation: overview of what each package does (text below),
  2. Technical documentation: auto-generated documentation from source with doxygen
  3. Download : download area (sources)
  4. Installation : installation instructions

These programs are parts of the TAG project (Transformations and Adaptations for the Grid).

 
 

> seismic ray-code parser (libraycode)

raycode library is a seismic ray-code parser which follows the IASPEI standard seismic phase nomenclature (draft from Hanoi, August 23, 2001).
This C library use Lex and Yacc to analyse the seismic ray-code and generate data structures that will be used to guide the ray-tracing process.

Some examples :

phase = ScS2
                            	sens	prof	phase
START                       	-1	0.00	S
REFLECTION                  	 1	2889.00	S
REFLECTION                  	-1	0.00	S
REFLECTION                  	 1	2889.00	S
STOP                        	 0	0.00	 
ScS2
[ScS2 seismic phase]
 
phase = P660-P
                            	sens	prof	phase
START                       	-1	0.00	P
TRANSMISSION                	-1	660.00	P
REFLECTION                  	-1	660.00	P
STOP                        	 0	0.00	
P660-P
[P660-P seismic phase]
 
phase = SKKP
                            	sens	prof	phase
START                       	-1	0.00	S
PHASE_CHANGE|TRANSMISSION   	-1	2889.00	P
REFLECTION                  	-1	2889.00	P
TRANSMISSION                	 1	2889.00	P
STOP                        	 0	0.00	 
SKKPbc, SKKPdf
[SKKPbc, SKKPdf seismic phase]
 

> 2D/3D seismic ray tracing (libraydescartes)

this seismic ray-tracing technic uses the Snell/Descartes law in spherical geometry to propagate a wave front from a source (earthquake epicenter) to a receiver (seismometer).
The ray path computation relies on the ray initial incidence angle (IASP package), and on the parsed ray signature.

 
figure (1).
[ray2D screenshot]
figure (2).
[ray3D screenshot]
figure (3).
[ray3D+mesh side view screenshot]
figure (4).
[ray3D+mesh side view screenshot]
figure (5).
[ray3D+mesh side view screenshot]
 
figure (6).
[]
figure (7).
[]
figure (8).
[]
figure (9).
[]
figure (10).
[]
figure (11).
[]
figure (12).
[]
 
figure (13).
[]
figure (14).
[]
 

Figure 1 shows 27 seismic ray paths for an epicentral distance of 130°. Blue paths symbolise compression waves, while the red ones are shear waves.
Figure 2 is the visualisation of 3D rays from waves recorded in Strasbourg.
Figures 3,4 and 5 show seismic ray (Pb,Pg) in a mesh with 4 layers.
Figures 6,7 show PKP rays in a global Earth mesh with five layers.
Figures 8,9,10,11,12 show the same PKP partial ray-paths in a local mesh (France) with five layers.
Figure 13 shows an empty cell extracted from mesh with its 64 sub-blocks.
Figure 14 shows the same cell as the one represented in figure 13, with 678 crossing rays.

> earth mesh (libmesh)

it produces a mesh from a geographic area description (XML). Each cell from the mesh is connected to its neighbors cells and carry some attributes like ray length, ray density, ray dispersion, etc. that will be imported from the ray2mesh computation output.
libmesh generates 3D graphic output file format (VTK).
The libmesh objective is to build an adaptative mesh of the Earth given a set a seismic rays. The size of a cell in the mesh will be adapted depending on the illumination quality, that is a region with few crossing rays will be modelized with large cells whereas a region sampled by many rays in various direction will yield small cells.


XML geographic area description
<?xml version="1.0"?>
<mesh lat-unit-size="3" lon-unit-size="3"
      lat-min="30"      lat-max="87"
      lon-min="-42"     lon-max="66">
		     	     
     <layer name="layer 0" zstart="0"    zend="40"   lat-unit="1" lon-unit="1" />
     <layer name="layer 1" zstart="40"   zend="100"  lat-unit="1" lon-unit="1" />
     <layer name="layer 2" zstart="100"  zend="250"  lat-unit="1" lon-unit="1" />
     <layer name="layer 3" zstart="250"  zend="400"  lat-unit="1" lon-unit="1" />
     <layer name="layer 4" zstart="400"  zend="650"  lat-unit="1" lon-unit="1" />
     <layer name="layer 5" zstart="650"  zend="900"  lat-unit="1" lon-unit="1" />
     <layer name="layer 6" zstart="900"  zend="1200" lat-unit="1" lon-unit="1" />
     <layer name="layer 7" zstart="1200" zend="1500" lat-unit="1" lon-unit="1" />
</mesh>
 
(a)
[mesh screenshot]
(b)
[world mesh screenshot]
 

Figure (a) : Euro-Mediterranean mesh visualization.
Figure (b) : World mesh visualization, with 5 layers and 3240 cells.

> ray2mesh

the ray2mesh project aims to compute the cell's illumination quality in a mesh given a set of seismic rays in order to perform a mesh refinement.

This cell's illumination computation is based on all the rays paths crossing the cell and is caraterized by several properties such as:
- number of rays,
- average ray length,
- number of ray hits by cell face,
- fill rate, which measures the quality of the spatial repartition of rays in the cell,
- etc.

The rays data set may contain millions of rays. Therefore parallelizing the computation is a key issue. There is a paralell implementation of ray2mesh that uses MPI as message-passing library.

There are 3 versions of ray2mesh that can be chosen at compile time :
- sequential mode,
- parallel scatter mode,
- parallel master/slaver mode.
The parallel scatter version is well suited to an homogeneous parallel machine whereas the master-slave implementation gives better results on an heterogeneous set of processors (e.g. network of workstations).
 
figure (a).
[ray3D in a mesh screenshot]
figure (b).
[world mesh showing the cells fill rate]
figure (c).
[world mesh showing the cells fill rate]
figure (d).
[world mesh showing the cells fill rate]
figure (e).
[world mesh showing the cells fill rate]
 

Figure (a) represents Euro-Mediterranean mesh with 10751 rays.

Figure (b,c,d,e) represent the cell fill rate computed in a global Earth mesh from the seismic activity of year 1999. The cell fill rate measures the quality of the spatial repartition of rays in the cell. More than 420.000 rays were computed in a world mesh with 712.800 cells. The color scale goes from blue for poorly informative cells, to red for highly exposed cells.

The three following Earth's mantle maps have been constructed using a mesh with nearly 3 millions of cells (0.5x0.5 degre) and 841.367 rays computed (activity of year 1999 and 2000). They represents the length score (f), hit score (g), dispersion score (h).

figure (f).
[Earth's mantle map showing the length score]
figure (g).
[Earth's mantle map showing the hit score]
figure (h).
[Earth's mantle map showing the dispertion score]
 

> visualisation

Ray2mesh can produce huge amount of data and we can take advantage of dedicated visualization equipments to interpret results as illustrated on figure (f). We use the Visualization Toolkit (VTK) as a graphical library.

figure (f).
Workbench


 
 
---
Marc Grunberg and Stéphane Genaud
ray2mesh@renass.u-strasbg.fr
http://renass.u-strasbg.fr/ray2mesh/index.shtml
Updated Wednesday, 24-Jun-2009 13:56:43 GMT
[Valid HTML 4.0!]
[Created with Vim]
[Frame Free]
[Any Browser]