-
Notifications
You must be signed in to change notification settings - Fork 9
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
[JOSS Review] Sign of acceleration components? #28
Comments
After checking again, I think you are right. In context of my issue #29 it appears that both the signs of all quantities are flipped in general (at least for my test body and according to the sign convention for the potential in my field), and additionally the Vz/Vy/Vz are flipped again with respect to the potential and the tensor. According to the definition in my field (physical geodesy), the potential outside a body with positive density is also defined positive. The gravitational acceleration is then the NEGATIVE derivative of the potential, e.g. dg_z = -Vz. Since the potential becomes smaller at further distance of the body, the sign of Vx/Vy/Vz should then be negative, whereas the acceleration is positive (but becomes also smaller in magnitude with increasing distance). UPDATE 2024-03-11:
|
The problemSo, the primary concern is that the acceleration's sign is inverted compared to the potential and the second derivative tensor. Handling until nowHowever, I want to put the following things for reference in the issue (since this sign question still is a bit unclear to me since I am not a domain expert):
Towards a solutionTo summarize, I am highly convinced by the fact that the numerical derivatives sign is flipped when compared to the derivative as returned by the implementation. So, I would definitely add a minus multiplication to the acceleration output. Anyways, many thanks the two of you for bringing up this issue in detail and stating examples - this is highly appreciated. |
Hi @schuhmaj. Thanks for the detailed reply. I think the solution of adding a -1 to the acceleration will solve the issue I get in that particular example, although I think it would be more important to be sure why the implementation needs that -1 sign, so the fix applies to every possible case and not just this one. Regarding your comments on why this is needed, I'm not very familiar with Tsoulis et al.'s implementation, and I'm not sure why they return absolute values. But I could say that your advisor is right when they stated that the issue the sign of the potential is a "definition thing". Lets consider the gravity acceleration vector The minus sign used in the definition of Nonetheless, in geodesy and geophysics, the positive sign convention is usually used, so Meaning that gravitational potentials have positive values for In conclusion, the sign of the potential could be either positive or negative, as long as it is clear what convention the implementation is applying. Regarding the acceleration vector, its sign must match the attractive nature of gravitational interactions for positive masses. Hofmann-Wellenhof and Moritz (2005). Physical Geodesy. doi: 10.1007/b139113 |
I think I have to make a general comment here: Firstly, as I now realized, with the correct mesh orientation of the test cube the package delivers a positive potential (outside the test body), decreasing when facing away from the mass. As outlined below by @santisoler, this is in line with the convention in physical geodesy. Now, regarding this geodetic convention:
To conclude: Sign of the accelerations here are defined always "downwards" (irrespective of where the mass, the computation point and the coordinate system actually are) for z, or towards "west"/negative x and "north"/negative y, accordingly. Therefore, I can only strongly advise not to just take the absolute value of any of the vector components. This should be clearly stated in the description of the package. In particular, the table in paragraph "Output" is wrong and should be corrected to -Vx, -Vy and -Vz. |
So, if I get this correctly, sorry, if I am asking so stupidly, but I am quite a lot confused with the sign: At the moment:
So, to comply with the geodesy and geophysics conventions, I must:
OR
AND ANYWAYS
Is this correct? |
There are not stupid questions 🙂. I think is super valuable that you are asking for clarification. I would suggest to take the 1b path. I think it's easier to understand and document the definition of the potential as positive and that the acceleration vector is returned as: If the 1a path is chosen, then it would be wrong to call the Minor comment regarding orientation of axis. I appreciate the point that @JoachimSchwabe makes regarding the gravity acceleration measurements in geophysics. Nonetheless, I think the main confusion that comes from (and this are historical reasons) the fact that in most geophysical literature, authors refer to In conclusion, given the fact that From personal preference, I would use the geodetic convention of defining the potential |
I pretty much agree with santosoler. Again, whether Vx etc. or -Vx etc. points towards the mass depends on the coordinate system and the location of mass and computation point. And as I had written before and santosoler pointed out again, the convention with the negative sign for the acceleration comes from the case of surface gravimetry where the acceleration is considered as the vertical component only and points downwards, whereas the height coordinate points upwards. This concept does not really make sense for general 3d coordinates, or also for the "horizontal" component of the gravity vector, if x and y are associated with east and north. |
Thanks a lot to both of you for taking the time to detail your explanation a second time. Now, I get it 🙂 #31 fixes the sign issues by adding a -1 multiplication to the acceleration while also improving the documentation with regard to the convention being utilized. |
While playing with the minimal Python example shown in the
README.md
I defined a cube in the (+,+,+) octant, so one of its vertices is in[1, 1, 1]
and its opposite one in[2, 2 ,2]
, with a density of 1.0. Then I defined a computation point in the origin ([0, 0, 0]
) and used theevaluate()
function to compute its fields.After running this code I get:
The three components of the acceleration are negative, which would imply that any particle located in the computation point would feel an acceleration towards the (-,-,-) octant, meaning it would feel a repulsive force from the gravitational interaction with the cube. Given that the cube has a positive density, I'd assume that the three components should be positive, not negative.
Is this the expected result? Or are there any sign conventions that I missed?
This issue is part of the JOSS review: openjournals/joss-reviews#6384
The text was updated successfully, but these errors were encountered: