diff options
author | 2021-02-12 02:49:18 +0100 | |
---|---|---|
committer | 2021-02-11 17:49:18 -0800 | |
commit | 20234864e6a719adb05ccbe225dc581dabc33572 (patch) | |
tree | 8d9ab2b497f67375bdb4742a7f17696e6ab79a50 /Source/Utils/WarpXMovingWindow.cpp | |
parent | 8c4abec3b0e21849b6308aee5c14fb261ca5a950 (diff) | |
download | WarpX-20234864e6a719adb05ccbe225dc581dabc33572.tar.gz WarpX-20234864e6a719adb05ccbe225dc581dabc33572.tar.zst WarpX-20234864e6a719adb05ccbe225dc581dabc33572.zip |
Close #1688 : Transform the moving window velocity to its boosted-frame value. (#1700)
* Source/Utils/WarpXMovingWindow.cpp : Transform 'moving_window_v' to that in the boosted frame '(moving_window_v-beta_boost*c)/(1-moving_window_v/c*beta_boost)'.
Examples/Tests/moving_window_boost : A simple test gives the moving window velocity in the boosted frame.
* Remove test
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Diffstat (limited to 'Source/Utils/WarpXMovingWindow.cpp')
-rw-r--r-- | Source/Utils/WarpXMovingWindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index b8401c9a6..73a5307d2 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -44,7 +44,7 @@ WarpX::MoveWindow (bool move_j) // Update the continuous position of the moving window, // and of the plasma injection - moving_window_x += moving_window_v * dt[0]; + moving_window_x += (moving_window_v - WarpX::beta_boost * PhysConst::c)/(1 - moving_window_v * WarpX::beta_boost / PhysConst::c) * dt[0]; int dir = moving_window_dir; // Update warpx.current_injection_position |