Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8003

Re: solving poisson equation with Mathematica

From JUN <noeckel@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: solving poisson equation with Mathematica
Date 2012-01-19 10:16 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jf8qh3$3nr$1@smc.vnet.net> (permalink)
References <jf6961$gdh$1@smc.vnet.net>

Show all headers | View raw


On Jan 18, 3:07 am, Farhad Bazyari <farhad.bazy...@gmail.com> wrote:
> Hi guys,
>
> I just downloaded Mathematica's trial version.
> I have a vector field, vf, in 3D. I need to find a scalar function
> f(x,y,z) such that Laplacian of f(x,y,z) equals divergence of vf (the
> vector field)
> I need to find f(x,y,z) in the unit cube, and vf is defined in that
> area.
>
> can anyone help me with that please?

This looks suspiciously like a homework problem, so I won't address
the specific case you're describing, except to say that you probably
won't need a Poisson solver at all because you are given more
information than you perhaps realized in the form of vf.

However, if you _do_ want to implement one in 3D, I can point you to
the following page that contains a teaching resource for my
electromagnetism class:
uoregon.edu/~noeckel/computernotes/Mathematica/poissonEquation.html

This shows one way to solve the Poisson equation in 2D.

To implement second derivatives (as required for the Laplacian), I use
RotateRight and RotateLeft on the grid containing the potential. One
can instead also use ListConvolve to achieve the same thing.

Another important aspect is how to impose the boundary conditions. In
electrostatics, these are typically Dirichlet conditions on conductors
of arbitrary shape. To allow arbitrary shapes, I include the
conductors in the computational grid but combine each relaxation step
with a step in which a mask is applied to the grid that sets the
conductors to their given fixed potential.

Jens

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

solving poisson equation with Mathematica Farhad Bazyari <farhad.bazyari@gmail.com> - 2012-01-18 11:07 +0000
  Re: solving poisson equation with Mathematica JUN <noeckel@gmail.com> - 2012-01-19 10:16 +0000
  Re: solving poisson equation with Mathematica Physics Scholar <physics.scholars@gmail.com> - 2012-01-19 11:39 +0000

csiph-web