Skip to content

Commit

Permalink
aligned videos
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Dec 11, 2024
1 parent db9cfe5 commit 90f7dfe
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Binary file added docs/_static/spherical_tokamak_animation.mp4
Binary file not shown.
Binary file added docs/_static/tokamak_animation.mp4
Binary file not shown.
10 changes: 7 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ The style of reaction, sizes of components, plasma shape and number of radial or

.. raw:: html

<div style="text-align: center;">
<video width="600" controls autoplay loop>
<source src="_static/animation.mp4" type="video/mp4">
<div style="display: flex; justify-content: center;">
<video width="45%" controls autoplay loop>
<source src="_static/spherical_tokamak_animation.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<video width="45%" controls autoplay loop>
<source src="_static/tokamak_animation.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/spherical_tokamak_from_plasma_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def export_reactor_to_png(reactor, file_path):
frame += 1

for modified_n_tf_coils in [original_n_tf_coils, original_n_tf_coils -1 , original_n_tf_coils -2, original_n_tf_coils-3, original_n_tf_coils-2, original_n_tf_coils-1,original_n_tf_coils]:
reactor = create_reactor(n_tf_coil=modified_n_tf_coils)
reactor = create_reactor(n_tf_coils=modified_n_tf_coils)
export_reactor_to_png(reactor, f'spherical_tokamak_frame_{frame:03d}.png')
frame += 1

Expand Down
7 changes: 2 additions & 5 deletions examples/tokamak_from_plasma_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
original_rotation_angle=180
original_n_tf_coils = 8
original_coil_height_factor = 1
original_divertor_thickness = 40
original_divertor_thickness = 55

# Function to create a reactor with modified radial build
def create_reactor(
Expand All @@ -43,10 +43,7 @@ def create_reactor(
divertor_radius = major_radius + minor_radius * np.cos(theta + triangularity * np.sin(theta))
outer_blanket_thickness = sum([layer[1] for layer in radial_build[2:6]])
pf_radial_position = divertor_radius + outer_blanket_thickness + 40
print([x[1] for x in radial_build])
reactor_height = 0.5*elongation * radial_build[6][1] + outer_blanket_thickness
print(reactor_height)
print(outer_blanket_thickness)

# makes a rectangle that overlaps the lower blanket under the plasma
# the intersection of this and the layers will form the lower divertor
Expand Down Expand Up @@ -162,7 +159,7 @@ def export_reactor_to_png(reactor, file_path):
frame += 1

for modified_n_tf_coils in [original_n_tf_coils, original_n_tf_coils -1 , original_n_tf_coils -2, original_n_tf_coils-3, original_n_tf_coils-2, original_n_tf_coils-1,original_n_tf_coils]:
reactor = create_reactor(n_tf_coil=modified_n_tf_coils)
reactor = create_reactor(n_tf_coils=modified_n_tf_coils)
export_reactor_to_png(reactor, f'spherical_tokamak_frame_{frame:03d}.png')
frame += 1

Expand Down

0 comments on commit 90f7dfe

Please sign in to comment.