Skip to content

Ib ob build split - #34

Open
tksafi wants to merge 4 commits into
svalinn:mainfrom
tksafi:ib-ob-build-split
Open

Ib ob build split#34
tksafi wants to merge 4 commits into
svalinn:mainfrom
tksafi:ib-ob-build-split

Conversation

@tksafi

@tksafi tksafi commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@tksafi

tksafi commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

I kept a lot of the redundancies in the code by commenting them out. When I actually merge it, I would remove them all

@connoramoreno

Copy link
Copy Markdown
Contributor

We don't need to create new pull requests every time we push updates to GitHub. Usually, we'd use the same PR for a specific new feature we're adding. When you push a branch to GitHub, the associated PR will automatically update

@connoramoreno connoramoreno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty solid start on the IB/OB geometry overall. It would be nice to share an OpenMC slice plot to show the resulting geometry. I'll need to take a closer look at some point but here is some feedback to get you going.

Comment thread examples/make_toroidal_model_example.py
Comment on lines +42 to +43

for thickness in range(10, 71, 10): #cm)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not change this example too much. Let's just define a single thickness (rather than looping), and remove all the additional OpenMC stuff you added below

Comment thread build.yaml
Comment thread first_model.py
Comment thread radial_build_tools.py
Comment thread radial_build_tools.py
Comment on lines +423 to +431
# Outboard surfaces
minor_z_ob= self.minor_rad_z
minor_xy_ob= self.minor_rad_xy
surfaces["outboard"][surface] = openmc.ZTorus(
a=major_rad,
b=minor_z_ob,
c=minor_xy_ob
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the openmc.Ztorus(https://docs.openmc.org/en/latest/pythonapi/generated/openmc.ZTorus.html) for the separate donut shapes of different layers--First wall boundary, breeder, and shield.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outboard and inboard should be defined by the same surface

Comment thread radial_build_tools.py
b=minor_z_ob,
c=minor_xy_ob
)
self.surfaces = surfaces

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overwrites the self.surfaces dictionary you defined in __init__. Either add your surfaces to that dictionary or don't instantiate a dictionary in __init__

Comment thread radial_build_tools.py
Comment thread radial_build_tools.py
Comment on lines +503 to +504
if layer_def is None:
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About 8 lines below that code:
if "material_name" in layer_def:
material = self.get_material_by_name(
layer_def["material_name"]
)
For some reason, this was looping with None as well and gave me issues with the layer_def["material_name"].
This is kind of a stopgap measure to fix it.

Comment thread radial_build_tools.py

@gonuke gonuke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to our discussion this morning.

In general, the best practice is to keep individual PRs as small as possible. There is no such thing as "too small".

Comment thread build.yaml
Comment thread build.yaml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that this file should not need to be changed much or at all (depends a little on the input files syntax)

Comment thread first_model.py
Comment thread radial_build_tools.py
Comment on lines +423 to +431
# Outboard surfaces
minor_z_ob= self.minor_rad_z
minor_xy_ob= self.minor_rad_xy
surfaces["outboard"][surface] = openmc.ZTorus(
a=major_rad,
b=minor_z_ob,
c=minor_xy_ob
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outboard and inboard should be defined by the same surface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants