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

EU-DEMO material tag and generation issues. #327

Open
g-blackett opened this issue Jul 22, 2024 · 2 comments
Open

EU-DEMO material tag and generation issues. #327

g-blackett opened this issue Jul 22, 2024 · 2 comments

Comments

@g-blackett
Copy link

g-blackett commented Jul 22, 2024

Hello,

I am trying to generate the EU-DEMO model but keep running into issues.

The first method is as below:


my_reactor = paramak.EuDemoFrom2015PaperDiagram(
rotation_angle=360,
number_of_tf_coils=16,
)

my_reactor.export_dagmc_h5m(filename = 'demotest.h5m')

However this throws an error saying the number of material tags does not match the number of volumes.

Screenshot 2024-07-22 171844

Rerunning the code with rotation angle equal to anything less than 360 throws 'ValueError: Null TopoDS_Shape object. From looking at forum posts online this may be related to how the geometry is sliced when selecting an angle < 360.

Screenshot 2024-07-22 172237

I also followed the method as stated in a previous thread raised here (#306) where the paramak reactor object is exported as a .brep file then imported with the brep_to_h5m command. To perform this method the appropriate material tags are required. From looking at the code for the EU-DEMO model there should be 16 volumes in the order stated below?

from brep_to_h5m import brep_to_h5m
import openmc
brep_to_h5m(
   brep_filename='demotest.brep',
    material_tags=['plasma',
                    'outboard_pf_coil_1',
                    'outboard_pf_coil_2',
                    'outboard_pf_coil_3',
                    'outboard_pf_coil_4',
                    'outboard_pf_coil_5',
                    'outboard_pf_coil_6',
                    'pf_coils_1',
                    'pf_coils_2',
                    'pf_coils_3',
                    'pf_coils_4',
                    'pf_coils_5',
                    'blanket',
                    'divertor',
                    'vessel_inner',
                    'tf_coil_casing'],
    h5m_filename='demotest.h5m',
    min_mesh_size= 1,
    max_mesh_size = 20,
    mesh_algorithm = 1,
)

dag_univ = openmc.DAGMCUniverse(filename='demotest.h5m').bounded_universe()
print(dag_univ.material_names)

However this throws the error "ValueError: 34 volumes found in Brep file is not equal to the number of material_tags 16 provided."
Should there be 34 volumes? What would their material tags be, I cannot see from the EU-DEMO code what these would be.

Thank you for any help!

@shimwell
Copy link
Member

Yes sorry, paramak needs a rewrite (which is happening)

But in the meantime perhaps the work around is to export to step file and use cad-to-dagmc or one of the other converters with the step file.

The step file can also be opened in freecad or other step file viewers so you can see the order of the solids and number of solids

@g-blackett
Copy link
Author

No worries, thank you for the response. I will give this method a go.

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

2 participants