Equations for finite difference, element & volume
I am a college student. Recently, I have worked out the equations for finite difference, finite element and finite volume to calculate the fluid diffusion problem. When I had based on those equations to develop the program for calculation, I found something incorrect in my program, but I don't know whether my equation incorrect or not. Can someone help me to check my equations?
Student WLC 
Re: Equations for finite difference, element & vol
Try to solve very simple problems with known analytical solutions. It will be easier to track downbugs in your program or mistakes in you equations.

Re: Equations for finite difference, element & vol
Sebastien Perron, Thanks. I have tried the implicit scheme (theta = 1) and cranknicolson (theta = 0.5), the results seems to be reasonable. But when I did the explicit scheme (theta = 0), the result of the scheme tends to diverge. Would it be possible help me to check my equations?
Student WLC 
Re: Equations for finite difference, element & vol
When you use an explicit scheme, there is stability condition related to the time step. Hence, if your time step is too large, the scheme might diverge.
What kind of problem are you solving? (Permanent or transcient flow). We could give you more help if you'd give us more info on the type of problem you are trying to solve. 
Re: Equations for finite difference, element & vol
Sebastien Perron, Thanks for your kindly help. I am doing the transcient flow (diffusion) simulation by comparing the numical solution to exact solution. May I forward my equations to you for further evaluation?

Re: Equations for finite difference, element & vol
(1). Transient diffusion equation (heat conduction) and the approximate solutions,explicit and implicit, stability, etc... can be found in the book of "Applied Numerical Methods", by Brice Carnahan, H.A. Luther and James Wilkes,John Wiley publisher. (2). Chapter 7,has all the information about the theory, finitedifference formulation, examples, Fortran codes, stability and discussions.

Re: Equations for finite difference, element & vol
Unfortunately, my college does not have this book.

Re: Equations for finite difference, element & vol
(1). Looks like that Amazon.com has the book listed and it can be shipped in 24 hours. It is a newer edition. (2). You could ask your library to locate the book in other libraries and then borrow it from that library through interlibrary loan, I guess. (3). You can also ask your school or professors to purchase it first.

Re: Equations for finite difference, element & vol
I will check the other college library. But I caanot find thos book in the list of amazon.com

Re: Equations for finite difference, element & vol
(1). You can also try barnes&noble book store online. (2). Applied Numerical Methods In Stock:Ships within 24 hours . Brice Carnahan,H.A. Luther,James O. Wilkes / Hardcover / Krieger Publishing Company / January 1990 Our Price: $79.50

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