Skip to content
Discussion options

You must be logged in to vote

You can add custom diagnostics to achieve this.

diag.particle_fields_to_plot = num ene
diag.particle_fields.num.do_average = 0
diag.particle_fields.ene.do_average = 0
diag.particle_fields.num(x,y,z,ux,uy,uz) = "1."
diag.particle_fields.ene(x,y,z,ux,uy,uz) = "u2=ux*ux+uy*uy+uz*uz;gamma=sqrt(1.+u2);1./(1.+gamma)*u2*clight*clight"

Then you will have the variables num and ene for each species in your output files. The density is num / cell volume. Similarly, the species energy density is species mass * ene / cell volume.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Aratopn
Comment options

@dpgrote
Comment options

Answer selected by RemiLehe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants