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

Adding EPAC2004 space charge benchmarks #422

Merged
merged 97 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
8b35f7f
Examples for 3D space charge benchmarking
cemitch99 Jun 7, 2022
0d88ccf
Update input_kurth_10nC.in
cemitch99 Dec 5, 2022
09d153c
Add FODO + RF example w SC
cemitch99 Aug 28, 2023
616d669
Delete input_kurth_10nC.in
cemitch99 Aug 28, 2023
f401805
Correct RF coefficients and add analysis.
cemitch99 Aug 29, 2023
1f8d3dc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 29, 2023
81cc570
Added analysis script for FODO+RF SC benchmark.
cemitch99 Aug 29, 2023
fae804d
Merge branch 'development' into add_IPAC_3DSC_benchmarks
cemitch99 Aug 29, 2023
ce38921
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 29, 2023
283fc82
Update CMakeLists.txt
cemitch99 Aug 29, 2023
afce9c8
Add FODO+RF+SC Python input.
cemitch99 Aug 30, 2023
859dd34
Remove EOL white spaces.
cemitch99 Aug 30, 2023
4edcc64
Update run_fodo_rf_SC.py
cemitch99 Aug 30, 2023
33665ed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 30, 2023
4276d05
Update CMakeLists.txt
cemitch99 Aug 30, 2023
da4d743
Update run_fodo_rf_SC.py
cemitch99 Aug 30, 2023
6a77a83
Update run_fodo_rf_SC.py
cemitch99 Aug 30, 2023
3ff638d
Update run_fodo_rf_SC.py
cemitch99 Sep 5, 2023
1416b2a
Update analysis_fodo_rf_SC.py
cemitch99 Sep 5, 2023
c8d87af
Try again.
cemitch99 Aug 31, 2023
587dc9f
Preliminary draft of thermal distribution.
cemitch99 Sep 15, 2023
0781452
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 15, 2023
1c620b8
Added radial sampling.
cemitch99 Sep 16, 2023
b644e95
Modify radial sampling to use AMReX libs.
cemitch99 Sep 16, 2023
05f4d5b
Initializing Rprofile data.
cemitch99 Sep 16, 2023
251073e
Add CDF arrays, fixed shadowed declaration.
cemitch99 Sep 18, 2023
6ef63b3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 18, 2023
e438471
Resolve conflicts.
cemitch99 Sep 18, 2023
3132bf1
Remove comments.
cemitch99 Sep 18, 2023
f2f7707
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 18, 2023
8139e74
Fixed call to generate_radial_dist.
cemitch99 Sep 18, 2023
9f16f05
Added exchange of radial profile data.
cemitch99 Sep 18, 2023
a771e8c
Fix shadowed variables in integrator.
cemitch99 Sep 18, 2023
a535e8b
Support random selection of core or halo based on w.
cemitch99 Sep 19, 2023
d3f8d71
Finalize data exchange with rprofile.
cemitch99 Sep 20, 2023
8517e5e
Allow unused input parameters.
cemitch99 Sep 20, 2023
1037ba0
Add thermal beam example.
cemitch99 Sep 20, 2023
f9824fe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 20, 2023
d328ab4
Modify to use normalization instead of phi0.
cemitch99 Sep 22, 2023
e6d19f9
Add thermal and bithermal beam examples.
cemitch99 Sep 22, 2023
fc49be2
Update openPMD_to_ASCII.py
cemitch99 Sep 22, 2023
00ab910
Finalize bithermal beam example.
cemitch99 Sep 22, 2023
4a1131c
Finalize thermal beam example.
cemitch99 Sep 22, 2023
097f709
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 22, 2023
d914632
Add Python equivs for thermal tests.
cemitch99 Oct 18, 2023
099c9e5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2023
128bf9b
Add tests to CI.
cemitch99 Oct 19, 2023
693ab25
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
8e60abc
Reduce resolution for CI.
cemitch99 Oct 19, 2023
1aecfa0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
7bded1f
Update analysis scripts.
cemitch99 Oct 20, 2023
bc10523
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 20, 2023
8db480b
Update Thermal.H
cemitch99 Oct 20, 2023
d7d94fb
Update Thermal.H
cemitch99 Oct 20, 2023
28a9356
Update CMakeLists.txt
cemitch99 Oct 20, 2023
2f39bd4
Eliminate unused variable warnings.
cemitch99 Oct 23, 2023
36c0980
Update CMakeLists.txt
cemitch99 Oct 23, 2023
1eae94c
Update input_thermal.in
cemitch99 Oct 25, 2023
011ecb8
Update input_bithermal.in
cemitch99 Oct 25, 2023
067c2e2
Update input_thermal.in
cemitch99 Oct 25, 2023
93dbb4d
Update input_thermal.in
cemitch99 Oct 26, 2023
3733447
Update input_bithermal.in
cemitch99 Oct 26, 2023
a3ed094
Add tolerance to ToFixedT to avoid pz<=0.
cemitch99 Nov 10, 2023
c0620a5
Update input_thermal.in
cemitch99 Nov 22, 2023
ac699cd
Update input_bithermal.in
cemitch99 Nov 22, 2023
27fc922
Update input_fodo_rf_SC.in
cemitch99 Nov 22, 2023
520ed40
Update run_thermal.py
cemitch99 Nov 22, 2023
8f67db0
Update run_bithermal.py
cemitch99 Nov 22, 2023
f5823c6
Update run_fodo_rf_SC.py
cemitch99 Nov 22, 2023
5ede71d
Update Thermal.H
cemitch99 Nov 22, 2023
2952204
Merge branch 'development' into add_IPAC_3DSC_benchmarks
cemitch99 Nov 22, 2023
0eccfd1
Update CMakeLists.txt
cemitch99 Nov 22, 2023
228fcf0
Merge branch 'development' into add_IPAC_3DSC_benchmarks
cemitch99 Dec 6, 2023
8d57d0c
Update input_thermal.in
cemitch99 Dec 6, 2023
8b71b35
Add README example documentation.
cemitch99 Dec 6, 2023
bec97ce
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 6, 2023
ad47aa0
Add documentation of thermal distribution type.
cemitch99 Dec 6, 2023
c1258a4
Apply suggestions from code review
cemitch99 Dec 9, 2023
114b907
Apply suggestions from code review
ax3l Dec 19, 2023
945a78a
Update src/particles/distribution/Thermal.H
ax3l Dec 19, 2023
c0d19fd
Update src/initialization/InitDistribution.cpp
ax3l Dec 19, 2023
13d77c2
Update src/particles/distribution/Thermal.H
ax3l Dec 19, 2023
18e738b
Comment out PrintToFile Debugging
ax3l Dec 19, 2023
7dcaf8f
Merge remote-tracking branch 'mainline/development' into add_IPAC_3DS…
ax3l Dec 19, 2023
088edb7
Constexpr for length in kernel
ax3l Dec 19, 2023
101fa20
Thermal: Unused Variable
ax3l Jan 2, 2024
c32ea8d
Merge remote-tracking branch 'mainline/development' into add_IPAC_3DS…
ax3l Jan 2, 2024
8a51b5a
Python Thermal Test: `prob_relative` is a list now
ax3l Jan 2, 2024
6ddd678
Bithermal Plot Script: Matplotlib
ax3l Jan 2, 2024
23a24be
Apply suggestions from code review
ax3l Jan 2, 2024
ef62e91
Merge remote-tracking branch 'mainline/development' into add_IPAC_3DS…
ax3l Jan 3, 2024
44ee511
Thermal Distribution: Python
ax3l Jan 3, 2024
56efc2e
Update docs/source/usage/parameters.rst
ax3l Jan 3, 2024
bbfb8fe
Bithermal: slice_step_diagnostics off
ax3l Jan 3, 2024
8347eb9
Python Files: Executable
ax3l Jan 3, 2024
ee6bff7
Bithermal: Update Figure
ax3l Jan 3, 2024
4c2b294
README: New Formatting
ax3l Jan 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/usage/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This section allows you to **download input files** that correspond to different
examples/kicker/README.rst
examples/thin_dipole/README.rst
examples/aperture/README.rst
examples/epac2004_benchmarks/README.rst
examples/pytorch_surrogate_model/README.rst
examples/apochromatic/README.rst

