Gravity simulation with arbitrary geometries

Click For Summary

Discussion Overview

The discussion revolves around simulating the gravitational trajectory of point-like planets around a body with arbitrary geometry, specifically in a 2D plane of symmetry. Participants explore methods for calculating gravitational fields without needing to solve Poisson's equation in full 3D, considering computational efficiency and the use of Python for implementation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests solving Poisson's equation in 3D but seeks methods to focus calculations on a 2D plane.
  • Another participant shares their experience with 2D polygonal gravity sources, proposing that any polygon can be divided into parallelograms to simplify calculations of the gravitational field.
  • A participant expresses uncertainty about breaking shapes into simpler forms and introduces the idea of treating grid points as Dirac masses to calculate potential using a summation formula.
  • One response discusses the possibility of using a cubical grid where each cube acts as a point mass, noting that smaller cubes yield more accurate results, ultimately leading to an integral over volume.
  • A later reply proposes the idea of performing a 2D integration over the surface of the body using the divergence theorem as an alternative approach.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for simulating gravitational fields, with multiple competing approaches and ideas presented throughout the discussion.

Contextual Notes

Participants express varying levels of familiarity with algorithms for shape decomposition and the mathematical techniques involved, indicating potential limitations in their approaches. The discussion also highlights the trade-off between computational precision and efficiency.

debilo
Messages
6
Reaction score
0
Hello,

I want to study the trajectory of planets (considered as points) around a body with arbitrary geometry (cube,...). I would like to restrict the simulation to a 2D plane, which would be a plane of symmetry of the 3D object (for example a plane that would cut the cube into two equal parts). I thought I'd solve Poisson's equation in 3D. But my computer is not very efficient (and I only know Finite difference methods).

Are there methods to avoid calculating the field in all the pure space to focus on the field in the plane? I couldn't find any articles on this subject.

Thanks.

Edit : I want to do the simulation with Python.
 
Technology news on Phys.org
When I did this for 2d polygonal gravity sources, it turned out to be possible to write an analytical expression for the gravitational field of a parallelogram. Any polygon can be divided into parallelograms, and then calculating the total field was just the sum of the parallelogram fields.

Can you find an algorithm to break your shape into standard simpler shapes - triangular prisms with sloped ends, for example? Can you write down an expression for the gravitational field of that kind of simple shape?
 
  • Like
Likes   Reactions: aaroman
Hello,

thank you for your answer.

Can you find an algorithm to break your shape into standard simpler shapes - triangular prisms with sloped ends, for example?

I really don't know how to do these things.

I had a new idea. Instead of solving the Poisson equation I consider that each point of my grid is Dirac-mass and I calculate the potential on the whole space using the well-known formula : $$V(r)=\sum Gm(r')/|r-r'|$$ I don't know if it's a good idea.
 
It depends what you want. You can, of course, split your object up into a cubical grid and pretend each little cube is a point mass at its center. That will get more accurate the smaller your cubes are - in fact, the limiting case of infinitely small cubes is an integral over the volume, which is exactly what I was proposing.

Algorithms to divide a polygon up into triangles are easy to find online. Imagine drawing a wireframe of your object looking down on it from above - you immediately get a set of polygons that you can triangulate. That gives you the simple polygons. The only question then is if you can write down and/or do the integral to get the gravitational force from such a prism.

However, if you are not going for an analytical solution, then you will have to balance precision (more and smaller cubes) versus the computational cost of doing so.
 
debilo said:
I thought I'd solve Poisson's equation in 3D.

How about a 2D integration over the surface of the body using the divergence theorem?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K