Problem with a leapfrog scheme for wave equation
I have coded the 1D acoustical wave equation (actually, I coded the two Euler equations that one must combine to obtain the wave equation) using a finite differences leapfrog scheme (three time steps).
But when I try to excite a resonant mode by implementing a sinusoidal source, one value over two is zero.
For exemple, this is what i obtain for the third mode :
The shape of the signal is correct, the position of the nodes and anti-nodes is good, but where do these oscillations come from ?! Does someone know ? Thanks.
PS : sorry if my english is not perfect because I'm french. I hope my problem was understandable.
|All times are GMT -4. The time now is 10:55.|