Poisson equation discretization

Poisson's equation is an elliptic partial differential equation of broad utility theoretical physics. For example, the solution to Poisson's equation the potential field caused by a given electric charge or mass density distribution; with the potential field known, one can then calculate electrostatic or gravitational force field.

It is a generalization of Laplace's equationwhich is also frequently seen in physics. In three-dimensional Cartesian coordinatesit takes the form. Poisson's equation may be solved using a Green's function :. A general exposition of the Green's function for Poisson's equation is given in the article on the screened Poisson equation.

There are various methods for numerical solution, such as the relaxation methodan iterative algorithm. If the mass density is zero, Poisson's equation reduces to Laplace's equation. Using Green's Function, the potential at distance r from a central point mass m i.

One of the cornerstones of electrostatics is setting up and solving problems described by the Poisson equation. The mathematical details behind Poisson's equation in electrostatics are as follows SI units are used rather than Gaussian unitswhich are also frequently used in electromagnetism.

Starting with Gauss's law for electricity also one of Maxwell's equations in differential form, one has. Assuming the medium is linear, isotropic, and homogeneous see polarization densitywe have the constitutive equation. In electrostatic, we assume that there is no magnetic field the argument that follows also holds in the presence of a constant magnetic field.

Then, we have that. Thus we can write. The derivation of Poisson's equation under these circumstances is straightforward.

Poisson's equation

Substituting the potential gradient for the electric field. Solving Poisson's equation for the potential requires knowing the charge density distribution. If the charge density is zero, then Laplace's equation results. If the charge density follows a Boltzmann distributionthen the Poisson-Boltzmann equation results. Using Green's Function, the potential at distance r from a central point charge Q i. The above discussion assumes that the magnetic field is not varying in time.

The same Poisson equation arises even if it does vary in time, as long as the Coulomb gauge is used. If there is a static spherically symmetric Gaussian charge density. Surface reconstruction is an inverse problem.In this project we will learn three ways of implementating multigrid methods: from matrix-free to matrix-only depending on how much information on the grid and PDE is provided.

Figure out the index map between fine grid with size h and coarse grid with size 2h. Code the bilinear prolongation and restriction using the index map. Be carefuly on the value on the boundary points. Code the two-grid method. On the fine grid, apply m times G-S iteration and then restrict the updated residual to the coarse grid. On the coarse grid, use G-S iteration or the direct method to solve the equation below the discretization error. Then prolongates the correction to the fine grid and apply additional m G-S iterations.

We consider the linear finite element discretization of the Poisson equation on grids obtained by uniform refinement of a coarse grid.

Refine the initial mesh J times to get the finest mesh. To get a mesh of the disk, the boundary nodes should be projected onto the unit circle. Construct HB in two ways. Either from the output of uniformrefine during the refinement or call uniformcoarsenred from the finest mesh. Follow the lecture notes Introduction to Multigrid method to implement the non-recrusive V-cycle. Be careful on the boundary nodes. Restrict smoothing to interiori nodes only and enforce the residual on boundary nodes to be zero.

A coarsening of the graph of A is needed and restriction and prolongation can be constructued based on the coarsening. Assemble the stiffness matrix on this mesh and take the submatrix associated to interior nodes only. The mesh is only used to generate the matrix. In the later step, only the generated matrix is used. Test the robustness of the solver, apply uniformrefine to a mesh and generate corresponding matrix. List the iteration steps and CPU time for different size of matrices.In this project we will learn three ways of implementating multigrid methods: from matrix-free version to matrix-only version depending on how much information on the grid and PDE is provided.

We consider linear finite element discretization of the Poisson equation on grids obtained by uniform refinement of a coarse grid. Be careful on the boundary nodes. Restrict smoothing to interiori nodes only and enforce the residual on boundary nodes to be zero. A coarsening of the graph of A is needed and restriction and prolongation can be constructued based on the coarsening. The mesh is only used to generate the matrix. In the later step, only the generated matrix is used.

