From 20234864e6a719adb05ccbe225dc581dabc33572 Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Fri, 12 Feb 2021 02:49:18 +0100 Subject: 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 --- Source/Utils/WarpXMovingWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Utils/WarpXMovingWindow.cpp') 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 -- cgit v1.2.3