Skip to content

Commit

Permalink
Merge branch 'update_package' of github.com:fusion-energy/openmc-plas…
Browse files Browse the repository at this point in the history
…ma-source into update_package
  • Loading branch information
shimwell committed Jan 17, 2024
2 parents 37bdd58 + 1731457 commit 780e191
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
12 changes: 3 additions & 9 deletions examples/point_source_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
openmc.config["cross_sections"] = Path(__file__).parent.resolve() / "cross_sections.xml"

# minimal geometry
sphere_surface = openmc.Sphere(r=1000.0, boundary_type='vacuum')
sphere_surface = openmc.Sphere(r=1000.0, boundary_type="vacuum")
cell = openmc.Cell(region=-sphere_surface)
geometry = openmc.Geometry([cell])

# define the source
my_source = FusionPointSource(
coordinate=(0, 0, 0),
temperature=20000.0,
fuel="DT"
)
my_source = FusionPointSource(coordinate=(0, 0, 0), temperature=20000.0, fuel="DT")

# Tell OpenMC we're going to use our custom source
settings = openmc.Settings()
Expand All @@ -25,8 +21,6 @@
settings.source = my_source


model = openmc.model.Model(
materials=None, geometry=geometry, settings=settings
)
model = openmc.model.Model(materials=None, geometry=geometry, settings=settings)

model.run()
6 changes: 2 additions & 4 deletions examples/ring_source_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
openmc.config["cross_sections"] = Path(__file__).parent.resolve() / "cross_sections.xml"

# minimal geometry
sphere_surface = openmc.Sphere(r=1000.0, boundary_type='vacuum')
sphere_surface = openmc.Sphere(r=1000.0, boundary_type="vacuum")
cell = openmc.Cell(region=-sphere_surface)
geometry = openmc.Geometry([cell])

Expand All @@ -25,8 +25,6 @@
# tell OpenMC we're going to use our custom source
settings.source = my_source

model = openmc.model.Model(
materials=None, geometry=geometry, settings=settings
)
model = openmc.model.Model(materials=None, geometry=geometry, settings=settings)

model.run()
6 changes: 2 additions & 4 deletions examples/tokamak_source_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


# minimal geometry
sphere_surface = openmc.Sphere(r=1000.0, boundary_type='vacuum')
sphere_surface = openmc.Sphere(r=1000.0, boundary_type="vacuum")
cell = openmc.Cell(region=-sphere_surface)
geometry = openmc.Geometry([cell])

Expand Down Expand Up @@ -39,8 +39,6 @@
settings.source = my_plasma.sources


model = openmc.model.Model(
materials=None, geometry=geometry, settings=settings
)
model = openmc.model.Model(materials=None, geometry=geometry, settings=settings)

model.run()

0 comments on commit 780e191

Please sign in to comment.