-
Notifications
You must be signed in to change notification settings - Fork 199
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
Diagnostics : EM fields on particles #5637
base: development
Are you sure you want to change the base?
Diagnostics : EM fields on particles #5637
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…rpX into diags_em_on_particles_2
tmp.NewRealComp("Ex"); | ||
tmp.NewRealComp("Ey"); | ||
tmp.NewRealComp("Ez"); | ||
tmp.NewRealComp("Bx"); | ||
tmp.NewRealComp("By"); | ||
tmp.NewRealComp("Bz"); | ||
|
||
int const Ex_index = tmp.getParticleComps().at("Ex"); |
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.
There will be a minimal change we need to add to this PR once we merged #5481 (simplification of named SoA bookkeeping), but it will be easy to update once your PR is ready/out-of-WIP.
@@ -590,6 +590,9 @@ for (const auto & particle_diag : particle_diags) { | |||
if ( particle_diag.m_plot_phi ) { | |||
storePhiOnParticles( tmp, WarpX::electrostatic_solver_id, !use_pinned_pc ); |
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.
@RemiLehe , do you know why for storePhiOnParticles
we pass !use_pinned_pc
instead of full_diag
?
for more information, see https://pre-commit.ci
Co-authored-by: Luca Fedeli <[email protected]>
Co-authored-by: Luca Fedeli <[email protected]>
Co-authored-by: Luca Fedeli <[email protected]>
for more information, see https://pre-commit.ci
Removed unnecessary comments
for more information, see https://pre-commit.ci
This PR implements the
EM
option for particles diagnostics output. It is an extension of #4599 and #4839 and works in the same way. It allows the user to output the electromagnetic fields seen by particles.I added a test case
test_2d_particle_EM_diagnostics
with its analysis. This case represents a single particle fixed in a box traversed by a laser pulse, and the analysis verifies that the fields are matching the theoretical ones.I also tested the diagnostics on bigger cases, and I noticed that when writing a lot of timesteps with a lot of particles, reading the diagnostics with
adios2
file-based encoding is very slow due to the high number of opening/closing files. Moreover, it appears thatopenpmd-viewer
does not support reading variable-based encoding, so I wrote some scripts to read them directly using theadios2
python API, that I added inTools/PostProcessing/read_variable_based_adios2.py
There is a small update in the documentation to add the description of both the diagnostics and the script
This diagnostics does not support mesh refinement at the moment, this should be added in a follow up PR