# Fast and Efficient Lunar Finite Element Gravity Model
## 3 Representations of Lunar Potential Using Orthogonal Finite Elements
### Results of the FEM LP Analysis  
The following discussion delves into the results derived from the above-mentioned FEM routine applying NASA's LP100K SH model. The primary focus is on determining the best parameters for achieving an optimal balance between computational efficiency and error minimization. For cosine sampling, the number of CGL nodes was highest near the surface and would decrease as the radii increased. The number of sample nodes should decrease as nodes are related to the number of coefficients used in the polynomial approximation at a specific radius. In order to find the best node quantity for each radius, the routine is iterated through uniform node values at each radius until a node value produces an error greater than a tolerance of \(10^{-9}\) m s\({}^{-2}\). Because the number of CGL nodes is related to the polynomial order, the goal is to further investigate by observing how the polynomial order affects computational time. With this, an analogous relationship is observed between CPU time and polynomial order (as expected). Figure 7 illustrates a decrease in time cost as a function of radius alongside the polynomial order decreasing in the same manner, confirming the idea that it takes a longer period of time to approximate at higher polynomial orders than at lower orders. For higher-precision orbit propagation, all terms used in the \((m,n)=(100,100)\) LP spherical harmonic model are considered. As mentioned in the approximation theory, an error tolerance of \(10^{-9}\) m s\({}^{-2}\) is selected while substituting the high-degree order gravity model with a FEM approximation. Figure 8 showcases the maximum absolute error of the approximated norm of the \"disturbance\" acceleration as a function of the Chebyshev polynomial order \(N\). Here, it is noted that as the radius increases, the error declines faster; a smaller polynomial order is sufficient enough to reach the placed error tolerance of \(10^{-9}\) m s\({}^{-2}\). However, in this plot, it is clear that there are two error tolerance values displayed. In the previous analysis, a polynomial order of 21 is identified that yielded an error of \(10^{-9}\) m s\({}^{-2}\). However, after reviewing the coefficient values in this polynomial order, it is found that the portion of corresponding errors was much smaller than allowed error tolerance. This suggests that this polynomial order was significantly implementing a high precision that was computationally expensive. With this, a \"fetching\" routine is implemented where any error values less than our error tolerance had their corresponding coefficient value to be approximated to 0. As an outcome, most of the coefficient values were approximated to 0, further suggesting an excessive polynomial order. After revisiting the current analysis, and after the polynomial order of 18 was found for the surface, the same \"fetching\" routine was performed with \(N=18\), finding that none of the error values strayed too far past the  
Figure 7: CPU and Polynomial Order vs. Radius. The y axis to the left represents the time cost as a function of radius, while to the right represents the polynomial order. error tolerance, which was apparent in the weight of non-zero coefficient values found in that sample. This led us to believe that a maximum polynomial order of 18 was the most reasonable (computationally supportive and precise) option for the surface of the Moon. An error tolerance of \(10^{-9}\) m s\({}^{-2}\) proved to be too conservative. With this, a more liberal error tolerance value of \(10^{-8}\) m s\({}^{-2}\) was placed to ease the amount of computational burden while also still maintaining reasonable error. As we get closer to the surface of the Moon, a higher polynomial order is required to reach this error tolerance. The (100, 100) LP model's gravitational acceleration values are used as the truth and the errors between the FEM approximation are reduced by adjusting the degree value of the Chebyshev polynomials until it reaches the error tolerance.