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

Hydrodynamic profile is showing small periodic unphysical kinks #5554

Open
roelof-groenewald opened this issue Jan 14, 2025 Discussed in #5538 · 3 comments
Open

Hydrodynamic profile is showing small periodic unphysical kinks #5554

roelof-groenewald opened this issue Jan 14, 2025 Discussed in #5538 · 3 comments
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: diagnostics all types of outputs component: parallelization Guard cell exchanges and particle redistribution

Comments

@roelof-groenewald
Copy link
Member

Discussed in #5538

Originally posted by moisesae January 6, 2025
I have taken the <u_x> moment using the particle_fields.do_average feature in the input file to get the hydrodynamic flow profile that WarpX interpolates onto the grid which I can then analyze. I have been taking numerical gradients of this profile and have noticed that I consistently get periodic spikes showing up. I thought that if I did a time-average of the velocity profile (~1000 time-steps), I would be able to see that the spikes go away when I apply the gradient. However, they persist even with time-averaging and I am having a difficult time trying to figure out why. They seem to occur every ~1mm but there isn't a length-scale that would correspond to this such as the debye length, gyro-radius, etc, which are sufficiently resolved as well (time-scales too). Pre-gradient, the spikes look small but once you apply the gradient, they get significantly amplified. I can see this in all of the species being simulated, with and without the B-field.

I'm not sure if it is an issue of how the moments are getting interpolated onto the grid, but I would appreciate if anyone could point me to some sanity-checks I can try to pinpoint this down.

image

(Each curve is normalized by their maximum value so they can be plotted on the same scale and be dimensionless)

The following is an example where I used significant time-averaging but the periodic spikes persist.
image

@roelof-groenewald roelof-groenewald added bug Something isn't working bug: affects latest release Bug also exists in latest release version component: diagnostics all types of outputs component: parallelization Guard cell exchanges and particle redistribution labels Jan 14, 2025
@ax3l
Copy link
Member

ax3l commented Jan 14, 2025

Discussed today: @roelof-groenewald checked: the interpolation is already:

  • after particles are redistributed
  • to cell-centered cells

Next thing we want to check: Could be from the used binning functions (2x ParticleToMesh using amrex::getParticleCell) that are used from AMReX, which might shift the position / interpolation point. (Not obvious to us right now from looking at the code that might happen.)

@ax3l
Copy link
Member

ax3l commented Jan 14, 2025

@moisesae thank you for the report. Do you potentially have the time to reduce your reproducer to a smaller input set that can be run quickly on a desktop and post it here?

@ax3l

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: diagnostics all types of outputs component: parallelization Guard cell exchanges and particle redistribution
Projects
None yet
Development

No branches or pull requests

2 participants