Help debugging MCNP code - particle lost and zero latice element found

In summary, the conversation discusses an issue with a particle lost error in an MCNP model and the need to properly define cells in the 3-D space. It is suggested to use the interactive plotter and the "ip" option to identify any geometry errors. The conversation also mentions using the "pz 0" command to get a cross section and suggests defining reflectors with simple surfaces instead of macrobodies to potentially resolve the issue with the void cell.
  • #1
AlexFi
19
5
TL;DR Summary
Help identify gap in geometry or something
I keep getting particle lost error even though there were no hole in the lattice.
Can someone identify any mistake in my code?
 

Attachments

  • OpusLEUmod6_quarter.txt
    1.8 KB · Views: 81
Last edited:
Engineering news on Phys.org
  • #2
The first thing to do is fire-up the plotting package that comes with MCNP. Look for those dotted lines around some cells. These indicate geometry errors.

In an MCNP model, every part of 3-D space must be filled with exactly one cell. There must be no gaps that are not part of a defined cell. And no point can be part of more than one cell.
 
  • Like
Likes Alex A
  • #3
To give a few more hints, search for "interactive plotter" in the manual and use the "ip" option on the command line.
 
  • Like
Likes Alex A and Grelbr42
  • #4
I ran mcnp5 ip inp=file
i means process the input file, p means plot the geometry in the interactive plotter.
I click on the "Click here or picture or menu" and type "pz 0" to get a cross section through the reactor. Nothing is coloured in, everywhere I click on the plot is cell 99. This strongly suggests an error in the definition of cell 99, the void cell. Without having much time to look into it :5:6 where 5 and 6 are macrobody surfaces "Top reflector" and "Bottom reflector" feels wrong. Defining those reflectors with simple surfaces rather than macrobodies might make defining the void cell easier.
 

1. What could be causing particles to get lost in my MCNP code?

There could be several reasons for particles getting lost in your MCNP code. Some common causes include incorrect boundary conditions, improper use of tallying, and errors in geometry definitions. It is important to carefully review your code and check for any potential mistakes.

2. How can I locate and fix a zero lattice element error in my MCNP code?

A zero lattice element error typically occurs when there is an issue with the definition of your lattice. This could be due to incorrect lattice dimensions, missing materials, or other errors in your input file. It is important to carefully check your lattice definitions and make sure they are accurate.

3. Can using too many or too few particles in my MCNP simulation affect the accuracy of my results?

Yes, the number of particles used in a simulation can have a significant impact on the accuracy of your results. Using too few particles can lead to statistical errors, while using too many particles can increase computation time without necessarily improving accuracy. It is important to carefully choose the appropriate number of particles for your simulation.

4. How can I troubleshoot errors in my MCNP code?

When troubleshooting errors in your MCNP code, it is important to carefully review your input file for any potential mistakes. You can also use the MCNP output files to identify the location and type of errors. Additionally, seeking help from experienced MCNP users or consulting the MCNP user manual can also be helpful in troubleshooting errors.

5. Are there any common mistakes that can lead to particle loss in MCNP simulations?

Yes, there are several common mistakes that can result in particle loss in MCNP simulations. These include improper use of source definitions, incorrect boundary conditions, and errors in the definition of materials or geometry. It is important to carefully review your code and check for any potential mistakes to avoid particle loss in your simulations.

Similar threads

Replies
19
Views
1K
Replies
5
Views
2K
  • Nuclear Engineering
Replies
4
Views
2K
Replies
2
Views
970
  • Nuclear Engineering
Replies
3
Views
2K
  • Nuclear Engineering
Replies
7
Views
2K
  • Nuclear Engineering
Replies
4
Views
2K
Replies
7
Views
2K
  • Nuclear Engineering
Replies
3
Views
4K
Replies
2
Views
3K
Back
Top