Open cbaus opened 2 years ago
Super to hear the package is useful.
This is not really a solution but just a bit more info on the bug
The Paramak makes use of Cadquery and CadQuery performs a clean operation by default that might help here. I would have thought that the duplicated surface due to a 360 in the Z axis rotation gets removed
Here is a simple example with showing that we get 4 faces for a full 360 rotation
However the BlanketFP is a more complex shape and has another place where this duplicate surface can happen.
Does the error go away if the start and stop angles are changed from this
shape = paramak.BlanketFP(50, -90, 270, offset_from_plasma=50.0)
to this
shape = paramak.BlanketFP(50, -80, 270, offset_from_plasma=50.0)
Yes it goes away for the proposed values.
BallReactor
behaves similarly. I can set the rotation up to ~359.6 degrees. If I set it larger, errors appear.
As you said, it might just be a few of the volumes in the reactor giving trouble.
I shall look into this more.
As a temporary fix there is a method of generating those reflective planes automatically with the openmc-dagmc-wrapper. So perhaps a 90 degree model wouldn't be too bad
Let me first congratulate the authors for this fantastic project and the related repos that I really came to appreciate in the past days.
About the problem When creating shapes or reactors with the
rotatation_angle=360
the workflow to run in openmc via ->cad_to_h5m
with cubit imprinting andopenmc_dagmc_wrapper
fails. I believe the issue is well known: float precision for angle resulting in 2 overlapping surfaces at the boundary of the rotation start and end of the shape. Or at least that's my guess where the problem lies. Do you experience the samePossible solution a) I put this issue in the paramak repo even though it could fit in some other repos as well. Is there a way to create the full rotation shapes in another way, so that there are no surfaces that need to be merged? Either a flag or checking if the rotation is close to 360 degrees. b) I could also imagine that with
rotation_angle
slightly larger than 180 plus a reflective surface the problem might be solved. However symmetry has to be assumed and one has to be careful with the source making this not a universal solution. What do you think?To reproduce
Errors from cubit imprint/merge
Paricles seems to get lost when running openmc. Also plotting the x-y slice is very different than when the shape is only rotated 395.5 degrees.