Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

MarkWieczorek
Copy link
Contributor

@MarkWieczorek MarkWieczorek commented Apr 8, 2024

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:

  • The linear eccentricity was given the mathematical symbol E in the docstring (as opposed to "c" which has several other meanings)
  • The volume of an ellipsoid was defined using "c" instead of "b" in the docstring.

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
Copy link
Member

leouieda commented Apr 17, 2024

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
Copy link
Contributor Author

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
Copy link
Member

No rush. I'm OK with either one.

@MarkWieczorek
Copy link
Contributor Author

I'm now leaning towards

reference_normal_gravity_potential
reference_normal_gravitational_potential

even though they are long.

In this PR #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
Copy link
Member

😆 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.

@leouieda leouieda changed the title Add reference_potential for the Ellipsoid class Add attributes for the normal potential to Sphere and Ellipsoid Apr 17, 2024
@leouieda leouieda merged commit 87fefd2 into fatiando:main Apr 17, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants