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

original CSG #976

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions doc/content/tutorials/csg_to_cad.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ This mesh can now be exported for use in multiphysics copuling.
Cubit> export mesh "/Users/pshriwise/krusty.e"
```

A different OpenMC model is needed to apply the DAGMC model generated, this is
already present in the tutorial directory and will be used by Cardinal as it is
set to the default filename expected by OpenMC ("model.xml"). This hybrid
CSG/CAD model can also be produced by running the `make_hybrid_model.py` script.

## Multiphysics Coupling

We have built a hybrid [!ac](CAD) and [!ac](CSG) model of the KRUSTY reactor in OpenMC,
Expand Down
17 changes: 17 additions & 0 deletions tutorials/csg_to_cad/make_hybrid_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! python

import openmc

# create an object for the DAGMC model
dagmc_universe = openmc.DAGMCUniverse('krusty_fuel.h5m')

model = openmc.Model.from_model_xml('original_model.xml')

fuel_cell = model.geometry.get_cells_by_fill_name('U-7.65Mo Fuel')[0]

print("Inserting the CAD model into the following cell:")
print(fuel_cell)

fuel_cell.fill = dagmc_universe

model.export_to_model_xml()