Help with computational gasdynamic
Apr 12, 2008 at 10:19 PM Thread Starter Post #1 of 8

Khanate

500+ Head-Fier
Joined
Oct 8, 2007
Posts
741
Likes
10
Hi,

I'm working on a university project and I really feel like this is my last resort... It's for my computational gasdynamic class. Now I don't even know if it's anyone's field on here but it is a last resort, I don't even know where to start and have tried school libraries and all books are out and I spent several hour googling but to no avail.

So I am wondering if anyone knows how to do the following:

1)
Using the programming environment of your choice, write a code to solve the linear
advection equation du/dt + a du/dx = 0 numerically. Choose one 1rst order and one
second order linear scheme (out of those covered in the course or any other one you fancy
to try out) and incorporate them into your code.
Problem to be simulated is the propagation of a disturbance specified at the initial mo-
ment t = 0 as follows: u(x; 0) = 0:5+0:075x for 0 · x · 20 and u(x; 0) = 0:5 everywhere
else. Assume that the wave speed a in the linear advection equation is equal to 2. We
are interested in the solution at time moment t = 100.

2)

Using the programming environment of your choice, write a code to solve the one-
dimensional Euler equations numerically. Your code should be capable of using the fol-
lowing schemes:
1) The 1rst-order Godunov scheme (use the exact Riemann solver you have developed
in the mini-project 1);
2) The Lax-Wendroff scheme;
3) Any 1rst order upwind scheme of your choice: Flux Vector Splitting, HLLC, Roe
method etc.



Help on anything would be a tremendous help and would help me get started on this, I'd deeply appreciate it and wouldn't even know how to thank you.
 
Apr 12, 2008 at 10:24 PM Post #2 of 8
Ok, so it looks like we want to write a discrete PDE solver?
First, you have your constraints (check), and (thus) the boundary.
I found the trick was to write the discrete steps and it would work out after that.
Try to "step" in time and see how that should appear in the equation.
Have you done that part?

Edit: I am thinking of this in a Matlab enviroment.
 
Apr 12, 2008 at 10:51 PM Post #4 of 8
Quote:

Originally Posted by aaron313 /img/forum/go_quote.gif
Yea, do a search on matlab's pde solvers, if they exist.


Are you being cheeky here?
But it should not be too hard to code.
I always found getting started on writing out the discrete equation the hardest part.
 
Apr 12, 2008 at 11:17 PM Post #6 of 8
I would be surprised if these methods are taught in discrete mathematics (undergrad or otherwise).

You need to discretize your function and two variables here and plug those values into the equation according to your step size.
You are creating a grid and tracing the values of your function over it.
 
Apr 13, 2008 at 12:48 AM Post #7 of 8
Quote:

Are you being cheeky here?


No, not at all. Maybe the op can take a look at the source code of matlab's canned solvers, and use that? Not really sure if that would help.
 
Apr 13, 2008 at 1:09 AM Post #8 of 8
Quote:

Originally Posted by aaron313 /img/forum/go_quote.gif
No, not at all. Maybe the op can take a look at the source code of matlab's canned solvers, and use that? Not really sure if that would help.


Ok
smily_headphones1.gif
, the reason I asked that is Matlab has some really nice canned solvers and there is likely a lot of finite element code floating around on the internet.
 

Users who are viewing this thread

Back
Top