New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and better implementations of `fatiando.seismic.wavefd` #52

Merged
merged 32 commits into from Sep 2, 2013

Conversation

Projects
None yet
3 participants
@leouieda
Member

leouieda commented Aug 26, 2013

I have changed and simplified a lot the interface for the finite difference simulation functions. They can now take care of recording seismograms at specified stations, calculating grid spacings, etc. They are still iterators but instead of yielding on every time step, a snapshot parameter controls how often the results are yielded.

The methods used for the finite differences have evolved from simple forward differences to staggared grid methods. For SH waves, I used the Equivalent Staggared Grid of Di Bartolo et al. (2012). This method can and should also be used for acoustic (scalar) waves. For P-SV waves I used the Parsimonious Staggared Grid of Luo and Schuster (1990). These methods have the advantages of being more stable to physical property gradients and high Poisson ratios. Because of these new algorithms, simulations now require the Lamé parameters and density instead of wave velocities.

Instead of 3, now only 2 grids are stored for each displacement. The t+1 grid can overwrite the t-1 grid because I only need it at i,j.

The absorbing boundaries have also improved. I still use a Gaussian tapering (damping) in extended borders of the grid. But now I do it right. Damping is applied to grids at times t + 1 and t for more efficiency. There are also special non-reflecting boundary conditions help reduce plain wave reflections.

For P-SV waves, an option was added to convert x and z displacements into representations of P and S waves. They are calculated from the divergence and curl of the displacement vector, respectively, using forth order centered differences. This way, only one wavefield panel can be plotted with more intuitive representations of the wave field.

psv_p_s_waves

I also added a new source function for simulating a blast in all directions. This function actually produces various point sources. This is useful because this source only produces P waves in P-SV simulations:

blast_p_wave

This is cools because its then easy to see that when the wave reaches an interface:

blast_reflect

It splits into a P and an S wave that wasn't there before

blast_p_to_s

Closes #4

leouieda added some commits Jun 11, 2013

Merge branch 'master' into wavefd
Conflicts:
	cookbook/seismic_wavefd_elastic_sh.py
	fatiando/io.py
	fatiando/mesher.py
	fatiando/seismic/wavefd.py
@hbueno

This comment has been minimized.

Member

hbueno commented Aug 26, 2013

\m/

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Aug 27, 2013

Really cool master @leouieda . I will try to test the recipes and merge with mine to have the changes included.
I will read the papers to have a better understanding of all that. Too much for my head right now.
Again congrats, really cool. 👍 :godmode:

@leouieda

This comment has been minimized.

Member

leouieda commented Sep 2, 2013

@hbueno @eusoubrasileiro tudo bem se eu fechar esse PR? Objeções?

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Sep 2, 2013

manda ver mestre @leouieda , vou testar as recepies ainda mas põem pra dentro! vou modificar meu código depois.
Achei que tu já tinha posto na verdade... fogo na 💣

leouieda added a commit that referenced this pull request Sep 2, 2013

Merge pull request #52 from leouieda/wavefd
Refactor and better implementations of `fatiando.seismic.wavefd`

@leouieda leouieda merged commit 54ac6a8 into master Sep 2, 2013

1 check passed

default The Travis CI build passed
Details

@leouieda leouieda deleted the wavefd branch Sep 2, 2013

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Sep 18, 2013

velho tá a maior droga pra poder fazer merge, tem alguma ferramenta decente aew pra recomendar. Fudeu com tudo!
@hbueno alguma sugestão pra conflito com o git? valeus

@hbueno

This comment has been minimized.

Member

hbueno commented Sep 18, 2013

O que aconteceu?

Em 17 de setembro de 2013 23:49, André notifications@github.com escreveu:

velho tá a maior droga pra poder fazer merge, tem alguma ferramenta
decente aew pra recomendar. Fudeu com tudo!
@hbueno https://github.com/hbueno alguma sugestão pra conflito com o
git? valeus


Reply to this email directly or view it on GitHubhttps://github.com//pull/52#issuecomment-24637650
.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Sep 18, 2013

rsrs @hbueno então tenho que fazer merge do novo master com o meu. Tenho alguns conflitos vou acabar fazendo na mão a gambiarra do merge mas se vocês conhecerem algo legal aew de merge ui pra linux seria maneiros. valeus

