CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Exact solution - Euler equations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2013, 15:07
Default Exact solution - Euler equations
  #1
New Member
 
Jakub
Join Date: May 2013
Location: Czech Republic
Posts: 16
Rep Power: 13
jakubstary is on a distinguished road
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
jakubstary is offline   Reply With Quote

Old   May 2, 2013, 15:17
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by jakubstary View Post
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
you can find many references for the Sod problem ...
FMDenaro is offline   Reply With Quote

Old   May 3, 2013, 01:29
Default
  #3
Member
 
Ravindra Shende
Join Date: Feb 2011
Location: Pune, India
Posts: 45
Rep Power: 15
Ravindra Shende is on a distinguished road
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.
Ravindra Shende is offline   Reply With Quote

Old   May 3, 2013, 03:55
Default
  #4
New Member
 
Join Date: Mar 2012
Posts: 8
Rep Power: 14
Fabian82 is on a distinguished road
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://www-troja.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, rayleigh-taylor) 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.
Fabian82 is offline   Reply With Quote

Old   May 3, 2013, 11:00
Default Solved
  #5
New Member
 
Jakub
Join Date: May 2013
Location: Czech Republic
Posts: 16
Rep Power: 13
jakubstary is on a distinguished road
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, Runge-Kutta 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
jakubstary is offline   Reply With Quote

Old   May 3, 2013, 15:49
Default
  #6
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
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?
cfdnewbie is offline   Reply With Quote

Old   May 4, 2013, 15:40
Default
  #7
New Member
 
Jakub
Join Date: May 2013
Location: Czech Republic
Posts: 16
Rep Power: 13
jakubstary is on a distinguished road
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)
    dy = 3*exp(-4*t)-2*y;
end

for i=1:length(t)-1
   k1=rigid(t(i),rk2(i)); %derivate
   ystar1(i)=rk2(i)+h*k1; %y*
   k2=rigid(t(i),ystar1(i)); %derivate
   ystar2(i)=ystar1(i)+h*k2; %y**
   rk2(i+1)=0.5*(rk2(i)+ystar2(i)); %result = 1/2*(y + y**)
end
Many thanks!
Jakub
Attached Images
File Type: jpg figure.jpg (24.9 KB, 12 views)
jakubstary is offline   Reply With Quote

Old   May 6, 2013, 07:47
Default
  #8
New Member
 
Jakub
Join Date: May 2013
Location: Czech Republic
Posts: 16
Rep Power: 13
jakubstary is on a distinguished road
Please, has anybody any idea for my problem with Runge Kutta? Thanks.

Jakub
jakubstary is offline   Reply With Quote

Old   May 6, 2013, 09:02
Default
  #9
New Member
 
Join Date: Mar 2012
Posts: 8
Rep Power: 14
Fabian82 is on a distinguished road
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!
Fabian82 is offline   Reply With Quote

Old   May 6, 2013, 19:14
Default
  #10
New Member
 
Jakub
Join Date: May 2013
Location: Czech Republic
Posts: 16
Rep Power: 13
jakubstary is on a distinguished road
Quote:
Originally Posted by Fabian82 View Post
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!
Yes, t(i) + h was the problem. Thanks Fabian82 .

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.
jakubstary is offline   Reply With Quote

Reply

Tags
euler equations, exact solutution


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convergence Centurion2011 FLUENT 48 June 15, 2022 00:29
Delta form of Heat, Euler and NS equations RameshK Main CFD Forum 3 May 30, 2012 11:41
Exact solution of N-S eq. in Kim and Moin's paper Kyounghwa Main CFD Forum 5 January 23, 2012 10:36
Naca 0012 (compressible and inviscid) flow convergence problem bipulsaha FLUENT 1 July 6, 2011 08:51
Euler equations & expansion shocks technophobe Main CFD Forum 5 April 28, 2009 16:11


All times are GMT -4. The time now is 17:47.