Comments (21)
Just a precision: the magnetic field is shifted by half a timestep compared to its value from Field diagnostics. Right? Is this what you meant?
from smilei.
Not exactly. It is shifted by half a timestep and half a spatial step. In particular, if particle moves along x direction inside the plane wave, which is propagating in -x direction, then the vector of the transverse magnetic field (B_y,B_z) in TrackParticles/ParticleBinning diagnotics is rotated by the angle phi=timestep*(1+v_x)/2
from smilei.
I don't understand how there could be a spatial shift. Is it due because of the wave displacement during that half timestep?
from smilei.
I think it is due to the particle displacement during the half timestep, since there is the term timestep*v_x/2
from smilei.
But what do you compare it with? The field diagnostic? If yes, i believe those are not properly aligned (by half a cell) in happi
from smilei.
No, actually I calculate the longitudinal component of the Lorentz force ([v x B]_x, for circular polarization it is also the ponderomotive force), and I know that (at least for rare plasma) the integral over time of it should be equal to zero. It is zero ideed after the rotation I described above.
from smilei.
@egelfer Could you try your test using the option keep_interpolated_fields
? It probably changes the results as the interpolated fields are calculated at the correct time with this option.
from smilei.
Actually I used the option keep_interpolated_fields=["Ex","Ey","Ez","Bx","By","Bz"]. Do you want me to run the test without it?
from smilei.
yes that would be good.
Now your result is puzzling. Those fields are supposed to be exactly those calculated for pushing particles
from smilei.
Yes, I also assumed it and was very much surprized :)
from smilei.
Ah well in fact I forgot that the magnetic field is interpolated at integer timesteps while the velocity is known at half-integer timesteps
Thus the shift?
from smilei.
Yes, I suppose that might be the source of the shift
from smilei.
Did you manage to test without keep_interpolated_fields
?
from smilei.
Did you test without keep_interpolated_fields
?
from smilei.
I made some changes in the documentation in branch develop. Please reopen if necessary
from smilei.
Did you test without
keep_interpolated_fields
?
Sorry, I forgot to answer. In this case the simulation crushes.
I also wanted to ask, is it possible to output the magnetic field in a way similar to when the force acting on a field is calculated (https://smileipic.github.io/Smilei/Understand/algorithms.html#the-pic-loop), i.e. (B_p^{(n+1/2)}+B_p^{(n-1/2)})/2 ? Unfortunately my method to recover the correct field is valid only for a plane wave, and it is not always the case.
from smilei.
keep_interpolated_fields
exactly retain the value of the fields that were obtained during interpolation. So you should have the force exactly.
from smilei.
That's what I assumed! :) But it is not, what I've got. Here is the plot of average longitudinal momentum (darkred, obtained from the ParticleBinning diag) in the collision of electron-positron bunch with a pulse plane wave. Magenta curve corresponds to the integral of the (averaged over the particles) force F_x= [v x B]_x+E_x with the E and B fields obtained from TrackParticles diag. Orange curve corresponds to the integral of F_x'= [v x B']_x+E_x, where B' is B shifted by a half step. However, as I wrote above, it works only for a plane wave field.
from smilei.
Are you using the velocity from tracked particles as well? As the fields and velocities differ by half a timestep that might be the problem
from smilei.
Yes, the velocities are taken from TrackParticles diag as well
from smilei.
Well then there you have it. It is not the fields that are out of phase. It's the velocities
from smilei.
Related Issues (20)
- Enabling Prescribed Field for AM Geometry HOT 1
- Force final step to be restartable option HOT 2
- 'cannot convert float NaN to integer' error when opening Track Particles Diagnostic HOT 13
- Thermal boundary condition HOT 2
- Deprecated pyplot register_cmap HOT 3
- problems with species creation while using parallelization HOT 4
- TrackParticles has different fusion neutron weights at low energies HOT 10
- ansys fluent
- timestep_over_CFL leads to an index error HOT 4
- AMcylindrical geometry: showing the Field diagnostic on both half planes
- Screen Diagnostic Not Working HOT 5
- PML for magnetized plasmas HOT 3
- Only electron, no ion in Species block
- The particle kinetic energy density HOT 1
- Error building HOT 1
- Failed to compile for GPU HOT 3
- Alfven wave absorption boundary conditions HOT 10
- GPU Quadro M5000 Installation Failed HOT 5
- Installation Failed on NVIDIA QUADRO M5000 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smilei.