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 normal_gravitational_potential, normal_gravity_potential, and centrifugal_potential #187
Open
MarkWieczorek
wants to merge
18
commits into
fatiando:main
Choose a base branch
from
MarkWieczorek:normal_potential
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MarkWieczorek
force-pushed
the
normal_potential
branch
2 times, most recently
from
April 11, 2024 22:04
2e1c831
to
87f8529
Compare
MarkWieczorek
force-pushed
the
normal_potential
branch
from
April 11, 2024 22:08
87f8529
to
6cd8b39
Compare
This was referenced Apr 12, 2024
MarkWieczorek
force-pushed
the
normal_potential
branch
4 times, most recently
from
April 18, 2024 10:02
c19732d
to
bf05e20
Compare
MarkWieczorek
force-pushed
the
normal_potential
branch
from
April 18, 2024 10:06
bf05e20
to
894d0ae
Compare
I added a centrifugal_potential method for the triaxial ellipsoid now that PR with the semimajor_axis_longitude attribute has been accepted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes several additions in order to compute the normal gravity/gravitational potential on or above the ellipsoid.
normal_gravity_potential()
,normal_gravitational_potential()
andcentrifugal_potential()
methods to both the Ellipsoid and Sphere class.Ellipsoid.geodetic_to_ellipsoidal_harmonic()
andEllipsoid.ellipsoidal_harmonic_to_geodetic()
.normal_gravity_potential() = normal_gravitational_potential() + centrifugal_potential()
.Notes
The centrifugal potential calculation needs the perpendicular distance to the rotation axis. For this, I used the definition of the prime radius of curvature and geodetic latitude which gives:$(N(\phi) + h) \cos\phi$ , where $\phi$ is geodetic latitude and $h$ is ellipsoidal height. There are probably other ways that this could be calculated. A separate PR will implement this for triaxial ellipsoids, as we will need to change how we handle
longitude_semimajor_axis
.The geodetic to ellipsoidal harmonic coordinate transforms work, but I am worried about the precision. The conversion from geodetic to ellipsoidal uses the same code as in the
normal_gravity
method, which is based on the equations in Lakshmanan (1991). The inverse is just a a couple atans for the latitude, and the ellipsoidal height is computed as the difference of theprime_vertical_radius
of the two ellipsoids. Even if I can understand why the height might lose precision this way, the latitude shouldn't.Here are a couple of examples:
Maybe this is good enough. I suspect that the loss of precision comes from the Lakshmanan equations (which have some subtractions of similarly sized numbers). Perhaps there is nothing we can do about it. Nevertheless, I note that if this is a problem, then it will also affect the normal gravity routine that uses the same method.
Relevant issues/PRs:
Closes #151