MCNPX pwr pin depletion input file running error

  • #1
emilmammadzada
122
19
TL;DR Summary
Help with MCNPX Error: "You need a source subroutine" and Other Warnings
Hello everyone,

I'm working on a PWR fuel pin depletion simulation in MCNPX, but I'm encountering several warnings and an error that stops my simulation. Here’s my input setup:
[c *** PWR pincell ***
c
c --- cell cards ---
1 1 -10.4 -1 imp:n=1 vol=192.29 $ fuel
2 2 -6.55 1 -2 imp:n=1 vol=66.53 $ clad
3 3 -1.0 2 -3 imp:n=1 vol=374.27 $ water
4 0 3 imp:n=0 $ outside

c --- surface cards ---
1 RCC 0 0 0 0 0 365.0 0.4095 $ fuel
2 RCC 0 0 -0.0655 0 0 365.131 0.4750 $ clad
3 BOX -0.65665 -0.65665 -0.1 1.3133 0 0 0 1.3133 0 0 0 367.0 $ water box

c --- material cards ---
m1 8016.60c 0.9651 92235.60c 0.0030 92238.60c 0.0319 $ fuel
m2 40000.60c 1.0 $ clad
m3 1001.60c 0.667 8016.60c 0.333 $ water

c --- Tally cards---
F4:n 1

c --- depletion ---
BURN TIME=100,200,300
MAT=1
POWER=0.066956
PFRAC=1.0,0.8,0.5
OMIT=1,2,92235,92238

c --- KCODE cards ---
kcode 1000 1.0 15 50
ksrc 0.65665 0.65665 150.0
]
running error
[ warning. total nu is now the default for fixed-source problems.
warning. there are no tallies in this problem.
warning. cross-section file bertin does not exist.
imcn is done
runtpe already exists. runtpf is created instead.
warning. 92235.60c lacks delayed neutron cross sections.
warning. 92238.60c lacks delayed neutron cross sections.
dump 1 on file runtpf nps = 0 coll = 0
ctm = 0.00 nrn = 0

xact is done
dynamic storage = 0 words, 0 bytes. cp0 = 0.01

bad trouble in mcrun in routine source
you need a source subroutine.]
 
Engineering news on Phys.org
  • #2
Hi @emilmammadzada,

You should check the location of your data files. I don't know if bertin would be used in a burn problem, if in doubt find the file and drop it into the same directory X is in.

You have extra empty lines in your input file, you should have two, one after the cell definitions and one after the surface definitions. Some of those errors are just that the program isn't reading beyond the third empty line. Other than that it looks good.

If you fix those and still get errors, change the input file to add .txt to the end of the name and then attach it to a post.
 
  • Informative
Likes emilmammadzada
  • #3
Alex A said:
Hi @emilmammadzada,

You should check the location of your data files. I don't know if bertin would be used in a burn problem, if in doubt find the file and drop it into the same directory X is in.

You have extra empty lines in your input file, you should have two, one after the cell definitions and one after the surface definitions. Some of those errors are just that the program isn't reading beyond the third empty line. Other than that it looks good.

If you fix those and still get errors, change the input file to add .txt to the end of the name and then attach it to a post.
Is the xsdir file you specified as x?
 
  • #4
Alex A said:
Hi @emilmammadzada,

You should check the location of your data files. I don't know if bertin would be used in a burn problem, if in doubt find the file and drop it into the same directory X is in.

You have extra empty lines in your input file, you should have two, one after the cell definitions and one after the surface definitions. Some of those errors are just that the program isn't reading beyond the third empty line. Other than that it looks good.

If you fix those and still get errors, change the input file to add .txt to the end of the name and then attach it to a post.
now i am getting this error.
warning. total nu is now the default for fixed-source problems.
warning. there are no tallies in this problem.
warning. cross-section file bertin does not exist.
imcn is done
warning. 92235.60c lacks delayed neutron cross sections.
warning. 92238.60c lacks delayed neutron cross sections.
dump 1 on file runtpe nps = 0 coll = 0
ctm = 0.00 nrn = 0

xact is done
dynamic storage = 0 words, 0 bytes. cp0 = 0.01

bad trouble in mcrun in routine source
you need a source subroutine.
my input file is this
 

Attachments

  • dep.txt
    750 bytes · Views: 14
  • #5
Sorry, x meaning wherever mcnpx or mcnpx.exe is but this is often where xsdir is anyway. Try it in the data directory, MCNP_DATA or whatever directory is pointed to by the top line in your xsdir file (if it is in it), or if everything is in the same directory just drop it into that. So long as the file is not damaged it will work somewhere.
 
  • Informative
Likes emilmammadzada
  • #6
