I get this error when I try to run the code MCNPX

In summary, the conversation discusses an error that occurs when attempting to run MCNPX code due to a failure in the definition of the sphere. The solution suggested is to insert blank lines after line 10 and line 21 in the input file. Additionally, the conversation notes that the Government holds certain licensing rights for the use and distribution of the material produced.
  • #1
emilmammadzada
118
19
TL;DR Summary
I get this error when I try to run the code MCNPX
I get this error"bad trouble in imcn in routine pass1 unexpected eof in file depletion.inp" when I try to run the code MCNPX
my input file
Code:
c Depletion pincell input file for MCNPX
c Define cells
c   Cell 1: Fuel
1 0 -1.0 -4 -5 -6
c   Cell 2: Cladding
2 0 -2.0 4 -7
c   Cell 3: Moderator
3 0 -3.0 5 6 7
c   Cell 4: Outside
4 0 4 -8
c Define surfaces
c   Surface 4: Inner radius of fuel
4 rpp -0.3937 0.0 0.0 0.3937 10.16 10.16
c   Surface 5: Outer radius of fuel
5 rpp -0.5080 0.0 0.0 0.5080 10.16 10.16
c   Surface 6: Top of fuel
6 pz 10.16
c   Surface 7: Bottom of fuel
7 pz 0.0
c   Surface 8: Outer boundary
8 sphere 0.0 0.0 0.0 15.24
c Define materials
M1 8016.70c -1.0
     8017.70c -0.0072
     92235.70c -0.0001
     92238.70c -0.9927
c Define depletion parameters
DEPL IBURN 1 1 1E-6
DEPL NLIB 9 9
DEPL RDTOL 1E-6
DEPL MAXORD 10
DEPL TDEL 1E-6
DEPL TOTTIME 365.0
c Define initial conditions
IC1 1 1.0 1
c Define run parameters
MODE N
NPS 100000
c Define tallies
F1:n 1 1 0 7 -4 -5 -6
F2:n 2 1 0 7 4
 
Engineering news on Phys.org
  • #2
I'm not sure if this is the problem or not, but the first thing I noticed is that you need single blank lines after the cell card definitions and after the surface card definitions to define the different "input blocks".

Insert a blank line after line 10, and after line 21 (which will be 22 if you submit the first blank line)
 
  • Like
Likes emilmammadzada
  • #3
rpp said:
I'm not sure if this is the problem or not, but the first thing I noticed is that you need single blank lines after the cell card definitions and after the surface card definitions to define the different "input blocks".

Insert a blank line after line 10, and after line 21 (which will be 22 if you submit the first blank line)
The definition of sphere has failed, how can I fix it?
Code:
*************************************************************
 *                                                           *
 *                   MCNPX                                   *
 *                                                           *
 * Copyright 2007. Los Alamos National Security, LLC.        *
 * All rights reserved.                                      *
 *                                                           *
 * This material was produced under U.S. Government contract *
 * DE-AC52-06NA25396 for Los Alamos National Laboratory,     *
 * which is operated by Los Alamos National Security, LLC    *
 * for the U.S. Department of Energy. The Government is      *
 * granted for itself and others acting on its behalf a      *
 * paid-up, nonexclusive, irrevocable worldwide license in   *
 * this material to reproduce, prepare derivative works, and *
 * works, and perform publicly and display publicly.         *
 * Beginning five (5) years after June 1, 2006, subject to   *
 * additional five-year worldwide renewals, the Government   *
 * is granted for itself and others acting on its behalf     *
 * a paid-up, nonexclusive, irrevocable worldwide license    *
 * in this material to reproduce, prepare derivative works,  *
 * distribute copies to the public, perform publicly and     *
 * display publicly, and to permit others to do so.          *
 *                                                           *
 * NEITHER THE UNITED STATES NOR THE UNITED STATES           *
 * DEPARTMENT OF ENERGY, NOR LOS ALAMOS NATIONAL SECURITY,   *
 * LLC, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY,      *
 * EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR     *
 * RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR         *
 * USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR     *
 * PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT   *
 * INFRINGE PRIVATELY OWNED RIGHTS.                          *
 *                                                           *
 *************************************************************
 4 rpp -0.3937 0.0 0.0 0.3937 10.16 10.16                             
 warning.  rpp is infinite in one dimension.
 5 rpp -0.5080 0.0 0.0 0.5080 10.16 10.16                             
 warning.  rpp is infinite in one dimension.
 8 sphere 0.0 0.0 0.0 15.24                                           
 fatal error.  the surface type is not recognized:  sphere         
 m1 8016.70c -1.0                                                     
 warning.  material   1 is not used in the problem.
 depl IBURN 1 1 1E-6                                                 
 fatal error.  depl  is not a legal data symbol.
 depl NLIB 9 9                                                       
 fatal error.  depl  is not a legal data symbol.
 depl RDTOL 1E-6                                                     
 fatal error.  depl  is not a legal data symbol.
 depl MAXORD 10                                                       
 fatal error.  depl  is not a legal data symbol.
 depl TDEL 1E-6                                                       
 fatal error.  depl  is not a legal data symbol.
 depl TOTTIME 365.0                                                   
 fatal error.  depl  is not a legal data symbol.
 ic1 1 1.0 1                                                         
 fatal error.  ic    is not a legal data symbol.
 
 warning.  total nu is now the default for fixed-source problems.
 f2:n 2 1 0 7 4                                                       
 fatal error.  surface     -1 not found for cell     1 card.

 bad trouble in imcn     in routine mbody                             
 surface error                                                       

 
 warning.  plot plane coincident with surface      4
 warning.  plot plane coincident with surface      4
 warning.  plot plane coincident with surface      4
 warning.  plot plane coincident with surface      4
 
  • #4
