Chronology Current Month Current Thread Current Date [Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

# Re: discretizing derivatives

• From: "John S. Denker" <jsd@MONMOUTH.COM>
• Date: Sun, 11 Feb 2001 21:35:46 -0500

At 05:20 PM 2/11/01 -0500, Ludwik Kowalski wrote:
One problem with the accuracy of calculating C numerically,
is the size of each cell. Suppose sigmas were calculated and
one needs E (=dV/dl) for the corresponding locations. What
should one use for dl? So far I am using dl=one half of the
cell size. This is based on the assumption that V assigned to
a cell, at the end of iterations, really belongs to the center of
the cell (as far as the r,z projections are concerned). Right?

I rather doubt that is right.

It's fine to consider the cell value to represent the voltage at the center
of the cell. Then the numerator of (dV/dl) is the voltage difference,
center-to-center. So I would think that the denominator would be the
position difference, also center-to-center, i.e. the full cell size, not half.

===========

There remains the question of where to "park" the resulting value of
(dV/dl). There are several plausible choices:
-- take the left difference,
-- take the right difference,
-- take the symmetric long-span difference, or
-- phase shift the E-grid by half a cell relative to the V-grid.

The choices don't matter much in rectangular coordinates, where everything
is nice and linear.

The choices don't matter AT ALL if what you are really interested in the
charge, because that goes like del^2 V, and the Laplacian operator is
beautifully symmetric and on-center; it contains things like (left
difference minus right difference).

The choices DO matter in polar coordinates, because of the nasty
nonlinearity of the (1/r)(d/dr) term. I recommend taking the weighted
average of the right difference and the left difference (weighted by the
appropriate (different!) radius values). If things were linear, this would
reduce to the symmetric long-span difference.