/wave_equation_simulations

Python script solving the wave equation (équations de D'Alembert) 1D and 2D by taking into account velocity variation.

Primary LanguagePython

Wave equation simulations 1D/2D (équation de D'Alembert)

To cite this version:

Sacha BINDER. Étude de l’observation et de la modélisation des ondes de surface en eau peu profonde. Physique-Informatique.TIPE session 2021.

Python model solving the wave equations in 1D and 2D. All the process of calculation is based on finite difference method. The simulation include a variation of wave's velocity in the spatial domain. Scripts are using NumPy, Matplotlib and SciPy libraries.

1D simulation

The script 1D_WAVE-EQ_variable-velocity.py can be used to simulate several situations :

  • Wave propagation at constant speed (left) and variable speed (right) :

1D_cstspeed_Dirichlet 1D_disctpeed_Dirichlet

Dirichlet_demo Neumann_demo Mur_demo

2D simulation

The script 2D_WAVE-EQ_variable-velocity.py is a two-dimensional generalisation of what was presented previously :

2D_cstspeed_Neumann 2D_cstspeed_Neumann_flat