Test the robustness of the solver, apply uniformrefine to a mesh and generate corresponding matrix. List the iteration steps and CPU time for different size of matrices. Project: Multigrid Methods In this project we will learn three ways of implementating multigrid methods: from matrix-free version to matrix-only version depending on how much information on the grid and PDE is provided.

Choose a random initial guess. Plot the error function on the grid for the first 3 steps. Figure out the index map between fine grid with size h and coarse grid with size 2h. Code the bilinear prolongation and restriction using the index map. Be carefuly on the value on the boundary points. Code the two-grid method. On the fine grid, apply m times G-S iteration and then restrict the updated residual to the coarse grid.

On the coarse grid, use G-S iteration or direct method to solve the equation below the discretization error. Then prolongates the correction to the fine grid and apply additional m G-S iterations. Recrusive way Apply the two-grid method to the coarse grid problem in Step 2. Refine the initial mesh J times to get the finest mesh. To get a mesh of the disk, the boundary nodes should be projected onto the unit circle.

Construct HB in two ways. Either from the output of uniformrefine during the refinement or call uniformcoarsenred from the finest mesh. Follow the lecture notes Introduction to Multigrid method to implement the non-recrusive V-cycle.

Assemble the stiffness matrix on this mesh and take the submatrix associated to interior nodes only.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields.

Subscribe to RSS

It only takes a minute to sign up. I am not sure what to do. For the discretization of f x I was taught to use the hat function but I am still not sure. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Asked 1 year, 10 months ago. Active 1 year, 9 months ago. Viewed 82 times. Discretize the equation using the finite element method with piecewise linear basis functions. Any help would be greatly appreciated.

Leucippus 22k 10 10 gold badges 32 32 silver badges 75 75 bronze badges. Active Oldest Votes. Han de Bruijn Han de Bruijn Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Featured on Meta. Feedback post: New moderator reinstatement and appeal process revisions.

The new moderator agreement is now live for moderators to accept across theā€¦.Primary authors of this description: V. StepanenkoE.

Poisson equation, solving with DFT

MortikovVad. Voevodin section 2. The so-called "periodic boundary conditions" are also useful in some problems. The analytical form of the solution to the Poisson equation is not known in the case where the right-hand side is arbitrary and the boundary conditions are inhomogeneous.

Consequently, in most applications, this equation is solved numerically. The most common discretization of the Poisson equation has the form. The boundary conditions are also approximated by finite differences. Here, we examine a finite difference scheme for the most common problem related to the Poisson equation in the three-dimensional space:. For simplicity, we impose the so-called 3-D periodic boundary conditions. The periodic boundary conditions are automatically satisfied if the solution is represented via the conventional discrete inverse Fourier transform:.

poisson equation discretization

The convenience of using the Fourier transform for solving the discrete Poisson equation stems from the fact that the basis functions of the Fourier expansion are eigenfunctions of the discrete Laplace operator. This makes obvious the algorithm for solving the equation: first, the right-hand side is expanded into the Fourier series, then the above formula is used for calculating the Fourier coefficients of the solution; finally, the solution is reconstructed by applying the inverse Fourier transform.

The one-dimensional Fourier transform is the computational kernel of this algorithm. Indeed, the discrete inverse Fourier transform can be written as.

One can see that the three-dimensional Fourier transform reduces to the sequence of three one-dimensional transforms. A widely used tool for calculating the one-dimensional transform is an efficient algorithm called the fast Fourier transform FFT [1].

From the above discussion, it is clear that the fast Fourier transform is the basic macro operation in the algorithm for solving the Poisson equation. Now, the algorithm can be written as follows:. Indeed, the results of one-dimensional Fourier transforms in one direction can be written to the input array, and the resulting array can be used as an input for transform in the next direction, and so on.

Operation 4 is an element-wise array modification. We present the information graph only for stages because stages are implemented analogously to stages The information dependence between the layers of the graph can be stated as follows.

