Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

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

Merged
leouieda merged 32 commits into
masterfrom
wavefd
Sep 2, 2013
Merged

Refactor and better implementations of fatiando.seismic.wavefd#52
leouieda merged 32 commits into
masterfrom
wavefd

Conversation

@leouieda

Copy link
Copy Markdown
Member

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 30 commits June 11, 2013 10:22
Conflicts:
	cookbook/seismic_wavefd_elastic_sh.py
	fatiando/io.py
	fatiando/mesher.py
	fatiando/seismic/wavefd.py
@hbueno

hbueno commented Aug 26, 2013

Copy link
Copy Markdown
Member

\m/

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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

leouieda commented Sep 2, 2013

Copy link
Copy Markdown
Member Author

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

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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
Refactor and better implementations of `fatiando.seismic.wavefd`
@leouieda
leouieda merged commit 54ac6a8 into master Sep 2, 2013
@leouieda
leouieda deleted the wavefd branch September 2, 2013 17:12
@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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

hbueno commented Sep 18, 2013

Copy link
Copy Markdown
Member

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/leouieda/fatiando/pull/52#issuecomment-24637650
.

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member Author

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/leouieda/fatiando/pull/52#issuecomment-24660203
.

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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

@leouieda

Copy link
Copy Markdown
Member Author

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

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@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

hbueno commented Oct 12, 2013

Copy link
Copy Markdown
Member

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/leouieda/fatiando/pull/52#issuecomment-26206630
.

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

nada como a diversão rsrs

@leouieda

Copy link
Copy Markdown
Member Author

@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/leouieda/fatiando/pull/52#issuecomment-26207494
.

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Member Author

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/leouieda/fatiando/pull/52#issuecomment-31308170
.

@eusoubrasileiro

Copy link
Copy Markdown
Contributor

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wavefd refactor

3 participants