From 37bdd584723be4ab870847d116cea7fc45343c40 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 17 Jan 2024 15:33:11 +0000 Subject: [PATCH] adding cross sections xml --- examples/point_source_example.py | 4 ++++ examples/ring_source_example.py | 4 ++++ examples/tokamak_source_example.py | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/examples/point_source_example.py b/examples/point_source_example.py index b780b08..a90cb8f 100644 --- a/examples/point_source_example.py +++ b/examples/point_source_example.py @@ -1,5 +1,9 @@ import openmc from openmc_plasma_source import FusionPointSource +from pathlib import Path + +# just making use of a local cross section xml file, replace with your own cross sections or comment out +openmc.config["cross_sections"] = Path(__file__).parent.resolve() / "cross_sections.xml" # minimal geometry sphere_surface = openmc.Sphere(r=1000.0, boundary_type='vacuum') diff --git a/examples/ring_source_example.py b/examples/ring_source_example.py index 064dc63..3a0b6cb 100644 --- a/examples/ring_source_example.py +++ b/examples/ring_source_example.py @@ -1,6 +1,10 @@ import openmc from openmc_plasma_source import FusionRingSource import math +from pathlib import Path + +# just making use of a local cross section xml file, replace with your own cross sections or comment out +openmc.config["cross_sections"] = Path(__file__).parent.resolve() / "cross_sections.xml" # minimal geometry sphere_surface = openmc.Sphere(r=1000.0, boundary_type='vacuum') diff --git a/examples/tokamak_source_example.py b/examples/tokamak_source_example.py index 232eeb2..f841a6d 100644 --- a/examples/tokamak_source_example.py +++ b/examples/tokamak_source_example.py @@ -1,6 +1,11 @@ +from pathlib import Path import openmc from openmc_plasma_source import TokamakSource +# just making use of a local cross section xml file, replace with your own cross sections or comment out +openmc.config["cross_sections"] = Path(__file__).parent.resolve() / "cross_sections.xml" + + # minimal geometry sphere_surface = openmc.Sphere(r=1000.0, boundary_type='vacuum') cell = openmc.Cell(region=-sphere_surface)