Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 3 additions & 7 deletions example-with-csg/shield_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
basis="yz", color_by="material", n_samples=10000, outline=True, plane_tolerance=150
)
plot.figure.savefig("geometry_yz.png", bbox_inches="tight")


plt.close()
plt.clf()



Expand All @@ -199,7 +199,6 @@ def generate_ww(
random_ray_particles: int = 800,
random_ray_batches: int = 100,
random_ray_inactive: int = 50,
weight_window_generator_max_realizations: int = 100,
multigroup_nparticles: int = 2000,
mesh_dimension: Tuple[int] | int = 1000000,
particle_type: str = "neutron",
Expand All @@ -212,8 +211,6 @@ def generate_ww(
random_ray_particles (int): Number of particles per batch for Random Ray.
random_ray_batches (int): Number of batches for Random Ray.
random_ray_inactive (int): Number of inactive batches for Random Ray.
weight_window_generator_max_realizations (int): Maximum number of realizations for the weight window
generator.
multigroup_nparticles (int): Number of particles for the multigroup cross section generation.
mesh_dimension (Tuple[int]): Dimensions of the regular mesh used for the weight window generation.
particle_type (str): Type of particle for the weight window (e.g., 'neutron', 'photon').
Expand Down Expand Up @@ -267,7 +264,6 @@ def generate_ww(
rr_model.settings.weight_window_generators = openmc.WeightWindowGenerator(
method="fw_cadis",
mesh=mesh,
max_realizations=weight_window_generator_max_realizations,
particle_type=particle_type, # TODO should this particle_type be checked against the model.settings.source.particle?
energy_bounds=[0.0, 100e6]
# could use multiple bins here, openmc.mgxs.EnergyGroups("CASMO-2").group_edges
Expand Down Expand Up @@ -429,7 +425,7 @@ def run_and_plot(model: openmc.Model, image_filename: str) -> openmc.StatePoint:
model.settings.weight_windows_on = False
model.settings.batches = 12

run_and_plot(model, "flux_results_with_ww.png")
run_and_plot(model, "flux_results_without_ww.png")



Expand Down
4 changes: 0 additions & 4 deletions example-with-dagmc/shield_box_with_dagmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def generate_ww(
random_ray_particles: int = 800,
random_ray_batches: int = 100,
random_ray_inactive: int = 50,
weight_window_generator_max_realizations: int = 100,
multigroup_nparticles: int = 2000,
mesh_dimension: Tuple[int] | int = 1000000,
particle_type: str = "neutron",
Expand All @@ -26,8 +25,6 @@ def generate_ww(
random_ray_particles (int): Number of particles per batch for Random Ray.
random_ray_batches (int): Number of batches for Random Ray.
random_ray_inactive (int): Number of inactive batches for Random Ray.
weight_window_generator_max_realizations (int): Maximum number of realizations for the weight window
generator.
multigroup_nparticles (int): Number of particles for the multigroup cross section generation.
mesh_dimension (Tuple[int]): Dimensions of the regular mesh used for the weight window generation.
particle_type (str): Type of particle for the weight window (e.g., 'neutron', 'photon').
Expand Down Expand Up @@ -81,7 +78,6 @@ def generate_ww(
rr_model.settings.weight_window_generators = openmc.WeightWindowGenerator(
method="fw_cadis",
mesh=mesh,
max_realizations=weight_window_generator_max_realizations,
particle_type=particle_type, # TODO should this particle_type be checked against the model.settings.source.particle?
energy_bounds=[0.0, 100e6]
# energy_bounds=openmc.mgxs.EnergyGroups("CASMO-2").group_edges
Expand Down