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

current and species current #750

Open
feelingxxxxxxx opened this issue Nov 22, 2024 · 2 comments
Open

current and species current #750

feelingxxxxxxx opened this issue Nov 22, 2024 · 2 comments

Comments

@feelingxxxxxxx
Copy link

Hi,
I set the output of J_z in the input.deck,as shown in the first figure. However, when I read the sdf of J_z by Matlab, I find the J_z not equal J_{iz}-J_{ez},and J_z not equal J_{iz}+J_{ez}, and J_z not equal J_{ez}-J_{iz}. So, what do the J_z, J_{iz} and J_{ez} represent respectively in the second picture,and what is the relationship between them?

PixPin_2024-11-22_15-58-22

PixPin_2024-11-22_15-52-21

@Status-Mirror
Copy link
Collaborator

Hi @feelingxxxxxxx,

I think the code uses two different methods to calculate the total current density, and the particle-specific current density.

For the total, we look at the macro-particle shapes in each cell before and after the push. From the change in cell-weighting, we deduce the current-flow. This has the effect of being charge-conserving.

For the by-species current, we take the instantaneous momentum of each macro-particle, and calculate its current from the product of its charge density and speed. This is then written to the grid using the macro-particle shape. This is a slightly different operation, as it doesn't take into account the changing weights in each cell over a step.

So the results won't be exactly the same, but they should still be very close. Are you finding the currents to be radically different?

Cheers,
Stuart

@feelingxxxxxxx
Copy link
Author

Hi @Status-Mirror ,
Thank you for your reply. I have drawn the total current density and the species' current density, which are slightly different. So, if we need to use the current density data, do you have any good ideas about how to deal with them?
untitled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants