-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fully-implicit cosmic-ray diffusion module using Multigrid #550
Conversation
Also removed unused flags.
This also includes refactoring of the original multigrid
Also refactored octets
This is much simpler.
…ries Add a trap for periodic BCs
…n for MG coefficients Not working yet.
Steady state approximation for CR diffusion Diagnosis options Skipping unnecessary calculations
@changgoo , can you tell me why the regression tests failed? |
I'm going to forward the error message to you.
Dr. Chang-Goo Kim
Research Scholar
Department of Astrophysical Sciences
Princeton University
http://changgoo.github.io/index.html
…On Sun, Dec 24, 2023 at 8:37 AM Kengo TOMIDA ***@***.***> wrote:
@changgoo <https://github.com/changgoo> , can you tell me why the
regression tests failed?
—
Reply to this email directly, view it on GitHub
<#550 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNKZHZLZTQKTYVCU7M746DYLAVX5AVCNFSM6AAAAABBBJH6CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGUYTSMBVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks! And it is still failing... |
It turned out this is a bug in the script itself. The first pgen in each set was removed by pop and not tested with double precision
I am happy to merge it, and I agree to tag it, 2023 or 2024. |
My biggest questions regarding this PR are about how the Your edits to https://github.com/PrincetonUniversity/athena/wiki/Cosmic%E2%80%90ray-diffusion-with-Multigrid nicely contrast the two algorithms, but do we need to be worried about a user configuring Athena++ with both options? I cant imagine any reason why you would want to use both at the same time, so maybe we should have Other comments:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
I am currently quite busy, but will work on it over this weekend (or next week). |
Currently, they are just independent modules to solve similar problems and do not share anything.
I think it is totally up to users' discretion. One can use CR diffusion for low-energy CR and Yanfei's CR for high-energy CR, for example, although I think such use cases are VERY limited. So I am happy to make them exclusive, but theoretically they are not and that's why I left so.
First of all, my CR diffusion is designed for more specific problems with different approximation. For my purpose, this is to calculate the ionization rate in star forming clouds. I can change ecr to u_cr, but I do not think they have to be the same as they have different array dimensions and are in different modules. Lambda and Zeta are used to calculate the ionization rate which can be used for non-ideal MHD. In Yanfei's CR, one can implement such terms using the source function, but Lambda has to be specified for the full-implicit calculation. I am going to move zeta_factor outside the module.
I am going to modify the documentation.
cr_diffusion_transport sounds confusing to me.
@yanfeij ? |
Documentation changes look good, except I noticed that for And for https://github.com/PrincetonUniversity/athena/wiki/Cosmic%E2%80%90ray-diffusion-with-Multigrid |
The ionization rate zeta can be easily calculated. See the wiki documentation.
I've pushed slightly updated code, and I also updated the wiki. |
Here is my Christmas present.
Prerequisite checklist
Description
This PR implements a fully-implicit cosmic-ray diffusion solver using the Multigrid method. For details, please see [[Cosmic‐ray diffusion with Multigrid]] in Wiki. This also includes some enhancements in the Multigrid solver. It is now generalized for complicated physics. Also, now users can set the Multigrid parameters at runtime and additional diagnosis information can be shown on the fly.
Note that this is quite different from Yan-Fei's [[Cosmic Ray Transport]] module. This module adopts the diffusion approximation solving the zeroth moment only, which is less accurate. On the other hand, as this is a fully-implicit method, it runs using the (long) timestep of the MHD part, without using the reduced speed of light technique.
Testing and validation
An anisotropic diffusion test problem is implemented, but more quantitative tests are necessary.
The capability is still limited, but I think it is already useful for some users, and I want users to help testing and improving it.