Skip to content

3D acoustic wave propagation in homogeneous isotropic media using PETSc and Krylov space method

License

Notifications You must be signed in to change notification settings

ovcharenkoo/PETSc_FDTD_3D_acoustic_wave_propagation

Repository files navigation

3D acoustic wave propagation in homogeneous isotropic media using PETSc

PETSc - Portable, Extensible Toolkit for Scientific Computation

Here you find an example of C + PETSc implementation solving acoustic wave equation in 3D. Krylov methods are used to find iteratively approximate solution of Ax=b

Wavefield example

DISCRETIZATION DETAILS:

  • Finite-Differences in Time Domain (FDTD)
  • Implicit time stepping
  • O(2,4)
  • Schemes derived from Taylor series:
    • in space [-1:16:-30:16:-1]/12dx2
    • in time [2:-5:4:-1]/dt2

MODEL DETAILS

  • Isotropic
  • Homogeneous
  • Dirichlet boundary conditions

HOW TO USE:

PETSc has to be installed. Make sure that PETSC_DIR and PETSC_LIB environmental libraries are set

make all
./run_O22.sh
or
./run_O24.sh

Runtime options and number of processors could be changed in shell scripts. Changing flags in the code or from runtime one can save and plot either the whole wavefields or just seismograms at receiver positions.

RUNTIME OPTIONS
-vel float - propagation velocity [km/s]
-xmax float - model dimentions [km]
     -ymax float
     -zmax float
-dt float - time step [sec]
-tmax float - max simulation time
-isrc int - source location [grid points]
     -jsrc int
     -ksrc int
-f0 float - dominant frequency of Ricker wavelet [Hz]
-nrec int - number of receivers on diagonal

All options listed above have default values so all of them could be skipped for a trial run

EXAMPLE
mpirun -n 2 ./p3D_acoustic_O24.out -xmax 8.0 -ymax 8.0 -zmax 8.0 -vel 3.5 -pc_type asm -pc_asm_overlap 2 -da_refine 1 -ksp_converged_reason

FOLDER STRUCTURE

/mfiles - matlab routines for seismograms and wavefields visualisation
/doc - documentation, figures and slides
/seism - seismigrams in .txt
/wavefields - wavefields in .m

About

3D acoustic wave propagation in homogeneous isotropic media using PETSc and Krylov space method

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages