WarpX
WarpX copied to clipboard
[WIP] Option for antenna with non-zero velocity
The laser antenna can already move, and this is used when running in the boosted frame. However, the option to set separately the velocity of the antenna was not implemented. This is what this PR proposes. For the moment, the antenna can only move in the z direction, which should cover most use cases.
Wow, thanks, I need to practice more. If that's fine with you, I'll just simplify the option and only have 1 input parameter vz_antenna, which should avoid confusion.
HIP warning/error addressed in #2840
Thanks for this PR @MaxThevenet.
I have 2 quick additional suggestions (I can implement them in this PR, if you agree with them):
- Would it be OK to modify the code and documentation so that antenna velocity
v_antennais considered to be along the normal to the emission plane (instead ofzspecifically)? (This would make the code slightly more general and allow moving antennas in arbitrary directions - as long as the laser is emitted in the same direction.) - Would it be OK to consider that a non-zero
v_antennais incompatible with the boosted-frame? This is also what we do in FBPIC for instance, because I did not generalize the formulas to make it compatible with both non-zerov_antennaand boosted-frame simultaneously. (See also the previous commit - which I think fixed some of the automated tests - and the associated review comment.)
Regarding the first point, note that the assumption that the velocity is along the normal to the plane is actually made implicitly here, I think: https://github.com/ECP-WarpX/WarpX/pull/2832/files#diff-b9f19654f5fb894bff1eed74a6a13ebc5eb34244edbef306ac5d169743215883R597
I added an automated test that emits a laser with the moving antenna. (The laser is emitted in the direction opposite to that of the antenna motion.)

Some action items left:
- [ ] Need to fix the automated tests
- [ ] When using the moving antenna, I noticed that the time of
profile_t_peakneeds to be adapted in a non-intuitive manner. This needs to be fixed.