Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composite surface for wedge #3214

Open
shimwell opened this issue Dec 4, 2024 · 0 comments
Open

composite surface for wedge #3214

shimwell opened this issue Dec 4, 2024 · 0 comments

Comments

@shimwell
Copy link
Member

shimwell commented Dec 4, 2024

Description

Quite often we make wedge shaped CSG surfaces for models

typically two plane surfaces and a sphere, or 4 planes and a cylinder.

This is useful for a DAGMC bounding box for sector models.

We typically have mixed surface types (reflective and vacuum)

The existing .bounded_region does not quite have the flexibility to provide a bounding wedge region

Additional terms like angle1, angle2 would be probably be needed

Currently we have this code

vac_surf = openmc.Sphere(r=10000, surface_id=9999, boundary_type="vacuum")

# adds reflective surface for the sector model at 0 degrees
reflective_1 = openmc.Plane(
    a=math.sin(0),
    b=-math.cos(0),
    c=0.0,
    d=0.0,
    surface_id=9991,
    boundary_type="reflective",
)

# adds reflective surface for the sector model at 90 degrees
reflective_2 = openmc.Plane(
    a=math.sin(math.radians(90)),
    b=-math.cos(math.radians(90)),
    c=0.0,
    d=0.0,
    surface_id=9990,
    boundary_type="reflective",
)

region = -vac_surf & -reflective_1 & +reflective_2
containing_cell = openmc.Cell(cell_id=9999, region=region, fill=dag_univ)

Perhaps it would be useful to have this wedge shape available in openmc as a CompositeSurface?

Alternatives

Continue using the code as is and users make a wedge shape
Modify the .bounded_region so it allows wedges as well as boxes and sphere
Add another bounding_wedge method which would be similar to bounding_region but just designed for wedges

Compatibility

additional composite surface does not interfere with API for other parts of the code

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

No branches or pull requests

1 participant