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

Click For Summary

Discussion Overview

The discussion revolves around debugging an MCNP code related to particle loss errors and issues with lattice elements. Participants are exploring potential geometry errors and providing suggestions for troubleshooting within the context of computational modeling in nuclear engineering.

Discussion Character

  • Technical explanation, Exploratory, Debate/contested

Main Points Raised

  • One participant reports a persistent "particle lost" error despite no apparent holes in the lattice and seeks assistance in identifying mistakes in the code.
  • Another participant suggests using the plotting package that comes with MCNP to identify geometry errors, emphasizing that every part of 3-D space must be filled with exactly one cell.
  • A further suggestion is made to consult the manual for the "interactive plotter" and to use specific command line options to visualize the geometry.
  • A participant describes their experience using the interactive plotter, noting that the entire plot shows as cell 99, which indicates a potential error in the definition of that cell. They suggest that defining reflectors with simple surfaces instead of macrobodies might simplify the void cell definition.

Areas of Agreement / Disagreement

Participants generally agree on the importance of checking geometry definitions and using the plotting tools, but there is no consensus on the specific nature of the errors or the best approach to resolve them.

Contextual Notes

Limitations include potential missing assumptions about the geometry definitions and the specific configurations of the cells and surfaces in the MCNP model.

AlexFi
Messages
19
Reaction score
5
TL;DR
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

Last edited:
Engineering news on Phys.org
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   Reactions: Alex A
To give a few more hints, search for "interactive plotter" in the manual and use the "ip" option on the command line.
 
  • Like
Likes   Reactions: Alex A and Grelbr42
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.
 

Similar threads

Replies
2
Views
2K
Replies
6
Views
999
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K