Any tips for debugging MCNP geometry errors?

Click For Summary

Discussion Overview

The discussion revolves around strategies for debugging geometry errors in MCNP (Monte Carlo N-Particle Transport Code), focusing on techniques that extend beyond the manual. Participants share their experiences and methods for identifying and resolving issues related to geometry in simulations.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant suggests using an X-server (X-ming) to visualize geometry in multiple planes (XY, XZ, YZ) for better debugging, although acknowledges limitations with complex geometries.
  • Another participant recommends the MCNPX Visual Editor as a tool for debugging geometry errors.
  • A detailed technique is proposed for identifying subtle geometry errors by changing all cells to void material with non-zero neutron/photon importance, surrounding the geometry with a void sphere, and using a point source to track lost particles during a high-history run.
  • One participant reports that removing material led to the disappearance of the error, raising a question about whether lost particles were indeed caused by geometry errors.
  • A suggestion is made to share the input file or a simplified version to facilitate troubleshooting, emphasizing the importance of setting particle importance correctly.
  • A later reply indicates that the participant found the geometry error, suggesting that the previous run may not have had enough particles to reach the problematic areas.

Areas of Agreement / Disagreement

Participants express various methods for debugging geometry errors, but there is no consensus on a single best approach. The discussion includes differing opinions on the implications of removing materials and the effectiveness of certain techniques.

Contextual Notes

Some techniques depend on specific configurations and assumptions about the geometry and particle importance settings, which may not be universally applicable. Limitations in visualizing complex geometries are acknowledged.

Kirk Truax
Messages
9
Reaction score
2
Hey all,

I was wondering if anyone had any good tips on debugging mcnp geometry? I'm an intermediate user working on better understanding the program. Does anyone have any tips or tricks that go beyond simply reading the manual?
 
Engineering news on Phys.org
Hi
I think there are no easy answers or ready-made solutions. For my part I use a X-server (X-ming for me) and look at the geometry in XY, XZ AND YZ. But it is true that for complex geometry you can not see everything. With x-ming you can also see the cookie-cutter.
PSR
 
or you can try using MCNPX Visual Editor
 
If you have a tiny or non-obvious geometry error (caused by rounding off errors, overlaps, skewed lattice etc) that you can't find with the MCNP plotter or Visual Editor, the following technique can help you pinpoint the error:
- Change all cells to having a void material, but a non-zero neutron/photon importance.
- Surround the entire geometry with a void sphere, again non-zero particle importance
- Surround the sphere with a zero importance void as usual.
- Create a generic point source somewhere within the geometry.
Run MCNP for a very high number of histories. If there are any geometry errors, the run will terminate because of lost particles. You can find the coordinates of the lost particles in the output and file and use those to pinpoint the error.
 
I did what quarkle said and strangely without material the error disappeared, Is that mean losing particles are not caused by geometry error ?
 
Show us the input file, or a simplified input file that still shows the issue. The trick is to make things fast for large numbers of particles. If it's fixed the issue, you may have an obvious undefined area around your problem. Or you didn't set the importance correctly.
 
No sorry, I found the geometrical error , maybe number of particles were not large enough in the previous run (without material) to reach the erroneous parts of geometry.
 
  • Like
Likes   Reactions: Alex A

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 19 ·
Replies
19
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K