
Minimal documentation on the 2D Chebyshev code:

Author: Heiner Igel

Date: March 2005

Last change: March 10, 2005

========================================

General code description: 

This code is a direct implementation of the 
code described by Wang and Carcione (1993). It solves the elastic wave equation 
in 2D with a Chebyshev method, i.e., a Chebyshev grid, with densification of points towards 
the boundaries, that - however - are made up by re-stretching to avoid very small time steps. 
Differentiation by matrix-maxtix multiply (not by FFT)

========================================

File description:

ch_main: main file with time extrapolation loop
ch_input: reads parameters from standard input (ch2d.exe < Par)
ch_init: initialization of various things
ch_model: model initialization
ch_evolution: numerical solution of wave equation, time exatrpolation, space derivatives, Hookes law
ch_output: outpuit of snaps and seismograms
ch_check: paramter check before simulation
ch_oper: initalization of Chebyshev differential matrix 
ch_boundary: contains boundary condition

========================================

Directories:

/src contains source
/bin contains executable
/examples contains parameter file
/output	contains output
/tools contains matlab script to visualize snaps and seismograms
/doc contains documentation/readme
/output contains simulation output 

========================================

Compilation:

No makefile is given as code is compiled with Visual Fortran, tested only under Windows, executable should
sit in /bin

========================================

Execution:

run in /examples using ../bin/ch2d.exe < Par
will create output in ../output

========================================

Parameters: 

An example of a parameter file is given below with comments
parametres ==================
seisfile      =..\output\test		"test" is the root name for output files
modelfile     =				may be used to input model
nt            =200			number of time steps
dt (ms)       =.5			time increment
tord          =4			time order (1,2, or 4)
Model -----------------------
model_type    =1			flag for model type 1- homogeneous
vs0           =2887.			velocities for homogeneous model
vp0           =5000.
rho0          =2500.
Source ----------------------
xxs           =900.			source location x (in m)
zzs           =900.			same in z
source_type   =4			flag for source type (1-fx, 2-fz, 3-expl, 4-sxz) 
srcfreq(Hz)   =100.                     Source frequency in Hz
alpha         =25.			half-width of source Gaussian in m
Receivers------------------------------
xa            =14			index of first receiver in x			
xe            =65			index of last receiver in x
irec          =1			reciever increment along profile
izrec         =0			index of receiver in z
isamp         =1			sampling rate of seismogram output (in dt's, dont change)
ssamp         =10			snapshot sampling in time steps
JUNK------------------------------
ibound        =4			flag for boundaries (1-free surfaces, 2-absorb, 3-freesurf+absorb, 4-circular
icheck        =5			output rate in time steps of min/max values
xmax          =1000.			physical dimension [0,xmax] in m
zmax          =1000.			same for z
istretch      =1			flag for grid stretching, always 1			
gammax        =.999			coefficient for stretching in x			
gammaz        =.999			same for z


========================================

Output:

The following files will be created named with the root given in the parameter file e.g. "test_..."
_gauss  - spatial gauss function
_rec	- # of receivers and offsets
_src	- source time function
_x	- x component seismograms in Ascii nt*nr
_z	- same for z component
_x_snp	- snapshots ns*nx*nz
_z_snp	- same for snaps
_xco	- x coordinates
_zco	- z coordinates

========================================

Tools:

in /tools there are two matlab programs
show_snaps.m allows you to visualize snapshots
show_seis.m the seismograms

========================================

Problems:

Careful, the source input is not scaled so the absolute amplitudes are meaningless


========================================

References: 
Carcione, J.M., Wang, J.P., 1993. A Chebyshev collocation method for the elastic 
wave equation in generalized coordinates, Comput. Fluid. Dynam. J., 2, 269-290.

Carcione, J. M. (1994). The wave equation in generalized coordinates,  Geophysics . 59, 
1911-1919.

Tessmer, E., Kosloff, D., 1994. 3-D elastic modelling with surface topography by a 
Chebyshev spectral method, Geophysics, 59, 464-473. 