There are many problems with this input. Have you tried to look in the manual and example problems? I would start with one of the example problems distributed with the code and try to understand how it works.

The "fatal error" message tells you exactly what the problem is. The keyword "sphere" is not a recognized surface type. If you look in the manual, you should be able to find a table that lists the available surface types.

Once you fix this error, you will get several errors about the materials. None of your cell cards include a valid material number and the densities are not correct. Once you fix this, you will find that you are missing material definitions for the cladding and moderator.

Next, you will find that a fixed source problem is probably not what you want to run. Look at the examples on how to run a criticality problem using the "kcode" option.

I suggest taking out all of the "DEPL" and "IC1" cards and just try to get a simple problem working before trying to deplete. Look at the sample problems to understand how to set up the geometry and materials.
 
  • Love
  • Informative
Likes emilmammadzada and Alex A
  • #5
I just looked at your previous posts, and it looks like several people have tried to help you set up your MCNP cases, but you don't appear to understand the very basics of how to set up the code.

Instead of randomly "trying things", I suggest sitting down with an example input and going through the manual and try to understand what each input line does. There are many samples distributed with the code, and you can find more on the web.

It will take some time, but it is necessary if you are going to understand how to set up a problem and interpret the results.
 
  • Like
Likes PSRB191921
  • #6
rpp said:
There are many problems with this input. Have you tried to look in the manual and example problems? I would start with one of the example problems distributed with the code and try to understand how it works.

The "fatal error" message tells you exactly what the problem is. The keyword "sphere" is not a recognized surface type. If you look in the manual, you should be able to find a table that lists the available surface types.

Once you fix this error, you will get several errors about the materials. None of your cell cards include a valid material number and the densities are not correct. Once you fix this, you will find that you are missing material definitions for the cladding and moderator.

Next, you will find that a fixed source problem is probably not what you want to run. Look at the examples on how to run a criticality problem using the "kcode" option.

I suggest taking out all of the "DEPL" and "IC1" cards and just try to get a simple problem working before trying to deplete. Look at the sample problems to understand how to set up the geometry and materials.
I'm currently working on openmc and serpent. It's been a while since I looked at mcnpx. That's why I don't remember a lot of things. I think this code about mcnpx may have mixed this input file with the input files of other codes. I'll look into this again.))
 

FAQ: I get this error when I try to run the code MCNPX

Why am I getting a "bad trouble" error when running MCNPX?

The "bad trouble" error in MCNPX typically indicates a severe issue with the input file. Common causes include syntax errors, undefined materials, or incorrect geometry definitions. Carefully review your input file for any mistakes, ensuring all required parameters and definitions are correctly specified.

What does the "source particle type not recognized" error mean?

This error occurs when the source particle type specified in the input file is not recognized by MCNPX. Ensure that the particle type is correctly defined and that it matches one of the valid types supported by the version of MCNPX you are using. Refer to the MCNPX manual for a list of acceptable particle types.

How do I resolve the "geometry error" in MCNPX?

A "geometry error" usually indicates an issue with the defined geometry in your input file. This can be due to overlapping cells, undefined surfaces, or improper cell definitions. Use the MCNPX geometry plotting tools to visualize and debug the geometry, ensuring all cells and surfaces are correctly defined and non-overlapping.

Why does MCNPX give an "unresolved material" error?

The "unresolved material" error means that a material specified in your input file is not properly defined. Verify that all materials are correctly listed in the material cards and that each material has a valid composition and density. Additionally, ensure that the material numbers used in the cell cards match those in the material cards.

What should I do if MCNPX outputs a "fatal error" during execution?

A "fatal error" indicates a critical issue that prevents MCNPX from continuing the simulation. This could be due to a wide range of problems, such as memory allocation issues, incorrect input parameters, or bugs in the code. Check the output and error files for detailed messages about the cause of the error, and consult the MCNPX documentation or user forums for specific troubleshooting steps.

Back
Top