Expand Down
14 changes: 14 additions & 0 deletions docs/source/usage/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,20 @@ Initial Beam Distributions
* ``beam.muypy`` (``float``, dimensionless, default: ``0``) correlation Y-Py
* ``beam.mutpt`` (``float``, dimensionless, default: ``0``) correlation T-Pt

* ``thermal`` for a 6D stationary thermal or bithermal distribution.
This distribution type is described, for example in:
R. D. Ryne et al, "A Test Suite of Space-Charge Problems for Code Benchmarking", in Proc. EPAC2004, Lucerne, Switzerland.
C. E. Mitchell et al, "ImpactX Modeling of Benchmark Tests for Space Charge Validation", in Proc. HB2023, Geneva, Switzerland.
With additional parameters:

* ``beam.k`` (``float``, in inverse meters) external focusing strength
* ``beam.kT`` (``float``, dimensionless) temperature of core population
ax3l marked this conversation as resolved.
Show resolved Hide resolved
* ``beam.kT_halo`` (``float``, dimensionless, default ``kT``) temperature of halo population
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cemitch99 what is the temperature normalized to? The energy of the reference particle?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here kT = <(px/p0)^2> = <(py/p0)^2>, where p0 is the momentum of the reference particle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add this detail to the doc strings?

* ``beam.normalize`` (``float``, dimensionless) normalizing constant for core population
* ``beam.normalize_halo`` (``float``, dimensionless) normalizing constant for halo population
Comment on lines +249 to +250
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this normalizing constant used for and what is a good default value of this? 1.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, a good default value is 1.0. The explanation of this constant is too complex to provide here. I will think about how best to document this.

* ``beam.halo`` (``float``, dimensionless) fraction of charge in halo


.. _running-cpp-parameters-lattice:

Lattice Elements
Expand Down
4 changes: 4 additions & 0 deletions docs/source/usage/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ This module provides particle beam distributions that can be used to initialize

A 6D Waterbag distribution.

.. py:class:: impactx.distribution.Thermal(k, kT, kT_halo, normalize, normalize_halo, halo)

A 6D stationary thermal or bithermal distribution.


Lattice Elements
----------------
Expand Down
58 changes: 49 additions & 9 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ add_impactx_test(positron_channel.py
OFF # no plot script yet
)

# Cyclotron ############################################################
# Cyclotron ###################################################################
#
# w/o space charge
add_impactx_test(cyclotron
Expand All @@ -566,7 +566,7 @@ add_impactx_test(cyclotron.py
OFF # no plot script yet
)

# Combined-function bend ########################################################
# Combined-function bend ######################################################
#
# w/o space charge
add_impactx_test(cfbend
Expand All @@ -584,7 +584,7 @@ add_impactx_test(cfbend.py
OFF # no plot script yet
)

# Ballistic compression ########################################################
# Ballistic compression #######################################################
#
# w/o space charge
add_impactx_test(compression
Expand All @@ -602,7 +602,7 @@ add_impactx_test(compression.py
OFF # no plot script yet
)

# Kicker test ##########################################################
# Kicker test #################################################################
#
# w/o space charge
add_impactx_test(kicker
Expand Down Expand Up @@ -640,7 +640,47 @@ add_impactx_test(hvkicker_madx.py
OFF # no plot script yet
)

# IOTA s-dependent nonlinear lens test ##########################################################
# FODO + RF EPAC2004 ##########################################################
#
# with space charge
add_impactx_test(fodo_rf_sc
examples/epac2004_benchmarks/input_fodo_rf_SC.in
ON # ImpactX MPI-parallel
OFF # ImpactX Python interface
examples/epac2004_benchmarks/analysis_fodo_rf_SC.py
OFF # no plot script yet
)
add_impactx_test(fodo_rf_sc.py
examples/epac2004_benchmarks/run_fodo_rf_SC.py
OFF # ImpactX MPI-parallel
ON # ImpactX Python interface
examples/epac2004_benchmarks/analysis_fodo_rf_SC.py
OFF # no plot script yet
)

# Thermal Beam EPAC2004 #######################################################
#
# with space charge
add_impactx_test(thermal
examples/epac2004_benchmarks/input_thermal.in
ON # ImpactX MPI-parallel
OFF # ImpactX Python interface
examples/epac2004_benchmarks/analysis_thermal.py
OFF # no plot script yet
)

# Bithermal Beam EPAC2004 #####################################################
#
# with space charge
add_impactx_test(bithermal
examples/epac2004_benchmarks/input_bithermal.in
ON # ImpactX MPI-parallel
OFF # ImpactX Python interface
examples/epac2004_benchmarks/analysis_bithermal.py
examples/epac2004_benchmarks/plot_bithermal.py
)

# IOTA s-dependent nonlinear lens test ########################################
#
# w/o space charge
add_impactx_test(IOTA_nll
Expand All @@ -658,7 +698,7 @@ add_impactx_test(IOTA_nll.py
OFF # no plot script yet
)

# IOTA nonlinear lattice test ##########################################################
# IOTA nonlinear lattice test #################################################
#
# w/o space charge
add_impactx_test(IOTA_lattice
Expand All @@ -676,7 +716,7 @@ add_impactx_test(IOTA_lattice.py
OFF # no plot script yet
)

# Thin dipole ########################################################
# Thin dipole #################################################################
#
# w/o space charge
add_impactx_test(thin_dipole
Expand All @@ -694,7 +734,7 @@ add_impactx_test(thin_dipole.py
OFF # no plot script yet
)

# Aperture collimation ############################################################
# Aperture collimation ########################################################
#
# w/o space charge
add_impactx_test(aperture
Expand All @@ -712,7 +752,7 @@ add_impactx_test(aperture.py
OFF # no plot script yet
)

# Apochromat example ########################################################
# Apochromat example ##########################################################
#
# w/o space charge
add_impactx_test(apochromat
Expand Down
206 changes: 206 additions & 0 deletions examples/epac2004_benchmarks/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
.. _examples-fodo-rf-sc:

Cold Beam in a FODO Channel with RF Cavities (and Space Charge)
===============================================================

This example is based on the subsection of the same name in:
R. D. Ryne et al, "A Test Suite of Space-Charge Problems for Code Benchmarking", in Proc. EPAC2004, Lucerne, Switzerland.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a link for https://accelconf.web.cern.ch/e04/papers/weplt047.pdf (but no DOI) that we can put.

Do you know if HB2023 already has the proceedings published (or do we want to do an arXiv as backup)?

Copy link
Member Author

@cemitch99 cemitch99 Dec 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HB2023 has the pre-press proceedings available: https://hb2023.vrws.de/papers/thbp44.pdf
I don't see a DOI generated yet.


See additional documentation in:
C. E. Mitchell et al, "ImpactX Modeling of Benchmark Tests for Space Charge Validation", in Proc. HB2023, Geneva, Switzerland.

A cold (zero momentum spread), uniform density, 250 MeV, 143 pC proton bunch propagates in a FODO lattice with 700 MHz RF
cavities added for longitudinal confinement. The on-axis profile of the RF electric field is given by:

.. math::

E(z)=\exp(-(4z)^4)\cos(\frac{5\pi}{2}\tanh(5z)).

The beam is matched to the 3D focusing, with space charge, using the rms envelope equations.

The particle distribution should remain unchanged, to within the level expected due to numerical particle noise.
This is tested using the second moments of the distribution.

In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values.


Run
---

This example can be run as a Python script (``python3 run_fodo_rf_SC.py``) or with an app with an input file (``impactx input_fodo_rf_SC.in``).
Each can also be prefixed with an `MPI executor <https://www.mpi-forum.org>`__, such as ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

.. tab-set::

.. tab-item:: Python Script

.. literalinclude:: run_fodo_rf_SC.py
:language: python3
:caption: You can copy this file from ``examples/epac2004_benchmarks/run_fodo_rf_SC.py``.

.. tab-item:: App Input File

.. literalinclude:: input_fodo_rf_SC.in
:language: ini
:caption: You can copy this file from ``examples/epac2004_benchmarks/input_fodo_rf_SC.in``.


Analyze
-------

We run the following script to analyze correctness:

.. dropdown:: Script ``analysis_fodo_rf_SC.py``

.. literalinclude:: analysis_fodo_rf_SC.py
:language: python3
:caption: You can copy this file from ``examples/epac2004_benchmarks/analysis_fodo_rf_SC.py``.



.. _examples-thermal-beam:

Thermal Beam in a Constant Focusing Channel (with Space Charge)
===============================================================

This example is based on the subsection of the same name in:
R. D. Ryne et al, "A Test Suite of Space-Charge Problems for Code Benchmarking", in Proc. EPAC2004, Lucerne, Switzerland.

See additional documentation in:
C. E. Mitchell et al, "ImpactX Modeling of Benchmark Tests for Space Charge Validation", in Proc. HB2023, Geneva, Switzerland.

This example illustrates a stationary solution of the Vlasov-Poisson equations with spherical symmetry (in the beam
rest frame). The distribution represents a thermal equilibrium of the form:

.. math::

f=C\exp(-H/kT),

where :math:`C` and :math:`kT` are constants, and :math:`H` denotes the self-consistent Hamiltonian with space charge.

In this example, a 0.1 MeV, 143 pC proton bunch with :math:`kT=36\times 10^{-6}` propagates in a constant focusing lattice
with 3D isotropic focusing. (The isotropy is exact in the beam rest frame.)

The particle distribution should remain unchanged, to within the level expected due to numerical particle noise.
This is tested using the second moments of the distribution.

In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values.


Run
---

This example can be run as a Python script (``python3 run_thermal.py``) or as an app with an input file (``impactx input_thermal.in``).
Each can also be prefixed with an `MPI executor <https://www.mpi-forum.org>`__, such as ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

.. tab-set::

.. tab-item:: Python Script

.. literalinclude:: run_thermal.py
:language: python3
:caption: You can copy this file from ``examples/epac2004_benchmarks/run_thermal.py``.


.. tab-item:: App Input File

.. literalinclude:: input_thermal.in
:language: ini
:caption: You can copy this file from ``examples/epac2004_benchmarks/input_thermal.in``.


Analyze
-------

We run the following script to analyze correctness:

.. dropdown:: Script ``analysis_thermal.py``

.. literalinclude:: analysis_thermal.py
:language: python3
:caption: You can copy this file from ``examples/epac2004_benchmarks/analysis_thermal.py``.



.. _examples-bithermal-beam:

Bithermal Beam in a Constant Focusing Channel (with Space Charge)
=================================================================

This example is based on the subsection of the same name in:
R. D. Ryne et al, "A Test Suite of Space-Charge Problems for Code Benchmarking", in Proc. EPAC2004, Lucerne, Switzerland.

See additional documentation in:
C. E. Mitchell et al, "ImpactX Modeling of Benchmark Tests for Space Charge Validation", in Proc. HB2023, Geneva, Switzerland.

This example illustrates a stationary solution of the Vlasov-Poisson equations with spherical symmetry (in the beam rest frame).
It provides a self-consistent model of a 3D bunch with a nontrivial core-halo distribution.

The distribution represents a bithermal stationary distribution of the form:

.. math::

f=c_1\exp(-H/kT_1)+c_2\exp(-H/kT_2),

where :math:`c_j`, :math:`kT_j` :math:`(j=1,2)` are constants, and :math:`H` denotes the self-consistent Hamiltonian with space charge.

In this example, a 0.1 MeV, 143 pC proton bunch with :math:`kT_1=36\times 10^{-6}` and :math:`kT_1=900\times 10^{-6}` propagates in a constant focusing lattice
with 3D isotropic focusing.
(The isotropy is exact in the beam rest frame.)
5% of the total charge lies in the second (halo) population.

The particle distribution should remain unchanged, to within the level expected due to numerical particle noise.
This is tested using the second moments of the distribution.

In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values.


Run
---

This example can be run as a Python script (``python3 run_bithermal.py``) or as an app with an input file (``impactx input_bithermal.in``).
Each can also be prefixed with an `MPI executor <https://www.mpi-forum.org>`__, such as ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

.. tab-set::

.. tab-item:: Python Script

.. literalinclude:: run_bithermal.py
:language: python3
:caption: You can copy this file from ``examples/epac2004_benchmarks/run_bithermal.py``.


.. tab-item:: App Input File

.. literalinclude:: input_bithermal.in
:language: ini
:caption: You can copy this file from ``examples/epac2004_benchmarks/input_bithermal.in``.


Analyze
-------

We run the following script to analyze correctness:

.. dropdown:: Script ``analysis_bithermal.py``

.. literalinclude:: analysis_bithermal.py
:language: python3
:caption: You can copy this file from ``examples/epac2004_benchmarks/analysis_bithermal.py``.


Visualize
---------

You can run the following script to visualize the initial and final beam distribution:

.. dropdown:: Script ``plot_bithermal.py``

.. literalinclude:: plot_bithermal.py
:language: python3
:caption: You can copy this file from ``examples/fodo/plot_bithermal.py``.

.. figure:: https://user-images.githubusercontent.com/1353258/293794130-9aaee337-d810-4221-8f6d-1d7d2134c1b7.png
:alt: Initial and final beam distribution.

Initial and final beam distribution.
Loading
Loading