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

CB72 n<2 getDln fix #7

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

j-iga
Copy link

@j-iga j-iga commented May 8, 2024

Currently, the 0th order density functions for the CB1972 basis return zero.
I think this is because of the line Dln = u2-u0. If $n=0$ then getUln will just return
uact = UAzimuthalInitializationCB72(x,l) , resulting in Dln = 0.0.
Similarly for $n=1$, Dln will be offset by UAzimuthalInitializationCB72(x,l).
To fix, I added a conditional to satisfy (3.14) of Clutton-Brock 1972 so that $\mu^l_n = \phi^{l+1}_n$ for $n&lt;2$.
DensityFix
Above is a plot showing the results before and after the fix.

@MathieuRoule MathieuRoule marked this pull request as ready for review May 9, 2024 10:04
Copy link
Member

@MathieuRoule MathieuRoule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch and fix !

@MathieuRoule MathieuRoule merged commit c7e7630 into JuliaStellarDynamics:main May 9, 2024
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