1D advection-diffusion-need to check my code; any suggestions?

  • Thread starter bzz77
  • Start date
  • #1
34
0

Main Question or Discussion Point

1D advection-diffusion--need to check my code; any suggestions?

Hi everyone:

I am teaching myself transport/programming, and have created a simple program for 1-D advection-diffusion (constant velocity, diffusion coefficient, central differencing, Crank-Nicolson).

I would like to check that my code is working properly and would appreciate any advice about how to go about this. I have not been successful on Google at finding code that others have written... If anyone can direct me or provide advice about getting an analytical solution, I would be very grateful. An EXCEL-based spreadsheet or a Matlab or a c++ implementation would be useful; I am not a Fortran or C user.
 

Answers and Replies

  • #2
79
0


probably the best way is to find a textbook problem and see if your solution agrees with the book's.
 

Related Threads for: 1D advection-diffusion-need to check my code; any suggestions?

  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
5
Views
4K
Replies
6
Views
1K
  • Last Post
Replies
0
Views
1K
Replies
1
Views
5K
Replies
8
Views
6K
Top