I am trying to validate the 1D analytical wave equation with a numerical solution with periodic boundary conditions. I have implemented the periodic boundary condition for the numerically calculated wave but have not been able to implement it for the analytical solution. The analytical solution for the the 1D gaussian wave is U(x,t) = e^((x-x0-c*t)**2)* cos(k0*(x-x0-c*t)) where x0 is the starting point of the wave (the midpoint of the wave would be at this location), c being the speed, and k0 is the wave number. The value of x varies (i.e, the domain) varies from -L to L.

I want if the moving wave crosses the domain L the wave packet again starts with -L (staring of the domain). Any suggestions would be of great help.

What changes are required to be made to the equation to get an analytical solution with periodic boundary conditions implemented?

  • $\begingroup$ Just introduce a coordinate that goes periodically through the domain (like an angular coordinate), and make your wave travel with constant speed along this periodic coordinate. $\endgroup$ Mar 5 at 17:09


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.