CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Shock Tube (https://www.cfd-online.com/Forums/main/9291-shock-tube.html)

Pooria Sattari June 7, 2005 04:03

Shock Tube
 
Dear Friends,

I have written a code for 1D-Shock Tube Problem (using Lax Method),butI get wrong results.

Has anybody written a code in C for this problem using Lax Method?

If yes,Could you send that for me?

Thanks, Sincerely, Pooria Sattari

Nick June 7, 2005 10:30

Re: Shock Tube
 
What is wrong with your results? Isn't the Lax method 1st order? What are your boundary conditions? Have you discretized conservatively? Just some things to think about...

Nick

Pooria Sattari June 7, 2005 12:31

Re: Shock Tube
 
Thanks for your response,

Initial Conditios are: P1=1 rau1=1 P2=0.1 rau2=0.1 gamma=1.4

My Problems are :

after t=0.01 my results get diverged and I have unphysical results for u(velocity) and pressure.This happens with deltat greater than 0.0001.

Other Problem is that I can not set deltat less than 1e-7,because of memory shortage.

It would be very nice to hear from you.

Sincerely, Pooria.

Nick June 7, 2005 12:52

Re: Shock Tube
 
Are you sure that those initial conditions are appropriate? I mean, have you checked all these values from the compressible flow tables?

As far as your DT is concerned: How many nodes do you have and what is your stability criteria? Most of the time non-physical results come from a non-stable situation.

upwind June 8, 2005 02:52

Re: Shock Tube
 
You should be able to set any value of deltat : it appears you are storing values of dependent variables at all time levels. You need to store values of dependent variables only for two time levels and keep swapping values at the end of each time step.

Ritesh June 14, 2005 00:55

Re: Shock Tube
 
Apart from the initial condition, you just use reflecting boundary conditions, you can look into a book by R. J. Levaque (chapter 7) for boundary conditions. let me know, for any further details


All times are GMT -4. The time now is 03:53.