# Assistance with one-way wave equation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 13, 2007, 07:38 Assistance with one-way wave equation #1 Frank 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(I-1,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 one-way 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 Frank Guest   Posts: n/a Sorry guys, I forgot to mention that I'm trying to solve the one-way 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 one-way wave equation #3 ag Guest   Posts: n/a Your differencing indicates you are using an implicit scheme. Is this correct?

 March 13, 2007, 18:43 Re: Assistance with one-way wave equation #4 stefan 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 one-way wave equation #5 Rami 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., central-difference 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 one-way wave equation #6 Frank 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 Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Mihail CFX 7 September 7, 2014 06:27 Shiranui Main CFD Forum 0 June 22, 2010 09:19 mztcu CFX 1 May 4, 2010 02:14 mmff Main CFD Forum 0 January 26, 2010 05:25 rvndr Main CFD Forum 5 December 5, 2003 21:28

All times are GMT -4. The time now is 02:44.