-
Notifications
You must be signed in to change notification settings - Fork 149
05_adjoint_simulations
Table of Contents
-
Run a forward simulation:
-
SIMULATION_TYPE = 1
-
SAVE_FORWARD = .true.
-
seismotype = 1
(we need to save the displacement fields to later on derive the adjoint source. Note: if the user forgets it, the program corrects it when reading the properSIMULATION_TYPE
andSAVE_FORWARD
combination and a warning message appears in the output file)
Important output files (for example, for the elastic case, P-SV waves):
-
absorb_elastic_bottom*****.bin
-
absorb_elastic_left*****.bin
-
absorb_elastic_right*****.bin
-
absorb_elastic_top*****.bin
-
lastframe_elastic*****.bin
-
AA.S****.BXX.semd
-
AA.S****.BXZ.semd
-
-
Define the adjoint source:
-
Use
adj_seismogram.f90
-
Edit to update
NSTEP
,nrec
,t0
,deltat
, and the position of the cut to pick any given phase if needed (tstart
,tend
), add the right number of stations, and put one component of the source to zero if needed. -
The output files of
adj_seismogram.f90
areAA.S****.BXX.adj
andAA.S****.BXZ.adj
, for P-SV waves (andAA.S****.BXY.adj
, for SH (membrane) waves). Note that you will need these three files (AA.S****.BXX.adj
,AA.S****.BXY.adj
andAA.S****.BXZ.adj
) to be present in theSEM/
directory together with theabsorb_elastic_****.bin
andlastframe_elastic.bin
files to be read when running the adjoint simulation.
-
-
Run the adjoint simulation:
-
Make sure that the adjoint source files absorbing boundaries and last frame files are in the
OUTPUT_FILES/
directory. -
SIMULATION_TYPE = 3
-
SAVE_FORWARD = .false.
Output files (for example for the elastic case):
-
snapshot_rho_kappa_mu*****
-
snapshot_rhop_alpha_beta*****
which are the primary moduli kernels and the phase velocities kernels respectively, in ascii format and at the local level, that is as “
kernels(i,j,ispec)
”. -
SPECFEM2D can produce the gradient of the misfit function for a tomographic inversion, but options for using the gradient within an iterative inversion are left to the user (e.g., conjugate-gradient, steepest descent). The plan is to include some examples in the future.
The algorithm is simple:
-
calculate the forward wave field
$\mathbf{s}(x,t)$ -
calculate the adjoint wave field
$\mathbf{s}^\dagger(x,t)$ -
calculate their interaction
$\mathbf{s}(x,t) \cdot \mathbf{s}^\dagger(x,T-t)$ (these symbolic, temporal and spatial derivatives should be included) -
integrate the interactions, which is summation in the code.
That is all. Step 3 has some tricks in implementation, but which can be skipped by regular users.
If you look into SPECFEM2D, besides “rhop_ac_kl
” and “rho_ac_kl
”, there are more variables such as “kappa_ac_kl
” and “rho_el_kl
” etc. “rho
” denotes density kappa
” for bulk modulus ac
” denotes acoustic (“el
” for elastic), “kl
” means kernel (and you may find “k
” as well, which is the interaction at each time step, i.e., before doing time integration).
Please note that:
-
at the moment, adjoint simulations do not support anisotropy, attenuation, and viscous damping.
-
you will need
AA.S****.BXX.adj
,AA.S****.BXY.adj
andAA.S****.BXZ.adj
to be present in directorySEM/
even if you are just running an acoustic or poroelastic adjoint simulation.-
AA.S****.BXX.adj
is the only relevant component for an acoustic case. -
AA.S****.BXX.adj
andAA.S****.BXZ.adj
are the only relevant components for a poroelastic case.
-
This documentation has been automatically generated by pandoc based on the User manual (LaTeX version) in folder doc/USER_MANUAL/ (Aug 26, 2024)
Development wiki
User manual
- 01_introduction
- 02_getting_started
- 03_mesh_generation
- 04_running_the_solver
- 05_adjoint_simulations
- 06_doing_tomography
- 07_oil_and_gas_industry_simulations
- 08_informations_for_developers
- A_reference_frame
- B_channel_codes
- C_troubleshooting
- D_license
- authors
- copyright_and_version
- features
- manual_SPECFEM2D
- notes_and_acknowledgement
- sponsors