Help with neutron spectroscopy experiments in MCNP code

Click For Summary
SUMMARY

This discussion focuses on troubleshooting neutron spectroscopy experiments using the MCNP code. The user encountered issues with data cards, specifically with the source definition and geometry errors. Key problems included overlapping cells, incorrect energy definitions, and the need for proper tally configurations. Suggestions included using a Watt fission spectrum for the californium source and ensuring the output files are correctly named and managed.

PREREQUISITES
  • Understanding of MCNP code and its data card structure
  • Familiarity with neutron spectroscopy concepts
  • Knowledge of geometry definitions in MCNP
  • Experience with defining source and tally cards in MCNP
NEXT STEPS
  • Learn about MCNP source definitions and the use of the Watt fission spectrum
  • Research proper geometry setup to avoid overlapping cells in MCNP
  • Study the configuration of tally cards for neutron spectroscopy in MCNP
  • Investigate common errors in MCNP output files and how to resolve them
USEFUL FOR

Researchers and practitioners in nuclear engineering, particularly those working with neutron spectroscopy and MCNP simulations, will benefit from this discussion.

Hamidul
Messages
27
Reaction score
5
Hello everyone, currently I am doing a neutron spectroscopy experiments. I am doing it with the MCNP code. I designed my Geometry there, but facing problems in data cards, is there anyone who can help me in this sector?
 
Engineering news on Phys.org
Welcome to PF.

Can you say what kind of problems you are having in your data cards? The more information you can provide, the better we will be able to help you.
 
  • Like
Likes   Reactions: Hamidul
Thank you Berkeman for your reply. I was not able to run the program, it shows error. The document I uploaded below is my cell and surface card. My californium source is in cell 1 within surface no. 80 . I need to measure surface flux of neutron across surface 111.1 ( helium-3) surface. My source will radiate only from the radial part of 80 number cyllinder..In my experiments , I need to find out neutron spectroscopy. Thank you for your response , for additional information, please reply.
 

Attachments

Last edited:
The sdef card is incomplete, for a simple test a single value of energy will work. Cf sources produce neutrons by spontaneous fission, so a better source definition would use a fission spectrum, does that make sense? There is a good example of a californium source on this forum you could try searching for.

There also seem to be geometry errors. Are you aware that cells must not overlap? All locations must be inside a cell, and no points can be inside more than one cell. I will continue to look at this, I think the problem may be one or more polyethyene cylinders.
 
  • Informative
  • Like
Likes   Reactions: berkeman and Hamidul
Thank you, Alex. I modified the source card and use the surface 80 as the source. But it shows fatal error, illegal antry 0. Nevertheless the code runs, but gives no output !!! If I define the source card as pos=0 0 0 , it shows no fatal errors, but the code does not run !
 

Attachments

  • presentworking.txt
    presentworking.txt
    2.2 KB · Views: 102
  • Screenshot 2023-11-13 111118.png
    Screenshot 2023-11-13 111118.png
    35.3 KB · Views: 133
