Skip to content
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

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

bnara
Copy link
Contributor

@bnara bnara commented Sep 8, 2024

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$ (gamma_boost = 1.25). If the moving window also travels at speed $\beta$, then its length in the boosted frame is $L \gamma = 1.25 L$ rather than $2 L$, as is currently calculated.

Special 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)

@bnara bnara marked this pull request as draft September 8, 2024 17:09
@bnara bnara marked this pull request as ready for review September 9, 2024 16:28
@bnara
Copy link
Contributor Author

bnara commented Sep 10, 2024

The diagnostic field output window, specified via diag_lo and diag_hi, could be transformed in the same way:

if (WarpX::boost_direction[ dim_map[WarpX::moving_window_dir] ] == 1) {

@ax3l ax3l added the component: boosted frame boosted frame components & logic label Sep 16, 2024
@ax3l ax3l requested a review from RemiLehe September 16, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: boosted frame boosted frame components & logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants