Skip to content
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

Is Trixi.jl suitable for simulation of acoustic wave through inhomogeneous media ? #1744

Open
LaurentPlagne opened this issue Nov 19, 2023 · 4 comments

Comments

@LaurentPlagne
Copy link

Sorry for this probably dumb question, but I wonder if Trixi.jl is suitable for simulation of acoustic wave through (3D) inhomogeneous media (in time domain) ? I have seen the keywork acoustic on a slide in a video presentation of Trixi.jl, but I was not able to find example for it.

@DanielDoehring
Copy link
Contributor

What are the governing equations? Acoustic perturbation, (non)linear Euler, how does inhomogeneous media translate into physical modeling?

@LaurentPlagne
Copy link
Author

I would like to solve this kind of equation

$\frac{1}{\rho c^2} \frac{\partial^2}{\partial t^2}u-\nabla \cdot (\frac{1}{\rho}\nabla u) =s $

like in https://arxiv.org/pdf/2003.09812.pdf

@DanielDoehring
Copy link
Contributor

That should be possible - however, you need to implement this equation yourself which involves rewriting this as a two-dimensional system with only first order temporal derivatives.

@sloede
Copy link
Member

sloede commented Nov 21, 2023

That should be possible - however, you need to implement this equation yourself which involves rewriting this as a two-dimensional system with only first order temporal derivatives.

Exactly! Once rewritten, you should be able to discretize the equations with Trixi.jl. Furthermore:

  1. If $\rho$ and $c$ are to vary in space, you need to implement them as additional state variables, and set the physical flux (flux) and the numerical fluxes for them to zero. We did something similar for, e.g., the acoustic perturbation equations.
  2. If $\rho$ and $c$ are to vary in time, you need to provide a custom rhs! function as described in this tutorial that updates the values appropriately in each Runge-Kutta stage.

Feel free to ping us in case of further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants