GithubHelp home page GithubHelp logo

ovcharenkoo / petsc_fdtd_3d_acoustic_wave_propagation Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 7.0 5.75 MB

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

License: MIT License

C 56.35% Makefile 0.34% Shell 0.51% MATLAB 42.79%
petsc fdtd wave acoustic 3d time-domain demo krylov propagation

petsc_fdtd_3d_acoustic_wave_propagation's Introduction

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

petsc_fdtd_3d_acoustic_wave_propagation's People

Contributors

ovcharenkoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.