solution to Burger's Equation using fortran

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 24, 2005, 14:35 solution to Burger's Equation using fortran #1 Tony Limjuco Guest   Posts: n/a I need to find the finite difference/finite volume solution to Burger's Equation using fortran. problem statement: the inviscid burger's eqn (non-linear advection equation ) was derived to be du/dt + u(du/dx)= 0 du/dt + d(u^2/2)/dx = 0 with initial and boundary conditions u(x,0) = u0 + sin(pi*x/L) 0<=x<=L u(x,0) = u0 L<=x<=6L u(0,t) = u0 t>0 procedure: I am to write finite difference code to solve both forms of Burger's equation and compare my result with the analytical solution. 1. for the spatial deriviatives I am to use a first order backward difference and for time use a first order forward difference so the scheme is FWD TIME - BACKWD SPACE 2. i am to run my code with L = 1, u0 = 1, for a total simulation time of 3 sec 3. i am to run it for a total number of grid points 50, 100, 200, 400, and 800. 4. with the Courant number defined as C = u(del t/del x), the maximum theoretical Courant no. gives a stable solution at Cmax = 1; i am to use this criterion to determine the "del t" to use in the above equations. 5. from my numerical solutions, i need to estimate the shock speed and compare that to the analytical solution. 6. i should pick one parameter to vary and study how the solution varies with change in that parameter (for this i use the conservative form of the equation) 7. using finite volume code for the same case above, i am to compute the interface fluxes using the following methods: a)average values of u at the interfaces, b)upwinding 8. lastly, i need to make these plots: u vs x at t = 3 sec for each grid (on one plot); u vs x at t = 3sec on the 800 grid for max Courant number 0.25, 0.5, 0.75, 1.0, and 1.25; u vs x at t = 3 sec on the 800 grid for both the conservative and non-conservative form of the equations for a Couran number of Cmax = 0.75, and the analytical solution; u vs x at t = 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0 seconds on one plot If anybody can help me out with the coding of the above problem i would appreciate it very much. Pseudocode or snippets of the actual code itself would be extremely helpful. I have not programmed in Fortran for a while so i need help with the basics as well. I can email you a pdf of the actual assignment. Thank you very much.

 March 24, 2005, 15:09 Re: solution to Burger's Equation using fortran #2 Runge_Kutta Guest   Posts: n/a Tony, It takes balls to go onto an international forum to cheat on your homework assignment!! (Am I being too harsh? Did I misread something?) So, which university in the Chicago area do you attend??

 March 24, 2005, 15:15 Re: solution to Burger's Equation using fortran #3 Tony Limjuco Guest   Posts: n/a Just a few helpful suggestions is all i ask. I am a student at the university of new orleans.

 March 24, 2005, 16:53 Re: solution to Burger's Equation using fortran #4 cfd dude Guest   Posts: n/a I don't intend to sound harsh myself, or belittle your request, but this really is pretty basic, and as a student it would be in your best interest to learn by doing. Presumably you covered the fundamentals of differencing schemes, indices, etc. in your lectures or whatever textbook you're using, and I'm sure you can find an introductory book on Fortran at the school library, or introductions on the web. Fortran is an easy language to pick up, and your program for this assignment won't be that involved. Declare and initialize your variables and arrays, a few do loops to advance the solution in time, and print your results to a file to make your plots.

 April 2, 2005, 00:41 Re: solution to Burger's Equation using fortran #5 zz Guest   Posts: n/a lol, this dude is in my class