Does your source need to be a cylinder? That is possible, but complicated. It needs to be constructed from distributions. Surface 80 is composite (it's really three infinite surfaces) which is why that fails.

EXT takes a single variable, which is why the second coordinate in your attempt "0" produces an error.

POS=0 0 0 I think is the default, so just setting an energy should let it work fine as a point source if you want to start with that.

Your tally needs energy bins (an e card) if you want to do spectroscopy on the neutrons.
 
Hello Alex, if I put POS= 0 0 0 , the code does not run ........... :cry: . It shows error in the run section .

would you please see the output file I attatched? I TRY TO RUN THE SAME CODE which shows on this output, but this time it does not work, it shows error. MOREVER , i did not find ant tally in this output file across my desired surface..
 

Attachments

The problem you ran has
Code:
   42-       sdef erg=100 par=1 sur=80 ext=0 0 1.96 rad=0.47                                 
 warning.  ext is constant.  in most problems it is a variable.
 fatal error.  illegal entry:  0
Running just 'sdef erg=100 par=1' should work as explained above.

Your e card is good but it needs to be e2 to match the f2 and they should be together, f2 first.

A minor thing, but erg is in MeV so 100 Mev is quite high for neutrons it does not need fixing now but your high value for the e card should probably exceed 100 to show everything.

Code:
f2:n 111.1
e2 0 224i 101
nps 30000
 
Hello Alex, would you please check the code? It is running but , I did not get any data. In my visual data it shows all the nps .
 

Attachments

  • #10
you have a problem with your library :
try with this material :
m1 98252.60c -1 $MAT1
m2 6000.60c -5e-005 $MAT2
25055. -0.0161 15031. -0.00012 16032. -9e-005
14028. -0.0037 24054. -0.1696 28058. -0.0362
42098. -0.0229 26054. -0.6516
m4 13027. -1 $MAT4
m5 6000.60c -0.000124 $MAT5
7014.60c -0.755268 8016.70c -0.2231781 18040.70c -0.012827
m6 2003. -1 $MAT6
m8 6000. 2 $MAT8
1001.
 
  • Like
Likes   Reactions: Hamidul
  • #11
Hamidul, is outp.txt uploaded in error? It does not contain what I would expect.
 
  • #12
Alex A said:
Hamidul, is outp.txt uploaded in error? It does not contain what I would expect.
No dear , this is exactly the output what I got . I recheck after uploading. This is also a matter of sadness for me for few days !!!
 
  • #13
I have to find out neutron spectroscopy over a surface. Should i use Whatt fission spectrum distribution ?
 
  • #14
PSRB191921 said:
you have a problem with your library :
try with this material :
m1 98252.60c -1 $MAT1
m2 6000.60c -5e-005 $MAT2
25055. -0.0161 15031. -0.00012 16032. -9e-005
14028. -0.0037 24054. -0.1696 28058. -0.0362
42098. -0.0229 26054. -0.6516
m4 13027. -1 $MAT4
m5 6000.60c -0.000124 $MAT5
7014.60c -0.755268 8016.70c -0.2231781 18040.70c -0.012827
m6 2003. -1 $MAT6
m8 6000. 2 $MAT8
1001.
Hi dear, After modifying and running the code I got these output. Do I have any issues with my software?
 

Attachments

  • #15
You are not deleting your out files and run files. So your output file should not be called outp. It might be called outq or outa, or something else, I can't read the screenshot. Are you posting the newest file made by the program?
 
  • Like
Likes   Reactions: Hamidul and PSRB191921
  • #16
for Cf-252 you must simulated a watt spectra:
SDEF erg=d1
SP1 -3 1.025 2.926
 
  • Informative
  • Like
Likes   Reactions: Hamidul and Alex A
  • #17
Alex A said:
You are not deleting your out files and run files. So your output file should not be called outp. It might be called outq or outa, or something else, I can't read the screenshot. Are you posting the newest file made by the program?
actually there was issues with my laptop , code runs here but did not produce any data. I run it to another laptop, it give me data, but that was not enough for getting spectra,
 

Attachments

  • #18
Ohhhhhh! I think you have an incorrect character, most probably in your xsdir file. The line should have "C:\Program Files (x86)\LANL\MCNPDATA" if that is where your cross section files are, but instead of C is something not ASCII, that causes MCNP to break and also gedit to break. It might be unicode.

So open your xsdir file, it should be in the same dir that mcnp is in and the first line should tell mcnp where your cross section files are. Edit that to make it correct.
 
  • Like
Likes   Reactions: Hamidul
  • #19
PSRB191921 said:
for Cf-252 you must simulated a watt spectra:
SDEF erg=d1
SP1 -3 1.025 2.926
I modified the output as of your code
SDEF erg=d1
SP1 -3 1.025 2.926

the output file and the corresponding exel graph is uploaded below
 
  • #20
don't forget your "pos=" and your "par=" in the sdef
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
Replies
5
Views
752
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
562
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
742
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
5
Views
2K