FC Coding is One step from 1st Principles to Solution!

User's Poisson Equation
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."
∇^{2} V =  ρ / ε_{0}
Have a Poisson's equation to solve? Or any other math equations? For the next few months of 2014, we are willing to help you solve them using Calculuslevel programming. To start, copy and modify the source code below in a file we'll call it {abc}{123}.fc where {abc} = your initials and {123} = any number or id; 8 characters max. for filename. Edit your {abc}{123}.fc file, especially lines starting with a "!" character.
Email us your {abc}{123}.fc file. We will compile & execute it and send you the output file. Try compiling you own code with our FCCompiler program. Download and install FCCompiler with more [~60] example problems to choose from. Learn how easy it works.
All "!" characters in columns 1 or 2 must be deleted before compiling. These "!" were added in order to point out areas needing work.
Next, you may modify a copy of this web page and send it to us for viewing. If accepted, we will post your webpage showing your problem with solution. If you want people to be able to contact you, please include your email address on this web page.
Please mention our goaldriven.net website to others. Thanks!



User's Poisson Equation Source Code:
For 1dimensional (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.854187817e12 ! F/m or A^{2 }s^{4} kg^{1}m^{−3} permittivity of free space
C
C xparameter 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 xaxis
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 2dimensional (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.854187817e12 ! F/m or A^{2 }s^{4} kg^{1}m^{−3} permittivity of free space
ipoints=20 ! grid pts. over xaxis
C
C xparameter 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 xaxis
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, ipoints1 ! System of ODEs
Uyy = (U(ij+1)2*U(ij)+U(ij1))/(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 ...
HTML code for linking to this page:
<a
href="http://goaldriven.net/mathproblems/poissonequation.html"><img style="float:left; width:100px"
src="http://goaldriven.net/image/fccompilericon.png"/>
<strong>Poisson's (Partial Differential) Equation</strong>
</a>; Simulation to Optimization, Tweak Parameters for Optimal
Solution.
Go to top
