Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Numerical solution of Laplace's equation in cylindrical coordinates

1,004 views
Skip to first unread message

Karmox

unread,
Mar 24, 2011, 8:12:05 AM3/24/11
to
Please point me to a free Matlab code which numerically (by e.g. the finite difference method) solves the Laplace equation in cylindrical coordinates. Further, I'd appreciate an academic textbook reference.

My purpose is to modify this code for fluid flow problems in cylindrical ducts with moving boundaries, which is why I can't use analytic solutions.

Thanks!

Greg Heath

unread,
Mar 24, 2011, 4:27:51 PM3/24/11
to

You may want to investigate the conformal transformation of
coordinates

x = log(r/r0)
y = theta-theta0

Hope this helps.

Greg

Karmox

unread,
Mar 25, 2011, 2:28:04 AM3/25/11
to
Thanks for the suggestion, Greg. However, I don't think this is exactly what I'm looking for. Maybe I just didn't understand your point, but I'll be attempting to get rid of the angular dependence altogether (axisymmetric solution) in the end.

Any more ideas or links? If you know of a web site or reference which just shows the discretized equations corresponding to this PDE in cylindrical coordinates, this would also be helpful.

Thanks again.

Greg Heath <he...@alumni.brown.edu> wrote in message <6f6f8f26-684d-4021...@34g2000pru.googlegroups.com>...

Bruno Luong

unread,
Mar 25, 2011, 3:08:05 AM3/25/11
to
"Karmox" wrote in message <imhclk$fcd$1...@fred.mathworks.com>...

>
> Any more ideas or links? If you know of a web site or reference which just shows the discretized equations corresponding to this PDE in cylindrical coordinates, this would also be helpful.
>

http://mathworld.wolfram.com/CylindricalCoordinates.html
The laplacian operator of antisymmetric function f in cylindrical coordinates is

delta f = d^2f/dr^2 + 1/r * df/dr + d^2f/dz^2

The asymmetric condition to impose is

df/dr = 0 at r = 0

That should be enough for you to start with.

Bruno

Greg Heath

unread,
Mar 25, 2011, 11:07:36 PM3/25/11
to
CORRECTED FOR THE HEINOUS SIN OF TOP-POSTING!

On Mar 25, 2:28 am, "Karmox " <karmoweld...@gmail.com> wrote:
> Greg Heath <he...@alumni.brown.edu> wrote in message <6f6f8f26-684d-4021-a2ea-57f4e18ee...@34g2000pru.googlegroups.com>...


> > On Mar 24, 8:12 am, "Karmox " <karmoweld...@gmail.com> wrote:
> > > Please point me to a free Matlab code which numerically
(by e.g. the finite difference method) solves the Laplace
equation in cylindrical coordinates. Further, I'd appreciate an
academic textbook reference.
>
> > > My purpose is to modify this code for fluid flow problems in cylindrical ducts with moving boundaries, which is why I can't use analytic solutions.
>
> > > Thanks!
>
> > You may want to investigate the conformal transformation of
> > coordinates
>
> > x = log(r/r0)
> > y = theta-theta0

> Thanks for the suggestion, Greg. However, I don't think this is


exactly what I'm looking for. Maybe I just didn't understand your
point, but I'll be attempting to get rid of the angular dependence
>altogether (axisymmetric solution) in the end.

http://groups.google.com/group/comp.soft-sys.matlab/...
msg/9e2eb370164c5085

My point is the log(r) transformation will get rid
of the nasty (1/r) coefficients in the Laplacian
and you will just get the cartesian coordinate
Laplacian in the transformed coordinate.

For incompressible flow the PDE for pressure is
Poisson, not Laplace

http://en.wikipedia.org/wiki/Discrete_Poisson_equation

I did a lot of 2-D plasma and electron beam
quasistatic (i.e., electrostatic Poisson instead of
electrodynamic Maxwell) simulations in cylindrical
coordinates ~ 45 years ago. The log(r)
transformation made the simulations much easier.

> Any more ideas or links?
If you know of a web site or
reference which just shows the discretized equations
corresponding to this PDE in cylindrical coordinates,
this would also be helpful.
>
> Thanks again.
>

Check out the references in the wikipedia article.

Hope this helps.

Greg

Bruno Luong

unread,
Mar 26, 2011, 3:21:04 AM3/26/11
to
Greg Heath <he...@alumni.brown.edu> wrote in message <be8c9403-791e-4736...@n10g2000yqf.googlegroups.com>...

>
> I did a lot of 2-D plasma and electron beam
> quasistatic (i.e., electrostatic Poisson instead of
> electrodynamic Maxwell) simulations in cylindrical
> coordinates ~ 45 years ago. The log(r)
> transformation made the simulations much easier.

Transforming with log(r) made simulation *Much* easier is debatable. The problem of singularity at r=0 is shifted rather than solved: The Finite domain suddenly becomes infinite. The Mesh would deform greatly and the boundary condition at r=0 becomes some kind of infinity radiation...

A full of multitude traps happens with log(r) transformation.

But it's surely something to look at.

Bruno

Greg Heath

unread,
Mar 26, 2011, 4:45:56 AM3/26/11
to
On Mar 26, 3:21 am, "Bruno Luong" <b.lu...@fogale.findmycountry>
wrote:
> Greg Heath <he...@alumni.brown.edu> wrote in message <be8c9403-791e-4736-82d7-3fc14adba...@n10g2000yqf.googlegroups.com>...

You are right. All of my simulations excluded the origin.
with a charged cylindrical conducting boundary at
r = r1 > 0 and dealt with the instability of hollow beams
containing charged particles with perturbed helical orbits.

If I had included the case of solid beams with particle
motion allowed at r = 0, I would have had to use an equation
of motion patch to deal with particles in the region 0<=r<=r1.

I don't remember details, but I don't think the problem at
the origin goes away for particles or fluids in the original
cylindrical coordinate system.

Hope this helps.

Greg

0 new messages