Particles lost in MCNP running

  • Thread starter Thread starter flashcflash
  • Start date Start date
  • Tags Tags
    Mcnp Particle
Click For Summary

Discussion Overview

The discussion revolves around issues encountered in a Monte Carlo N-Particle Transport Code (MCNP) simulation, specifically regarding particles being lost in air bubbles within a defined geometry. Participants are examining the geometry definitions and cell configurations to identify and resolve the problems causing particle loss.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports that particles are lost in air bubbles, indicating problems with specific cell definitions (cells 1500-1504, 2-7, and 1300).
  • Another participant suggests that the definition of cell 1300 is failing, leading to particles being lost, and provides a specific format for defining the space between coordinates.
  • There is a reiteration of the need to use the union operator correctly when defining spaces, with references to Boolean logic and De Morgan's theorem.
  • A participant mentions that the user's manual advises against frequent use of the complement operator, but they find it necessary to pass geometric tests despite errors reported by the software.
  • Concerns are raised about the complexity and potential errors in the input file, with a specific mention that cell 1504 is actually a surface and not defined as a cell.

Areas of Agreement / Disagreement

Participants express differing views on the correct approach to defining cells and spaces, with some suggesting specific definitions while others point out potential errors in the current setup. The discussion remains unresolved regarding the best method to correct the issues.

Contextual Notes

Participants note that the input file is complicated and may contain multiple errors, with specific references to the definitions of cells and surfaces that could be contributing to the problems.

flashcflash
Messages
6
Reaction score
0
Hi dears,
My model has several air bubbles to surrounding solid models. The output file reported some particles were lost in my air bubbles and could not find a cell there. I have used vised to check and found that cell 1500-1504,cell2-7,cell1300 has some problems. I changed the geometry definitions from planes to macro rectangles, but the errors persist. Any advice would be helpful. Thank you!

Attachment is output file with source code.
 

Attachments

Engineering news on Phys.org
Cell 1300 is the big cell containing the experiment and air, outside that is the void cell. That cell definition is failing and anything going into the space that should be cell 1300 is getting lost. When defining a space in a box you want the space between x1 and x2, y1 and y2, z1 and z2 so the definition reads like +x1 -x2 +y1 -y2 +z1 -z2
When defining the outside of that space you can't just flip the tests, you have to use the union operator :
People that have done Boolean logic might recognize this as De Morgan's theorem in action. -x1 +x2 would straight away be a space that doesn't exist, it's below a lower value and at the same time above a higher value.

What is needed is -x1:+x2:-y1:+y2:-z1:+z2
ie, all the space below the lower bounds and also all the space above the higher bound for every axis.
 
  • Informative
  • Like
Likes   Reactions: DEvens and berkeman
Alex A said:
Cell 1300 is the big cell containing the experiment and air, outside that is the void cell. That cell definition is failing and anything going into the space that should be cell 1300 is getting lost. When defining a space in a box you want the space between x1 and x2, y1 and y2, z1 and z2 so the definition reads like +x1 -x2 +y1 -y2 +z1 -z2
When defining the outside of that space you can't just flip the tests, you have to use the union operator :
People that have done Boolean logic might recognize this as De Morgan's theorem in action. -x1 +x2 would straight away be a space that doesn't exist, it's below a lower value and at the same time above a higher value.

What is needed is -x1:+x2:-y1:+y2:-z1:+z2
ie, all the space below the lower bounds and also all the space above the higher bound for every axis.
Thank you, that must be the mislead of user's manual. It said I should seldom using complement operator. Not only the last cell, several of them have problem. The vised would report error in red lines even using union operator, the complement operator for cell combination is the only way to pass the geometric test.
 
All space in the problem must belong to a cell, and no point in space may belong to more than one cell.

That is a complicated input file and it's a bit of a mess. You mention cell 1504, but there is no cell 1504, there is a surface 1504 and it isn't used in any of the cell definitions.

Is there a working version of this you are modifying or did you make the whole thing from scratch?
 
  • Like
Likes   Reactions: DEvens
Alex A mentions there being no cell 1504. In the OP there is no surface 1504 either, it's a line number as printed out by MCNP.

flashcflash mentions the user manual advising not to use the complement operator too much. This is correct. But the complement operator is the # sign. It indicates outside the cell it refers to. This is different from the union operator mentioned by Alex A. MCNP can make heavy going of an input that uses a lot of complement ops. Your input uses them a fair amount. Probably Vised gets confused first while MCNP is still doing OK. So let's try to fix the rest of the problem first. I'm going to guess that at this size problem the # ops are not a problem.

I read through your code only very quickly. It looks like you have cell 1300 wrong. As Alex A says, you want to be getting the outside of the various rectangular boxes, so -x1:+x2:-y1:+y2:-z1:+z2 where x1<x2, y1<y2, and z1<z2. But you still need 1300 to include being inside surface 2000. So you need this.

-2000 (-x1:+x2:-y1:+y2:-z1:+z2)

Note that it is a space between the 2000 and the rest. A space defaults to "and" where the : means "or" or union. It looks like you have this.

-2000 x1 -x2 y1 -y2 z1 -z2

Note the difference in signs and the space instead of : If the xs, ys, and zs define a rectangular box entirely inside surface 2000 then the second form is just the inside of 2000. The first form cuts the box out.

Generically your problem could benefit from some tidying. It would be handy to have all the surfaces for a given cell grouped together and numbered in sequence. It would be handy to put some comments in the surfaces indicating what cells they belong to. It would be handy to group cell and surface numbers so that the numbers for a region in your problem are in sequence. Say in the range of 1000 to 2000 for this part, 2000 to 3000 that part, and so on. It would be a big chore to get from where you are to there. And usually rewriting large parts of your code should be avoided. But the next time you make an input for MCNP you should consider it.
 
  • Like
Likes   Reactions: Alex A

Similar threads

Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 20 ·
Replies
20
Views
19K
  • · Replies 21 ·
Replies
21
Views
4K