simpeg / geoana

Interactive geoscience (mostly) analytic functions.
MIT License
22 stars 9 forks source link

Gravity due to a point mass & sphere #39

Closed jcapriot closed 2 years ago

jcapriot commented 2 years ago

We should add the simple solutions for the gravitational potential, field, and even the gravity gradient due to a simple point mass. The formulas should be straightforward enough to implement!

U_g = G * m/ r

g_vec = -G *m *r_vec/ r**3

gg_tens = -G * m * (eye /r**3 - 3 * outer(r_vec, r_vec) / r**5)

etc..

This could then be extended for a sphere,

lheagy commented 2 years ago

where do you think this should live @jcapriot? geoana/gravity.py?

jcapriot commented 2 years ago

Sounds like a great place!

jcapriot commented 2 years ago

The only question is... do we decide the relationship between gravity and it's potential is g = -\nabla U or g=\nabla U...

lheagy commented 2 years ago

I would be inclined to follow Blakely on this and use g = \nabla U

lheagy commented 2 years ago

One other note is that scipy.constants includes G, so we can make use of that: https://docs.scipy.org/doc/scipy/reference/constants.html