address rotation source in spherical 2d coordinate#2967
address rotation source in spherical 2d coordinate#2967zingale merged 22 commits intoAMReX-Astro:developmentfrom
Conversation
…to 2d_spherical_rotation
…to 2d_spherical_rotation
|
|
||
| Array2D<Real, 0, 2, 0, 2> dt_omega_matrix = {}; | ||
|
|
||
| if (implicit_rotation_update == 1) { |
There was a problem hiding this comment.
what happened to this check on implicit_rotation_update ?
There was a problem hiding this comment.
I think it is missing in fill_dt_omega_matrix
There was a problem hiding this comment.
fill_dt_omega_matrix is only called within if (implicit_rotation_update == 1) I think.
|
|
||
| if (c1) { | ||
| // For Spherical coordinate, the physical position vector is just r rhat, | ||
| // but the input r will be in the format of (r,theta,0). So change it to (r,0,0) |
There was a problem hiding this comment.
in spherical coord, the position vector is just
There was a problem hiding this comment.
Oh, this is because it is the position vector from the origin?
|
okay, everything looks good. can you also update the docs? |
done |
PR summary
This addresses #2927 regarding the rotation bit.$\Omega \hat{z} = \Omega[\cos(\theta) \hat{r} - \sin(\theta) \hat{\theta})]$ .
I mainly separated
get_omega()to return magnitude of the angular frequency,then made
get_omega_vec()to depend on j, sinceTo deal with the problem of position vector, I just made sure
ris (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
CHANGESfile has been updated, if appropriate