Trixi.jl icon indicating copy to clipboard operation
Trixi.jl copied to clipboard

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

Open LaurentPlagne opened this issue 2 years ago • 4 comments

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.

LaurentPlagne avatar Nov 19 '23 09:11 LaurentPlagne

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

DanielDoehring avatar Nov 19 '23 15:11 DanielDoehring

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

LaurentPlagne avatar Nov 21 '23 06:11 LaurentPlagne

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.

DanielDoehring avatar Nov 21 '23 07:11 DanielDoehring

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.

sloede avatar Nov 21 '23 09:11 sloede