-
Notifications
You must be signed in to change notification settings - Fork 213
Add tags and fluxes to the ForceFree evolution system #4344
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
Add tags and fluxes to the ForceFree evolution system #4344
Conversation
95111cd to
bcdfc3a
Compare
| * \f$e^{abcd}\f$ and \f$e^{ijk}\f$ are usual antisymmetric _symbols_ (which | ||
| * only have the value \f$\pm 1\f$) with 4 and 3 indices, respectively, with the | ||
| * convention \f$e^{0123} = e^{123} = +1\f$. | ||
| * |
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.
We use the (sensible) convention e_{0123}=+1!
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.
Agree with @teukolsky!
@yoonso0-0, just so that I follow the convention here: e is just [abcd], and epsilon is the tensor, right?
So that epsilon_{0123} = -epsilon^{0123} = +1; but e_{0123} = e^{0123} = +1 ?
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.
Ah! I missed the point that e was the permutation symbol and epsilon the tensor. It's best not to treat the indices of e as things that can be raised or lowered, so as to avoid confusion. A good notation is e=[\alpha \beta \gamma \delta], with [0123]=+1. Then there's no confusion: \epsilon_{\alpha\beta\gamma\beta]=1/\sqrt{\det{-g}} [\alpha\beta\gamma\delta].
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.
@ermost correct :) @teukolsky sorry for the confusion! I'll update the docs.
| * \f$e^{abcd}\f$ and \f$e^{ijk}\f$ are usual antisymmetric _symbols_ (which | ||
| * only have the value \f$\pm 1\f$) with 4 and 3 indices, respectively, with the | ||
| * convention \f$e^{0123} = e^{123} = +1\f$. | ||
| * |
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.
Agree with @teukolsky!
@yoonso0-0, just so that I follow the convention here: e is just [abcd], and epsilon is the tensor, right?
So that epsilon_{0123} = -epsilon^{0123} = +1; but e_{0123} = e^{0123} = +1 ?
| "Options related to constraint damping"}; | ||
| using group = ForceFreeGroup; | ||
| }; | ||
|
|
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.
The force-free current includes a damping term, that acts as an effective resistivity.
It might make sense to add an option for that, too. Sometimes this needs to be adjusted.
Eta might be a good name; it has the same dimensions as the Kappa's
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.
Thanks for pointing this out!
From your paper I see Nu was used and in Alic's paper SigmaB was used. I think we can use Eta when we describe our equations, but would prefer some descriptive name inside the code.
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.
something like RelaxationParameter? I cannot think of a good name on this, but I can put this parameter in a separate option group named like ForceFreeCurrent:
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.
How about ParallelConductivity? Physically that parameter is the conductivity parallel to magnetic field lines.
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.
Sounds nice 👍
f856de6 to
07fe16c
Compare
|
Rebased and pushed fixups |
ermost
left a comment
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.
fixUps look good to me
07fe16c to
b33772a
Compare
| namespace ForceFree { | ||
|
|
||
| namespace detail { | ||
| void fluxes_impl( |
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.
Change the detail namespace to an anonymous namespace. Alternatively, combine this function with the one that calls it.
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.
@nilsdeppe I think I asked about this to you before, on separating _impl function inside a detail namespace. If I remember correctly this is for reducing memory allocations when computing the DG time derivative.
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.
@wthrowe GRMHD is also using this _impl splitting
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.
Yes, in the GRMHD system it's done because we need to compute the fluxes and sources on different grids with FD
|
|
||
| tilde_e_flux->get(j, i) += -get(lapse) * it.sign() * | ||
| tilde_b_one_form.get(k) / | ||
| get(sqrt_det_spatial_metric); |
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.
Move it.sign() to immediately after the -. This reduces the number of DataVector math operations by one. General rule is to put all non-DataVector factors first.
Optional: the one_form variables are only used in the combination lapse * one_form / sqrt_det_spatial_metric, so those factors could be included in the precomputed value.
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.
Pushed a fixup for this.
0c5d991 to
e51c178
Compare
e51c178 to
2c71146
Compare
|
Rebased and pushed fixup. I interchanged |
2c71146 to
df2aa9f
Compare
|
Will this system use subcell? I'm not familiar enough with it to know what typical results look like. |
|
Yes |
|
OK, sounds good then. Go ahead and squash. |
df2aa9f to
795c5dd
Compare
|
Thanks for the review! |
Proposed changes
Upgrade instructions
Code review checklist
make docto generate the documentation locally intoBUILD_DIR/docs/html.Then open
index.html.code review guide.
bugfixornew featureif appropriate.Further comments