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

WIP: GRFFE #85

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

WIP: GRFFE #85

wants to merge 2 commits into from

Conversation

bprather
Copy link
Contributor

Reopening since last branch target was deleted.

Andrew Chael just published a GR Force-free E&M/Hybrid GRMHD+GRFFE scheme (https://arxiv.org/abs/2404.01471) which is also implemented in KORAL (https://github.com/achael/koral_lite).

It was too nice a scheme not to just have a go at implementing it in KHARMA (read: "shamelessly copying it from koral and changing variable names"), so here's a draft. This version is still buggy, and not feature-complete compared to KORAL's implementation, but the basics are there. Mostly I'm surprised the variable and package infra accommodates it so cleanly. Maybe finding the bugs will be hell or something, but at this point I'm pleasantly surprised.

Notably:

  • All the flags are already working to know when zones hit FFE and when the FFE-based inversion for GRMHD variables fails
  • I finally moved entropy tracking to its own package, which electrons and FFE now consume. Relatedly, I'm adding a step-end callback for updating single-step derived variables like the entropy, and now the FFE vars
  • When the FFE-only mode gets up and running, it will be the first time KHARMA has ever run without the GRMHD package, which should also provide a nice check on just how flexible the code is, and pays off a ton of work moving stuff out of that package over the last year or two.
  • I renamed all the flag variables, because having an fflag and ffflag, not to mention the also-cryptic eflag and pflag, was going to kill me. Bonus: you can output all flags to a file by adding flags to the output list now.

A bunch left to do here, and without pressing need I may not get back to it for a while. But it's here when someone wants it.

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.

1 participant