@leouieda

This comment has been minimized.

Member

leouieda commented Sep 18, 2013

Eu uso um programa chamado Meld
Em 18/09/2013 09:25, "André" notifications@github.com escreveu:

rsrs @hbueno https://github.com/hbueno então tenho que fazer merge do
novo master com o meu. Tenho alguns conflitos vou acabar fazendo na mão a
gambiarra do merge mas se vocês conhecerem algo legal aew de merge ui pra
linux seria maneiros. valeus


Reply to this email directly or view it on GitHubhttps://github.com//pull/52#issuecomment-24660203
.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Sep 18, 2013

É to vendo o povo recomendando aqui... vou tentar rsrs cara mó trabalharei q droga uhaiahiua ⛵️
Valeus @leouieda

@leouieda

This comment has been minimized.

Member

leouieda commented Sep 18, 2013

Cara, o que tinha tanto no seu branch que tá dando conflito?

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Sep 18, 2013

ja to arrumando as chamadas pras implementacoes do python, o arquivo de implementacoes de python foi removido. Foi criado outro no lugar. Fora isso o merge automático nao funcionou no wavefd.py por conta das minhas mudanças . Mas ta sussa vou arrumar em mais uns 2 commits.
Sei que a PR já foi fechada.
Só uma sugestão a maneira como o sismograma é retornado poderia ser como a iteração para honrar o modelo de snapshot. Mas tanto faz. Funciona do mesmo jeito e o stations ficou maneiro.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Sep 18, 2013

Todos os exemplos que testei estão rodando (era problema com o backend que não estava instalado direito). Depois olha a pull request do scalar lá finalmente deixei usável.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 12, 2013

@leouieda mestre... to dando uma estudada aqui. Realmente ESG ou no geral staggered grid's são muito mais fodas! Lembrando do curso de CFD que fiz lendo o artigo do Bartolo, tanto CFD qto Eletromag usam esse trem. Realmente deve ser bom! Vou tentar implementar um scalar com isso aew vamos ter duas versões de scalar. Um non-staggered e um staggered bonito o bicho. Valeus pela dica dos artigos.

@hbueno

This comment has been minimized.

Member

hbueno commented Oct 12, 2013

Achei que só eu estava nerdiando essa hora num sábado... =/

Em 12 de outubro de 2013 18:39, André notifications@github.com escreveu:

@leouieda https://github.com/leouieda mestre... to dando uma estudada
aqui. Realmente ESG ou no geral staggered grid's são muito mais fodas!
Lembrando do curso de CFD que fiz lendo o artigo do Bartolo, tanto CFD qto
Eletromag usam esse trem. Realmente deve ser bom! Vou tentar implementar um
scalar com isso aew vamos ter duas versões de scalar. Um non-staggered e um
staggered bonito o bicho. Valeus pela dica dos artigos.


Reply to this email directly or view it on GitHubhttps://github.com//pull/52#issuecomment-26206630
.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 12, 2013

nada como a diversão rsrs

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 16, 2013

@eusoubrasileiro prefeito! Não esqueça de fazer em outro branch e de avisar
na docstring do módulo que a versão staggered é melhor. Bom trabalho
nerdão!
Em 12/10/2013 19:35, "André" notifications@github.com escreveu:

nada como a diversão rsrs


Reply to this email directly or view it on GitHubhttps://github.com//pull/52#issuecomment-26207494
.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Dec 29, 2013

@leouieda agora entendi esse trem seu aiii... eu acho... rsrs
só fonte na componente z

https://gist.github.com/eusoubrasileiro/8165804

parana_basin_psv_shot

parana_basin_psv_shot_original_wiggle

@leouieda

This comment has been minimized.

Member

leouieda commented Dec 29, 2013

Hahaha depois precisamos marcar um dia pra discutir a implementação OO
On Dec 28, 2013 10:23 PM, "André" notifications@github.com wrote:

@leouieda https://github.com/leouieda agora entendi esse trem seu
aiii... eu acho... rsrs


Reply to this email directly or view it on GitHubhttps://github.com//pull/52#issuecomment-31308170
.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Dec 29, 2013

A com certeza... vamos, pela alegria e felicidade de mundo. Até lá feliz ano novo!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment