CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Numerical Solution for one dimension linear wave problem (

cxcxcx0505 September 4, 2010 06:27

Numerical Solution for one dimension linear wave problem
5 Attachment(s)
I am a newbie in CFD.I need to solve the one dimension linear wave problem.I have found some source from wiki here and wikipedia.

I need to solve using 6th compaq scheme,1st order upwind scheme,2th maccormack scheme and lax-wendroff scheme.And compare the results of this different schemes.The time derivative needs to be solve using 4th runge-kutta method.Can anybody explain more on how to do the numerical solution?Thanks.And,how to integrate the 4th runge-kutta into the equation?
I need more help and resource on how to do it.

cxcxcx0505 September 5, 2010 07:33

2 Attachment(s)
I have completed the numerical solution using maccormack scheme.Still need help for the other methods and on how to integrate the runge-kutta method into the time derivative.

DoHander September 7, 2010 07:44


have you checked your solution with the exact solution of the wave equation ?


cxcxcx0505 September 10, 2010 04:30

hello,Do.Thanks for your advice and support.
I have consulted my professor,the above graph is the exact solution since the cfl number is equal to one.
I have solve the equation using lax-wendroff,maccormack,and upwind scheme.
Now,I need to solve the wave equation using sixth-order compact scheme and time-integrated by a four-stage runge-kutta method.I really dont have any idea how to do it.Is there anybody know how to do it?I need some materials and guidance.Thanks!

DoHander September 10, 2010 07:36

Basically you need to "split" your problem in two parts:

1. Replace the spatial derivative with a 6th order finite difference formula and move this in the right hand term. You will have now a problem of this form:


where R(x) contains your discretized spatial terms.

2. For temporal discretization use any good book of numerical methods, or simply search Google for Runge-Kutta ...


DoHander September 10, 2010 07:41

About your professor confirmation that your solution is the "exact one" for CFL=1. This is true only if your implementation if faultless - this is exactly the point of comparing the "exact" analytical solution with the numerical one to prove that your implementation is correct.

From my experience the time spent in comparing a numerical solution with an analytical solution (when you have one) is always rewarded :) .


cxcxcx0505 September 10, 2010 08:23

Thanks !

cxcxcx0505 September 10, 2010 22:10

1 Attachment(s)
when I solve for the runge-kutta equation,I use R(x) as the slope?

All times are GMT -4. The time now is 13:48.