Alex A said:
Sorry, x meaning wherever mcnpx or mcnpx.exe is but this is often where xsdir is anyway. Try it in the data directory, MCNP_DATA or whatever directory is pointed to by the top line in your xsdir file (if it is in it), or if everything is in the same directory just drop it into that. So long as the file is not damaged it will work somewhere.
I did what you said but I still got this error.
warning. total nu is now the default for fixed-source problems.
warning. there are no tallies in this problem.
warning. cross-section file bertin does not exist.
imcn is done
warning. 92235.60c lacks delayed neutron cross sections.
warning. 92238.60c lacks delayed neutron cross sections.
dump 1 on file runtpe nps = 0 coll = 0
ctm = 0.00 nrn = 0

xact is done
dynamic storage = 0 words, 0 bytes. cp0 = 0.01

bad trouble in mcrun in routine source
you need a source subroutine.
 
  • #7
If you still get "you need a source subroutine" you have not removed a blank line. You should only have two in the file. There is more to this than I thought. Your ksrc isn't in your fuel, I've put it in the fuel but not in the middle so you should change this. Your k for the system - a single rod - is very very low. I've turned it into an infinite lattice by making the water box reflecting just for this test.

The BURN card is in the wrong place, the material cards must be below it and it should be
Code:
BURN TIME=100,200,300
     MAT=1
     POWER=0.066956
     PFRAC=1.0,0.8,0.5
     OMIT=blah
Because these are variables on the BURN card.

The result then runs into what I hope will be the last problem - missing data tables for fleeting nuclei. So add what it needs and make an OMIT line that works for you. The one with U235 and U238 in it was a strange choice.

See how far you can get!
 

Attachments

  • dep.txt
    743 bytes · Views: 7
  • Care
Likes emilmammadzada
  • #8
Alex A said:
If you still get "you need a source subroutine" you have not removed a blank line. You should only have two in the file. There is more to this than I thought. Your ksrc isn't in your fuel, I've put it in the fuel but not in the middle so you should change this. Your k for the system - a single rod - is very very low. I've turned it into an infinite lattice by making the water box reflecting just for this test.

The BURN card is in the wrong place, the material cards must be below it and it should be
Code:
BURN TIME=100,200,300
     MAT=1
     POWER=0.066956
     PFRAC=1.0,0.8,0.5
     OMIT=blah
Because these are variables on the BURN card.

The result then runs into what I hope will be the last problem - missing data tables for fleeting nuclei. So add what it needs and make an OMIT line that works for you. The one with U235 and U238 in it was a strange choice.

See how far you can get!
Thank you so much for taking the time to answer my question! Your insights were really helpful.
 
  • Like
Likes Alex A
  • #9
Alex A said:
If you still get "you need a source subroutine" you have not removed a blank line. You should only have two in the file. There is more to this than I thought. Your ksrc isn't in your fuel, I've put it in the fuel but not in the middle so you should change this. Your k for the system - a single rod - is very very low. I've turned it into an infinite lattice by making the water box reflecting just for this test.

The BURN card is in the wrong place, the material cards must be below it and it should be
Code:
BURN TIME=100,200,300
     MAT=1
     POWER=0.066956
     PFRAC=1.0,0.8,0.5
     OMIT=blah
Because these are variables on the BURN card.

The result then runs into what I hope will be the last problem - missing data tables for fleeting nuclei. So add what it needs and make an OMIT line that works for you. The one with U235 and U238 in it was a strange choice.

See how far you can get!
Dear Alex A , How can I read the keff data at the output of this input file, I want to draw the schedule of keff according to the depletion time. Is there a method to do this?
 
  • #10
If you have changed the OMIT line and/or added the missing data and have a working input file please share it. It will need to contain all the isotopes that cannot be calculated using the data tables. So typically the input file is run and the list of predicted isotopes that error is used for the OMIT line.

A BURN should run a lot of kcodes and give a k for the system at different points. There are three burn periods, 100 days, another 200 days at 80% power and a further 300 days at 50% power. So I would expect at least 4 values of k?

What is the fuel are you simulating? The material 1 definition seems strange.

I do not have experience of doing BURNs outside trying to help in this forum so if anyone else knows anything please do add your voice to the thread!
 
  • Informative
Likes emilmammadzada
  • #11
Alex A said:
If you have changed the OMIT line and/or added the missing data and have a working input file please share it. It will need to contain all the isotopes that cannot be calculated using the data tables. So typically the input file is run and the list of predicted isotopes that error is used for the OMIT line.

A BURN should run a lot of kcodes and give a k for the system at different points. There are three burn periods, 100 days, another 200 days at 80% power and a further 300 days at 50% power. So I would expect at least 4 values of k?

