Castro
Castro copied to clipboard
address rotation source in spherical 2d coordinate
PR summary
This addresses #2927 regarding the rotation bit.
I mainly separated get_omega() to return magnitude of the angular frequency,
then made get_omega_vec() to depend on j, since $\Omega \hat{z} = \Omega[\cos(\theta) \hat{r} - \sin(\theta) \hat{\theta})]$.
To deal with the problem of position vector, I just made sure r is (r,0,0) before the cross_product call.
I also made computing dt_omega_matrix into a separate function since omega vector now varies.
PR motivation
PR checklist
- [ ] test suite needs to be run on this PR
- [ ] this PR will change answers in the test suite to more than roundoff level
- [ ] all newly-added functions have docstrings as per the coding conventions
- [ ] the
CHANGESfile has been updated, if appropriate - [ ] if appropriate, this change is described in the docs