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

Serpent does not allow UNION for cell surfaces #52

Open
gvozdila opened this issue May 18, 2020 · 1 comment
Open

Serpent does not allow UNION for cell surfaces #52

gvozdila opened this issue May 18, 2020 · 1 comment

Comments

@gvozdila
Copy link

I can cite Serpent-1.1.7 user manual obtained from OECD, p.28 :

  1. Only the intersection operator is available for cell definitions. This means that a point
    is inside the cell if and only if it is inside (or outside if defined by a negative surface
    number) all the boundary surfaces in the list.

May be it would be possible to build some decomposition from UNIONs to INTERSECTIONs.
First time even warning printing could be helpful.

@gvozdila
Copy link
Author

Ok. I have some something about it. CSG is not a "real" boolean algebra over macro-bodies, only over basis macro-bodies. So we cannot use algebra directly. For example:
A AND B = not ( not A OR not B) -- one can use #cell_id in MCNP, but there is no way like this in Serpent or KENO-VI (SCALE)

But we can use some other simple rules like this :
a1) is equal a2) i will use MCNP notation here
a1) 1 1 1.0 10: 20 u=0 imp:n=1

a2)101 1 1.0 -10 20 u=0 imp:n=1
102 1 1.0 10 -20 u=0 imp:n=1
103 1 1.0 -10 -20 u=0 imp:n=1

b) not (A and B) == (not A) or (not B)
c) not (A or B) == (not A) and (not B)

For me it seems like we need some basic "expand" procedure in class InputDeck.
And we are not really need to destroy original cell_list. Should we use self.create_cell_list_without_union() to build no_union_cell_list[] ?

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