You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/ossfe2025.Rmd
+71-32Lines changed: 71 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ exercises: 30
7
7
:::::::::::::::::::::::::::::::::::::: questions
8
8
9
9
- 🤌 What is WarpX?
10
-
-🧮 How can I install and run WarpX?
10
+
-🔧 How can I install and run WarpX?
11
11
- 🕵️ How can I analyze the simulation results?
12
12
13
13
::::::::::::::::::::::::::::::::::::::::::::::::
@@ -22,58 +22,70 @@ exercises: 30
22
22
23
23
## WarpX, a particle-in-cell code
24
24
25
-
Welcome to the WarpX tutorial at [OSSFE 2025](https://ossfe.github.io/)!
25
+
Welcome to the WarpX tutorial at [OSSFE 2025](https://ossfe.github.io/)! 👋
26
26
27
-
[WarpX](https://github.com/BLAST-WarpX/warpx) is a general purpose **open-source****high-performance** Particle-In-Cell (PIC) code.
27
+
[WarpX](https://github.com/BLAST-WarpX/warpx) is a general purpose **open-source****high-performance****Particle-In-Cell** (PIC) code.
28
28
If you are not familiar with the PIC method, here is a picture that condenses the core idea:
29
29
30
-
If you want to know more, here are a few references:
30
+
{alt="macroparticles in the cells of a grid"}
32
+
33
+
And here is a more informative image that explains the core algorithmic steps.
34
+
35
+
{alt="pic loop"}
37
+
38
+
If you want to know more about PIC, here are a few **references**:
31
39
32
40
* The two bibles on PIC 📚
33
41
*[C. K. Birdsall and A. B. Langdon. Plasma Physics Via Computer Simulation.](https://doi.org/10.1201/9781315275048)
34
42
*[R. W. Hockney and J. W. Eastwood. Computer simulation using particles.](https://doi.org/10.1201/9780367806934)
35
43
* An old review written by one of the pioneers: [John M. Dawson, Particle simulation of plasmas, Rev. Mod. Phys. 55, 403](https://doi.org/10.1103/RevModPhys.55.403)
36
44
* Browse our docs for [many more references about advanced algorithms and methods](https://warpx.readthedocs.io/en/latest/theory/pic.html).
37
45
38
-
39
-
In this tutorial we will go through the basics of WarpX: installation, running a simple example and visualizing the results.
46
+
In this tutorial we will go through the **basics of WarpX**: installation, running a simple example and visualizing the results.
40
47
Along the way, we will point to some specific locations in the documentation, for your reference.
41
48
42
-
43
49
::: callout
44
-
Everything you need to know to use WarpX is in the [documentation](https://warpx.readthedocs.io/en/latest/index.html), check it out!
50
+
📣 Everything you need to know to use WarpX is in the [documentation](https://warpx.readthedocs.io/en/latest/index.html), check it out!
If the run went wrong, you may find a `Backtrace.0.0` file which can be useful for debugging purposes.
142
157
Let me know if the code fails in any way!
143
158
159
+
Here we have loaded the field of hte magnetic bottle from a file.
160
+
You can also you can [define an external field analytically](https://warpx.readthedocs.io/en/latest/usage/parameters.html#applied-to-particles).
161
+
144
162
163
+
## Visualizing
145
164
146
-
##Visualizing with python
165
+
### With python 🐍
147
166
148
167
Now that we have the results, we can analyze them using `python`.
149
168
We will use the [openPMD-viewer](https://openpmd-viewer.readthedocs.io/en/latest/) library to grab the data that the simulation produced in `openPMD` format.
169
+
Here you can find [a few great tutorials on how to use the viewer](https://openpmd-viewer.readthedocs.io/en/latest/tutorials/tutorials.html).
170
+
If you feel nerdy and/or you need to deal with the data in parallel workflows, you can use the [openPMD-api](https://openpmd-api.readthedocs.io/en/latest/).
You can [download the notebook](../files/analysis_3d_magnetic_mirror.ipynb) and try it yourself.
186
+
Remember to either run the notebook from the simulation directory or change the corresponding path in the notebook.
164
187
165
-
Add stuff...
188
+
### With Paraview
166
189
167
-
You can get images and videos 😎
190
+
Now it's time to produce some pretty cool images and videos! 😎
191
+
If you don't have it, you can [download Paraview here](https://www.paraview.org/download/).
192
+
In the `diags/diag1` directory you should find a file named `paraview.pmd`: Paraview can read `.pmd` files.
193
+
Just open Paraview and from there open the `.pmd` file.
194
+
You should see `Meshes` and `Particles` in your pipeline browser (usually on the left).
195
+
We can zhuzh up the pipeline so that we can visualize the trajectories of the protons in time
168
196
169
-
{alt="simulation of proton trajectories inside a magnetic mirror"}
197
+
This is the pipeline that I have used to produce the visualizations below.
{alt="simulation of proton trajectories inside a magnetic mirror"}
If you make any other 3D visualization with this data, let me know! We can add it here 😉!
207
+
208
+
And that's all for now! 👋
209
+
174
210
::::::::::::::::::::::::::::::::::::: keypoints
175
211
176
-
- WarpX is a open-source high-performance particle-in-cell code
177
-
- WarpX is easy to install using `Conda`: `conda -c conda-forge warpx`
178
-
- The documentation is the first place to look for answers, otherwise check out our Issues and Discussions
179
-
- Visualizing 3D results with Paraview and `openpmd` data using `.pmd` files.
212
+
📖 [**WarpX**](https://ecp-warpx.github.io/) is a open-source high-performance particle-in-cell code
213
+
214
+
🔧 WarpX is **easy to install via Conda**: `conda -c conda-forge warpx`
215
+
216
+
🔍 The [**documentation**](https://warpx.readthedocs.io/en/latest/) is the first place to look for answers, otherwise check out our [**issues**](https://github.com/BLAST-WarpX/warpx/issues) and [**discussions**](https://github.com/BLAST-WarpX/warpx/discussions).
217
+
218
+
👀 To visualize the simulation results in [**openPMD**](http://www.openpmd.org/) format, you can use the [**openPMD-viewer**](https://openpmd-viewer.readthedocs.io/) library for `python` or you can open `.pmd` files directly in [**Paraview**]((https://www.paraview.org/download/)).
0 commit comments