Home

# Poisson's Equation _________

Wikipedia comments: "In mathematics, Poisson's equation is a partial differential equation of elliptic type with broad utility in electrostatics, mechanical engineering and theoretical physics. Commonly used to model diffusion, it is named after the French mathematician, geometer, and physicist Simeon Denis Poisson."

### User's Poisson Equation Source Code:

#### For 1-dimensional (1D) Poisson Equation use following:

``````      global all
problem PoissonsPDE
C ------------------------------------------------------------------------
C --- Calculus Programming example: Poisson's Equation; a PDE (1D) Initial
C --- Value Problem solved using Method of Lines.
C ------------------------------------------------------------------------
C
C User parameters ...
!       rho = ...
e0 = 8.854187817e-12 ! F/m or A2 s4 kg-1m−3 permittivity of free space
C
C x-parameter initial settings: x ==> i
xFinal=  1:   xPrint = xFinal/20
C
call xAxis      !
end               ! Stmt.s not necessary in IVP, but used in BVP versions
model xAxis       !
C ... Integrate over x-axis
C
x= 0:    xPrt = xPrint:      dx = xPrt / 10
!        U = ???	! @ x = 0 ... initial value
!        Ux = ???	! @ x = 0
Initiate janus;  for PDE;
~    equations Uxx/Ux, Ux/U;  of x;  step dx;  to xPrt
do while (x .lt. xFinal)
Integrate PDE;  by janus
if( x .ge. xPrt) then
print 79, x, U, Ux, Uxx
xPrt = xPrt + xPrint
end if
end do
79     format( 1x, f8.4, 1x,10(g14.5, 2x))
end
model PDE                         ! Partial Differential Equation
Uxx = - rho/e0
end
``````

#### For 2-dimensional (2D) Poisson Equation use following:

``````      global all
problem PoissonsPDE
C ------------------------------------------------------------------------
C --- Calculus Programming example: Poisson's Equation; a PDE (2D) Initial
C --- Value Problem solved using Method of Lines.
C ------------------------------------------------------------------------
dynamic U, Ux, Uxx
C
C User parameters ...
!       rho = ...
e0 = 8.854187817e-12 ! F/m or A2 s4 kg-1m−3 permittivity of free space
ipoints=20          ! grid pts. over x-axis
C
C x-parameter initial settings: x ==> i
xFinal =  1:    ip = ipoints:    xPrint = xFinal/20

allot U(ip), Ux(ip), Uxx(ip)
C
call xAxis      !
end               ! Stmt.s not necessary in IVP, but used in BVP versions
model xAxis       !
C ... Integrate over x-axis
C
x= 0:    xPrt = xPrint:      dx = xPrt / 10
!        U = ???	! @ x = 0 ... initial value
!        Ux = ???	! @ x = 0
Initiate janus;  for PDE;
~       equations Uxx/Ux, Ux/U;  of x;  step dx;  to xPrt
do while (x .lt. xFinal)
Integrate PDE;  by janus
if( x .ge. xPrt) then
print 79, x, U, Ux, Uxx
xPrt = xPrt + xPrint
end if
end do
79     format( 1x,f8.4,1x,20(g14.5,1x))
end
model PDE                         ! Partial Differential Equation
!       U(1) = U0:      Ux(1)=0:     Uxx(1)=0    ! Initial Conditions
do 20 ij = 2, ipoints-1         ! System of ODEs
Uyy = (U(ij+1)-2*U(ij)+U(ij-1))/(dy*dy)  !4 2nd order in 'y'
Uxx(ij)= - rho/e0 - Uyy	    ! Poisson's PDE
20     continue
!       Ux(ip)= ???:        Uxx(ip)= ???   ! Final conditions (ie. BC)
end
``````

### User's Poisson Equation Output:

``selected output goes here ... ``