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

solution to Burger's Equation using fortran

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2005, 14:35
Default 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.

  Reply With Quote

Old   March 24, 2005, 15:09
Default 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??
  Reply With Quote

Old   March 24, 2005, 15:15
Default 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.
  Reply With Quote

Old   March 24, 2005, 16:53
Default 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.

  Reply With Quote

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

Reply


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
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
Solution of a matrix equation technophobe Main CFD Forum 1 July 10, 2010 04:30
Fortran routine for advection-convection equation khan Main CFD Forum 3 May 23, 2007 13:08
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 08:12.