Skip to content

Commit cbe7c83

Browse files
committed
[skip ci] need bb
1 parent 7911779 commit cbe7c83

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

examples/tokamak_structured_mesh_simulation.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import numpy as np
33
import math
44
import paramak
5+
import cadquery as cq
56

67
openmc.config['cross_sections'] = '/nuclear_data/cross_sections.xml' # change this to the dir of your cross_sections.xml
78

@@ -24,10 +25,15 @@
2425
triangularity=0.55,
2526
rotation_angle=180,
2627
)
27-
my_reactor.save(f"tokamak_minimal.step")
28-
print(f"Saved as tokamak_minimal.step")
2928
my_reactor=my_reactor.remove(name='plasma')
3029

30+
# Translate the my_assembly object so that its bottom is at z=0
31+
translation_vector = cq.Vector(0, 0, -my_reactor.BoundingBox().zmin)
32+
my_assembly = my_assembly.translate(translation_vector)
33+
34+
print('translation_vector', translation_vector)
35+
36+
3137
# this prints all the names of the parts in the reactor
3238
print(my_reactor.names())
3339

0 commit comments

Comments
 (0)