Science > Physics > 2D Finite difference equations for voltage from Poisson's Equation
| Topic: |
Science > Physics |
| User: |
"Dr. David Kirkby" |
| Date: |
21 Oct 2003 10:20:46 PM |
| Object: |
2D Finite difference equations for voltage from Poisson's Equation |
Hi,
I'm using the finite difference technique in a program
of mine to
determine the impedance of arbitrary shaped transmission lines.
This
is based around the equation
div D = 0
It's fairly easy to show using a Taylor series expansion that
the
voltage at a node (i,j) should be the average or the 4 nodes
around it
i.e.
V(i,j)=(V(i+1,j)+V(i-1,j)+V(i,j+1)+V(i,j-1))/4
However, this proof assumes a homogeneous dielectric. I
think at the boundary between a metal and a dielectric perhaps
different equations should be used. Certainly when there is a
change
of dielectric that is so. Does anyone have any guidance on what
one
should do to determine the voltage in a dielectric which is just
one
node away from metal?
Some calcualtions of impedance of a transmission line show
erorrs of around a percent or two using just the above equation, but I
know others have got considerably better results than this, and so
have I if I hack the code in a way that is not very logical and
difficult to justify.
I have an electronic copy of what is the classic paper on this
topic:
H. E. Green, (1965), "The numercial Solution of Some Important
Transmission Line Problems", IEEE Transactions on Microwave
Theory and
Techniquest, vol MIT-3, #3, , pp 676.
in which he quotes the above simple expression, plus 28 other
special
cases, which include corners, dielectric interfaces, right hand
edges,
left hand edges ..... etc etc. The problem is I can't figure in
my own
mind how to apply the vast majority of them. Does he mean the
corners
of the whole finite difference matrix (of which there are of
course
4), or corners of metalic conductors ??
Anyone help appreciated.
Dr. David Kirkby,
My email address can be found at
http://homepage.ntlworld.com/drkirkby/home-email.jpg
.
|
|
| User: "Bruce D. Scott" |
|
| Title: Re: 2D Finite difference equations for voltage from Poisson's Equation |
23 Oct 2003 09:53:44 AM |
|
|
David Kirkby wrote:
|> I'm using the finite difference technique in a program
|> of mine to
|> determine the impedance of arbitrary shaped transmission lines.
|> This
|> is based around the equation
|>
|> div D = 0
[...]
You should be able to find standard stuff to solve this. The reference
you gave is very old and all the standard stuff has been derived and
made routine since then.
If D = -grad phi, you just have grad^2 phi, which is a 5-point
finite-diff stencil in Cartesian geometry. In anything else, if you can
deal with the fundamentals of your geometry, you can use the tensor form
for this,
grad^2 = div grad = J (partial_a) [J^{-1} g^{ab}] (partial_b)
where the a and b are the coordinate indices, g^{ab} is the metric, and
J = sqrt(det(g^{ab})) is the Jacobian (inverse of the coordinate volume
element).
This reduces to the well known formulae in straight, cylinder, and
spherical geometry.
Now, if you want an inhomogeneous medium, then you have
D = - e grad phi
and
div D = - J (partial_a) [J^{-1} e g^{ab}] (partial_b) phi
The only change is that the factor of e gets in there with the metric
information. If you are discretising this you'll do it the same way as
for a variable metric. Instead of 5 points you'll have a 9-point
stencil centered on node (i,j), including the corners (i+/-1, j+/-1) as
well as the sides (i+/-1,j) and (i,j+/-1).
In 2D, break the stencil domain into four quadrants. Use averages of
the first derivatives and of the metric elements to form the
contravariant components of D times J^{-1}:
F = J^{-1} D
at the centers of the quadrants (locations i+/-0.5 and j+/-0.5). Now,
use J at (i,j) and the averages of the first derivatives to evaluate the
divergence at (i,j).
If e is constant and the geometry is Cartesian (J=1 with unit diagonal
metric), this will reduce to the standard 5-point stencil formula.
This sort of thing should be in more textbooks but most everyone just
tells you how to do it for the homogeneous, Cartesian case.
--
cu,
Bruce
drift wave turbulence: http://www.rzg.mpg.de/~bds/
.
|
|
|
|
| User: "Joel Kolstad" |
|
| Title: Re: 2D Finite difference equations for voltage from Poisson's Equation |
21 Oct 2003 10:51:45 PM |
|
|
Dr. David Kirkby <see_my_signature_for_my_real_address@hotmail.com> wrote:
I'm using the finite difference technique in a program
of mine to
determine the impedance of arbitrary shaped transmission lines.
This
is based around the equation
div D = 0
Gotcha.
It's fairly easy to show using a Taylor series expansion that
the
voltage at a node (i,j) should be the average or the 4 nodes
around it
i.e.
V(i,j)=(V(i+1,j)+V(i-1,j)+V(i,j+1)+V(i,j-1))/4
Yes.
However, this proof assumes a homogeneous dielectric. I
think at the boundary between a metal and a dielectric perhaps
different equations should be used. Certainly when there is a
change
of dielectric that is so. Does anyone have any guidance on what
one
should do to determine the voltage in a dielectric which is just
one
node away from metal?
All nodes 'within' (or on) the metal are (assuming a perfect conductor) at
the same potential -- you use the formula you already have, just don't
'update' the nodes of the metal itself!
But I bet you really want to know how to update the nodes that are next on
the boundary of a dielectric, right? This is the way we handled such
problems in my numerical electromagnetics class...
Let me attempt an ASCII drawing here:
epsilon1 V1
|
...... <-- path (see below)
. | .
---------V2-.-V0-.-V4---------- dielectric boundary
. | .
......
|
epsilon2 V3
Now, we're going to approximate Gauss's law, that being that the closed path
integral of D*ds=the charge enclosed=0. The path will be as shown by the
periods (.) above. You approximate D*dS along the top horizontal part of
the path as (V1-V0)*epsilon1/dS*dS (dS=step size) and therefore dS cancels.
Along the bottom horizontal part it's (V3-V0)*epsilon2. The left vertical
part you split into (V2-V0)/2*eps1+(V2-V0)/2*eps2 (i.e., you're saying it's
at an effective epsilon of (eps1+eps2)/2), and the right vertical part is
(V4-V0)/2*eps1+(V4-V0)/2*eps2.
Sum this all up, set it equal to zero, and you can solve for
V0=eps1/(eps1+eps2)*V1/2+V2/4+eps2/(eps1+eps2)*V3/2+V4/4. Note that this
reduces to the formula you already have when eps1=eps2.
I have an electronic copy of what is the classic paper on this
topic:
I'm afraid that I don't, so I can't comment further on that. Hope this
helps!
---Joel Kolstad
.
|
|
|
|
| User: "Don Pearce" |
|
| Title: Re: 2D Finite difference equations for voltage from Poisson's Equation |
22 Oct 2003 01:58:29 AM |
|
|
On 21 Oct 2003 20:20:46 -0700,
see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby)
wrote:
Hi,
I'm using the finite difference technique in a program
of mine to
determine the impedance of arbitrary shaped transmission lines.
This
is based around the equation
div D = 0
It's fairly easy to show using a Taylor series expansion that
the
voltage at a node (i,j) should be the average or the 4 nodes
around it
i.e.
V(i,j)=(V(i+1,j)+V(i-1,j)+V(i,j+1)+V(i,j-1))/4
However, this proof assumes a homogeneous dielectric. I
think at the boundary between a metal and a dielectric perhaps
different equations should be used. Certainly when there is a
change
of dielectric that is so. Does anyone have any guidance on what
one
should do to determine the voltage in a dielectric which is just
one
node away from metal?
Some calcualtions of impedance of a transmission line show
erorrs of around a percent or two using just the above equation, but I
know others have got considerably better results than this, and so
have I if I hack the code in a way that is not very logical and
difficult to justify.
I have an electronic copy of what is the classic paper on this
topic:
H. E. Green, (1965), "The numercial Solution of Some Important
Transmission Line Problems", IEEE Transactions on Microwave
Theory and
Techniquest, vol MIT-3, #3, , pp 676.
in which he quotes the above simple expression, plus 28 other
special
cases, which include corners, dielectric interfaces, right hand
edges,
left hand edges ..... etc etc. The problem is I can't figure in
my own
mind how to apply the vast majority of them. Does he mean the
corners
of the whole finite difference matrix (of which there are of
course
4), or corners of metalic conductors ??
Anyone help appreciated.
Dr. David Kirkby,
My email address can be found at
http://homepage.ntlworld.com/drkirkby/home-email.jpg
One of the big reasons for the inaccuracy of the result is that the
simple Laplace equation is incredibly slow in converging on a
solution. This means that the test for convergence must be very
approximate. Substitute instead the over-relaxed equation (which I
think pretty much everybody uses in practice).
V(i,j)=R((V(i+1,j)+V(i-1,j)+V(i,j+1)+V(i,j-1))/4)+(1-R)V(i,j)
Where R is about 1.5. You can vary this a bit to see if it works
faster for you - and the limit case where R = 1 brings you back to the
original Laplace equation.
With this done, you can tighten the test for convergence a long way
and still have this work acceptably quickly.
d
_____________________________
http://www.pearce.uk.com
.
|
|
|
|

|
Related Articles |
|
|