A one-dimensional FFT depends on the results of an earlier FFT in a perpendicular direction which was performed at a previous layer only if the one-dimensional sections processed by these FFTs intersect each other. One can distinguish at least two levels of parallelism in the above algorithm.

First, the execution of each one-dimensional FFT can be distributed between computational cores.This is a demonstration of how the Python module shenfun can be used to solve a 3D Poisson equation in a 3D tensor product domain that has homogeneous Dirichlet boundary conditions in one direction and periodicity in the remaining two.

The solver described runs with MPI without any further considerations required from the user. Spectral convergence, as shown in Figure Convergence of 3D Poisson solvers for both Legendre and Chebyshev modified basis functionis demonstrated.

Shen [She94] and [She95]. To solve Eq. And then we create three-dimensional basis functions like. The expansion coefficients are the unknowns in the spectral Galerkin method.

The integral can either be computed exactly, or with quadrature. The advantage of the latter is that it is generally faster, and that non-linear terms may be computed just as quickly as linear. For a linear problem, it does not make much of a difference, if any at all. Approximating the integral with quadrature, we obtain. The right hand side of Eq. The linear system of equations to solve for the expansion coefficients can now be found as follows.

Fast solvers for 22 are implemented in shenfun for both bases. In this demo we will use the method of manufactured solutions to demonstrate spectral accuracy of the shenfun bases. To this end we choose a smooth analytical function that satisfies the given boundary conditions:. We will solve the Poisson problem using the shenfun Python module. We use Sympy for the manufactured solution and Numpy for testing. These solutions are now valid for a continuous domain. The next step is thus to discretize, using the computational mesh.

Note that it is not mandatory to use Sympy for the manufactured solution. However, with Sympy it is much easier to experiment and quickly change the solution. We create three bases with given size, one for each dimension of the problem.Pallavi P.

3.1.1 Introduction to Laplace's Equation

Chopade 1Prabha S. Rastogi 2. The solution of partial differential 2-D Laplace equation in Electrostatics with Dirichlet boundary conditions is evaluated. The electric potential over the complete domain for both methods are calculated. The developed numerical solutions in MATLAB gives results much closer to exact solution when evaluated at different nodes.

An error analysis is also presented where the numerical error based on the L 2 norm is computed. This error reduces monotonically by reducing the mesh size. Keywords: Finite difference method, Finite element method, Dirichlet boundary conditions, Laplace equation, Partial differential equation, Electrostatics. Cite this paper: Pallavi P. Chopade, Prabha S.

Article Outline 1. Introduction 2. Exact Solution 3. Introduction In the field of mathematics, formulation of differential equations and their respective solutions are the most important aspects to almost every numerical.

poisson equation discretization

They are also equally useful and important in many fields of engineering e. The exact solution of partial differential equation is difficult and complex. For problem involving irregular shapes, boundary conditions, material properties, etc. Instead of solving the problem for entire domain in one step, the solutions are obtained for each constituent unit and eventually combined to obtain the complete solution.

Finite Difference Method and Finite Element Method were used extensively to analyze the stresses in various load conditions. Besides instrumental in structural analysis, they have been popularly used to solve differential and integral equations involved in various domains of Mechanical Engineering, Civil Engineering and Electronics Engineering.

In electrostatics, Poisson or Laplace equation are used in calculations of the electric potential and electric field [1].

In cartesian co-ordinate system the del operator is given by, 2 The static electric field in terms of gradient and scalar electric potential V is given by 3 On combining equation 1 and 3 4 where is Laplacian operator. The charge density in the region of interest when becomes zero, equation 4 becomes Laplace equation as [4], 5 In cartesian coordinate system, operating on electric potential for a two -dimensional Laplace equation is given as [5], 6 The solution of equation 6 is obtained using finite element method.

The rest of the paper is organized into three sections.

poisson equation discretization

Section 2 defines the electrostatic 2-D problem and its formulation.


thoughts on “Poisson equation discretization”

Leave a Reply

Your email address will not be published. Required fields are marked *