
[Sponsors] 
March 13, 2007, 07:38 
Assistance with oneway wave equation

#1 
Guest
Posts: n/a

Hello folks, I know that most of you will laugh when you read this (it should be a simple finite difference problem) but could someone please help me with the following problem:
I am trying to solve the one way wave equation: phi_x + phi_t = 0 {for x, say, in 0:0.01:10} subject to the following boundary conditions: phi(x,0) = 0 phi(x,dt)= 0 {so phi for the first 2 timesteps is zero} phi(0,t) = sin(t) phi_x(xmax,t)=0 I have used the notation "_x" to denote differentiation with x etc. I have tried different finite difference schemes but my results are nonsense. My "expected" result was to see a sinusodial wave moving from left to right as time increased but depending on how I develop the finite difference scheme my results vary wildly. Most recently tried the following scheme: [p(I,N+1)p(I,N)]/dt + [p(I,N+1)p(I1,N+1)]/dx = 0 i.e. backwards time and space. My results for the above scheme were not what I expected. I have also tried a 2nd order scheme, with central differencing for x & backwards differencing for time, but again my results were nonsense (this time they were full of wiggles). To put the problem in context: I'm solving for the flow around the airfoil in an unsteady transonic flow. The wake condition gives rise to the oneway wave equation which I need to solve numerically. The above problem is a model problem I was trying before moving onto adapting my existing aerodynamic solver. The funny part is I have had no problem with the complicated transonic problem but can't manage this simple 1st order PDE!! I'd be hugely grateful to anyone who could offer help or any advice. Many thanks, F 

March 13, 2007, 15:23 
One more thing...

#2 
Guest
Posts: n/a

Sorry guys, I forgot to mention that I'm trying to solve the oneway wave equation on a stretched cartesian grid. The degree of stretching is relatively small but a rather large grid is required for my problem.
Thanks again, F 

March 13, 2007, 16:11 
Re: Assistance with oneway wave equation

#3 
Guest
Posts: n/a

Your differencing indicates you are using an implicit scheme. Is this correct?


March 13, 2007, 18:43 
Re: Assistance with oneway wave equation

#4 
Guest
Posts: n/a

Hi Frank,
you're not allowed to have a homogeneous Neumann boundary at xmax (due to characteristic direction). Use some sort of extrapolation there in your difference scheme instead (exact form should be dependent on scheme). /Stefan 

March 14, 2007, 04:01 
Re: Assistance with oneway wave equation

#5 
Guest
Posts: n/a

Don't you have too many BCs and ICs? I think a single BC, say phi(x=0,t), and a single IC, e.g., phi(x,t=0) or phi_t(x,t=0) is what you need.
In order to solve it numerically, you may start by the simplest possible schemes, e.g., centraldifference for the spatial derivative, explicit scheme for time advance and CFL condition to limit the time step. 

March 14, 2007, 11:56 
Re: Assistance with oneway wave equation

#6 
Guest
Posts: n/a

Thanks guys  there's some great advice on these forums )
I finally managed to get the equation solved (you guys were right  the problem was to do with the boundary conditions) and got some really good results. I did have a problem, however, when I moved on to solving the same problem on a stretched grid. I'm not too sure why but when I use a stretched cartesian grid all my results become nonsense  it's like some big instability is setting in. Could someone please advise? Thanks for all your help so far! F 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculation of the Governing Equations  Mihail  CFX  7  September 7, 2014 06:27 
Problem with a leapfrog scheme for wave equation  Shiranui  Main CFD Forum  0  June 22, 2010 09:19 
Wave equation, wave velocity components  mztcu  CFX  1  May 4, 2010 02:14 
what is the condition to use the wave equation?  mmff  Main CFD Forum  0  January 26, 2010 05:25 
1D wave equation  rvndr  Main CFD Forum  5  December 5, 2003 21:28 