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

unexpected density decrease with particle injector #572

Open
rl3418 opened this issue Nov 15, 2022 · 2 comments
Open

unexpected density decrease with particle injector #572

rl3418 opened this issue Nov 15, 2022 · 2 comments
Assignees
Labels

Comments

@rl3418
Copy link

rl3418 commented Nov 15, 2022

Figure_1
injection.txt
I modified the example script for 2D particle injection. So I defined the species to have a constant density beyond a certain distance and injected the particles from xmax. It is working well with 'random' position intialisation, but when I switch to 'regular', the injected particles are at a slightly lower density than the specified value as shown in the figure attached.

@rl3418 rl3418 added the bug label Nov 15, 2022
@xxirii xxirii self-assigned this Nov 16, 2022
@xxirii
Copy link
Contributor

xxirii commented Nov 16, 2022

Hi @rl3418,

This problem is known and partially explained in https://smileipic.github.io/Smilei/Understand/particle_injector.html
I made some tests this morning just to be sure you were not observing a new problem.

Some particles do not cross the boundary during the timestep dt leading to lower density. The phenomenon will be less visible if you use more particles. The problem comes from the way we inject particles. We have some ideas to fix that but not yet implemented. This is not a bug but a model issue.

I suggest you use the random distribution with the injector.

@rl3418
Copy link
Author

rl3418 commented Nov 16, 2022

Thanks for your reply. I will try that then. When I initialise the injected species, is it possible for it to only have non-zero density beyond the simulation box? Though the density will be lower, I guess that will give the particles the same density at least.

@xxirii xxirii mentioned this issue Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants