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

Issue with BallReactor DAGMC export #318

Open
generein opened this issue Jun 23, 2023 · 2 comments
Open

Issue with BallReactor DAGMC export #318

generein opened this issue Jun 23, 2023 · 2 comments

Comments

@generein
Copy link
Contributor

Hello,

When I generate a BallReactor at 360 degrees rotation angle, the DAGMC export does not appear to work. I'm getting an error code on meshing (with default parameters or with min_mesh_size = 0.01, max_mesh_size=20.): "There are [number] intersections in the 1D mesh." gmsh then tries to resolve that splitting them up further, but fails and gives up after a few iterations.

I want to use a TokamakSource in OpenMC for this, so I suspect the workaround suggested in this issue with an offset point source won't work...

Any suggestions?

@shimwell
Copy link
Member

Thanks for posting, I suspect this is due to a wire rotation that doesn't remove the two faces when the solid is fully rotated. Cadquery has a option to clean such solids but I think it does work with the plasma volume for some reason. Are you able to see which volume is breaking

@generein
Copy link
Contributor Author

It seems to be "surface 1".

This is the code:

my_reactor = paramak.BallReactor(
    inner_bore_radial_thickness=1,
    inboard_tf_leg_radial_thickness=30,
    center_column_shield_radial_thickness=60,
    divertor_radial_thickness=110, # use to be 50
    inner_plasma_gap_radial_thickness=30,
    plasma_radial_thickness=300,
    outer_plasma_gap_radial_thickness=30,
    firstwall_radial_thickness=3,
    blanket_radial_thickness=100,
    blanket_rear_wall_radial_thickness=3,
    elongation=2.75,
    triangularity=0.5,
    number_of_tf_coils=16,
    rotation_angle=360,
)

my_reactor.export_dagmc_h5m('moltensalt_ballreactor.h5m',min_mesh_size = 0.01, max_mesh_size=20.)

The terminal output is:

UserWarning: 360 degree rotation may result in a Standard_ConstructionError or AttributeError
  warnings.warn(msg, UserWarning)
Major radius:  None
Minor radius:  None
assembly found
checking new shape against 8 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 1 shape id = 1
checking new shape against 7 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 2 shape id = 2
checking new shape against 6 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 3 shape id = 3
checking new shape against 5 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 4 shape id = 4
checking new shape against 4 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 5 shape id = 5
checking new shape against 3 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 6 shape id = 6
checking new shape against 2 parts
    checking shape against brep part 1
/.../anaconda3/envs/paramak_env/lib/python3.8/site-packages/brep_part_finder/core.py:177: UserWarning: No parts matching the specified center_x +/- tolerances were found
  warnings.warn(
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 7 shape id = 7
checking new shape against 1 parts
    checking shape against brep part 1
    checking shape against brep part 2
    checking shape against brep part 3
    checking shape against brep part 4
    checking shape against brep part 5
    checking shape against brep part 6
    checking shape against brep part 7
    checking shape against brep part 8
    checking shape against brep part 9
    checking shape against brep part 10
    single matching pair, brep id = 8 shape id = 8
remaining brep ids that were not matched = dict_keys([])
Info    : Meshing 1D...
Info    : [  0%] Meshing curve 1 (Circle)
Info    : [ 10%] Meshing curve 2 (BSpline)
Info    : [ 10%] Meshing curve 3 (Circle)
Info    : [ 10%] Meshing curve 4 (Circle)
Info    : [ 10%] Meshing curve 5 (Line)
Info    : [ 20%] Meshing curve 6 (Circle)
Info    : [ 20%] Meshing curve 7 (Circle)
Info    : [ 20%] Meshing curve 8 (Line)
Info    : [ 20%] Meshing curve 9 (Circle)
Info    : [ 30%] Meshing curve 10 (Line)
Info    : [ 30%] Meshing curve 11 (BSpline)
Info    : [ 30%] Meshing curve 12 (Line)
Info    : [ 30%] Meshing curve 13 (BSpline)
Info    : [ 40%] Meshing curve 14 (Line)
Info    : [ 40%] Meshing curve 15 (BSpline)
Info    : [ 40%] Meshing curve 16 (Line)
Info    : [ 40%] Meshing curve 17 (BSpline)
Info    : [ 50%] Meshing curve 18 (Line)
Info    : [ 50%] Meshing curve 19 (Circle)
Info    : [ 50%] Meshing curve 20 (BSpline)
Info    : [ 50%] Meshing curve 21 (BSpline)
Info    : [ 60%] Meshing curve 22 (BSpline)
Info    : [ 60%] Meshing curve 23 (Line)
Info    : [ 60%] Meshing curve 24 (BSpline)
Info    : [ 60%] Meshing curve 25 (Line)
Info    : [ 70%] Meshing curve 26 (BSpline)
Info    : [ 70%] Meshing curve 27 (BSpline)
Info    : [ 70%] Meshing curve 28 (Line)
Info    : [ 70%] Meshing curve 29 (BSpline)
Info    : [ 80%] Meshing curve 30 (Line)
Info    : [ 80%] Meshing curve 31 (BSpline)
Info    : [ 80%] Meshing curve 32 (BSpline)
Info    : [ 80%] Meshing curve 33 (BSpline)
Info    : [ 90%] Meshing curve 34 (Line)
Info    : [ 90%] Meshing curve 35 (Line)
Info    : [ 90%] Meshing curve 36 (BSpline)
Info    : [ 90%] Meshing curve 37 (BSpline)
Info    : [100%] Meshing curve 38 (BSpline)
Info    : [100%] Meshing curve 39 (BSpline)
Info    : [100%] Meshing curve 40 (BSpline)
Info    : [100%] Meshing curve 41 (BSpline)
Info    : Done meshing 1D (Wall 0.257646s, CPU 0.257333s)
Info    : Meshing 2D...
Info    : [  0%] Meshing surface 1 (Surface of Revolution, MeshAdapt)
Info    : [  0%] :-( There are 113 intersections in the 1D mesh (curves 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 1(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(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,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1) 2(1,1))
Info    : [  0%] 8-| Splitting those edges and trying again
(...)
Error   : Impossible to mesh periodic surface 1
Aborted

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