What is the fuel are you simulating? The material 1 definition seems strange.

I do not have experience of doing BURNs outside trying to help in this forum so if anyone else knows anything please do add your voice to the thread!
I want to read the data in the output file, for example for Serpent I can do this using Octave or Matlab.I can convert the data in this mcnp output file(example:depletion.o) to ascii or data format or in Excel format. like mdata or gridconv . My goal is to see the keff and time list from the output file
 
  • #12
The output file should already be text. mdata is a mesh tally result and tools like gridconv can make that easier to use. Newer versions and OpenMC use the h5 (HDF5) data format.
 
  • Informative
Likes emilmammadzada
  • #13
Alex A said:
The output file should already be text. mdata is a mesh tally result and tools like gridconv can make that easier to use. Newer versions and OpenMC use the h5 (HDF5) data format.
I got this error when I added the MATMOD cart to the input file
c --- Tally cards---
F4:n 1
c --- depletion ---
BURN TIME=5
MAT=1
POWER=174
PFRAC=1.0
OMIT=1,8,6014,7016,8018,9018,90234,91232,95240,95244
MATMOD=2,
1, 1, 1, 92235, 7.0e-2,
2, 1, 1, 92238, 0.97
c --- KCODE cards ---
KCODE 100 1.0 10 50
ksrc 0.0 0.0 1.0
c --- material cards ---
m1 8016.60c 0.9651 92235.60c 0.0030 92238.60c 0.0319 $ fuel
m2 40000.60c 1.0 $ clad
m3 1001.60c 0.667 8016.60c 0.333 $ water

this error
total fission nubar data are being used.
warning. kcode usually needs s(a,b) physics (mt card)
fatal error. BURN card MADMOD keyword isotope does not exist.
fatal error. BURN card MADMOD keyword isotope does not exist.
fatal error. BURN card MADMOD keyword isotope does not exist.
fatal error. BURN card MADMOD keyword duplicate isotopes.
warning. cross-section file bertin does not exist.
warning. Resetting bank size from 2048 to 128 particles
imcn is done
I want to see the data table in the output file as in the following picture
Screenshot_8-11-2024_225635_.jpeg
 
  • #14
Not sure what you are trying to do here. Number of timesteps = 2. Timestep 1, number of materials =1, material 1, number of isotopes [missing but it clearly should be 1], ZAID1 is U235, C1... Then the same problem with Timestep 2.

This should be an example of a fixed syntax, maybe, but I don't know if it is meaningful. This changes two different isotopes at two different points in time and might not be what you intended.
Code:
MATMOD=2,
     1, 1, 1, 1, 92235, 7.0e-2,
     2, 1, 1, 1, 92238, 0.97
 
  • Informative
Likes emilmammadzada
  • #15
Alex A said:
Not sure what you are trying to do here. Number of timesteps = 2. Timestep 1, number of materials =1, material 1, number of isotopes [missing but it clearly should be 1], ZAID1 is U235, C1... Then the same problem with Timestep 2.

This should be an example of a fixed syntax, maybe, but I don't know if it is meaningful. This changes two different isotopes at two different points in time and might not be what you intended.
Code:
MATMOD=2,
     1, 1, 1, 1, 92235, 7.0e-2,
     2, 1, 1, 1, 92238, 0.97
BURN TIME=0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180
MAT=1
POWER=174
PFRAC=1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
OMIT=1, 8, 6014, 7016, 8018, 9018, 90234, 91232, 95240, 95244

I got this error when I did the fuel depletion in specific day steps
BURN TIME=0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 1

bad trouble in mcnpx in routine exemes
input file data beyond column 80.
 
  • #16
MCNP is derived from code that ran on IBM punch card computers, which had 80 char lines.
Comments may not matter but on old versions of the code (they may have fixed this) anything that looks like part of a command cannot go past the 80th char in a line.

This is 80 chars.
01234567890123456789012345678901234567890123456789012345678901234567890123456789
BURN TIME=0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180
Looks fine by eye, but put it in code tags (or count),
Code:
01234567890123456789012345678901234567890123456789012345678901234567890123456789
BURN TIME=0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180
...and it isn't. Just trim it and wrap it around. Five spaces on the next line tells MCNP that it continues the previous line.

Edit,
Btw, the burn times are not total, so what you actually want may be 10, 10, 10, 10, etc
 
Last edited:
  • Informative
Likes emilmammadzada

Similar threads

Replies
5
Views
2K
Replies
3
Views
2K
Replies
7
Views
2K
Replies
2
Views
2K
Replies
7
Views
2K
Replies
4
Views
2K
Replies
2
Views
3K
Back
Top