Solve Poisson’s Equation

Early-on I considered solving Poisson’s equation but thought it too compute intensive. I should reconsider.

Poisson says of the potential πœ™:
βˆ‚2πœ™/βˆ‚x2 + βˆ‚2πœ™/βˆ‚y2 + βˆ‚2πœ™/βˆ‚z2 = 4πρ. ρ = 0 outside the body and ρ = 1 inside. Simple iteration of this numerically provides a relaxation scheme that might yet win out. Maybe this would help. A pressing problem is to decide how far outside the body we compute πœ™ and what boundary conditions to use there. To first approximation we know the total mass m of the body and πœ™=m/r there is an easy start. There is the complexity to relate the mesh to the body’s boundary.

There are two potentials in this problem. The above πœ™ is just the gravitational potential. The one we use to redistribute mass is πœ™ + (rΟ‰)2/2.

First I presume a uniform square mesh. We need to make body boundary information readily accessible as we run thru the mesh. As we center a calculation on some mesh point we must know whether we and which of the six neighbors are in the body. The two body definitions that seem plausible in this context are the octree and tetrahedral decomposition.

Tetrahedra

In this scheme it is easy to find all of the faces. For each of the three dimensions it is easy to enumerate the piercings of a coordinate line with the triangle. It is error prone but not difficult to avoid double counting at the edges. It is easy, I think to keep a sorted list so that the inner loop of the relaxation code known when things have changed.

For each case where of (x, y, z) two of those are multiples of Ξ΄ and for some triangle face (x, y, z) is in that face, make a record that identifies the point and the face. List sort these by z value and pocket sort them by x and y values.

I can use the Cornet alternating gradient scheme! (No!! It fails badly in a box where North & South walls are 0 and Ease & West walls are 1. πŸ˜•)

Octree

There might be a big win here for large uniform cubes. The implicit logic gives us a transfer function between the elements of the face of a big cube. For a big cube composed of 8n little cubes there are roughly 6βˆ™4n face elements and the square of that transfer elements. They for not depend on time or geometry, however; they are constant. They are also highly redundant. I need to define transfer element. This trick removes the bulk of the relaxation work.