MCNP6: error -- "bad trouble in imcn" is usually tangled with spacing error?

  • Thread starter HHJo
  • Start date
  • Tags
    Mcnp6
  • #1
HHJo
4
3
Hello,

I'm new to MCNP deck-building, and I'm trying to acquire an X-ray energy spectrum using MCNP6, on Windows 10 environment. I'm running MCNP6 via MCNPX Visual Editor Version X_24E, and the deck is input using built-in "Input File" tab in MCNPX Visual Editor. My input deck is given below.

***** Start
MCNP 5MeV Spectrum
c ------------------------------
c Cell Cards
c ------------------------------
1 1 -19.25 1 -2 3 -4 5 -6
2 0 -7
3 0 -1 2 -3 4 -5 6 7 -8

c ------------------------------
c Surface Cards
c ------------------------------
c Tungsten target
1 PZ -2.5
2 PZ 2.5
3 PY -0.15
4 PY 0.15
5 PX -2.5
6 PX 2.5
c Detector
7 RCC 0 30 0 0 10 0 5
c World
8 SO 100

c ------------------------------
c Data Cards
c ------------------------------
MODE E P
IMP:E 1 1 1
IMP:P 1 1 1
SDEF POS=0 -18 0 VEC=0 1 0 DIR=1 ERG=5 PAR=E CEL=3
F8:P 2
E8 0 298I 5
M1 74000 1
NPS 100000000

***** End

And I'm getting MCNP FATAL ERROR, which reads as following,

***** Start
bad trouble in imcn in routine imcn
source particle no.
starting random number =
error getting memorybly a control character, in column 3
***** End

I've seen a post that says that "bad trouble in imcn" is usually tangled with spacing error, so I changed "tab spaces" to "space-bar spaces," but the problem is not resolved. I'm not familiar with MCNP, so any kind of advices will be grateful.HwanHui Jo
 
Engineering news on Phys.org
  • #2
Welcome to physicsforms HwanHui Jo,

The error message seems damaged. It resembles one where a control code ASCII char is in the input instead of text. It appears to have been wiped by physicsforums formatting and when I run your input deck I get a different error that results from cell 3 not being properly specified. Your box is everything above a minimum that is also below a maximum. If you reverse this to describe outside the box you get everything below a minimum that is also above a maximum. What you want is the union operator :

That allows you to specify everything below a minimum and, additionally, everything above a maximum.

You should also add a void cell, a cell with zero importance around your world cell. This is so neutrons are not tracked forever.
 
  • Informative
  • Like
Likes Astronuc and berkeman
  • #3
Alex A said:
Welcome to physicsforms HwanHui Jo,

The error message seems damaged. It resembles one where a control code ASCII char is in the input instead of text. It appears to have been wiped by physicsforums formatting and when I run your input deck I get a different error that results from cell 3 not being properly specified. Your box is everything above a minimum that is also below a maximum. If you reverse this to describe outside the box you get everything below a minimum that is also above a maximum. What you want is the union operator :

That allows you to specify everything below a minimum and, additionally, everything above a maximum.

You should also add a void cell, a cell with zero importance around your world cell. This is so neutrons are not tracked forever.
Thanks for your kind reply! I tried copy-pasting the deck on the physics forum, but still getting the same error message. Think my MCNP or vised24 build is broken somewhere. I'll make sure to try your solution after re-building it.
 
  • #4
Try renaming the input file and the output file to add .txt and attach them to a post. Try also running this version which for me gives the error "pos point source is not located in sdef cel 3.".

Edit,
We may also need to check for correct 0d 0a at the end of lines if you are in windows.
 

Attachments

  • spectrum.txt
    574 bytes · Views: 60
  • #6
Tom.G said:
See also:
https://www.physicsforums.com/posts/6929152

Iit states:
"Blank lines being the section breaks is probably the biggest gotcha."
Dear Tom.G,

Separating cards with no blank lines gave me runtime error. Sadly it was not a solution in my case.
 
  • Informative
Likes Tom.G
  • #7
Hello,

My problem has been fully resolved and I succeeded to acquire an X-ray energy spectrum in a water slab. To wrap up, I want to share my course of troubleshooting. My full MCNP deck for the X-ray energy spectrum is attached.

1. The first thing I did was replacing all "tab-spacings" with "space bar-spacings." Tab-spacing is a handy way of aligning each lines and elements in your input deck, but it may cause fatal error when running the MCNP.

2. The second thing I did was re-visiting my geometry (a.k.a. cell cards). Make sure to always envelop your world with void. From the point of a particle, the boundary of your world is not the end of the propagation. If nothing defined, it will propagate endlessly. Defining void surrounding your world will effectively "cut" the propagation of the particle. In my input deck, Cell #4 in the Cell Cards is the void enveloping my world. Use VisEd to check whether your cells were generated as intended, it helped me alot.

3. The last thing I did was checking the environmental variables. Upon checking them, I found that my "DATAPATH" in the "system variables" was damaged. Make sure to add your directory to "xsdir" in your "DATAPATH" environmental variable. Usually "xsdir" is in "YOUR_MCNP\MCNP_data."

This is the course I went through to resolve my problem with MCNP deck building. Things are elementary, yet so easy to overlook. Hope other newcomers get some help and insights like I did.HwanHui Jo
 

Attachments

  • spectrum.txt
    624 bytes · Views: 52
  • Informative
Likes Alex A and Tom.G

Similar threads

  • Nuclear Engineering
Replies
7
Views
2K
  • Nuclear Engineering
Replies
5
Views
2K
  • Nuclear Engineering
Replies
7
Views
601
  • Nuclear Engineering
Replies
11
Views
7K
  • Nuclear Engineering
Replies
4
Views
2K
  • Nuclear Engineering
Replies
7
Views
2K
Replies
3
Views
2K
Replies
6
Views
1K
Replies
3
Views
7K
  • Nuclear Engineering
Replies
2
Views
2K
Back
Top