Solving Poisson Equation by using FDM

In summary, Nasser is looking for someone to help him solve a Poisson equation problem he's been struggling with for some time. He has some code that he's hoping to translate to C, but he's not sure where to start. He asks for advice on how to proceed.
  • #1
samia2008
4
0
I need help from anyone urgently,
I need C code for Solving Poisson Equation has known source with Neumann condition by using FDM (finite difference method) in 2D problem.
 
Physics news on Phys.org
  • #2
samia2008 said:
I need help from anyone urgently,
I need C code for Solving Poisson Equation has known source with Neumann condition by using FDM (finite difference method) in 2D problem.

Tell you what, I'm gonna' make some suggestions you may not like:

1. Helps if you show effort rather than just ask for a hand-out.

2. Helps if you don't say urgent. Kinda' offensive like we gonna' stop what we're doing and help you cus' you said urgent.

3. Try and work on simple ones first just to get the hang of using this method. Work on a simple one you already know the answer so you can check your work. Any PDE text will have a section on numerical methods. Forget about Poission's equation for now and just go over the simple examples in the book.

4. You phrased your question in terms of code. Usually we don't do code in here expecially C cus' Mathematica is way easier. If you need help with code, we have sub-forums below under "Mathematical Software" that may be more appropriate for your question.

5. Try and remember whenever you have a tough problem you can't solve, put it on the back-burner and work on a simpler, related one first, get that one right, then build up the problem to the one on the back-burner. For example solve Laplace's equation numerically first. Then for example if the non-homogeneous component of Poission's equation is complicated, just solve it for say a constant term or just f=x for starters then build it back up to the equation you wish to solve.

6. Don't double-post: don't make an identical post in the Mathematics Software forum. You'll just tick them off more.

So here's my best advice:

Make some genuine effort on say a simple problem, preferably in Mathematica code. Then go to the Mathematics Software forum, read some of them to get a hang of the dialog. Write up some Mathemtaica code to show effort, then ask for help on that problem (since it's not this one it's not a double-post). Those guys in that forum are really good.
 
Last edited:
  • #3
I don't think anyone is just going to give you code here. Write the Poisson equation as a partial differential equation, and just replace the partial derivatives by differences between neighboring points/timeslices.
 
  • #4
samia2008 said:
I need help from anyone urgently,
I need C code for Solving Poisson Equation has known source with Neumann condition by using FDM (finite difference method) in 2D problem.

Not C, but I have Mathematica code (you'd have to shoot me first to make me do this in C ;)

I can't post a link, since this forum will not let me. But if you go to my website and click on the Mathematica applets page near the top, you'll see the poisson applet there. Just google my name (Nasser Abbasi). I have to make 10 posts here for this forum to let me post a link it seems.

Source code is there. Feel free to translate it to C. Many differenent methods. Pick the solver you like.

Poisson 2D, Supports Neumman and Dirichlet boundary conditions. Different grid size on each dimension.

The Mathematica Applet is there that you can run from your browser.

--Nasser
 
Last edited:
  • #5
Sorry for late reply and thank you jackmell for your advices. I have just started to use this forum, so I have no about how the discussion should be here. The aim of my post to know if there is somebody can help me in solving poison problem, if i get reply, I can then ask precisely about what I want to solve. I did effort to solve the problem of course and i got some problems and this why I want to discuss here to find the solution. I will write that in another reply post. Anyway, thank you for the advice and showing me the way, and I hope you get the aim of my post.
 
  • #6
Great thanks nasser_abbasi for your help by sending me your website showing the Mathematica code. I will search and study them. If i have a problem, I will send again.
 
  • #7
Thank you for your reply and I will try to work on your advice.
 

1. What is the Poisson Equation?

The Poisson Equation is a partial differential equation that describes the relationship between a scalar function and its sources. It is commonly used in physics, engineering, and mathematics to model various physical phenomena such as electrostatics, heat transfer, and fluid dynamics.

2. What is FDM and how is it used to solve the Poisson Equation?

FDM stands for Finite Difference Method, which is a numerical technique used to solve differential equations. In the context of the Poisson Equation, FDM involves discretizing the equation into a set of algebraic equations and solving them using finite difference approximations. This approach is commonly used because it is relatively simple and efficient.

3. What are the steps involved in solving the Poisson Equation using FDM?

The steps involved in solving the Poisson Equation using FDM are as follows:

  1. Discretize the equation by dividing the domain into a grid of points.
  2. Approximate the derivatives in the equation using finite difference formulas.
  3. Substitute the approximated derivatives into the equation and solve for the unknown function at each grid point.
  4. Repeat the process until a solution with the desired level of accuracy is obtained.

4. What are the advantages and limitations of using FDM to solve the Poisson Equation?

The advantages of using FDM to solve the Poisson Equation include its simplicity, efficiency, and applicability to a wide range of problems. However, FDM has limitations in terms of accuracy and stability. The accuracy of the solution depends on the grid size and the choice of finite difference approximations, while the stability of the method can be affected by the geometry and boundary conditions of the problem.

5. Are there any alternative methods for solving the Poisson Equation?

Yes, there are alternative methods for solving the Poisson Equation, such as Finite Element Method (FEM) and Boundary Element Method (BEM). These methods offer certain advantages over FDM, such as higher accuracy and better handling of complex geometries. However, they are more computationally intensive and require more specialized knowledge to implement.

Similar threads

  • Differential Equations
Replies
9
Views
2K
  • Differential Equations
Replies
13
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
935
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
625
Replies
6
Views
2K
Back
Top