-
Notifications
You must be signed in to change notification settings - Fork 196
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
Averaged over an axis in a 2D simulation #5460
Comments
Hi @Tissot11, For You could use a combination of the options:
You could play around and set the number of cells to average over to exactly the number of cells in the field output you are getting. However, what you are describing with the momenta sounds to me like you would want to output phase spaces of particles. That is easily possible with the PhaseSpaceElectrons.type = ParticleHistogram2D
PhaseSpaceElectrons.intervals = 100
PhaseSpaceElectrons.species = electrons
PhaseSpaceElectrons.bin_number_abs = 1000
PhaseSpaceElectrons.bin_number_ord = 1000
PhaseSpaceElectrons.bin_min_abs = -5.e-6
PhaseSpaceElectrons.bin_max_abs = 25.e-6
PhaseSpaceElectrons.bin_min_ord = -197
PhaseSpaceElectrons.bin_max_ord = 197
PhaseSpaceElectrons.histogram_function_abs(t,x,y,z,ux,uy,uz,w) = "z"
PhaseSpaceElectrons.histogram_function_ord(t,x,y,z,ux,uy,uz,w) = "uz"
PhaseSpaceElectrons.value_function(t,x,y,z,ux,uy,uz,w) = "w"
PhaseSpaceElectrons.filter_function(t,x,y,z,ux,uy,uz,w) = "sqrt(x*x+y*y) < 1e-6" You can choose axes for the 2D histograms freely (e.g., Does that answer your question? |
Hi @n01r Thanks for the fast reply! I am already saving phase space using I had overlooked
This should also produce the same output as with Could you please look at other questions of mine and answer if possible. I am new to WarpX and although the documentation is very good, there are always some subtle points that would be better to clarify for me first otherwise I ended up misunderstanding some features. |
The options I have not used the I may not fully understand yet why you should not be able to add another Why not do the following? pvsx.type = ParticleHistogram2D
pvsx.intervals = 100
pvsx.species = <your_species>
pvsx.bin_number_abs = <number of desired bins in x>
pvsx.bin_number_ord = <number of desired bins in p>
pvsx.bin_min_abs = Lx/2
pvsx.bin_max_abs = 0.75*Lx
pvsx.bin_min_ord = <expected lowest limit of p>
pvsx.bin_max_ord = <expected highest limit of p>
pvsx.histogram_function_abs(t,x,y,z,ux,uy,uz,w) = "x"
pvsx.histogram_function_ord(t,x,y,z,ux,uy,uz,w) = "sqrt( ux*ux + uy*uy + uz*uz)"
pvsx.value_function(t,x,y,z,ux,uy,uz,w) = "w"
pvsx.filter_function(t,x,y,z,ux,uy,uz,w) = <some other filter you may want to add, like filtering in y> I can have a look at the other questions but would formulate an answer if I feel like I can be immediately helpful. 😅 |
I did actually this as you suggested. Since this diagnostics is reduced, I assumed, it is better suited for checking quantities rather than analysing the physics because data in these files is rather small. I am yet to visualise these results though for these reduced diagnostics. I'll let you tomorrow. |
Dunno if I got that right that there may be a misunderstanding, but to clarify: the "reduced" in The particle fields that you are using are similar to what you can set up with |
Ok. I guess because of the term In fact, now I realized why the file sizes are bigger using Another clarification needed: is |
I just checked. Unfortunately, that has not been implemented so far, but I think it is a good change to make.
Yea, in a way. We are working on gradually making the diagnostics more configurable and comfortable for the user.
You can see |
Thanks for this clarification and now I have answers to my confusions! |
Cool, thanks for your questions! |
Is it possible to write in the diagnostics data averaged over one direction e.g.
y
for a 2D simulation?Also I wanted to save particle momentum
p
, so I used (#5131 input deck)But doing this gives
u
vsx
andy
. Is it possible to savep
vsx
for a 2D simulation withp
being averaged overy
in the diagnostic?The text was updated successfully, but these errors were encountered: