Union operator

This category replaces the missing input manual
Post Reply
User avatar
Jaakko Leppänen
Site Admin
Posts: 2387
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Union operator

Post by Jaakko Leppänen » Mon Feb 13, 2012 5:03 pm

The union operator for cell definitions was enabled in update 2.1.2. The syntax is similar to MCNP to simplify input conversions. For example:

Code: Select all

cell 1 0 mat1  (1:-2 :3:-4) -5
means that the cell is defined by a region that is:

outside surface 1
OR
inside surface 2
OR
outside surface 3
OR
inside surface 4
AND (provided that at least one of the above is true)
inside surface 5

Internally the geometry routine is based on a Reverse Polish notation -like algorithm that should be able to handle an arbitrary number of parentheses, but I've only tested it with relatively simple configurations, so be prepared for anything when dealing with complicated cell definitions.

A few notes:

- Reflected and periodic boundary conditions still require the outermost surface to be of specific type, such as a square or hexagonal cylinder.
- If the geometry can be defined without unions, it will probably run faster, even if the cell definitions require more complicated surfaces.

The note on performance is based on the fact that the routine tests every cell in the list when unions are used. If the list contains only intersections (logical AND), the test loop is terminated at the first failure (untrue), and the list is kept sorted according to previous failures.
- Jaakko

User avatar
markdehart
Posts: 40
Joined: Fri May 17, 2013 6:10 pm
Security question 1: No
Security question 2: 92
Location: Idaho National Laboratory

Re: Union operator

Post by markdehart » Wed Apr 16, 2014 4:27 pm

Is the MCNP complement operator (#) supported, or are there any plans to do so? I am trying to convert a rather complicated MCNP input and am not sure how to handle this operator.

User avatar
Jaakko Leppänen
Site Admin
Posts: 2387
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Union operator

Post by Jaakko Leppänen » Wed Apr 16, 2014 4:39 pm

At the moment, no.
- Jaakko

Post Reply