Exact solution  Euler equations
I work on numerical solution of Euler equations in 1D. I implemented some numerical schemes and now I need compare their accuracy due to the exact solution. But I don't know how to compute it. For Burger's equation I compute exact solution with method of characteristics, but I don't know how to implement it for Euler equations or whether it is possible. Can anyone get me some tip how to compute exact solution of Euler equations? Many thanks. Jakub

Quote:

Check out this paper: ANALYTICAL SOLUTIONS FOR THE UNSTEADY COMPRESSIBLE FLOW EQUATIONS SERVING AS TEST CASES FOR THE VERIFICATION OF NUMERICAL SCHEMES  Tsangaris and Pappou
Also look in the text 'Computational Gasdynamics' by Culbert Laney. 
Check the book on Riemann solvers by Toro, there you'll find many shock tube problems together with the behavior of many different discretizations.
A good starting point may also be: http://wwwtroja.fjfi.cvut.cz/~liska...re8/index.html Moreover, you could setup sound waves in the linear regime. Going to two or three dimensions, simulating flow instabilities (e.g. shear, convection, rayleightaylor) and comparing the growth rates to the theoretical estimates can give much insight into a numerical discretization. Besides that, computing (stationary) vortices are also a good code validation. 
Solved
Thanks all. It was very helpful for me. I have one more question about solving Euler equations. Please can you get me a good tip again?
I use Euler method, RungeKutta 2nd order method and RK 4th order method for time discretization. I think that RK4 method should be the best and RK2 method better than Euler, but in every cases I get the best accuracy with Euler and worst with RK4. Don't you have any idea where would be a mistake in my implementation? Thanks. Jakub 
Did you test your implementation of RK2 and 4 for a system of ODEs? It sounds to me like there must be a bug in your implementation?

1 Attachment(s)
I implemented Euler and RK2 on ODEs, but I get same bad results. In first few times RK2 is better than Euler, but after some time not. I enclosed figure with my results. In figure is Euler, RK2, Matlab ode 23 and exact solution. I must have bug in implementation or bug is in book (Finite Volume Method for Hyperbolic Problems  LeVeque  equations (10.18)) which I use.
Here is my code of RK2: Code:
function dy = rigid(t,y) Jakub 
Please, has anybody any idea for my problem with Runge Kutta? Thanks.
Jakub 
I guess the second evaluation of 'rigid' should not be at time t(i). The algorithm in LeVeque is defined for problems without an explicit time dependence. You should look up the butcher tableau for this time marching scheme to find out the correct time for the second evaluation. I guess, it's just t(i) + h but look it up in order to be certain!

Quote:
So if I apply now Runge Kutta 2nd order method on Euler equations or on other system of hyperbolic partial differential equations I get this: U* = U(n) + dt*G(U(n))  first step U** = U* + dt*G(U*(n+1))  second step and result is: U(n+1) = 1/2*(U(n) + U**). But how can I compute U** when I don't know U*(n+1) in the second step? Many thanks to all. Jakub. 
All times are GMT 4. The time now is 23:03. 