-
Notifications
You must be signed in to change notification settings - Fork 200
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
Exchange guard cells with the electrostatic solver #4713
Exchange guard cells with the electrostatic solver #4713
Conversation
8ac9aea
to
e9bd679
Compare
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 this PR! I left few minor comments
Examples/Tests/energy_conserving_thermal_plasma/inputs_2d_electrostatic
Outdated
Show resolved
Hide resolved
Examples/Tests/energy_conserving_thermal_plasma/inputs_2d_electrostatic
Outdated
Show resolved
Hide resolved
################################# | ||
############ NUMERICS ########### | ||
################################# | ||
warpx.serialize_initial_conditions = 1 | ||
warpx.verbose = 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.
I think that these parameters could be considered "general parameters" rather then "numerics" (they are not technical parameters of the solvers used in WarpX)
warpx.do_electrostatic = labframe | ||
algo.field_gathering = energy-conserving | ||
algo.particle_shape = 2 | ||
warpx.use_filter = 0 |
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.
I think that these parameters should be under "numerics"
geometry.dims = 2 | ||
geometry.prob_lo = 0.0 0.0 | ||
geometry.prob_hi = 10.*de0 10.*de0 |
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.
These parameters could be placed in the "general parameters" section above.
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! This looks good.
Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com>
It seems that we forgot to exchange guard cells after the Poisson solver, in the case of the electrostatic solver.
This was detected by looking at energy conservation in a periodic box with a thermal plasma:

input_2d.txt
I added a smaller version of the above test as an automated test. The test checks that the energy is within the dashed back line:
Many thanks to @oshapoval and @jlvay for helping in debugging this.