# ECSG
A package for 3D anisotropic elastic wave simulations based on a stable composite staggered grid finite difference time domain numerical scheme
### Why the composite grid?
It is well known that finite difference scheme suffers from grid dispersion. To minimize this numerical aritifact, we need to sample each wavelength by at least a certain number of grid points. When the simulation domain contains a low velocity zone, for example the shallow region, using the classical uniform grid scheme (same mesh size over the entire domain) would require a very fine mesh. In contrast, a composite grid scheme, which uses fine mesh for low velocity region and coarse mesh for high velocity region, needs less grid points to simulate the same region, so it helps to reduce the memory and computing cost of the simulation.
### Why we need stability?
In numerical analysis, numerical stability is always an important property we are looking for when we design a numerical scheme. Stability means a perturbation in the initial solution (e.g., machine error) will not blow up over time. Lax-Richtmyer theorem claims that for a linear consistent numerical scheme (e.g., finite difference scheme based on the wave equation), stability is a sufficient and necessary condition for convergence, which measures how close the numerical solution will be to the true solution if we keep reducing the mesh size. Because of these reasons, we need a stable numerical scheme.
### What is energy method and how we use the energy method to achieve numerical stability for this composite staggered grid FDTD scheme based on the elastic wave equation?
Energy method is a powerful technique to analyze and derive stability conditions. It starts by formulating an energy of the numerical solution, which is often a bilinear semidefinite form of the numerical solution. Note the energy is not the same energy as the one defined in physics, but often this energy is formulated based on the physics definition. For example, we formulate the energy of the wave equation solution based on the kinetic and strain energy. If the energy is conserved over time, and if the time step is chosen to be sufficiently small such that the energy is equivalent to the L2 norm of the solution, then the scheme is stable.
As opposed to von Neumann stability analysis which works on only periodic boundary condition and gives only necessary stability condition, energy method can work on non-periodic boundary condition, e.g., rigid, free surface boundary condition, and it can yield the sufficient stability condition.
After formulating the energy for the numerical solution of the second-order anisotropic elastic wave equation on a uniform staggered grid, we compute the energy on a composite grid by summing up energies on each individual uniform grid. We find that in order to conserve the energy on this composite grid, the unknown ghost data near the grid refinement interface, which are built to compute interface field data, have to satisfy a certain condition, i.e., a set of linear equations with those ghost data as unknowns. On the other hand, the transmission condition across the interface imposes another set of linear equations on the ghost data. These two sets of linear equations formulate three independent linear equation systems to solve for the ghost data. In our code, we use both direct solvers and iterative solver (Jacobi Method) to solve these linear equation systems. To make the energy on the composite grid to be equivalent to the L2 norm of the solution, we derived a sufficient stability condition which yields an upper bound for the time step.
### What is inside this code package?
This package is built to verify numerical stability and convergence of 3D elastic wave simulations based on this stable compostie staggered grid FDTD scheme.
1. This package is able to perform both single grid and multiple (>=2) grids schemes with energy-conserving interpolation implemented at grid refinement interfaces to ensure numerical stability.
2. This package relies on [Madagascar](https://github.com/ahay/src), OpenMP and [scons](http://scons.org), so have them installed or loaded before compiling the code. You may need to modify paths when running tests.
3. Currently the scheme is based on FDTD of second order in time and space. Free surface boundary condition is implemented on top, and rigid (Dirichlet) boundary condition is implemented on other three sides of the rectangular domain.
### Structure
* **SConstruct-local/SConstruct-tacc**: python scripts for code compilation on OSX and TACC/Stampede respectively. To compile this package, copy either one of the scripts to SConstruct, and then run scons.
* **main.cpp**: driver of this program.
* **init.hpp**: set up precision macros.
* **grid.hpp**: A C struct defines grid.
* **field.hpp/field.cpp**: A C++ class defines simulation fields and related operations.
* **array.hpp/array.cpp**: A C++ class defines multi-dimensional matrices.
* **sim_utils.hpp**: list of simulation function signatures with functions defined in:
* **init_del_par_field.cpp**: functions initialize and delete parameter fields.
* **init_del_sim.cpp**: functions initialize and delete simulation fields
* **init_del_ghost_container.cpp**: functions initialize and delete interface ghost data.
* **init_del_fd_coeff.cpp**: functions initialize and delete finite difference coefficients.
* **init_src.cpp**: functions initialize a Ricker source.
* **init_del_rec_trace**: functions initialize and delete a set of receiver traces.
* **init_del_movie.cpp**: functions initlalize and delete rsf movies.
* **init_del_res_trace.cpp**: functions initialize and delete residue traces
* **update_*.cpp**: functions update velocity/stresses/ghost data at grid interface.
* **compute_energy.cpp/compute_res.cpp**: functions compute energy and residue at a composite grid.
* **print.cpp**: functions print receiver data/residues/movies to rsf files.
* **test_utils.hpp**: list of test function signatures with functions defined in:
* **test_sbp.cpp**: functions test SBP property.
* **tests**: test scripts
### Future Work
- [ ] Extend this composite grid scheme to deal with fluid-solid interface.
- [ ] Extend this composite grid scheme to high order FDTD.
- [ ] MPI parallelization.
### Run a test example (composite grid simulation based on energy conserving condition)
1. Install Madagascar (http://www.ahay.org/wiki/Download)
2. Run "scons" in ecsg/ and get the executable called "main"
3. cd ecsg/tests/test1-cmp-eci-ii
4. cp par1.py pareci.py # parcei.py is the input parameter file used by the SConstruct in the test folder
5. cd eci
6. Change the path to ecsg binary and pareci.py at line 13,14 or line 17,18 (depending on the computing platform for the test)
7. scons in eci folder to get the correct result # it takes a Macbook Pro (2.5GHz Intel Corei7) about 10 minutes to finish the test
没有合适的资源?快使用搜索试试~ 我知道了~
基于能量稳定复合交错网格时域有限差分格式的.zip
共146个文件
svn-base:98个
cpp:20个
hpp:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 104 浏览量
2023-04-09
13:26:47
上传
评论
收藏 1.2MB ZIP 举报
温馨提示
基于能量稳定复合交错网格时域有限差分格式的.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于能量稳定复合交错网格时域有限差分格式的.zip (146个子文件)
update_ghost_sxz.cpp 20KB
field.cpp 15KB
update_stress.cpp 13KB
update_ghost_syz.cpp 12KB
update_ghost_vz.cpp 12KB
main.cpp 11KB
init_del_par_field.cpp 10KB
update_vel.cpp 10KB
test_sbp.cpp 9KB
print.cpp 4KB
array.cpp 4KB
compute_res.cpp 4KB
init_del_movie.cpp 3KB
init_del_fdcoeff.cpp 2KB
init_del_rec_trace.cpp 2KB
init_del_ghost_container.cpp 2KB
compute_energy.cpp 1KB
init_del_sim.cpp 1KB
init_src.cpp 1KB
init_del_res_trace.cpp 431B
wc.db 184KB
entries 3B
format 3B
sim_utils.hpp 7KB
field.hpp 4KB
array.hpp 1KB
init.hpp 608B
grid.hpp 204B
test_utils.hpp 48B
cmp_rec_trace.m 5KB
README.md 7KB
myesg-script 1KB
myesg-script 1KB
myesg-script 1KB
myesg-script 277B
par3.py 261B
par2.py 261B
par1.py 260B
SConstruct 9KB
SConstruct 9KB
SConstruct 8KB
SConstruct 7KB
SConstruct 706B
SConstruct-local 961B
SConstruct-new-mac 706B
SConstruct-tacc 594B
run.sh 330B
clean.sh 27B
196fc5a8de51d4c75f8f71fed1eeda92694ce0d6.svn-base 61KB
2d7ca247b0eaaf4eccb13d1fa10b7e1641c2f0d1.svn-base 60KB
2312a5a8ab7cfbb914a85e58790865751a8fd00c.svn-base 60KB
8838886e76e360e600996055537a24581d0f6618.svn-base 57KB
168d32fed40421fbcdf1bce55f4bd3a1cccb97f9.svn-base 56KB
f3f9cefcd03a3ec9f7d0f6e5609cb7d56473047b.svn-base 56KB
51ab41f4da6f486f9af721f0e240ba7424f7395b.svn-base 53KB
01392bf9b7506a190b82e57179df7114ca0ed1ad.svn-base 50KB
2ac8e031f5b6017b34fab4ca39c81a25d7248595.svn-base 48KB
8b303d5d0d5a3460e8c64427e559b5d021e9f970.svn-base 41KB
b6302f289603ab4c3b5986bc3da083202fee2ecc.svn-base 37KB
078df13a47c86c020af25e0e43dda831c873d4c7.svn-base 35KB
b1762ae6f7c6566b12fd92b0aaf0d3f3a2dc2617.svn-base 32KB
1398f1c0760ea819228f7dad30f60dd6b8eaf8ea.svn-base 31KB
4b09cd82de91ab1f809b32c8303302827cbef384.svn-base 31KB
4778f3189359227c3213c8e453157190bf17581c.svn-base 31KB
e01bdb6eaabecd7f673b2d807c1c8c381c8f9441.svn-base 29KB
ae7b7cc6c35ef442105dd3b945a0a79886a4a497.svn-base 29KB
9dcc389bc07b9df8283b63200ded8a1d1a14a350.svn-base 28KB
7ce1e3f109a3ab550fae619ea4b00e66ffc63a10.svn-base 28KB
d46cd8837a813b5f98536d3965d168d5d51f00b1.svn-base 23KB
97371678ba5474352f9be9159c5e3cf37564e2d3.svn-base 23KB
0930fc6dce4a6cc319ee63e848cb06171ef2e116.svn-base 23KB
103b4da3e6220a800de6ba6dc510be240f91dc02.svn-base 23KB
11702398c8fe5ebe54ba27c407154fd80e9a12f7.svn-base 22KB
213d39b0c0f44334fa61de13875fc027bd91d189.svn-base 22KB
485a7ac994247167bd5a0a9b35226991f5651382.svn-base 22KB
c89f7f924cd834e9fe35287edc6521bfda051eba.svn-base 20KB
74f046ed5e5ac3ffeeca746cc1bfae95aac1fb81.svn-base 19KB
4d96b646722443d963186f3de56b43992ac6a318.svn-base 19KB
6d58f43ced5db52a7f6045612da63db4a7eb996a.svn-base 19KB
4489fb15eda43832b79b2f808c7095431435e366.svn-base 19KB
c3c5436eb4af3d50ec33a757cce8d408bf07bb85.svn-base 19KB
2f40ff641bce684f913a3b7f6dd66bddb9e57c56.svn-base 19KB
ff2674791225c7dbd7db7965451b729eed7f0df4.svn-base 19KB
edced4fb16e9c8b76dae14fc2680896921f06a2f.svn-base 15KB
12dec7c675728317447fe139a4d33811a99298d9.svn-base 14KB
d3edfdfb57ed1159e460201e99a977ca395cef27.svn-base 13KB
10593d384a3e7520eea538ee7bfbe3da4929d38d.svn-base 12KB
d37127edf76946195ed87ba20cf5f23adee1b217.svn-base 12KB
f73c71dd983e1066b076224642bd3384ac0911e3.svn-base 11KB
ea0f42148fa5768265c88c44f76b9dd1bedc3b20.svn-base 10KB
2b4f4c9d2489e1d1943a3f1aa3684152b6def22a.svn-base 10KB
a37809d608266ea0241f5b840a31b593b36ccc77.svn-base 10KB
d0cae78511da044c437a1ece5809a8fa43f3e0c3.svn-base 9KB
4c798e323cf69f44f67457954aaa55f6931a88d8.svn-base 9KB
d3cc610810a604f0377742515929d430bf36cfe7.svn-base 9KB
382272e16ed92cd7e2ab2249cd4bf0ee7f6a261d.svn-base 9KB
0bbff1a202dec57336158ffcc91a932ef7eec2e7.svn-base 9KB
9144f485418daf96e73753ab3239c06b53d3611f.svn-base 9KB
36039864b37408338dc28b6fc069635741e6f3bf.svn-base 9KB
3e674a0732495ea209a23baac1e047bf7d8fe68b.svn-base 8KB
共 146 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功