fatiando / boule

Reference ellipsoids for geodesy and geophysics
https://www.fatiando.org/boule
BSD 3-Clause "New" or "Revised" License
37 stars 16 forks source link

Add attributes for the normal potential to Sphere and Ellipsoid #184

Closed MarkWieczorek closed 3 months ago

MarkWieczorek commented 3 months ago

This PR adds the property reference_potential to the Ellipsoid class. This is $U_0$ as defined by eq 2-123 in Hofmann-Wellenhof and Moritz.

This quantity is required in any application where it is necessary to compute the height of the geoid above the reference ellipsoid. I verified that the value of the GRS80 ellipsoid is what is in the above book.

As part of this PR, I corrected a couple minor typos:

Note: I did not add reference_potential to the Sphere class. This is because (as noted in the docs), the surface of a rotating sphere does not correspond to an equipotential.

We could perhaps instead add

Sphere.reference_gravitational_potential = GM/R

I'm happy to add if others think this is useful. GM/R appears everywhere when working with gravity fields of bodies like the Moon, so maybe it would be useful.

Relevant issues/PRs: Relevant to #151

leouieda commented 3 months ago

Thanks for this @MarkWieczorek! Should we call this surface_gravity_potential instead? Makes it clear that it's not gravitational and is on the surface. Then the Sphere one could surface_gravitational_potential. If you find that it appears in calculations for you, then please feel free to add it. Could also be on another PR if you'd like.

MarkWieczorek commented 3 months ago

Not sure which is best:

reference_gravity_potential reference_gravitational_potential

or

surface_gravity_potential surface_gravitational_potential

Let me think about this, unless someone want to make an executive decision.

leouieda commented 3 months ago

No rush. I'm OK with either one.

MarkWieczorek commented 3 months ago

I'm now leaning towards

reference_normal_gravity_potential reference_normal_gravitational_potential

even though they are long.

In this PR https://github.com/fatiando/boule/pull/187, we define the methods normal_gravity_potential and normal_gravitational_potential which allows you to calculate the two at arbitrary latitude and height. When the height it zero, the potential is constant.

The normal gravity potential on the surface of the ellipsoid is a fundamental parameter. In fact, you can define the reference ellipsoid using {GM, omega, f, a} or {GM, omega, U0, J2}. For this reason, I think that the word "reference" is appropriate. At some point, we should probably allow inputting either {U0, J2} or {a, f}.

I'll make the changes, and then probably change my mind later...

leouieda commented 3 months ago

😆 alright by me. And yes, it would be great to allow creating the Ellipsoid in multiple ways. It just makes the attribute validation logic harder but it should be doable.