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

  • Thread starter Thread starter emilmammadzada
  • Start date Start date
  • Tags Tags
    Code Error Mcnpx
Click For Summary

Discussion Overview

The discussion revolves around an error encountered while running the MCNPX code, specifically related to an input file for a depletion simulation. Participants analyze the input file structure, surface definitions, and material specifications, exploring potential causes for the reported errors.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant reports an error message indicating "unexpected eof in file depletion.inp" when attempting to run MCNPX.
  • Another participant suggests that the error may be due to missing blank lines after cell and surface definitions, which are necessary to separate input blocks.
  • Concerns are raised about the definition of the "sphere" surface type, which is noted as unrecognized, leading to fatal errors in the input.
  • Several participants point out that the input file has multiple issues, including invalid material numbers and incorrect density definitions, and recommend consulting the manual and example problems for guidance.
  • There is a suggestion to simplify the problem by removing depletion and initial condition cards to focus on getting a basic setup to work first.
  • One participant emphasizes the importance of understanding the basics of the code and suggests reviewing example inputs and the manual rather than making random adjustments.

Areas of Agreement / Disagreement

Participants generally agree that there are multiple issues with the input file and that consulting the manual and example problems is advisable. However, there is no consensus on the specific steps to resolve the errors, and some participants express frustration with the original poster's approach to troubleshooting.

Contextual Notes

Limitations include potential misunderstandings of the MCNPX input structure, reliance on specific definitions for surfaces and materials, and the need for clarity on the intended simulation type (e.g., criticality vs. fixed source). There are unresolved mathematical and structural issues in the input file that may affect the execution of the code.

emilmammadzada
Messages
133
Reaction score
19
TL;DR
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
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   Reactions: emilmammadzada
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
 
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   Reactions: emilmammadzada and Alex A
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   Reactions: PSRB191921
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.))
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
6
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K