-
Notifications
You must be signed in to change notification settings - Fork 191
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
General moving-window transformations in boosted-frame simulations #5226
Conversation
The diagnostic field output window, specified via WarpX/Source/Diagnostics/Diagnostics.cpp Line 229 in 78ff8bf
|
Head branch was pushed to by a user without write access
@@ -194,8 +231,11 @@ void ConvertLabParamsToBoost() | |||
{ | |||
if (boost_direction[dim_map[idim]]) { | |||
amrex::Real convert_factor; | |||
// Assume that the window travels with speed +c | |||
convert_factor = 1._rt/( gamma_boost * ( 1 - beta_boost ) ); | |||
amrex::Real beta_window = beta_boost; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
amrex::Real beta_window = 0;
i.e. if do_moving_window
is false, the velocity of the moving window is effectively 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I got confused. After more thought, I agree that this should be amrex::Real beta_window = beta_boost;
in the absence of an explicit moving window.
Thanks for this PR! I also had a question (see inline comment), but have not modified the code according to what I was suggesting in this question. |
During initialization in boosted-frame simulations, the moving window, of length$L$ given in lab-frame coordinates, is resized along the direction of the boost. Currently, the code assumes that the moving window is traveling along the direction of the boost at the speed-of-light.
This PR generalizes the transformation of the moving window from the lab-frame to the boosted-frame, taking into account the direction and speed of the moving window (c.f., Eq. 1 in Ref. [1]). As an example, let's say the boosted-frame moves with speed$\beta = 0.6$ ($\beta$ , then its length in the boosted frame is $L \gamma = 1.25 L$ rather than $2 L$ , as is currently calculated.
gamma_boost = 1.25
). If the moving window also travels at speedSpecial cases for negative values of
moving_window_v
and moving windows not traveling along the boost direction were both checked. In order to have access to the moving window parameters, there needed to be some rearrangement of initialization order.[1] J.-L. Vay, Phys. Rev. Lett. 98, 130405 (2007)